Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

the solvePnP() method takes the following as input : vector<point3f> ObjectPoints, vector<point2f> imagePoints, Mat cameraMatrix, Mat distortionCoeffs, Mat rvec, Mat tvec

The parameters you seem to be passing are:

vector<vector<point3f> > boardPoints, vector<mat> intrinsics, vector<mat> distortion, vector<mat> rvec, vector<mat> tvec

solvePnP() doesn't implicitly convert vector<vector<t> > to vector<t> like the calibrateCamera() method does, try to pass the parameters iteratively, it will work. Someone should include this in the documentation to avoid confusion.

the solvePnP() method takes the following as input : :

vector<point3f> ObjectPoints, vector<point2f> imagePoints, Mat cameraMatrix, Mat distortionCoeffs, Mat rvec, Mat tvec

The parameters you seem to be passing are:

vector<vector<point3f> > boardPoints, vector<mat> intrinsics, vector<mat> distortion, vector<mat> rvec, vector<mat> tvec

solvePnP() doesn't implicitly convert vector<vector<t> > to vector<t> like the calibrateCamera() method does, try to pass the parameters iteratively, it will work. Someone should include this in the documentation to avoid confusion.

click to hide/show revision 3
forgot one parameter in answer

the solvePnP() method takes the following as input :

vector<point3f> ObjectPoints, vector<point2f> imagePoints, Mat cameraMatrix, Mat distortionCoeffs, Mat rvec, Mat tvec

The parameters you seem to be passing are:

vector<vector<point3f> > boardPoints, vector<point2f> boardCorners, vector<mat> intrinsics, vector<mat> distortion, vector<mat> rvec, vector<mat> tvec

solvePnP() doesn't implicitly convert vector<vector<t> > to vector<t> like the calibrateCamera() method does, try to pass the parameters iteratively, it will work. Someone should include this in the documentation to avoid confusion.