mirror of
https://github.com/opencv/opencv.git
synced 2025-06-09 18:43:05 +08:00
Merge pull request #7800 from paroj:fisheye_undist
This commit is contained in:
commit
8f83d97adc
@ -377,6 +377,12 @@ void cv::fisheye::undistortPoints( InputArray distorted, OutputArray undistorted
|
|||||||
double scale = 1.0;
|
double scale = 1.0;
|
||||||
|
|
||||||
double theta_d = sqrt(pw[0]*pw[0] + pw[1]*pw[1]);
|
double theta_d = sqrt(pw[0]*pw[0] + pw[1]*pw[1]);
|
||||||
|
|
||||||
|
// the current camera model is only valid up to 180° FOV
|
||||||
|
// for larger FOV the loop below does not converge
|
||||||
|
// clip values so we still get plausible results for super fisheye images > 180°
|
||||||
|
theta_d = min(max(-CV_PI/2., theta_d), CV_PI/2.);
|
||||||
|
|
||||||
if (theta_d > 1e-8)
|
if (theta_d > 1e-8)
|
||||||
{
|
{
|
||||||
// compensate distortion iteratively
|
// compensate distortion iteratively
|
||||||
|
Loading…
Reference in New Issue
Block a user