The Stereo Camerae Calibrator having issue with reading the AprilTag patterns

9 ビュー (過去 30 日間)
Chuan Luo
Chuan Luo 2024 年 6 月 24 日
回答済み: Aishwarya 2024 年 7 月 1 日
Hello MathWorks Community,
I am learning how to use the Camera Calibrator and the Stereo Camera Calibrator toolbox with AprilTag patterns. I followed the instruction in page https://www.mathworks.com/help/vision/ug/camera-calibration-using-apriltag-markers.html to famailar with calibraing a single camera with Apriltag patterns. I used the "Camera Calibrator" toobox under the "App" section, As a practise, I just copied the Apriltag patterns within the "aprilTagCalibImages" folder, which was automatically generated as I run the script in the tutorial in the above link, to a seperate folder, saved these images into a seperate folder and selected these pattern for calibration. In this way, the system had no issue with recognizing the AprilTag patterns and performed the calibration.
I then tried to use the "Stereo Camera Calibrator" toolbox under the "App" section to learn how to calibrate a pair of stereo vision camera simutaneously, as I copied and pasted the same set of AprilTagg patterns into two seperate folders, and indicating these two folders containing the image for left and right camera, the system poped out any error message as shown below to indicate that the picture format has some issue.
Had any one meet the similar error before?

回答 (1 件)

Aishwarya
Aishwarya 2024 年 7 月 1 日
Hi Chaun,
The example https://www.mathworks.com/help/vision/ug/camera-calibration-using-apriltag-markers.html shows how to integrate AprilTag pattern as a custom calibration pattern.
The reason you are observing the error is as follows:
  • This example implements a custom “detectPatternPoints” method in the Class “MyCustomAprilTagPatternDetector” to process the calibration image files to detect pattern keypoints to be used for calibration.
  • The “imagePoints” calculated in this example are implemented for single-camera setup and hence returned as M-by-2-by-number of images array.
  • For stereo camera, the imagePoints are required to have additional dimension that is returned as M-by-2-by-number of images-by-number of cameras array. This is the cause for the error you are observing.
To resolve the error, it is required to modify the implementation of “imagePoints” variable in the custom class:
  • In the file “MyCustomAprilTagPatternDetector.m”, locate the “detectPatternPoints” method, which calls “helperDetectAprilTagCorners” function that calculates the “imagePoints” variable.
  • Adjust the implementation of the "imagePoints" for stereo pairs in the “helperDetectAprilTagCorners” function, found in the "helperDetectAprilTagCorners.m" file, so that imagePoints(:,:,:,1) contains the points from the first set of images, and imagePoints(:,:,:,2) contains the points from the second set of images.

カテゴリ

Help Center および File ExchangeCamera Calibration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by