Camera Calibration with AprilTags not working with png image datafile

6 ビュー (過去 30 日間)
Andrew Roley
Andrew Roley 2021 年 1 月 8 日
回答済み: Vinoth Venkatesan 2021 年 2 月 5 日
I'm trying to follow this example.
In both MATLAB online and 2020b, I get the following error when trying to detect tags in my calibration images:
Matrix index is out of range for deletion.
Error in CalibrateCameraUsingAprilTagBasedPatternExample>helperDetectAprilTagCorners (line 161)
imagePoints(:,:,idx) = [];
I have passed imdsCalib my filetype as described here.
I want to use pngs for calibration because I want the most accurate calibration possible, and intend to use pngs for detection, again for the most accurate detections possible. Is there something I'm doing wrong? Or is this not possible at all?
Thank you for any and all help!
  1 件のコメント
Andrew Roley
Andrew Roley 2021 年 1 月 12 日
So I ended up adding a few statements to diagnose what was happening right before the problematic line 161, and this was helpful:
numel(tagIds)
It prints the number of tags identified in the particular image that is being parsed through. I seemed to get this problem only after multiple poor detections with less than the expected number of tags, and it seemed to happen on the second to last image, which was very odd.
I then went through and individually deleted those files without the full tags detected, and it worked from there. I wouldn't call this a "solution", moreso a workaround, so I'm leaving the question unanswered until someone with better knowledge than I can comment.

サインインしてコメントする。

回答 (2 件)

Amrtanshu Raj
Amrtanshu Raj 2021 年 2 月 5 日
Hi,
I have brought this issue to the notice of our developers. They will investigate the matter further.

Vinoth Venkatesan
Vinoth Venkatesan 2021 年 2 月 5 日
Hi Andrew,
This is a bug in a helper function that is part of the example. Please replace the helperDetectAprilTagCorners function at the end of the example file (CalibrateCameraUsingAprilTagBasedPatternExample.mlx) with the function attached here to resolve the issue.
Thanks, Vinoth

カテゴリ

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