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
fdf549b9
Commit
fdf549b9
authored
9 years ago
by
Viet Dinh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #5599
parent
021ff0ef
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mathfuncs.cpp
modules/core/src/mathfuncs.cpp
+5
-5
No files found.
modules/core/src/mathfuncs.cpp
View file @
fdf549b9
...
...
@@ -2469,7 +2469,7 @@ int cv::solveCubic( InputArray _coeffs, OutputArray _roots )
double
cv
::
solvePoly
(
InputArray
_coeffs0
,
OutputArray
_roots0
,
int
maxIters
)
{
typedef
Complex
<
double
>
C
;
double
maxDiff
=
0
;
int
iter
,
i
,
j
;
Mat
coeffs0
=
_coeffs0
.
getMat
();
...
...
@@ -2494,8 +2494,8 @@ double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters )
for
(
i
=
0
;
i
<=
n
;
i
++
)
coeffs
[
i
]
=
C
(
rcoeffs
[
i
],
0
);
}
C
p
(
1
,
0
),
r
(
1
,
1
);
C
p
(
1
,
0
),
r
(
0.4
,
0.9
);
for
(
i
=
0
;
i
<
n
;
i
++
)
{
...
...
@@ -2514,7 +2514,7 @@ double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters )
for
(
j
=
0
;
j
<
n
;
j
++
)
{
num
=
num
*
p
+
coeffs
[
n
-
j
-
1
];
if
(
j
!=
i
)
denom
=
denom
*
(
p
-
roots
[
j
]);
if
(
j
!=
i
)
denom
=
denom
*
(
p
-
roots
[
j
]);
}
num
/=
denom
;
roots
[
i
]
=
p
-
num
;
...
...
@@ -2523,7 +2523,7 @@ double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters )
if
(
maxDiff
<=
0
)
break
;
}
if
(
coeffs0
.
channels
()
==
1
)
{
const
double
verySmallEps
=
1e-100
;
...
...
This diff is collapsed.
Click to expand it.
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