Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

@AleksandrPanov
Copy link
Contributor

@AleksandrPanovAleksandrPanov commentedOct 3, 2023
edited by asmorkalov
Loading

Fixes#24113
cornerRefinementMethod=CORNER_REFINE_SUBPIX does not work correctly with markers that are too close to each other.

NowcornerRefinementWinSize is recalculated for each marker as:
cornerRefinementWinSize = min(cornerRefinementWinSize, averageArucoPinSize*relativeCornerRefinmentWinSize)
relativeCornerRefinmentWinSize=0.3 by default and could be changed

image

Also the method has been tested by thebenchmark, 289 aruco boards like this were tested:

perspective_none_gaussNoise_33

command line to generate and run (also need set cornerRefinementMethod: 1 and cornerRefinementWinSize: 10 in aruco_params.yml):

objdetect_benchmark.py --marker_length_rate=0.1 --board_x=6 -p=res --rel_center_y=0.53 --rel_center_x=0.56 --synthetic_object=aruco

tested with cornerRefinementWinSize=10
error in pixels withold cornerRefinementMethod:
image
mean detected error in pixels 5.912010732442689

error in pixels withnew cornerRefinementMethod:
image
mean detected error in pixels 0.991642490414958

command line to show histogram:

--configuration=show -d1=old.json --marker_length_rate=0.1 --board_x=6 -p=res --rel_center_y=0.53 --rel_center_x=0.56 --synthetic_object=aruco

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

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

asmorkalov reacted with hooray emoji
@asmorkalovasmorkalov added this to the4.9.0 milestoneOct 3, 2023
@AleksandrPanovAleksandrPanovforce-pushed thedynamic_window_in_aruco_cornerRefinement branch from2438a78 to6b1e3b0CompareOctober 6, 2023 00:00
@AleksandrPanovAleksandrPanov marked this pull request as ready for reviewOctober 6, 2023 00:38
* 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;
Copy link
Contributor

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.

AleksandrPanov reacted with thumbs up emoji
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

@AleksandrPanovAleksandrPanovforce-pushed thedynamic_window_in_aruco_cornerRefinement branch from6b1e3b0 to663f4baCompareOctober 6, 2023 13:00
@AleksandrPanovAleksandrPanovforce-pushed thedynamic_window_in_aruco_cornerRefinement branch from663f4ba tofd4af21CompareOctober 6, 2023 13:44
Copy link
Contributor

@asmorkalovasmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

@victor1234
Copy link
Contributor

@AleksandrPanov what is the peak at 10px?

@AleksandrPanov
Copy link
ContributorAuthor

AleksandrPanov commentedOct 16, 2023
edited
Loading

@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.
detected: 10359 markers, total: 10368 markers

@victor1234
Copy link
Contributor

Chebyshev distance

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
Copy link
Contributor

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.

@asmorkalovasmorkalov mentioned this pull requestOct 17, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asmorkalovasmorkalovasmorkalov approved these changes

Assignees

@asmorkalovasmorkalov

Projects

None yet

Milestone

4.9.0

Development

Successfully merging this pull request may close these issues.

Incorrect aruco board corners refinement withCORNER_REFINE_SUBPIX

3 participants

@AleksandrPanov@victor1234@asmorkalov

[8]ページ先頭

©2009-2025 Movatter.jp