I saw that OpenCV's solvePnP() function assume that your camera parameters are from a pinhole model. But I calibrated my camera using cv.fisheye
module, so I wanted to know how to use solvePnP with parameters obtained from that fisheye module.
How can I use my fisheye camera parameters with solvePnP()
?
According to docs.opencv.org, you have {K, D, rvecs, tvecs} from cv::fisheye::calibrate()
.
You can remove the effect of K and D from the input coordinates distorted
using cv.fisheye.undistortPoints()
See here.
So the routine must be:
undistorted = cv.fisheye.undistortPoints(distorted, K, D)
cv.solvePnP(objPoints, undistorted, I, D)
where I=np.eye(3), D=np.zeros((1,5))
good luck