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
9bea717b
Commit
9bea717b
authored
Jul 05, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #703 from MartinNowak:fix_sift_overflow
parents
30f718d1
d4df727d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
sift.cpp
modules/xfeatures2d/src/sift.cpp
+1
-1
No files found.
modules/xfeatures2d/src/sift.cpp
View file @
9bea717b
...
...
@@ -579,7 +579,7 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc
float
hist_width
=
SIFT_DESCR_SCL_FCTR
*
scl
;
int
radius
=
cvRound
(
hist_width
*
1.4142135623730951
f
*
(
d
+
1
)
*
0.5
f
);
// Clip the radius to the diagonal of the image to avoid autobuffer too large exception
radius
=
std
::
min
(
radius
,
(
int
)
sqrt
((
double
)
img
.
cols
*
img
.
cols
+
img
.
rows
*
img
.
rows
));
radius
=
std
::
min
(
radius
,
(
int
)
sqrt
((
(
double
)
img
.
cols
)
*
img
.
cols
+
((
double
)
img
.
rows
)
*
img
.
rows
));
cos_t
/=
hist_width
;
sin_t
/=
hist_width
;
...
...
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