KammutierSpule
KammutierSpule

Reputation: 119

openCV calibration results on a more distorted image

I am doing an OpenCV calibration but the undistort result is not what I expect. It looks more distorted than the original image. I am using just one calibration image as I found other people doing similar approach but I also tried with multiple square images pattern.

Here are some details of what I'm doing:

calibrationFlags = cv::CALIB_FIX_K4 | CALIB_FIX_K5

using calibrateCamera and the undistort function.

cv::undistort( InputImage, OutputImage, cameraMatrix, distCoeffs, cameraMatrix );

I tried already with initUndistortRectifyMap and getOptimalNewCameraMatrix but the results are also similar.

What am I missing?

Here are the original and undistort images:

Original Matched points Undistort

Upvotes: 0

Views: 372

Answers (1)

KammutierSpule
KammutierSpule

Reputation: 119

I found the issue: I was using a half resolution image for calibration and then use a full resolution to apply the undistortion. All images in the process must (?) have the same resolution.

Upvotes: 1

Related Questions