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
f3320d4f
Commit
f3320d4f
authored
Jan 19, 2018
by
catree
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add getter and setter for VGG and Boost descriptors.
parent
c3fc7a12
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletion
+45
-1
xfeatures2d.hpp
modules/xfeatures2d/include/opencv2/xfeatures2d.hpp
+21
-0
boostdesc.cpp
modules/xfeatures2d/src/boostdesc.cpp
+7
-0
vgg.cpp
modules/xfeatures2d/src/vgg.cpp
+17
-1
No files found.
modules/xfeatures2d/include/opencv2/xfeatures2d.hpp
View file @
f3320d4f
...
...
@@ -312,6 +312,21 @@ public:
CV_WRAP
static
Ptr
<
VGG
>
create
(
int
desc
=
VGG
::
VGG_120
,
float
isigma
=
1.4
f
,
bool
img_normalize
=
true
,
bool
use_scale_orientation
=
true
,
float
scale_factor
=
6.25
f
,
bool
dsc_normalize
=
false
);
CV_WRAP
virtual
void
setSigma
(
const
float
isigma
)
=
0
;
CV_WRAP
virtual
float
getSigma
()
const
=
0
;
CV_WRAP
virtual
void
setUseNormalizeImage
(
const
bool
img_normalize
)
=
0
;
CV_WRAP
virtual
bool
getUseNormalizeImage
()
const
=
0
;
CV_WRAP
virtual
void
setUseScaleOrientation
(
const
bool
use_scale_orientation
)
=
0
;
CV_WRAP
virtual
bool
getUseScaleOrientation
()
const
=
0
;
CV_WRAP
virtual
void
setScaleFactor
(
const
float
scale_factor
)
=
0
;
CV_WRAP
virtual
float
getScaleFactor
()
const
=
0
;
CV_WRAP
virtual
void
setUseNormalizeDescriptor
(
const
bool
dsc_normalize
)
=
0
;
CV_WRAP
virtual
bool
getUseNormalizeDescriptor
()
const
=
0
;
};
/** @brief Class implementing BoostDesc (Learning Image Descriptors with Boosting), described in
...
...
@@ -353,6 +368,12 @@ public:
CV_WRAP
static
Ptr
<
BoostDesc
>
create
(
int
desc
=
BoostDesc
::
BINBOOST_256
,
bool
use_scale_orientation
=
true
,
float
scale_factor
=
6.25
f
);
CV_WRAP
virtual
void
setUseScaleOrientation
(
const
bool
use_scale_orientation
)
=
0
;
CV_WRAP
virtual
bool
getUseScaleOrientation
()
const
=
0
;
CV_WRAP
virtual
void
setScaleFactor
(
const
float
scale_factor
)
=
0
;
CV_WRAP
virtual
float
getScaleFactor
()
const
=
0
;
};
...
...
modules/xfeatures2d/src/boostdesc.cpp
View file @
f3320d4f
...
...
@@ -93,6 +93,13 @@ public:
// compute descriptors given keypoints
virtual
void
compute
(
InputArray
image
,
vector
<
KeyPoint
>&
keypoints
,
OutputArray
descriptors
);
// getter / setter
virtual
void
setUseScaleOrientation
(
const
bool
use_scale_orientation
)
{
m_use_scale_orientation
=
use_scale_orientation
;
}
virtual
bool
getUseScaleOrientation
()
const
{
return
m_use_scale_orientation
;
}
virtual
void
setScaleFactor
(
const
float
scale_factor
)
{
m_scale_factor
=
scale_factor
;
}
virtual
float
getScaleFactor
()
const
{
return
m_scale_factor
;
}
protected
:
/*
...
...
modules/xfeatures2d/src/vgg.cpp
View file @
f3320d4f
...
...
@@ -83,7 +83,7 @@ public:
virtual
~
VGG_Impl
();
// returns the descriptor length in bytes
virtual
int
descriptorSize
()
const
{
return
m_descriptor_size
;
}
;
virtual
int
descriptorSize
()
const
{
return
m_descriptor_size
;
}
// returns the descriptor type
virtual
int
descriptorType
()
const
{
return
CV_32F
;
}
...
...
@@ -94,6 +94,22 @@ public:
// compute descriptors given keypoints
virtual
void
compute
(
InputArray
image
,
vector
<
KeyPoint
>&
keypoints
,
OutputArray
descriptors
);
// getter / setter
virtual
void
setSigma
(
const
float
isigma
)
{
m_isigma
=
isigma
;
}
virtual
float
getSigma
()
const
{
return
m_isigma
;
}
virtual
void
setUseNormalizeImage
(
const
bool
img_normalize
)
{
m_img_normalize
=
img_normalize
;
}
virtual
bool
getUseNormalizeImage
()
const
{
return
m_img_normalize
;
}
virtual
void
setUseScaleOrientation
(
const
bool
use_scale_orientation
)
{
m_use_scale_orientation
=
use_scale_orientation
;
}
virtual
bool
getUseScaleOrientation
()
const
{
return
m_use_scale_orientation
;
}
virtual
void
setScaleFactor
(
const
float
scale_factor
)
{
m_scale_factor
=
scale_factor
;
}
virtual
float
getScaleFactor
()
const
{
return
m_scale_factor
;
}
virtual
void
setUseNormalizeDescriptor
(
const
bool
dsc_normalize
)
{
m_dsc_normalize
=
dsc_normalize
;
}
virtual
bool
getUseNormalizeDescriptor
()
const
{
return
m_dsc_normalize
;
}
protected
:
/*
...
...
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