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
7238cd27
Commit
7238cd27
authored
Dec 29, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #915 from sturkmen72:update_shift
parents
c2903700
cb7b59f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
sift.cpp
modules/xfeatures2d/src/sift.cpp
+5
-3
No files found.
modules/xfeatures2d/src/sift.cpp
View file @
7238cd27
...
...
@@ -220,10 +220,12 @@ static Mat createInitialImage( const Mat& img, bool doubleImageSize, float sigma
{
Mat
gray
,
gray_fpt
;
if
(
img
.
channels
()
==
3
||
img
.
channels
()
==
4
)
{
cvtColor
(
img
,
gray
,
COLOR_BGR2GRAY
);
gray
.
convertTo
(
gray_fpt
,
DataType
<
sift_wt
>::
type
,
SIFT_FIXPT_SCALE
,
0
);
}
else
img
.
copyTo
(
gray
);
gray
.
convertTo
(
gray_fpt
,
DataType
<
sift_wt
>::
type
,
SIFT_FIXPT_SCALE
,
0
);
img
.
convertTo
(
gray_fpt
,
DataType
<
sift_wt
>::
type
,
SIFT_FIXPT_SCALE
,
0
);
float
sig_diff
;
...
...
@@ -231,7 +233,7 @@ static Mat createInitialImage( const Mat& img, bool doubleImageSize, float sigma
{
sig_diff
=
sqrtf
(
std
::
max
(
sigma
*
sigma
-
SIFT_INIT_SIGMA
*
SIFT_INIT_SIGMA
*
4
,
0.01
f
)
);
Mat
dbl
;
resize
(
gray_fpt
,
dbl
,
Size
(
gray
.
cols
*
2
,
gray
.
rows
*
2
),
0
,
0
,
INTER_LINEAR
);
resize
(
gray_fpt
,
dbl
,
Size
(
gray
_fpt
.
cols
*
2
,
gray_fpt
.
rows
*
2
),
0
,
0
,
INTER_LINEAR
);
GaussianBlur
(
dbl
,
dbl
,
Size
(),
sig_diff
,
sig_diff
);
return
dbl
;
}
...
...
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