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
8511c9fc
Commit
8511c9fc
authored
Dec 23, 2010
by
Vladimir Dudnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetic changes, removed trailing spaces
parent
e92d0e4b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
surf.cpp
modules/features2d/src/surf.cpp
+0
-14
No files found.
modules/features2d/src/surf.cpp
View file @
8511c9fc
...
...
@@ -567,7 +567,6 @@ struct SURFInvoker
DW
[
i
*
PATCH_SZ
+
j
]
=
G_desc
.
at
<
float
>
(
i
,
0
)
*
G_desc
.
at
<
float
>
(
j
,
0
);
}
}
void
operator
()(
const
BlockedRange
&
range
)
const
{
/* X and Y gradient wavelet data */
...
...
@@ -576,7 +575,6 @@ struct SURFInvoker
const
int
dy_s
[
NY
][
5
]
=
{{
0
,
0
,
4
,
2
,
1
},
{
0
,
2
,
4
,
4
,
-
1
}};
const
int
descriptor_size
=
params
->
extended
?
128
:
64
;
/* Optimisation is better using nOriSampleBound than nOriSamples for
array lengths. Maybe because it is a constant known at compile time */
const
int
nOriSampleBound
=
(
2
*
ORI_RADIUS
+
1
)
*
(
2
*
ORI_RADIUS
+
1
);
...
...
@@ -591,32 +589,25 @@ struct SURFInvoker
int
k
,
k1
=
range
.
begin
(),
k2
=
range
.
end
();
int
maxSize
=
0
;
for
(
k
=
k1
;
k
<
k2
;
k
++
)
{
maxSize
=
std
::
max
(
maxSize
,
((
CvSURFPoint
*
)
cvGetSeqElem
(
keypoints
,
k
))
->
size
);
}
maxSize
=
cvCeil
((
PATCH_SZ
+
1
)
*
maxSize
*
1.2
f
/
9.0
f
);
Ptr
<
CvMat
>
winbuf
=
cvCreateMat
(
1
,
maxSize
>
0
?
maxSize
*
maxSize
:
1
,
CV_8U
);
for
(
k
=
k1
;
k
<
k2
;
k
++
)
{
const
int
*
sum_ptr
=
sum
->
data
.
i
;
int
sum_cols
=
sum
->
cols
;
int
i
,
j
,
kk
,
x
,
y
,
nangle
;
float
*
vec
;
CvSurfHF
dx_t
[
NX
],
dy_t
[
NY
];
CvSURFPoint
*
kp
=
(
CvSURFPoint
*
)
cvGetSeqElem
(
keypoints
,
k
);
int
size
=
kp
->
size
;
CvPoint2D32f
center
=
kp
->
pt
;
/* The sampling intervals and wavelet sized for selecting an orientation
and building the keypoint descriptor are defined relative to 's' */
float
s
=
(
float
)
size
*
1.2
f
/
9.0
f
;
/* To find the dominant orientation, the gradients in x and y are
sampled in a circle of radius 6s using wavelets of size 4s.
We ensure the gradient wavelet size is even to ensure the
...
...
@@ -680,19 +671,14 @@ struct SURFInvoker
besty
=
sumy
;
}
}
float
descriptor_dir
=
cvFastArctan
(
besty
,
bestx
);
kp
->
dir
=
descriptor_dir
;
if
(
!
descriptors
)
continue
;
descriptor_dir
*=
(
float
)(
CV_PI
/
180
);
/* Extract a window of pixels around the keypoint of size 20s */
int
win_size
=
(
int
)((
PATCH_SZ
+
1
)
*
s
);
CV_Assert
(
winbuf
->
cols
>=
win_size
*
win_size
);
CvMat
win
=
cvMat
(
win_size
,
win_size
,
CV_8U
,
winbuf
->
data
.
ptr
);
float
sin_dir
=
sin
(
descriptor_dir
);
float
cos_dir
=
cos
(
descriptor_dir
)
;
...
...
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