Is calibration doing what I expect?

asked 2017-07-17 16:10:16 -0500

We are using ArUco markers to calculate the real-world size of objects in an image. Here's a sample test image:

original image

I find the outer corners of the ArUco markers and use warpPerspective to move the board's plane perpendicular to the camera's:

corrected perspective

We've found that we aren't achieving the accuracy we were expecting. (It's hard to tell in these small images, but the sizes of the squares in the grid aren't completely consistent.) We thought that calibrating the camera might help with accuracy so we calibrated using these pictures of a ChArUco board. We modified the calibrate_camera_charuco program to use a collection of still images instead of images captured from a video, but it's otherwise identical.

calibration images

But instead of eliminating distortion as we expected, calling undistort with the calibration values introduces barrel distortion. Here's the same original image after running it through undistort:

undistort with calibration

You can see that the straight edges in the lower-left corner of the board are curved.

My question is why does calibration introduce distortion? Is calibration for some different use case instead of making images more accurate by eliminating distortion as we're assuming?

edit retag flag offensive close merge delete

Comments

1

What are results of calibration (mean square error)? With a charucoboard small part of grid can be hide Ok. That's not a good idea except when you want to calibrate a stereovision system for short distance. Try to use grid images with grid surface/image surface >50% and less 100%.

4 images with 90% (normal board parallel to optical axis) and sampling point EVERYWHERE in images 8 images with 50% (normal board 45° to optical axis) and sampling point EVERYWHERE in images

LBerger gravatar imageLBerger ( 2017-07-18 02:00:09 -0500 )edit

Is "mean square error" the same as "average reprojection error"? Our average reprojection error is usually between 0.6 and 1.5.

I can try again with your suggestion of 4 images at 90% and 8 images at 50%/45°. I'm not sure what you mean by "sampling point EVERYWHERE in images", though.

SSteve gravatar imageSSteve ( 2017-08-07 13:13:06 -0500 )edit