필터 지우기
필터 지우기

The Stereo Camerae Calibrator having issue with reading the AprilTag patterns

조회 수: 29 (최근 30일)
Chuan Luo
Chuan Luo 2024년 6월 24일 7:18
답변: Aishwarya 2024년 7월 1일 18:48
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일 18:48
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 CenterFile Exchange에서 Camera Calibration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by