This forum is disabled, please visit https://forum.opencv.org

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.

2 | added line spacing |

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.

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.

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.