Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Stereo Calibration: Return rotation and transformation vectors for each calibration object#22519
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
Stereo Calibration: Return rotation and transformation vectors for each calibration object#22519
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…w rotation and translation vectors between the calibration object coordinate space and the coordinate space of the first camera of the stereo pair. Added overloaded versions of the function for downward compatibility.
…w rotation and translation vectors between the calibration object coordinate space and the coordinate space of the first camera of the stereo pair. Added overloaded versions of the function for downward compatibility.
asmorkalov commentedSep 15, 2022
/cc@ivashmak |
savuor 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.
These changes should also be ported to 5.x (taking into account all the recent refactoring)
asmorkalov commentedSep 19, 2022
/cc@vpisarev |
alalek commentedJan 8, 2023
@savuor@asmorkalov There is still no port of this patch to "5.x" branch. |
| rvecs.create(3,1, CV_64F, i,true); | ||
| tvecs.create(3,1, CV_64F, i,true); | ||
| memcpy(rvecs.getMat(i).ptr(), rvecs1[i].val,sizeof(Vec3d)); | ||
| memcpy(tvecs.getMat(i).ptr(), tvecs1[i].val,sizeof(Vec3d)); |
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.
rvecs.getMat(i).ptr()
There is no guarantee (and no checks) of contiguous memory layout.
asmorkalov commentedJan 9, 2023
@savuor Please port the patch to 5.x manually. |
### Changes* Port of#22519 to 5.x* Distortion coefficients were not copied properly, fixed* Minor coding style chages### Pull Request Readiness ChecklistSee details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request- [x] I agree to contribute to the project under Apache 2 License.- [x] 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- [x] The PR is proposed to the proper branch- [x] There is a reference to the original bug report and related work- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name.- [x] The feature is well documented and sample code can be built with the project CMake
Motivation for feature
Extension of stereoCalibrate function for both, pinhole and fisheye model, to return the translation and rotation vectors between each calibration object and the coordinate system of the first camera of the stereo pair. This feature is helpful to evaluate the individual image pairs used for calibration. This feature is in particular interesting for the fisheye model since its stereoCalibrate function has not provided a parameter to obtain the reprojection errors per stereo image pair. With these per-view transformations available, it is now possible to calculate these reprojection errors. In addition, for the pinhole model, it is also interesting to not only get the per-view rms errors, but also statistics within one view.
For the implementation, the single camera calibration methods were used as example and all previous available function calls should still work.
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.