Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Aruco (diamonds) not working on bigger images. Which parameters to tune?


somehow detecting charuco diamonds does not work with bigger images for me. With my original images of 1920x1080 it neither recognizes the ids reliably (the diamond ids elements are switching places every time). In the first image, you can see it recognizes (7, 9, 45, 2).

Then I tried downsampling the images to 960x540, and dividing the calibration params, f, c, to half, and it works! The id is correctly recognized as (2,7,45,9) and the pose estimation is accurate.

How to make it work for bigger images? I tried changing the detection parameters depending on absolute pixel units (not relative to image size). Here is a list of my current parameters.

nmarkers: 1024
adaptiveThreshWinSizeMin: 13
adaptiveThreshWinSizeMax: 43
adaptiveThreshWinSizeStep: 10
adaptiveThreshWinSize: 42
adaptiveThreshConstant: 7
minMarkerPerimeterRate: 0.1
maxMarkerPerimeterRate: 4.0
polygonalApproxAccuracyRate: 0.05
minCornerDistance: 10.0
minDistanceToBorder: 10
minMarkerDistance: 10.0
minMarkerDistanceRate: 0.05
doCornerRefinement: false
cornerRefinementWinSize: 5
cornerRefinementMaxIterations: 30
cornerRefinementMinAccuracy: 0.1
markerBorderBits: 1
perspectiveRemovePixelPerCell: 8
perspectiveRemoveIgnoredMarginPerCell: 0.13
maxErroneousBitsInBorderRate: 0.04
minOtsuStdDev: 5.0
errorCorrectionRate: 0.6

Any hints?

thank you!

image description

image description