Merged
Conversation
f467f0a to
4b7d030
Compare
4b7d030 to
10c188c
Compare
asmorkalov
approved these changes
Jan 18, 2023
asmorkalov
requested changes
Jan 23, 2023
modules/aruco/src/aruco.cpp
Outdated
| // get object and image points for the solvePnP function | ||
| Mat objPoints, imgPoints; | ||
| board->matchImagePoints(charucoCorners, charucoIds, objPoints, imgPoints); | ||
| solvePnP(objPoints, imgPoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess); |
Contributor
There was a problem hiding this comment.
solvePnP throws exception, if there are no enough points.
Contributor
Author
There was a problem hiding this comment.
added points check:
if(charucoIds.getMat().total() < 4) return false;
Contributor
There was a problem hiding this comment.
I propose to add try-catch block and return false in case of exception. The function did not throw exceptions before and should not do it after the PR.
Contributor
Author
There was a problem hiding this comment.
Add try catch:
try {
solvePnP(objPoints, imgPoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess);
}
catch (const cv::Exception& e) {
CV_LOG_WARNING(NULL, "estimatePoseCharucoBoard: " << std::endl << e.what());
return false;
}
10c188c to
fc0af69
Compare
fc0af69 to
1f713fb
Compare
asmorkalov
approved these changes
Jan 26, 2023
Merged
Merged
|
This caused a regression in interpolateCornersCharuco, which does not detect the markers anymore. |
Contributor
|
@AleksandrPanov could you take a look? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed charuco duplication after move aruco to main repo.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.