How to interpret actual Camera Intrinsics/Principal Points results?

Hi everyone,
I have a question regarding the results of the MATLAB calibration, particularly the principal points in the camera intrinsics matrix.
I ran a set of 22 images with checkerboard through the MATLAB calibrator and got the Intrinsics parameter below. The image sizes are [2048, 3072]. Correct me if I am wrong, does the results below means that the principal axis/optical centre is so far off the centre of the camera sensor, almost at the boarder of the sensor (bold text)? For comparison, I ran the same set of images through OpenCV calibrations, and got very different results for Intrinsics -- The principal point is off centre in the other corner, but more central. Should I trust the MATLAB results? and if not, what should I do?
MATLAB:
Intrinsics
----------
Focal length (pixels): [45400.9202 +/- 561.3442 45378.6716 +/- 555.5501]
Principal point (pixels):[ 1221.2838 +/- 89.0373 151.5073 +/- 151.2339]
Radial distortion: [ 0.6755 +/- 0.1693 -111.5748 +/- 46.9582 ]
OpenCV:
[ 43799.33953, 0.0000, 2073.60946;
0.0000, 43818.89133, 1603.30986;
0.0000, 0.0000, 1.0000]
Thank you very much!

Answers (1)

The uncertainty values look kind of large to me. I wonder if your 22 images are diverse enough.

8 Comments

Hi Matt,
Thanks for responding!
I attached all 22 images as a montage. I am relatively new to computer vision, and I could not find a good guideline for a good set of calibration images. What I gathered so far was just to cover the entire FOV and tilt the checkerboard patterns at random position. Would that be good enough?
The only thing that stands out to me is that in some of the images the chequer board seems to stray slightly outside the field of view. That might confuse the calibrator, possibly. It might also help to tilt the angle of the checkerboard more strongly in more of the images.
Thank you very much for your answer! I will try that next week. Have a nice weekend!
Hi Matt,
Thank you very much for your suggestion! Following your advice, I finally managed to get one set of sensible calibration results. But it seems not very repeatable. I tried to replicate the position of checkerboard and recaptured several sets of images, and the results vary hugely from sets to sets. And are the error margin still too big, and what should the typical error margin be for a good calibration?
Thank you very much!
Intrinsics (41 images)
----------
Focal length (pixels): [41155.5700 +/- 279.2862 41211.3275 +/- 279.4376]
Principal point (pixels):[ 1099.2522 +/- 180.3130 1114.8149 +/- 103.7599]
Radial distortion: [ -0.7733 +/- 0.1296 189.4656 +/- 73.0149 ]
Intrinsics (45 images)
----------
Focal length (pixels): [41343.5585 +/- 241.3687 41382.5884 +/- 241.1616]
Principal point (pixels):[ 1202.4679 +/- 99.2004 238.5787 +/- 146.9797]
Radial distortion: [ 0.0244 +/- 0.0829 -6.9652 +/- 19.4266 ]
Btw, the reprojection errors are significantly higher in those images in which I tilted the checkerboard at very high angles. Is that to be expected?
I'm really not sure. The camera isn't wobbling, right? Also, are you calibrating programmatically or with the app?
The camera is on a secure mount, and I also try to keep the checkerboard on a steady platform when calibrating. I have tried both the scripts I copied from Mathworks and the calibrator app, but I don't think there is a difference between them.
I downloaded the Caltech Camera Calibration Toolbox and tried their sample image sets. The accuray of both MATLAB and OpenCV are great. So there is definitely something wrong with my setup or the way I took the calibration images.
FYI, I am using a manually adjusted fixed-focal length 100mm lens with not rather poor depth of field. The camera resolution is 2048 x 3072.
I retried another set by increasing the number of rows and column in the checkerboard while keeping everything else same, so that it fills the FOV more. The results are very surprising: the error is still substantial and the focal length changes so much.
Standard Errors of Estimated Camera Parameters
----------------------------------------------
Intrinsics
----------
Focal length (pixels): [51688.0580 +/- 229.5571 51665.9965 +/- 227.8179]
Principal point (pixels):[ 1849.2655 +/- 57.8565 960.1105 +/- 53.5398 ]
Radial distortion: [ 1.4291 +/- 0.2836 -1199.4045 +/- 263.1021]
The best suggestion I can make for now is that you use follow this example,
to detect and verify the checkerboard points yourself. Once it is verified that the corners are being well-detected, we can discuss how to proceed.

Sign in to comment.

Categories

Find more on MATLAB Support Package for USB Webcams in Help Center and File Exchange

Asked:

on 27 Jan 2023

Commented:

on 2 Feb 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!