Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
fix charuco matchImagePoints#23138
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
42d97fa tob9dbe13Compare69f69e8 toa0ff116Compared6b393b to9bf43c3CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ce709d5 toed8a99dCompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ed8a99d to697b2ecCompare
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.
👍 Looks good!
alalek 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.
From what other part of OpenCV code did you bring that design pattern?
Looks like we have malformed API design -InputArrayOfArrays is misused here.
/cc@vpisarev
Accessing elements without type checks must be avoided.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
be2be26 to605fbf9CompareAleksandrPanov commentedFeb 16, 2023
I fixed most of the issue (also updated docs, added cpp test). The issue of |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
bc0cb3b to890522aCompare890522a to4ba06c3Compare
Uh oh!
There was an error while loading.Please reload this page.
The problem was in python bindings in
void matchImagePoints(InputArrayOfArrays detectedCorners, InputArray detectedIds, OutputArray objPoints, OutputArray imgPoints).detectedCornersmay include aruco marker corners asvector<vector<Point2f>>orvector<Mat>. AnyMatinvector<Mat>must have 4 rows for 4 corners for one marker (one marker has 4 corners).detectedCornersmay include Charuco corners asvector<Point2f>orMat. Python bindings add extra dimension todetectedCornersand thereforevector<Mat>case is additionally processed for charuco corners.Until the PR merge, you can using custom
matchImagePoints():Use sample from#23139 to see problem.
args:
-w=5 -h=7 -sl=0.04 -ml=0.02 -d=10 -v=choriginal.jpg
With fix:

detectedCornersincludes charuco corners in this case. Python bindings add extra dimension todetectedCornersand therefore without fixdetectedCornersprocessed as aruco marker corners andmatchImagePointsreturns bad values: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.