Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
99fae814
Commit
99fae814
authored
Sep 15, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9626 from T0ny0:fisheye_fix_
parents
9dea2962
2f0036c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
fisheye.cpp
modules/calib3d/src/fisheye.cpp
+17
-8
No files found.
modules/calib3d/src/fisheye.cpp
View file @
99fae814
...
...
@@ -475,17 +475,26 @@ void cv::fisheye::initUndistortRectifyMap( InputArray K, InputArray D, InputArra
for
(
int
j
=
0
;
j
<
size
.
width
;
++
j
)
{
double
x
=
_x
/
_w
,
y
=
_y
/
_w
;
double
u
,
v
;
if
(
_w
<=
0
)
{
u
=
(
_x
>
0
)
?
-
std
::
numeric_limits
<
double
>::
infinity
()
:
std
::
numeric_limits
<
double
>::
infinity
();
v
=
(
_y
>
0
)
?
-
std
::
numeric_limits
<
double
>::
infinity
()
:
std
::
numeric_limits
<
double
>::
infinity
();
}
else
{
double
x
=
_x
/
_w
,
y
=
_y
/
_w
;
double
r
=
sqrt
(
x
*
x
+
y
*
y
);
double
theta
=
atan
(
r
);
double
r
=
sqrt
(
x
*
x
+
y
*
y
);
double
theta
=
atan
(
r
);
double
theta2
=
theta
*
theta
,
theta4
=
theta2
*
theta2
,
theta6
=
theta4
*
theta2
,
theta8
=
theta4
*
theta4
;
double
theta_d
=
theta
*
(
1
+
k
[
0
]
*
theta2
+
k
[
1
]
*
theta4
+
k
[
2
]
*
theta6
+
k
[
3
]
*
theta8
);
double
theta2
=
theta
*
theta
,
theta4
=
theta2
*
theta2
,
theta6
=
theta4
*
theta2
,
theta8
=
theta4
*
theta4
;
double
theta_d
=
theta
*
(
1
+
k
[
0
]
*
theta2
+
k
[
1
]
*
theta4
+
k
[
2
]
*
theta6
+
k
[
3
]
*
theta8
);
double
scale
=
(
r
==
0
)
?
1.0
:
theta_d
/
r
;
double
u
=
f
[
0
]
*
x
*
scale
+
c
[
0
];
double
v
=
f
[
1
]
*
y
*
scale
+
c
[
1
];
double
scale
=
(
r
==
0
)
?
1.0
:
theta_d
/
r
;
u
=
f
[
0
]
*
x
*
scale
+
c
[
0
];
v
=
f
[
1
]
*
y
*
scale
+
c
[
1
];
}
if
(
m1type
==
CV_16SC2
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment