Skip to content

aruco.detectMarkers() fails at a certain angle while the image is perfect #24220

@00ffcc

Description

@00ffcc

System Information

opencv-contrib-python :4.6.0.66
opencv-python:4.7.0.72
system:windows 11
python:3.10

Detailed description

aruco.detectMarkers() fails at a certain angle while the image is perfect
0GIHPVAQE)95Y9CE1WDORN6
It should be ok for opencv to detect this marker as aruco.detectMarkers() performed well when I rotated the marker.

Steps to reproduce

import cv2
arucoDict = cv2.aruco.Dictionary_get(cv2.aruco.DICT_4X4_50)
arucoParams = cv2.aruco.DetectorParameters_create()
# arucoParams.adaptiveThreshConstant=10 #I have tried all these parameters
arucoParams.adaptiveThreshWinSizeStep=3
arucoParams.adaptiveThreshWinSizeMax=80
arucoParams.aprilTagMaxNmaxima=40
# arucoParams.aprilTagCriticalRad=0
# arucoParams.aprilTagMinClusterPixels=0
arucoParams.maxErroneousBitsInBorderRate=0.4
# arucoParams.errorCorrectionRate=0.8
arucoParams.perspectiveRemoveIgnoredMarginPerCell=0.3
arucoParams.polygonalApproxAccuracyRate=0.1
arucoParams.maxMarkerPerimeterRate =4
arucoParams.minCornerDistanceRate=0
arucoParams.minDistanceToBorder=0
mask=cv2.imread('failmask.png')
img=cv2.imread('failimg.png')
(corners, ids, rejected) = cv2.aruco.detectMarkers(mask, arucoDict,parameters=arucoParams)
print(ids)

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions