Incorrect result from camera calibrator app

14 Ansichten (letzte 30 Tage)
cr
cr am 18 Mär. 2024
Kommentiert: cr am 1 Apr. 2024 um 10:42
I used the camera calibrator app to calibrate lens distortion and I specified correct checkerboard size of 8mm. The calibration goes fine and i'm able to undistort images and points. However, the plot from showextrinsics() shows camera at 8mm distance from object but in reality it is 140mm. Why is this wrong?
My setup has a camera looking downwards and pattern is placed at the same working distance in all 30+ images where the lens is focused.
Calibration settings: All default settings - Standard lens, 2 coeffs, no tangential distortion, no skew, etc.
  4 Kommentare
Giridharan Kumaravelu
Giridharan Kumaravelu am 19 Mär. 2024
Would you mind providing us with the calibration images to help troubleshoot this behavior?
cr
cr am 19 Mär. 2024
Bearbeitet: cr am 19 Mär. 2024
The folder is a little too big to be attached as a zipped file. Here is a link to google drive.
I do not recall if this is the exact same set of images yielding the results I shared above, but all 3 sets I have produced similar results in all aspects.
Thanks & Regards

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Giridharan Kumaravelu
Giridharan Kumaravelu am 22 Mär. 2024
Bearbeitet: Giridharan Kumaravelu am 22 Mär. 2024
Thanks for providing the calibration images. This is a limitation of the technique (Zhang's algorithm) that camera calibrator app uses, that it cannot calibrate a camera with calibration images that are coplanar. To accurately calibrate a camera with the app, you need some variance in the calibration images in the z-direction. Even a little wiggle in the z direction could avoid this degenerate configuration.
  3 Kommentare
Giridharan Kumaravelu
Giridharan Kumaravelu am 29 Mär. 2024 um 14:53
The camera calibration algorithm in MATLAB jointly optimizes for the intrinsics (including distortion parameters) and extrinsics. So, all the results are degenerate and invalid although the undistortion may look normal.
If you are in a position to vary the z-distances, you might as well capture the calibration images by varying the z-distance and you can arrive at the correct pixel-to-mm.
With respect to your questions related to the example, here is a typical workflow of measuring planar objects:
  1. Calibrate the camera for intrinsics in any location.
  2. Calibrate the camera for extrinsics in the workplace with the known intrinsics from step 1 and with the help of calibration pattern. Do not move the camera after this step to avoid invalidating the extrinsics. (Extrinsics is the relative position of the camera w.r.t the calibration pattern).
  3. You can remove the calibration pattern and start measuring planar objects that are in the same plane as the calibration pattern.
To answer your question, the estimations will still be accurate even if the checkerboard is removed after step 2 mentioned above. But if the camera is moved after step 2, then you need repeat step 2 to accurately measure objects.
It is true that you can gauge distances to "planar" objects, after calibration step but only with the help of a calibration target like a checkerboard or an apriltag.
cr
cr am 1 Apr. 2024 um 10:42
Giridharan
Thanks for the detailed answers.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Support Package for USB Webcams finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by