Reputation: 1549
"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 this 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.
Upvotes: 1
Views: 1644
Reputation: 10728
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.
Upvotes: 3