Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cv::omnidir::stereoRectify returns wrong R2. #2787

Closed
dzywater opened this issue Dec 12, 2020 · 1 comment · Fixed by #2890
Closed

cv::omnidir::stereoRectify returns wrong R2. #2787

dzywater opened this issue Dec 12, 2020 · 1 comment · Fixed by #2890

Comments

@dzywater
Copy link
Contributor

Recently, I used cv::stereoRectify, cv::fisheye::stereoRectify and cv::omnidir::stereoRectify.

I found that cv::omnidir::stereoRectify returned R2 which could not get stereo images with epipolar constraint.

So I checked theirs sources.

I think that cv::omnidir::stereoRectify has a mistake.

That is omnidir.cpp, line 2225: _R2 = R21 * _R1;

Based on cv::stereoRectify and cv::fisheye::stereoRectify, this line should be: _R2 = _R1 * R21;

Besides, R2 is theoretically the rotation matrix from the coordinate system of the world to the second camera.

@alalek
Copy link
Member

alalek commented Dec 12, 2020

Thank you for the report!

Feel free to prepare PR with fix.

If you have some simple test case please add it into PR description (unfortunately there are no any tests for this module)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants