Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MaximSmolskiy
Copy link
Contributor

@MaximSmolskiy MaximSmolskiy commented Dec 27, 2023

Pull Request Readiness Checklist

corners and neighbors indices means not filling order, but relative position. So, for example if quad->count = 2, it doesn't mean that quad->neighbors[0] and quad->neighbors[1] are filled. And we should should iterate over all four neighbors.

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

@asmorkalov asmorkalov added the pr: needs test New functionality requires minimal tests set label Dec 27, 2023
@asmorkalov
Copy link
Contributor

@MaximSmolskiy Could you add some test to highlight the problem. I need time to understand the code and issue root.

@MaximSmolskiy
Copy link
Contributor Author

@MaximSmolskiy Could you add some test to highlight the problem. I need time to understand the code and issue root.

@asmorkalov I checked this pr on hundreds of images and there were no changes in quality/accuracy.
But we checked some part of corners when comment and intuition say that we should check all corners.
You can add CV_Assert(closest_quad->neighbors[j]); and it should fail and then it mean that we miss some corners during this check

@AleksandrPanov AleksandrPanov self-assigned this Jan 10, 2024
@MaximSmolskiy
Copy link
Contributor Author

@asmorkalov @AleksandrPanov gentle ping

@MaximSmolskiy
Copy link
Contributor Author

@asmorkalov @AleksandrPanov gentle ping

@AleksandrPanov
Copy link
Contributor

@MaximSmolskiy, I will check this PR today, and test the benchmark

@MaximSmolskiy
Copy link
Contributor Author

@AleksandrPanov Any updates?

@MaximSmolskiy
Copy link
Contributor Author

@asmorkalov @AleksandrPanov ping

Copy link
Contributor

@AleksandrPanov AleksandrPanov left a comment

Choose a reason for hiding this comment

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

Tested with benchmark:
--configuration=generate_run --board_x=7 --path=res_chessboard --synthetic_object=chessboard

Before PR fix:
image

After PR fix:
image

There are no regressions.

@AleksandrPanov AleksandrPanov removed the pr: needs test New functionality requires minimal tests set label Feb 5, 2024
@AleksandrPanov
Copy link
Contributor

@asmorkalov, I propose to merge this PR.

Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov asmorkalov added this to the 4.10.0 milestone Feb 6, 2024
@asmorkalov asmorkalov merged commit 28d22d7 into opencv:4.x Feb 6, 2024
@MaximSmolskiy MaximSmolskiy deleted the fix-bug-in-ChessBoardDetector-findQuadNeighbors branch February 6, 2024 13:17
@asmorkalov asmorkalov mentioned this pull request Feb 8, 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.

3 participants