opencv_contrib
opencv_contrib copied to clipboard
Omnidirectional Camera Calibration
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);
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.
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