OpenCV-"Homogeneous coordinates are not supported" when using cvProjectPoints2
"OpenCV Error: Bad argument (Homogeneous coordinates are not supported ) in unknown function, file ......\modules\calib3d\src\calibration.cpp, line 826"
I think I'm getting t开发者_开发技巧his error when passing the following matrix into cvProjectPoints2() function
CvMat *dstPoints2D = cvCreateMat (4, 1, CV_32FC3);
cvProjectPoints2(srcPoints3D,rotation,translation,intrinsic_matrix,NULL,dstPoints2D);
I'm using OpenCV 2.3.0
Full code: http://pastebin.com/TYthn6Nt
Thanks in advance.
The output needs to be two channels. Change the declaration to CvMat *dstPoints2D = cvCreateMat (4, 1, CV_32FC2);
and you won't get the error.
精彩评论