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
4fa282e1
Commit
4fa282e1
authored
Jul 25, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed SURf according to clockwise descriptor convention
parent
fdfa4024
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
surf.cu
modules/gpu/src/cuda/surf.cu
+9
-1
surf.cpp
modules/gpu/src/surf.cpp
+1
-1
sift.cpp
modules/nonfree/src/sift.cpp
+1
-1
No files found.
modules/gpu/src/cuda/surf.cu
View file @
4fa282e1
...
...
@@ -51,6 +51,7 @@
#include "opencv2/gpu/device/utility.hpp"
#include "opencv2/gpu/device/functional.hpp"
#include "opencv2/gpu/device/filters.hpp"
#include <float.h>
namespace cv { namespace gpu { namespace device
{
...
...
@@ -625,6 +626,10 @@ namespace cv { namespace gpu { namespace device
kp_dir += 2.0f * CV_PI_F;
kp_dir *= 180.0f / CV_PI_F;
kp_dir = 360.0f - kp_dir;
if (abs(kp_dir - 360.f) < FLT_EPSILON)
kp_dir = 0.f;
featureDir[blockIdx.x] = kp_dir;
}
}
...
...
@@ -709,7 +714,10 @@ namespace cv { namespace gpu { namespace device
const float centerX = featureX[blockIdx.x];
const float centerY = featureY[blockIdx.x];
const float size = featureSize[blockIdx.x];
const float descriptor_dir = featureDir[blockIdx.x] * (float)(CV_PI_F / 180.0f);
float descriptor_dir = 360.0f - featureDir[blockIdx.x];
if (std::abs(descriptor_dir - 360.f) < FLT_EPSILON)
descriptor_dir = 0.f;
descriptor_dir *= (float)(CV_PI_F / 180.0f);
/* The sampling intervals and wavelet sized for selecting an orientation
and building the keypoint descriptor are defined relative to 's' */
...
...
modules/gpu/src/surf.cpp
View file @
4fa282e1
...
...
@@ -198,7 +198,7 @@ namespace
keypoints
.
cols
=
featureCounter
;
if
(
surf_
.
upright
)
keypoints
.
row
(
SURF_GPU
::
ANGLE_ROW
).
setTo
(
Scalar
::
all
(
90.0
));
keypoints
.
row
(
SURF_GPU
::
ANGLE_ROW
).
setTo
(
Scalar
::
all
(
360.0
-
90.0
));
else
findOrientation
(
keypoints
);
}
...
...
modules/nonfree/src/sift.cpp
View file @
4fa282e1
...
...
@@ -500,7 +500,7 @@ void SIFT::findScaleSpaceExtrema( const vector<Mat>& gauss_pyr, const vector<Mat
bin
=
bin
<
0
?
n
+
bin
:
bin
>=
n
?
bin
-
n
:
bin
;
kpt
.
angle
=
360.
f
-
(
float
)((
360.
f
/
n
)
*
bin
);
if
(
std
::
abs
(
kpt
.
angle
-
360.
f
)
<
FLT_EPSILON
)
kpt
.
angle
=
0.
f
;
kpt
.
angle
=
0.
f
;
keypoints
.
push_back
(
kpt
);
}
}
...
...
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