Question

I am using OpenCV to record pointclouds from Kinect and other cameras. To sync the pointclouds together, I want to use a 3D calibration rig and cv::estimateAffine3D(). However, OpenCV throws this strange exception at me when I try to use the function:

OpenCV Exception: C:\Tools\opencv\modules\core\src\matrix.cpp:1466: 
error: (-215) mtype == type0 || (CV_MAT_CN(mtype) == CV_MAT_CN(type0) && 
((1 << type0) & fixedDepthMask) != 0)

I cannot figure out what the exception text wants to tell me and Google gives no relevant results, maybe someone else knows more than me on that matter. Thank you!

EDIT: This is my call to the function:

cv::Mat affine;

std::vector<cv::Point> inliers;

cv::estimateAffine3D(camPoints,objPoints,affine,inliers,5.0,0.96);

where both camPoints and objPoints are std::vector<cv::Point3f> types, camPoints being the corners that findChessboardCorners returns (reprojected to 3D camera space) and objPoints simply a vector denoting the same corners in object space, in this case it's contents look like this: (0,0,0),(40,0,0),(80,0,0),...,(0,40,0),(40,40,0),(80,40,0)...(0,200,0),(40,200,0),(80,200,0)

Was it helpful?

Solution

Apparently, the function that gave me the reprojected chessboard corners was faulty (but worked fine before). Apparently, this exception want to say that something is not quite right with the input points, in my case all the camPoints were (0,0,0).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top