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
4606638b
Commit
4606638b
authored
Jun 21, 2010
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
f2392f2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
sift.cpp
modules/features2d/src/sift.cpp
+9
-9
No files found.
modules/features2d/src/sift.cpp
View file @
4606638b
...
...
@@ -2032,18 +2032,18 @@ SIFT::SIFT( const CommonParams& _commParams,
descriptorParams
=
_descriptorParams
;
}
inline
KeyPoint
vlKeypointToOcv
(
const
VL
::
Sift
::
Keypoint
&
vlKeypoint
,
float
angle
)
inline
KeyPoint
vlKeypointToOcv
(
const
VL
::
Sift
&
vlSift
,
const
VL
::
Sift
::
Keypoint
&
vlKeypoint
,
float
angle
)
{
return
KeyPoint
(
vlKeypoint
.
x
,
vlKeypoint
.
y
,
SIFT
::
DescriptorParams
::
GET_DEFAULT_MAGNIFICATION
()
*
vlKeypoint
.
sigma
*
5
/* 5==NBP+1 */
,
angle
,
0
,
vlKeypoint
.
o
,
0
);
float
size
=
SIFT
::
DescriptorParams
::
GET_DEFAULT_MAGNIFICATION
()
*
vlKeypoint
.
sigma
*
4
/*4==NBP*/
/
vlSift
.
getOctaveSamplingPeriod
(
vlKeypoint
.
o
);
return
KeyPoint
(
vlKeypoint
.
x
,
vlKeypoint
.
y
,
size
,
angle
,
0
,
vlKeypoint
.
o
,
0
);
}
inline
void
ocvKeypointToVl
(
const
KeyPoint
&
ocvKeypoint
,
const
VL
::
Sift
&
vlSif
t
,
inline
void
ocvKeypointToVl
(
const
VL
::
Sift
&
vlSift
,
const
KeyPoint
&
ocvKeypoin
t
,
VL
::
Sift
::
Keypoint
&
vlKeypoint
,
int
magnification
)
{
vlKeypoint
=
vlSift
.
getKeypoint
(
ocvKeypoint
.
pt
.
x
,
ocvKeypoint
.
pt
.
y
,
ocvKeypoint
.
size
/
(
magnification
*
5
)
/* 5==NBP+1 */
);
float
sigma
=
ocvKeypoint
.
size
*
vlSift
.
getOctaveSamplingPeriod
(
ocvKeypoint
.
octave
)
/
(
magnification
*
4
)
/*4==NBP*/
;
vlKeypoint
=
vlSift
.
getKeypoint
(
ocvKeypoint
.
pt
.
x
,
ocvKeypoint
.
pt
.
y
,
sigma
);
}
float
computeKeypointOrientations
(
VL
::
Sift
&
sift
,
const
VL
::
Sift
::
Keypoint
&
keypoint
,
int
angleMode
)
...
...
@@ -2097,7 +2097,7 @@ void SIFT::operator()(const Mat& img, const Mat& mask,
float
angleVal
=
computeKeypointOrientations
(
vlsift
,
*
iter
,
commParams
.
angleMode
);
if
(
angleVal
>=
0
)
{
keypoints
.
push_back
(
vlKeypointToOcv
(
*
iter
,
angleVal
*
180.0
/
CV_PI
)
);
keypoints
.
push_back
(
vlKeypointToOcv
(
vlsift
,
*
iter
,
angleVal
*
180.0
/
CV_PI
)
);
}
}
}
...
...
@@ -2131,7 +2131,7 @@ void SIFT::operator()(const Mat& img, const Mat& mask,
for
(
int
pi
=
0
;
iter
!=
keypoints
.
end
();
++
iter
,
pi
++
)
{
VL
::
Sift
::
Keypoint
vlkpt
;
ocvKeypointToVl
(
*
iter
,
vlsift
,
vlkpt
,
descriptorParams
.
magnification
);
ocvKeypointToVl
(
vlsift
,
*
iter
,
vlkpt
,
descriptorParams
.
magnification
);
float
angleVal
=
iter
->
angle
*
CV_PI
/
180.0
;
if
(
descriptorParams
.
recalculateAngles
)
{
...
...
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