You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@paroj Thank you for your reply! I found the issue on my side and it might actually be the underlining issue for #2900.
I'm using a 3 Megapixel Camera/Image, I assume the default values for the aruco settings are done for ~VGA resolution. Most parameters are relative to the image resolution, however, the threshold window sizes are not. Thus, the default values are too low and because of this, the thresholding was incorrect.
I visualized the threshold with the default parameter, and my adapted threshold window size parameter (see images below). With that, the detection works reliably. #2900 seems to have the same issue by locking at the inner contours.
Eventually, this can be mentioned in the tutorial, or the parameter could be rendered as relative values, but the pixel to threshold relation is probably not linear.
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:
The text was updated successfully, but these errors were encountered: