opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

Omnidirectional Camera Calibration

Open nicheng0019 opened this issue 11 months ago • 3 comments

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);

nicheng0019 avatar Mar 05 '24 11:03 nicheng0019

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.

Garvanand avatar Mar 18 '24 11:03 Garvanand

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

nicheng0019 avatar Mar 21 '24 06:03 nicheng0019