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

Omnidirectional Camera Calibration #3686

Open
nicheng0019 opened this issue Mar 5, 2024 · 3 comments
Open

Omnidirectional Camera Calibration #3686

nicheng0019 opened this issue Mar 5, 2024 · 3 comments

Comments

@nicheng0019
Copy link

nicheng0019 commented Mar 5, 2024

System information (version)
  • OpenCV => 4.5.5
  • Operating System / Platform =>Windows 64 Bit
  • Compiler => Visual Studio 2019
Detailed description

In function cv::omnidir::initUndistortRectifyMap, when flags is RECTIFY_CYLINDRICAL, the code line 477-479
_xt = std::cos(theta); _yt = std::sin(theta); _wt = h;
may be
_xt = -std::sin(h) * std::cos(theta); _yt = -std::cos(h); _wt = std::sin(h) * std::sin(theta);

and when flags is RECTIFY_LONGLATI, the code line 483-485
_xt = -std::cos(theta); _yt = -std::sin(theta) * std::cos(h); _wt = std::sin(theta) * std::sin(h);
may be
theta = (j * 1.0 / (size.width - 1) - 0.5) * 3.1415926; h = (i * 1.0 / (size.height - 1) - 0.5) * 3.1415926; _xt = std::sin(theta); _yt = std::cos(theta) * std::sin(h); _wt = std::cos(theta) * std::cos(h);

@Garvanand
Copy link

We can make changes to:
RECTIFY_CYLINDRICAL:
_xt = -std::sin(h) * std::cos(theta);
_yt = -std::cos(h);
_wt = std::sin(h) * std::sin(theta);

RECTIFY_LONGLATI:
theta = (j * 1.0 / (size.width - 1) - 0.5) * 3.1415926;
h = (i * 1.0 / (size.height - 1) - 0.5) * 3.1415926;
_xt = std::sin(theta);
_yt = std::cos(theta) * std::sin(h);
_wt = std::cos(theta) * std::cos(h);

If the issue is still open,Kindly assign the issue to me so that I can rectify it and raise a PR.

@nicheng0019
Copy link
Author

We can make changes to: RECTIFY_CYLINDRICAL: _xt = -std::sin(h) * std::cos(theta); _yt = -std::cos(h); _wt = std::sin(h) * std::sin(theta);

RECTIFY_LONGLATI: theta = (j * 1.0 / (size.width - 1) - 0.5) * 3.1415926; h = (i * 1.0 / (size.height - 1) - 0.5) * 3.1415926; _xt = std::sin(theta); _yt = std::cos(theta) * std::sin(h); _wt = std::cos(theta) * std::cos(h);

If the issue is still open,Kindly assign the issue to me so that I can rectify it and raise a PR.

OK, thank you, but I don't have the permission to assign the issue to you. If you have , please help yourself

@jnader
Copy link

jnader commented Oct 18, 2024

Hello
In function cv::omnidir::initUndistortRectifyMap, is it normal that when calculating theta and h in non perspective rectification, we use iK and not iKR?
In this case, we won't be taking into account the matrix R, right?

Thank you.

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

No branches or pull requests

3 participants