OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Wed, 14 Aug 2019 01:24:21 -0500Solvepnp for fisheyehttp://answers.opencv.org/question/208634/solvepnp-for-fisheye/Hi,
I was following a [page](http://answers.opencv.org/question/67356/is-there-a-solvepnp-function-for-the-fisheye-camera-model/) to use solvepnp with a fisheye model. However, the answer suggests using the same camera matrix for the last input of undistortPoints function. This last input corresponds to the camera matrix in the new or rectified frame. How can we consider this matrix to be the same as the original camera matrix? Also, how can we use the rvec and tvec would correspond to undistorted corner points. Will this be the same as the rvec and tvec for the originally distorted image?
Thanks!Sun, 10 Feb 2019 19:22:19 -0600http://answers.opencv.org/question/208634/solvepnp-for-fisheye/Answer by V for <p>Hi, </p>
<p>I was following a <a href="http://answers.opencv.org/question/67356/is-there-a-solvepnp-function-for-the-fisheye-camera-model/">page</a> to use solvepnp with a fisheye model. However, the answer suggests using the same camera matrix for the last input of undistortPoints function. This last input corresponds to the camera matrix in the new or rectified frame. How can we consider this matrix to be the same as the original camera matrix? Also, how can we use the rvec and tvec would correspond to undistorted corner points. Will this be the same as the rvec and tvec for the originally distorted image?</p>
<p>Thanks!</p>
http://answers.opencv.org/question/208634/solvepnp-for-fisheye/?answer=216921#post-id-216921undistortPoints unapplies the first camera matrix and applies the second camera matrix. If the same camera matrix is used, that means the camera view is the same, except distortion is removed at that view. rvec and tvec relate the undistorted 2D camera coordinates to 3D world coordinates. You can't use rvec and tvec for a distorted image, but the rvec/tvec solution you get from solvePnP on rectified coordinates is meant to be the same as the solution from calibrateCamera, at least under ideal conditions.Wed, 14 Aug 2019 01:24:21 -0500http://answers.opencv.org/question/208634/solvepnp-for-fisheye/?answer=216921#post-id-216921