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
549c5312
Commit
549c5312
authored
May 19, 2019
by
Kang
Committed by
Alexander Alekhin
Jun 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the bug, when k[4] is negative, icdist may be negative at the edge of image.
parent
b998c06d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
undistort.cpp
modules/imgproc/src/undistort.cpp
+6
-0
No files found.
modules/imgproc/src/undistort.cpp
View file @
549c5312
...
...
@@ -480,6 +480,12 @@ static void cvUndistortPointsInternal( const CvMat* _src, CvMat* _dst, const CvM
break
;
double
r2
=
x
*
x
+
y
*
y
;
double
icdist
=
(
1
+
((
k
[
7
]
*
r2
+
k
[
6
])
*
r2
+
k
[
5
])
*
r2
)
/
(
1
+
((
k
[
4
]
*
r2
+
k
[
1
])
*
r2
+
k
[
0
])
*
r2
);
if
(
icdist
<
0
)
// test: undistortPoints.regression_14583
{
x
=
(
u
-
cx
)
*
ifx
;
y
=
(
v
-
cy
)
*
ify
;
break
;
}
double
deltaX
=
2
*
k
[
2
]
*
x
*
y
+
k
[
3
]
*
(
r2
+
2
*
x
*
x
)
+
k
[
8
]
*
r2
+
k
[
9
]
*
r2
*
r2
;
double
deltaY
=
k
[
2
]
*
(
r2
+
2
*
y
*
y
)
+
2
*
k
[
3
]
*
x
*
y
+
k
[
10
]
*
r2
+
k
[
11
]
*
r2
*
r2
;
x
=
(
x0
-
deltaX
)
*
icdist
;
...
...
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