codeforge
codeforge

Reputation: 61

fisheye::estimateNewCameraMatrixForUndistortRectify opencv

I'm using this function to undistort images from a fisheye camera and it's very good as result, but i cannot find the skew coefficent to reduce the undistorsion.

With cameras without fisheye I use:

getOptimalNewCameraMatrix

where the alpha can control the scaling of the result from 0 to 1.

But in

fisheye::estimateNewCameraMatrixForUndistortRectify

I cannot understand how to do.

Anyone can suggest how to do?

Upvotes: 2

Views: 2795

Answers (1)

OpenCV (for fisheye or non-fisheye cameras) uses model that based on pin-hole camera model. In case of non-fisheye camera you can undistort 100% of initial image. But for fisheye camera with FOV ~ 180 degrees, undistorted image will have infinite size. So, fisheye::estimateNewCameraMatrixForUndistortRectify just calculates some "reasonable" zooming factor and doesn't let you set 100% of undistorted image surface.

Upvotes: 3

Related Questions