1 | initial version |
With the regular undistortPoints
function you have to pass your camera matrix as the P parameter in addition to passing it as the K parameter to convert the coordinates from -1..+1 back to pixels. I imagine fisheye::undistortPoints
works the same way.
void fisheye::undistortPoints(InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray R=noArray(), InputArray P=noArray())
Here's how I call it:
undistortPoints(thePoints, undistortedPoints, _cameraMatrix, _distortionCoefficients, noArray(), _cameraMatrix);