开发者

OpenCV-"Homogeneous coordinates are not supported" when using cvProjectPoints2

开发者 https://www.devze.com 2023-04-09 17:17 出处:网络
\"OpenCV Error: Bad argument (Homogeneous coordinates are not supported ) in unknown function, file ......\\modules\\calib3d\\src\\calibration.cpp, line 826\"

"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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号