Skip to content

Fix detect rotated SYMMETRIC_GRID#25258

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
AleksandrPanov:fix_rotated_symmetric_grid
Mar 26, 2024
Merged

Fix detect rotated SYMMETRIC_GRID#25258
asmorkalov merged 1 commit intoopencv:4.xfrom
AleksandrPanov:fix_rotated_symmetric_grid

Conversation

@AleksandrPanov
Copy link
Copy Markdown
Contributor

@AleksandrPanov AleksandrPanov commented Mar 24, 2024

Merge with opencv/opencv_extra#1157
Fixes #24964

This PR fixes isDetectionCorrect() in findCirclesGrid() for SYMMETRIC_GRID.
To isDetectionCorrect() added check rotation of the grid and bool flag rotatedGrid. if rotatedGrid is true, getHoles() transpose the circle grid before return.

Detect pattern with Size(7, 6):
image

Detect pattern with Size(6, 7):
image

Tests in benchmark with params --configuration=generate_run --board_x=7 --board_y=6 --path=res_circle --synthetic_object=circle_sym_grid:
before fix:
image
after fix:
image

Pull Request Readiness Checklist

See details at https://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

@AleksandrPanov AleksandrPanov force-pushed the fix_rotated_symmetric_grid branch from 3f999b4 to eaa88e7 Compare March 25, 2024 11:07
@asmorkalov asmorkalov merged commit 4dc4617 into opencv:4.x Mar 26, 2024
@asmorkalov asmorkalov mentioned this pull request Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

findCirclesGrid can't detect rotated SYMMETRIC_GRID

2 participants