-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
System information (version)
-
OpenCV 4.2.* and 4.5.1
-
Operating System: Linux Ubuntu 64 Bit
-
Tag family is: DICT_7X7_250
-
Image resolution: 2056x2542
-
Images are grayscale
Detailed description
This issue concerns the implementation of the ARUCO marker detection. I observed, that the corner-detection / detection of squares in the image shows incorrect results. This issue is especially visible with bigger tag sizes (e.g. 0.3-0.5 meters). It appears that the corners or the squares are detected 2/3 into the outer border of the marker which results in incorrect height information. This issue does not occur in all conditions and seems especially related to the orientation of the tags. If the sides of the tag are aligned with the image frame (which basically means that the yaw rotation of the tag is a multiple of 90°) then this issue does not occur (compare attached image zero_yaw_rot.png). However, if the orientation is ~30-60°, then the size of the tag is incorrect (see image non_zero_yaw_rot.png below).
The sizes of the tags in image are [id, size in meter]:
"97: 0.15, 98: 0.15, 99: 0.3, 100: 0.1, 101: 0.15, 102: 0.5, 103: 0.15, 104: 0.1, 105: 0.3, 106: 0.15, 107: 0.15"
I verified that this is not only a problem in visualization, the height information does actually change if the issue occurs. A quick workaround was to transform the grayscale images into black and white images which results in correct detections.
I'm using a ROS package (https://github.com/UbiquityRobotics/fiducials) which implements the aruco detection with OpenCV. However, the attached python script will produce similar results.
tag_issue_images.zip
tag_detect_issue.py.zip
ID 102, the middle tag is detected incorrect:
ID105, the tag to the right, is detected incorrect: