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
9c1d01e2
Commit
9c1d01e2
authored
Oct 27, 2016
by
Balint Cristian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add BoostDesc Descriptor.
parent
2a637461
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
566 additions
and
6 deletions
+566
-6
CMakeLists.txt
modules/xfeatures2d/CMakeLists.txt
+2
-2
download_boostdesc.cmake
modules/xfeatures2d/cmake/download_boostdesc.cmake
+30
-0
download_vgg.cmake
modules/xfeatures2d/cmake/download_vgg.cmake
+1
-1
xfeatures2d.bib
modules/xfeatures2d/doc/xfeatures2d.bib
+14
-0
xfeatures2d.hpp
modules/xfeatures2d/include/opencv2/xfeatures2d.hpp
+41
-0
export-boostdesc.py
modules/xfeatures2d/samples/export-boostdesc.py
+293
-0
boostdesc.cpp
modules/xfeatures2d/src/boostdesc.cpp
+0
-0
vgg.cpp
modules/xfeatures2d/src/vgg.cpp
+3
-3
test_features2d.cpp
modules/xfeatures2d/test/test_features2d.cpp
+56
-0
test_rotation_and_scale_invariance.cpp
...s/xfeatures2d/test/test_rotation_and_scale_invariance.cpp
+126
-0
No files found.
modules/xfeatures2d/CMakeLists.txt
View file @
9c1d01e2
set
(
the_description
"Contributed/Experimental Algorithms for Salient 2D Features Detection"
)
ocv_define_module
(
xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_shape opencv_highgui opencv_videoio opencv_ml
OPTIONAL opencv_cudaarithm WRAP python java
)
include
(
cmake/download_vgg.cmake
)
\ No newline at end of file
include
(
cmake/download_vgg.cmake
)
include
(
cmake/download_boostdesc.cmake
)
modules/xfeatures2d/cmake/download_boostdesc.cmake
0 → 100644
View file @
9c1d01e2
set
(
OPENCV_3RDPARTY_COMMIT
"34e4206aef44d50e6bbcd0ab06354b52e7466d26"
)
set
(
FILE_HASH_BOOSTDESC_BGM
"0ea90e7a8f3f7876d450e4149c97c74f"
)
set
(
FILE_HASH_BOOSTDESC_BGM_BI
"232c966b13651bd0e46a1497b0852191"
)
set
(
FILE_HASH_BOOSTDESC_BGM_HD
"324426a24fa56ad9c5b8e3e0b3e5303e"
)
set
(
FILE_HASH_BOOSTDESC_BINBOOST_064
"202e1b3e9fec871b04da31f7f016679f"
)
set
(
FILE_HASH_BOOSTDESC_BINBOOST_128
"98ea99d399965c03d555cef3ea502a0b"
)
set
(
FILE_HASH_BOOSTDESC_BINBOOST_256
"e6dcfa9f647779eb1ce446a8d759b6ea"
)
set
(
FILE_HASH_BOOSTDESC_LBGM
"0ae0675534aa318d9668f2a179c2a052"
)
set
(
BOOSTDESC_DOWNLOAD_URL
${
OPENCV_CONTRIB_BOOSTDESC_URL
}
;$ENV{OPENCV_CONTRIB_BOOSTDESC_URL};https://raw.githubusercontent.com/opencv/opencv_3rdparty/
${
OPENCV_3RDPARTY_COMMIT
}
/
)
function
(
boostdesc_download file id
)
message
(
STATUS
"Check contents of
${
file
}
..."
)
ocv_download
(
PACKAGE
${
file
}
HASH
${
FILE_HASH_
${
id
}}
URL
${
BOOSTDESC_DOWNLOAD_URL
}
DESTINATION_DIR
${
CMAKE_CURRENT_LIST_DIR
}
/../src
DOWNLOAD_DIR
${
CMAKE_CURRENT_LIST_DIR
}
/.download
)
endfunction
()
boostdesc_download
(
boostdesc_bgm.i BOOSTDESC_BGM
)
boostdesc_download
(
boostdesc_bgm_bi.i BOOSTDESC_BGM_BI
)
boostdesc_download
(
boostdesc_bgm_hd.i BOOSTDESC_BGM_HD
)
boostdesc_download
(
boostdesc_binboost_064.i BOOSTDESC_BINBOOST_064
)
boostdesc_download
(
boostdesc_binboost_128.i BOOSTDESC_BINBOOST_128
)
boostdesc_download
(
boostdesc_binboost_256.i BOOSTDESC_BINBOOST_256
)
boostdesc_download
(
boostdesc_lbgm.i BOOSTDESC_LBGM
)
modules/xfeatures2d/cmake/download_vgg.cmake
View file @
9c1d01e2
...
...
@@ -6,7 +6,7 @@ set(FILE_HASH_VGG_80 "7cd47228edec52b6d82f46511af325c5")
set
(
FILE_HASH_VGG_120
"151805e03568c9f490a5e3a872777b75"
)
set
(
VGG_DOWNLOAD_URL
${
OPENCV_CONTRIB_VGG_URL
}
;$ENV{OPENCV_CONTRIB_VGG_URL};https://raw.githubusercontent.com/
Itseez
/opencv_3rdparty/
${
OPENCV_3RDPARTY_COMMIT
}
/
)
set
(
VGG_DOWNLOAD_URL
${
OPENCV_CONTRIB_VGG_URL
}
;$ENV{OPENCV_CONTRIB_VGG_URL};https://raw.githubusercontent.com/
opencv
/opencv_3rdparty/
${
OPENCV_3RDPARTY_COMMIT
}
/
)
function
(
vgg_download file id
)
message
(
STATUS
"Check contents of
${
file
}
..."
)
...
...
modules/xfeatures2d/doc/xfeatures2d.bib
View file @
9c1d01e2
...
...
@@ -78,3 +78,17 @@
journal = "IEEE Transactions on Pattern Analysis and Machine Intelligence",
year = "2014"
}
@article{Trzcinski13b,
author = {T. Trzcinski, M. Christoudias and V. Lepetit},
title = {{Learning Image Descriptors with Boosting}},
journal = "submitted to IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI)",
year = {2013}
}
@inproceedings{Trzcinski13a,
author = {T. Trzcinski, M. Christoudias, V. Lepetit and P. Fua},
title = {{Boosting Binary Keypoint Descriptors}},
booktitle = "Computer Vision and Pattern Recognition",
year = {2013}
}
modules/xfeatures2d/include/opencv2/xfeatures2d.hpp
View file @
9c1d01e2
...
...
@@ -318,6 +318,47 @@ public:
};
/** @brief Class implementing BoostDesc (Learning Image Descriptors with Boosting), described in
@cite Trzcinski13a and @cite Trzcinski13b.
@param desc type of descriptor to use, BoostDesc::BINBOOST_256 is default (256 bit long dimension)
Available types are: BoostDesc::BGM, BoostDesc::BGM_HARD, BoostDesc::BGM_BILINEAR, BoostDesc::LBGM,
BoostDesc::BINBOOST_64, BoostDesc::BINBOOST_128, BoostDesc::BINBOOST_256
@param use_orientation sample patterns using keypoints orientation, enabled by default
@param scale_factor adjust the sampling window of detected keypoints
6.25f is default and fits for KAZE, SURF detected keypoints window ratio
6.75f should be the scale for SIFT detected keypoints window ratio
5.00f should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints window ratio
0.75f should be the scale for ORB keypoints ratio
1.50f was the default in original implementation
@note BGM is the base descriptor where each binary dimension is computed as the output of a single weak learner.
BGM_HARD and BGM_BILINEAR refers to same BGM but use different type of gradient binning. In the BGM_HARD that
use ASSIGN_HARD binning type the gradient is assigned to the nearest orientation bin. In the BGM_BILINEAR that use
ASSIGN_BILINEAR binning type the gradient is assigned to the two neighbouring bins. In the BGM and all other modes that use
ASSIGN_SOFT binning type the gradient is assigned to 8 nearest bins according to the cosine value between the gradient
angle and the bin center. LBGM (alias FP-Boost) is the floating point extension where each dimension is computed
as a linear combination of the weak learner responses. BINBOOST and subvariants are the binary extensions of LBGM
where each bit is computed as a thresholded linear combination of a set of weak learners.
BoostDesc header files (boostdesc_*.i) was exported from original binaries with export-boostdesc.py script from
samples subfolder.
*/
class
CV_EXPORTS_W
BoostDesc
:
public
Feature2D
{
public
:
CV_WRAP
enum
{
BGM
=
100
,
BGM_HARD
=
101
,
BGM_BILINEAR
=
102
,
LBGM
=
200
,
BINBOOST_64
=
300
,
BINBOOST_128
=
301
,
BINBOOST_256
=
302
};
CV_WRAP
static
Ptr
<
BoostDesc
>
create
(
int
desc
=
BoostDesc
::
BINBOOST_256
,
bool
use_scale_orientation
=
true
,
float
scale_factor
=
6.25
f
);
};
//! @}
}
...
...
modules/xfeatures2d/samples/export-boostdesc.py
0 → 100644
View file @
9c1d01e2
#!/usr/bin/python
"""
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2016
*
* Balint Cristian <cristian dot balint at gmail dot com>
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/
/* export-boostdesc.py */
/* Export C headers from binary data */
// [http://infoscience.epfl.ch/record/186246/files/boostDesc_1.0.tar.gz]
"""
import
sys
import
struct
def
float_to_hex
(
f
):
return
struct
.
unpack
(
'<I'
,
struct
.
pack
(
'<f'
,
f
)
)[
0
]
def
main
():
# usage
if
(
len
(
sys
.
argv
)
<
3
):
print
(
"Usage:
%
s <binary-type (BGM, LBGM, BINBOOST)> <boostdesc-binary-filename>"
%
sys
.
argv
[
0
]
)
sys
.
exit
(
0
)
if
(
(
sys
.
argv
[
1
]
!=
"BGM"
)
and
(
sys
.
argv
[
1
]
!=
"LBGM"
)
and
(
sys
.
argv
[
1
]
!=
"BINBOOST"
)
):
print
(
"Invalid type [
%
s]"
%
sys
.
argv
[
1
]
)
sys
.
exit
(
0
)
# enum literals
Assign
=
[
"ASSIGN_HARD"
,
"ASSIGN_BILINEAR"
,
"ASSIGN_SOFT"
,
"ASSIGN_HARD_MAGN"
,
"ASSIGN_SOFT_MAGN"
]
# open binary data file
f
=
open
(
sys
.
argv
[
2
],
'rb'
)
# header
print
"/*"
print
" *"
print
" * Header exported from binary."
print
" * [
%
s
%
s
%
s]"
%
(
sys
.
argv
[
0
],
sys
.
argv
[
1
],
sys
.
argv
[
2
]
)
print
" *"
print
" */"
# ini
nDim
=
1
;
nWLs
=
0
;
# dimensionality (where is the case)
if
(
(
sys
.
argv
[
1
]
==
"LBGM"
)
or
(
sys
.
argv
[
1
]
==
"BINBOOST"
)
):
nDim
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
print
print
"// dimensionality of learner"
print
"static const int nDim =
%
i;"
%
nDim
# week learners (where is the case)
if
(
sys
.
argv
[
1
]
!=
"BINBOOST"
):
nWLs
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
# common header
orientQuant
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
patchSize
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
iGradAssignType
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
print
print
"// orientations"
print
"static const int orientQuant =
%
i;"
%
orientQuant
print
print
"// patch size"
print
"static const int patchSize =
%
i;"
%
patchSize
print
print
"// gradient assignment type"
print
"static const int iGradAssignType =
%
s;"
%
Assign
[
iGradAssignType
]
arr_thresh
=
""
arr_orient
=
""
arr__y_min
=
""
arr__y_max
=
""
arr__x_min
=
""
arr__x_max
=
""
arr__alpha
=
""
arr___beta
=
""
dims
=
nDim
if
(
sys
.
argv
[
1
]
==
"LBGM"
):
dims
=
1
# iterate each dimension
for
d
in
range
(
0
,
dims
):
if
(
sys
.
argv
[
1
]
==
"BINBOOST"
):
nWLs
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
if
(
d
==
0
):
print
print
"// number of weak learners"
print
"static const int nWLs =
%
i;"
%
nWLs
# iterate each members
for
i
in
range
(
0
,
nWLs
):
# unpack structure array
thresh
=
struct
.
unpack
(
'<f'
,
f
.
read
(
4
)
)[
0
]
orient
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
y_min
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
y_max
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
x_min
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
x_max
=
struct
.
unpack
(
'<i'
,
f
.
read
(
4
)
)[
0
]
alpha
=
struct
.
unpack
(
'<f'
,
f
.
read
(
4
)
)[
0
]
beta
=
0
if
(
sys
.
argv
[
1
]
==
"BINBOOST"
):
beta
=
struct
.
unpack
(
'<f'
,
f
.
read
(
4
)
)[
0
]
# first entry
if
(
d
*
dims
+
i
==
0
):
arr_thresh
+=
"
\n
"
arr_thresh
+=
"// threshold array (
%
s x
%
s)
\n
"
%
(
dims
,
nWLs
)
arr_thresh
+=
"static const unsigned int thresh[] =
\n
{
\n
"
arr_orient
+=
"
\n
"
arr_orient
+=
"// orientation array (
%
s x
%
s)
\n
"
%
(
dims
,
nWLs
)
arr_orient
+=
"static const int orient[] =
\n
{
\n
"
arr__y_min
+=
"
\n
"
arr__y_min
+=
"// Y min array (
%
s x
%
s)
\n
"
%
(
dims
,
nWLs
)
arr__y_min
+=
"static const int y_min[] =
\n
{
\n
"
arr__y_max
+=
"
\n
"
arr__y_max
+=
"// Y max array (
%
s x
%
s)
\n
"
%
(
dims
,
nWLs
)
arr__y_max
+=
"static const int y_max[] =
\n
{
\n
"
arr__x_min
+=
"
\n
"
arr__x_min
+=
"// X min array (
%
s x
%
s)
\n
"
%
(
dims
,
nWLs
)
arr__x_min
+=
"static const int x_min[] =
\n
{
\n
"
arr__x_max
+=
"
\n
"
arr__x_max
+=
"// X max array (
%
s x
%
s)
\n
"
%
(
dims
,
nWLs
)
arr__x_max
+=
"static const int x_max[] =
\n
{
\n
"
arr__alpha
+=
"
\n
"
arr__alpha
+=
"// alpha array (
%
s x
%
s)
\n
"
%
(
dims
,
nWLs
)
arr__alpha
+=
"static const unsigned int alpha[] =
\n
{
\n
"
if
(
sys
.
argv
[
1
]
==
"BINBOOST"
):
arr___beta
+=
"
\n
"
arr___beta
+=
"// beta array (
%
s x
%
s)
\n
"
%
(
dims
,
nWLs
)
arr___beta
+=
"static const unsigned int beta[] =
\n
{
\n
"
# last entry
if
(
i
==
nWLs
-
1
)
and
(
d
==
dims
-
1
):
arr_thresh
+=
" 0x
%08
x
\n
};"
%
float_to_hex
(
thresh
)
arr_orient
+=
" 0x
%02
x
\n
};"
%
orient
arr__y_min
+=
" 0x
%02
x
\n
};"
%
y_min
arr__y_max
+=
" 0x
%02
x
\n
};"
%
y_max
arr__x_min
+=
" 0x
%02
x
\n
};"
%
x_min
arr__x_max
+=
" 0x
%02
x
\n
};"
%
x_max
arr__alpha
+=
" 0x
%08
x
\n
};"
%
float_to_hex
(
alpha
)
if
(
sys
.
argv
[
1
]
==
"BINBOOST"
):
arr___beta
+=
" 0x
%08
x
\n
};"
%
float_to_hex
(
beta
)
break
# align entries
if
(
(
d
*
dims
+
i
+
1
)
%
8
):
arr_thresh
+=
" 0x
%08
x,"
%
float_to_hex
(
thresh
)
arr_orient
+=
" 0x
%02
x,"
%
orient
arr__y_min
+=
" 0x
%02
x,"
%
y_min
arr__y_max
+=
" 0x
%02
x,"
%
y_max
arr__x_min
+=
" 0x
%02
x,"
%
x_min
arr__x_max
+=
" 0x
%02
x,"
%
x_max
arr__alpha
+=
" 0x
%08
x,"
%
float_to_hex
(
alpha
)
if
(
sys
.
argv
[
1
]
==
"BINBOOST"
):
arr___beta
+=
" 0x
%08
x,"
%
float_to_hex
(
beta
)
else
:
arr_thresh
+=
" 0x
%08
x,
\n
"
%
float_to_hex
(
thresh
)
arr_orient
+=
" 0x
%02
x,
\n
"
%
orient
arr__y_min
+=
" 0x
%02
x,
\n
"
%
y_min
arr__y_max
+=
" 0x
%02
x,
\n
"
%
y_max
arr__x_min
+=
" 0x
%02
x,
\n
"
%
x_min
arr__x_max
+=
" 0x
%02
x,
\n
"
%
x_max
arr__alpha
+=
" 0x
%08
x,
\n
"
%
float_to_hex
(
alpha
)
if
(
sys
.
argv
[
1
]
==
"BINBOOST"
):
arr___beta
+=
" 0x
%08
x,
\n
"
%
float_to_hex
(
beta
)
# extra array (when LBGM)
if
(
sys
.
argv
[
1
]
==
"LBGM"
):
arr___beta
+=
"
\n
"
arr___beta
+=
"// beta array (
%
s x
%
s)
\n
"
%
(
nWLs
,
nDim
)
arr___beta
+=
"static const unsigned int beta[] =
\n
{
\n
"
for
i
in
range
(
0
,
nWLs
):
for
d
in
range
(
0
,
nDim
):
beta
=
struct
.
unpack
(
'<f'
,
f
.
read
(
4
)
)[
0
]
# last entry
if
(
i
==
nWLs
-
1
)
and
(
d
==
nDim
-
1
):
arr___beta
+=
" 0x
%08
x
\n
};"
%
float_to_hex
(
beta
)
break
# align entries
if
(
(
i
*
nDim
+
d
+
1
)
%
8
):
arr___beta
+=
" 0x
%08
x,"
%
float_to_hex
(
beta
)
else
:
arr___beta
+=
" 0x
%08
x,
\n
"
%
float_to_hex
(
beta
)
# release
f
.
close
()
# dump on screen
print
arr_thresh
print
arr_orient
print
arr__y_min
print
arr__y_max
print
arr__x_min
print
arr__x_max
print
arr__alpha
if
(
(
sys
.
argv
[
1
]
==
"LBGM"
)
or
(
sys
.
argv
[
1
]
==
"BINBOOST"
)
):
print
arr___beta
if
__name__
==
"__main__"
:
main
()
modules/xfeatures2d/src/boostdesc.cpp
0 → 100644
View file @
9c1d01e2
This diff is collapsed.
Click to expand it.
modules/xfeatures2d/src/vgg.cpp
View file @
9c1d01e2
...
...
@@ -315,9 +315,9 @@ static void get_desc( const Mat Patch, Mat& PatchTrans, int anglebins, bool img_
// -------------------------------------------------
/* VGG interface implementation */
struct
Compute
Desc
Invoker
:
ParallelLoopBody
struct
Compute
VGG
Invoker
:
ParallelLoopBody
{
Compute
Desc
Invoker
(
const
Mat
&
_image
,
Mat
*
_descriptors
,
Compute
VGG
Invoker
(
const
Mat
&
_image
,
Mat
*
_descriptors
,
const
vector
<
KeyPoint
>&
_keypoints
,
const
Mat
&
_PRFilters
,
const
Mat
&
_Proj
,
const
int
_anglebins
,
const
bool
_img_normalize
,
...
...
@@ -403,7 +403,7 @@ void VGG_Impl::compute( InputArray _image, vector<KeyPoint>& keypoints, OutputAr
descriptors
.
setTo
(
Scalar
(
0
)
);
parallel_for_
(
Range
(
0
,
(
int
)
keypoints
.
size
()
),
Compute
Desc
Invoker
(
m_image
,
&
descriptors
,
keypoints
,
m_PRFilters
,
m_Proj
,
Compute
VGG
Invoker
(
m_image
,
&
descriptors
,
keypoints
,
m_PRFilters
,
m_Proj
,
m_anglebins
,
m_img_normalize
,
m_use_scale_orientation
,
m_scale_factor
)
);
...
...
modules/xfeatures2d/test/test_features2d.cpp
View file @
9c1d01e2
...
...
@@ -1057,6 +1057,62 @@ TEST( Features2d_DescriptorExtractor_VGG, regression )
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorExtractor_BGM
,
regression
)
{
CV_DescriptorExtractorTest
<
Hamming
>
test
(
"descriptor-boostdesc-bgm"
,
(
CV_DescriptorExtractorTest
<
Hamming
>::
DistanceType
)
12.
f
,
BoostDesc
::
create
(
BoostDesc
::
BGM
)
);
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorExtractor_BGM_HARD
,
regression
)
{
CV_DescriptorExtractorTest
<
Hamming
>
test
(
"descriptor-boostdesc-bgm_hard"
,
(
CV_DescriptorExtractorTest
<
Hamming
>::
DistanceType
)
12.
f
,
BoostDesc
::
create
(
BoostDesc
::
BGM_HARD
)
);
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorExtractor_BGM_BILINEAR
,
regression
)
{
CV_DescriptorExtractorTest
<
Hamming
>
test
(
"descriptor-boostdesc-bgm_bilinear"
,
(
CV_DescriptorExtractorTest
<
Hamming
>::
DistanceType
)
15.
f
,
BoostDesc
::
create
(
BoostDesc
::
BGM_BILINEAR
)
);
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorExtractor_LBGM
,
regression
)
{
CV_DescriptorExtractorTest
<
L2
<
float
>
>
test
(
"descriptor-boostdesc-lbgm"
,
1.0
f
,
BoostDesc
::
create
(
BoostDesc
::
LBGM
)
);
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorExtractor_BINBOOST_64
,
regression
)
{
CV_DescriptorExtractorTest
<
Hamming
>
test
(
"descriptor-boostdesc-binboost_64"
,
(
CV_DescriptorExtractorTest
<
Hamming
>::
DistanceType
)
12.
f
,
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_64
)
);
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorExtractor_BINBOOST_128
,
regression
)
{
CV_DescriptorExtractorTest
<
Hamming
>
test
(
"descriptor-boostdesc-binboost_128"
,
(
CV_DescriptorExtractorTest
<
Hamming
>::
DistanceType
)
12.
f
,
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_128
)
);
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorExtractor_BINBOOST_256
,
regression
)
{
CV_DescriptorExtractorTest
<
Hamming
>
test
(
"descriptor-boostdesc-binboost_256"
,
(
CV_DescriptorExtractorTest
<
Hamming
>::
DistanceType
)
12.
f
,
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_256
)
);
test
.
safe_run
();
}
/*#if CV_SSE2
TEST( Features2d_DescriptorExtractor_Calonder_uchar, regression )
...
...
modules/xfeatures2d/test/test_rotation_and_scale_invariance.cpp
View file @
9c1d01e2
...
...
@@ -744,6 +744,69 @@ TEST(Features2d_RotationInvariance_Descriptor_FREAK, regression)
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Descriptor_BoostDesc_BGM
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BGM
,
true
,
6.25
f
),
NORM_HAMMING
,
0.999
f
);
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Descriptor_BoostDesc_BGM_HARD
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BGM_HARD
,
true
,
6.25
f
),
NORM_HAMMING
,
0.98
f
);
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Descriptor_BoostDesc_BGM_BILINEAR
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BGM_BILINEAR
,
true
,
6.25
f
),
NORM_HAMMING
,
0.98
f
);
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Descriptor_BoostDesc_LBGM
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
LBGM
,
true
,
6.25
f
),
NORM_L1
,
0.999
f
);
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Descriptor_BoostDesc_BINBOOST_64
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_64
,
true
,
6.25
f
),
NORM_HAMMING
,
0.98
f
);
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Descriptor_BoostDesc_BINBOOST_128
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_128
,
true
,
6.25
f
),
NORM_HAMMING
,
0.98
f
);
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Descriptor_BoostDesc_BINBOOST_256
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_256
,
true
,
6.25
f
),
NORM_HAMMING
,
0.999
f
);
test
.
safe_run
();
}
/*
* Detector's scale invariance check
*/
...
...
@@ -846,3 +909,66 @@ TEST(Features2d_ScaleInvariance_Descriptor_VGG48, regression)
0.93
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Descriptor_BoostDesc_BGM
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BGM
,
true
,
6.25
f
),
NORM_HAMMING
,
0.98
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Descriptor_BoostDesc_BGM_HARD
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BGM_HARD
,
true
,
6.25
f
),
NORM_HAMMING
,
0.75
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Descriptor_BoostDesc_BGM_BILINEAR
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BGM_BILINEAR
,
true
,
6.25
f
),
NORM_HAMMING
,
0.95
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Descriptor_BoostDesc_LBGM
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
LBGM
,
true
,
6.25
f
),
NORM_L1
,
0.98
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Descriptor_BoostDesc_BINBOOST_64
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_64
,
true
,
6.25
f
),
NORM_HAMMING
,
0.75
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Descriptor_BoostDesc_BINBOOST_128
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_128
,
true
,
6.25
f
),
NORM_HAMMING
,
0.95
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Descriptor_BoostDesc_BINBOOST_256
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
SURF
::
create
(),
BoostDesc
::
create
(
BoostDesc
::
BINBOOST_256
,
true
,
6.25
f
),
NORM_HAMMING
,
0.98
f
);
test
.
safe_run
();
}
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