我有一个通过cvWarpPerspective的3x3转换矩阵,我想提取四个角坐标值。
CvMat* M;
M = xxxxxxxxxxx ;// Matrix was generated by a certain process
cvWarpPerspective( img, transformed, M, CV_INTER_LINEAR + CV_WARP_FILL_OUTLIERS, cvScalarAll( 0 ) ); //
最佳答案
只需将您每个预变形的角值乘以均质格式(例如(0,0,0,1)(width,0,0,1)(0,height,0,1),(width,height,0, 1))通过透视矩阵获得变换后的坐标。
https://stackoverflow.com/questions/2864942/