Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
add dynamic window in aruco cornerRefinement#24355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
add dynamic window in aruco cornerRefinement#24355
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
2438a78 to6b1e3b0Compare| * In the case of markers located far from each other, it may be useful to increase the value of the parameter to 0.4-0.5. | ||
| * In the case of markers located close to each other, it may be useful to decrease the parameter value to 0.1-0.2. | ||
| */ | ||
| CV_PROP_RWfloat minCornerRefinementWinSizeInPin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I propose to name the field asrelativeCornerRefinmentWinSize. And add information about avarage Aruco pin size and logic to the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
renamed torelativeCornerRefinmentWinSize:
/** @brief minimum allowed window size for the corner refinement process (in pins of ArUco marker) (default 0.3). * * cornerRefinementWinSize is recalculated for each marker as: * cornerRefinementWinSize = min(cornerRefinementWinSize, averageArucoModuleSize*relativeCornerRefinmentWinSize), * where averageArucoModuleSize is average module size of ArUco marker in pixels. * (ArUco marker is composed of black and white modules) * In the case of markers located far from each other, it may be useful to increase the value of the parameter to 0.4-0.5. * In the case of markers located close to each other, it may be useful to decrease the parameter value to 0.1-0.2. */ CV_PROP_RW float relativeCornerRefinmentWinSize;AleksandrPanov commentedOct 6, 2023
6b1e3b0 to663f4baCompare663f4ba tofd4af21Compare
asmorkalov left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍
victor1234 commentedOct 16, 2023
@AleksandrPanov what is the peak at 10px? |
AleksandrPanov commentedOct 16, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@victor1234, all markers detected with an error of 10 pixels or more are marked as undetected. These markers make a peak of 10 pixels. The error calculate as the Chebyshev distance between the gold marker and the detected marker. |
victor1234 commentedOct 16, 2023
I would say that mean error (=1px) on synthetic data for subpixel method is high. And outliers with error > 1 are also look strange. Do you know the reason? |
asmorkalov commentedOct 16, 2023
Several groups of images are blured. Also the benchmark adds color noise on top of the image like pepper-solt augmentation. Current hypothesis is related to this. We make experiments right now and analyze the detector code to prove it. |
Uh oh!
There was an error while loading.Please reload this page.
Fixes#24113
cornerRefinementMethod=CORNER_REFINE_SUBPIX does not work correctly with markers that are too close to each other.
Now
cornerRefinementWinSizeis recalculated for each marker as:cornerRefinementWinSize = min(cornerRefinementWinSize, averageArucoPinSize*relativeCornerRefinmentWinSize)relativeCornerRefinmentWinSize=0.3 by default and could be changed
Also the method has been tested by thebenchmark, 289 aruco boards like this were tested:
command line to generate and run (also need set cornerRefinementMethod: 1 and cornerRefinementWinSize: 10 in aruco_params.yml):
tested with cornerRefinementWinSize=10

error in pixels withold cornerRefinementMethod:
mean detected error in pixels 5.912010732442689
error in pixels withnew cornerRefinementMethod:

mean detected error in pixels 0.991642490414958
command line to show histogram:
new.json.txt
old.json.txt
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.