Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi i got it to work for me, u can try the same =). Since ther is no function to compute pose on fisheye lens, and the solvePnP performes the lens correction internaly, what i did was this:

im working with a chessboard , and findchessboard function.

bool patternfound = findChessboardCorners(gray, patternsize, corners_distorted,
                                                              //CALIB_CB_ADAPTIVE_THRESH +
                                                              //CALIB_CB_NORMALIZE_IMAGE +
                                                              CALIB_CB_FAST_CHECK);  
cornerSubPix(corners_distorted,corners,....);
fisheye::undistortPoints ( corners_distorted, corners, cameraMatrix, distCoeffs , cameraMatrix);

after i have the corrected chessboard corners, i create a fake_distorcion vector, and use solvepnp with that distorcion vector.

 Mat fake_distCoeffs = (Mat_<double>(4,1) << 0, 0, 0, 0);
 solvePnP(points, corners, cameraMatrix, fake_distCoeffs, rvec, tvec,false,CV_EPNP);

And this got it working. my camera lens is 110ยบ FOV, and i also got it to work with the normal model, but in both solvepnp as lot of error , i will try to improve the intrinsic parameters and other methods on solvpnp.

here is a screenshot of the chessboard corners on the camera frame. image description

=)