Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
36291faf
Commit
36291faf
authored
Nov 24, 2017
by
Hamdi Sahloul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Affine feature2D: Prevent crashing due to invalid covariant matrix
parent
bccbec79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
affine_feature2d.cpp
modules/xfeatures2d/src/affine_feature2d.cpp
+6
-1
No files found.
modules/xfeatures2d/src/affine_feature2d.cpp
View file @
36291faf
...
@@ -170,6 +170,10 @@ bool calcAffineAdaptation(const Mat & fimage, Elliptic_KeyPoint & keypoint)
...
@@ -170,6 +170,10 @@ bool calcAffineAdaptation(const Mat & fimage, Elliptic_KeyPoint & keypoint)
//Differentation scale selection
//Differentation scale selection
selDifferentiationScale
(
warpedImg
,
Lxm2smooth
,
Lxmysmooth
,
Lym2smooth
,
si
,
selDifferentiationScale
(
warpedImg
,
Lxm2smooth
,
Lxmysmooth
,
Lym2smooth
,
si
,
Point
(
cx
,
cy
));
Point
(
cx
,
cy
));
if
(
Lym2smooth
.
empty
())
{
divergence
=
true
;
continue
;
}
//Spatial Localization
//Spatial Localization
cxPr
=
cx
;
//Previous iteration point in normalized window
cxPr
=
cx
;
//Previous iteration point in normalized window
...
@@ -428,7 +432,8 @@ float selDifferentiationScale(const Mat & img, Mat & Lxm2smooth, Mat & Lxmysmoot
...
@@ -428,7 +432,8 @@ float selDifferentiationScale(const Mat & img, Mat & Lxm2smooth, Mat & Lxmysmoot
eigen
(
M
,
eval
);
eigen
(
M
,
eval
);
double
eval1
=
std
::
abs
(
eval
.
at
<
float
>
(
0
,
0
));
double
eval1
=
std
::
abs
(
eval
.
at
<
float
>
(
0
,
0
));
double
eval2
=
std
::
abs
(
eval
.
at
<
float
>
(
1
,
0
));
double
eval2
=
std
::
abs
(
eval
.
at
<
float
>
(
1
,
0
));
double
q
=
min
(
eval1
,
eval2
)
/
max
(
eval1
,
eval2
);
double
m
=
max
(
eval1
,
eval2
);
double
q
=
(
m
==
0
)
?
-
1
:
min
(
eval1
,
eval2
)
/
m
;
if
(
q
>=
qMax
)
if
(
q
>=
qMax
)
{
{
...
...
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