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
6c63139f
Commit
6c63139f
authored
Oct 17, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added properties setter/getter to SURF
parent
218358a5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
nonfree.hpp
modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp
+1
-0
surf.cpp
modules/xfeatures2d/src/surf.cpp
+34
-0
surf.hpp
modules/xfeatures2d/src/surf.hpp
+3
-0
No files found.
modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp
View file @
6c63139f
...
...
@@ -74,6 +74,7 @@ typedef SIFT SiftDescriptorExtractor;
class
CV_EXPORTS_W
SURF
:
public
Feature2D
{
public
:
enum
{
HESSIAN_THRESHOLD
=
10000
,
NOCTAVES
=
10001
,
NOCTAVE_LAYERS
=
10002
,
EXTENDED
=
10003
,
UPRIGHT
=
10004
};
CV_WRAP
static
Ptr
<
SURF
>
create
(
double
hessianThreshold
=
100
,
int
nOctaves
=
4
,
int
nOctaveLayers
=
3
,
bool
extended
=
false
,
bool
upright
=
false
);
...
...
modules/xfeatures2d/src/surf.cpp
View file @
6c63139f
...
...
@@ -876,6 +876,40 @@ SURF_Impl::SURF_Impl(double _threshold, int _nOctaves, int _nOctaveLayers, bool
nOctaveLayers
=
_nOctaveLayers
;
}
void
SURF_Impl
::
set
(
int
prop
,
double
value
)
{
if
(
prop
==
HESSIAN_THRESHOLD
)
hessianThreshold
=
value
;
else
if
(
prop
==
NOCTAVES
)
nOctaves
=
cvRound
(
value
);
else
if
(
prop
==
NOCTAVE_LAYERS
)
nOctaveLayers
=
cvRound
(
value
);
else
if
(
prop
==
EXTENDED
)
extended
=
value
!=
0
;
else
if
(
prop
==
UPRIGHT
)
upright
=
value
!=
0
;
else
CV_Error
(
Error
::
StsBadArg
,
""
);
}
double
SURF_Impl
::
get
(
int
prop
)
const
{
double
value
=
0
;
if
(
prop
==
HESSIAN_THRESHOLD
)
value
=
hessianThreshold
;
else
if
(
prop
==
NOCTAVES
)
value
=
nOctaves
;
else
if
(
prop
==
NOCTAVE_LAYERS
)
value
=
nOctaveLayers
;
else
if
(
prop
==
EXTENDED
)
value
=
extended
;
else
if
(
prop
==
UPRIGHT
)
value
=
upright
;
else
CV_Error
(
Error
::
StsBadArg
,
""
);
return
value
;
}
int
SURF_Impl
::
descriptorSize
()
const
{
return
extended
?
128
:
64
;
}
int
SURF_Impl
::
descriptorType
()
const
{
return
CV_32F
;
}
int
SURF_Impl
::
defaultNorm
()
const
{
return
NORM_L2
;
}
...
...
modules/xfeatures2d/src/surf.hpp
View file @
6c63139f
...
...
@@ -32,6 +32,9 @@ public:
//! returns the descriptor type
CV_WRAP
int
defaultNorm
()
const
;
void
set
(
int
,
double
);
double
get
(
int
)
const
;
//! finds the keypoints and computes their descriptors.
// Optionally it can compute descriptors for the user-provided keypoints
void
detectAndCompute
(
InputArray
img
,
InputArray
mask
,
...
...
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