Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
bb05af8e
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bb05af8e
编写于
3月 27, 2014
作者:
M
Martin Jul
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '2.4' into fixtypos
上级
73042b32
a1d15192
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
286 addition
and
28 deletion
+286
-28
modules/core/doc/old_basic_structures.rst
modules/core/doc/old_basic_structures.rst
+13
-1
modules/nonfree/doc/feature_detection.rst
modules/nonfree/doc/feature_detection.rst
+1
-1
modules/nonfree/include/opencv2/nonfree/ocl.hpp
modules/nonfree/include/opencv2/nonfree/ocl.hpp
+19
-3
modules/nonfree/perf/perf_main.cpp
modules/nonfree/perf/perf_main.cpp
+28
-1
modules/nonfree/perf/perf_surf.cpp
modules/nonfree/perf/perf_surf.cpp
+3
-9
modules/nonfree/perf/perf_surf_ocl.cpp
modules/nonfree/perf/perf_surf_ocl.cpp
+89
-0
modules/nonfree/src/nonfree_init.cpp
modules/nonfree/src/nonfree_init.cpp
+14
-0
modules/nonfree/src/surf_ocl.cpp
modules/nonfree/src/surf_ocl.cpp
+82
-2
modules/nonfree/test/test_features2d.cpp
modules/nonfree/test/test_features2d.cpp
+25
-5
modules/nonfree/test/test_rotation_and_scale_invariance.cpp
modules/nonfree/test/test_rotation_and_scale_invariance.cpp
+12
-6
未找到文件。
modules/core/doc/old_basic_structures.rst
浏览文件 @
bb05af8e
...
...
@@ -1436,7 +1436,7 @@ description rewritten using
IplImage* color_img = cvCreateImage(cvSize(320,240), IPL_DEPTH_8U, 3);
IplImage gray_img_hdr, *gray_img;
gray_img = (IplImage*)cvReshape
ND(color_img
, &gray_img_hdr, 1, 0, 0);
gray_img = (IplImage*)cvReshape
MatND(color_img, sizeof(gray_img_hdr)
, &gray_img_hdr, 1, 0, 0);
...
...
...
@@ -1444,6 +1444,18 @@ description rewritten using
int size[] = { 2, 2, 2 };
CvMatND* mat = cvCreateMatND(3, size, CV_32F);
CvMat row_header, *row;
row = (CvMat*)cvReshapeMatND(mat, sizeof(row_header), &row_header, 0, 1, 0);
..
In C, the header file for this function includes a convenient macro ``cvReshapeND`` that does away with the ``sizeof_header`` parameter. So, the lines containing the call to ``cvReshapeMatND`` in the examples may be replaced as follow:
::
gray_img = (IplImage*)cvReshapeND(color_img, &gray_img_hdr, 1, 0, 0);
...
row = (CvMat*)cvReshapeND(mat, &row_header, 0, 1, 0);
..
...
...
modules/nonfree/doc/feature_detection.rst
浏览文件 @
bb05af8e
...
...
@@ -240,7 +240,7 @@ The class ``SURF_GPU`` uses some buffers and provides access to it. All buffers
ocl::SURF_OCL
-------------
.. ocv:class:: ocl::SURF_OCL
.. ocv:class:: ocl::SURF_OCL
: public Feature2D
Class used for extracting Speeded Up Robust Features (SURF) from an image. ::
...
...
modules/nonfree/include/opencv2/nonfree/ocl.hpp
浏览文件 @
bb05af8e
...
...
@@ -53,7 +53,7 @@ namespace cv
//! Speeded up robust features, port from GPU module.
////////////////////////////////// SURF //////////////////////////////////////////
class
CV_EXPORTS
SURF_OCL
class
CV_EXPORTS
SURF_OCL
:
public
cv
::
Feature2D
{
public:
enum
KeypointLayout
...
...
@@ -72,10 +72,13 @@ namespace cv
SURF_OCL
();
//! the full constructor taking all the necessary parameters
explicit
SURF_OCL
(
double
_hessianThreshold
,
int
_nOctaves
=
4
,
int
_nOctaveLayers
=
2
,
bool
_extended
=
fals
e
,
float
_keypointsRatio
=
0.01
f
,
bool
_upright
=
false
);
int
_nOctaveLayers
=
2
,
bool
_extended
=
tru
e
,
float
_keypointsRatio
=
0.01
f
,
bool
_upright
=
false
);
//! returns the descriptor size in float's (64 or 128)
int
descriptorSize
()
const
;
int
descriptorType
()
const
;
//! upload host keypoints to device memory
void
uploadKeypoints
(
const
vector
<
cv
::
KeyPoint
>
&
keypoints
,
oclMat
&
keypointsocl
);
//! download keypoints from device to host memory
...
...
@@ -103,6 +106,17 @@ namespace cv
void
operator
()(
const
oclMat
&
img
,
const
oclMat
&
mask
,
std
::
vector
<
KeyPoint
>
&
keypoints
,
std
::
vector
<
float
>
&
descriptors
,
bool
useProvidedKeypoints
=
false
);
//! finds the keypoints using fast hessian detector used in SURF
void
operator
()(
InputArray
img
,
InputArray
mask
,
CV_OUT
vector
<
KeyPoint
>&
keypoints
)
const
;
//! finds the keypoints and computes their descriptors. Optionally it can compute descriptors for the user-provided keypoints
void
operator
()(
InputArray
img
,
InputArray
mask
,
CV_OUT
vector
<
KeyPoint
>&
keypoints
,
OutputArray
descriptors
,
bool
useProvidedKeypoints
=
false
)
const
;
AlgorithmInfo
*
info
()
const
;
void
releaseMemory
();
// SURF parameters
...
...
@@ -116,7 +130,9 @@ namespace cv
oclMat
sum
,
mask1
,
maskSum
,
intBuffer
;
oclMat
det
,
trace
;
oclMat
maxPosBuffer
;
protected:
void
detectImpl
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
const
Mat
&
mask
)
const
;
void
computeImpl
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
Mat
&
descriptors
)
const
;
};
}
}
...
...
modules/nonfree/perf/perf_main.cpp
浏览文件 @
bb05af8e
...
...
@@ -11,4 +11,31 @@ static const char * impls[] = {
"plain"
};
CV_PERF_TEST_MAIN_WITH_IMPLS
(
nonfree
,
impls
,
perf
::
printCudaInfo
())
#ifdef HAVE_OPENCL
#define DUMP_PROPERTY_XML(propertyName, propertyValue) \
do { \
std::stringstream ssName, ssValue;\
ssName << propertyName;\
ssValue << propertyValue; \
::testing::Test::RecordProperty(ssName.str(), ssValue.str()); \
} while (false)
#define DUMP_MESSAGE_STDOUT(msg) \
do { \
std::cout << msg << std::endl; \
} while (false)
#include "opencv2/ocl/private/opencl_dumpinfo.hpp"
#endif
int
main
(
int
argc
,
char
**
argv
)
{
::
perf
::
TestBase
::
setPerformanceStrategy
(
::
perf
::
PERF_STRATEGY_SIMPLE
);
#if defined(HAVE_CUDA)
CV_PERF_TEST_MAIN_INTERNALS
(
nonfree
,
impls
,
perf
::
printCudaInfo
());
#elif defined(HAVE_OPENCL)
CV_PERF_TEST_MAIN_INTERNALS
(
nonfree
,
impls
,
dumpOpenCLDevice
());
#else
CV_PERF_TEST_MAIN_INTERNALS
(
nonfree
,
impls
)
#endif
}
modules/nonfree/perf/perf_surf.cpp
浏览文件 @
bb05af8e
...
...
@@ -16,9 +16,7 @@ PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES))
{
String
filename
=
getDataPath
(
GetParam
());
Mat
frame
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
if
(
frame
.
empty
())
FAIL
()
<<
"Unable to load source image "
<<
filename
;
ASSERT_FALSE
(
frame
.
empty
())
<<
"Unable to load source image "
<<
filename
;
Mat
mask
;
declare
.
in
(
frame
).
time
(
90
);
...
...
@@ -34,9 +32,7 @@ PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
{
String
filename
=
getDataPath
(
GetParam
());
Mat
frame
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
if
(
frame
.
empty
())
FAIL
()
<<
"Unable to load source image "
<<
filename
;
ASSERT_FALSE
(
frame
.
empty
())
<<
"Unable to load source image "
<<
filename
;
Mat
mask
;
declare
.
in
(
frame
).
time
(
90
);
...
...
@@ -55,9 +51,7 @@ PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
{
String
filename
=
getDataPath
(
GetParam
());
Mat
frame
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
if
(
frame
.
empty
())
FAIL
()
<<
"Unable to load source image "
<<
filename
;
ASSERT_FALSE
(
frame
.
empty
())
<<
"Unable to load source image "
<<
filename
;
Mat
mask
;
declare
.
in
(
frame
).
time
(
90
);
...
...
modules/nonfree/perf/perf_surf_ocl.cpp
浏览文件 @
bb05af8e
...
...
@@ -121,4 +121,93 @@ PERF_TEST_P(OCL_SURF, DISABLED_without_data_transfer, testing::Values(SURF_IMAGE
SANITY_CHECK_NOTHING
();
}
PERF_TEST_P
(
OCL_SURF
,
DISABLED_detect
,
testing
::
Values
(
SURF_IMAGES
))
{
String
filename
=
getDataPath
(
GetParam
());
Mat
frame
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
frame
.
empty
())
<<
"Unable to load source image "
<<
filename
;
declare
.
in
(
frame
);
Mat
mask
;
vector
<
KeyPoint
>
points
;
Ptr
<
Feature2D
>
detector
;
if
(
getSelectedImpl
()
==
"plain"
)
{
detector
=
new
SURF
;
TEST_CYCLE
()
detector
->
operator
()(
frame
,
mask
,
points
,
noArray
());
}
else
if
(
getSelectedImpl
()
==
"ocl"
)
{
detector
=
new
ocl
::
SURF_OCL
;
OCL_TEST_CYCLE
()
detector
->
operator
()(
frame
,
mask
,
points
,
noArray
());
}
else
CV_TEST_FAIL_NO_IMPL
();
SANITY_CHECK_KEYPOINTS
(
points
,
1e-3
);
}
PERF_TEST_P
(
OCL_SURF
,
DISABLED_extract
,
testing
::
Values
(
SURF_IMAGES
))
{
String
filename
=
getDataPath
(
GetParam
());
Mat
frame
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
frame
.
empty
())
<<
"Unable to load source image "
<<
filename
;
declare
.
in
(
frame
);
Mat
mask
;
Ptr
<
Feature2D
>
detector
;
vector
<
KeyPoint
>
points
;
vector
<
float
>
descriptors
;
if
(
getSelectedImpl
()
==
"plain"
)
{
detector
=
new
SURF
;
detector
->
operator
()(
frame
,
mask
,
points
,
noArray
());
TEST_CYCLE
()
detector
->
operator
()(
frame
,
mask
,
points
,
descriptors
,
true
);
}
else
if
(
getSelectedImpl
()
==
"ocl"
)
{
detector
=
new
ocl
::
SURF_OCL
;
detector
->
operator
()(
frame
,
mask
,
points
,
noArray
());
OCL_TEST_CYCLE
()
detector
->
operator
()(
frame
,
mask
,
points
,
descriptors
,
true
);
}
else
CV_TEST_FAIL_NO_IMPL
();
SANITY_CHECK
(
descriptors
,
1e-4
);
}
PERF_TEST_P
(
OCL_SURF
,
DISABLED_full
,
testing
::
Values
(
SURF_IMAGES
))
{
String
filename
=
getDataPath
(
GetParam
());
Mat
frame
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
frame
.
empty
())
<<
"Unable to load source image "
<<
filename
;
declare
.
in
(
frame
).
time
(
90
);
Mat
mask
;
Ptr
<
Feature2D
>
detector
;
vector
<
KeyPoint
>
points
;
vector
<
float
>
descriptors
;
if
(
getSelectedImpl
()
==
"plain"
)
{
detector
=
new
SURF
;
TEST_CYCLE
()
detector
->
operator
()(
frame
,
mask
,
points
,
descriptors
,
false
);
}
else
if
(
getSelectedImpl
()
==
"ocl"
)
{
detector
=
new
ocl
::
SURF_OCL
;
detector
->
operator
()(
frame
,
mask
,
points
,
noArray
());
OCL_TEST_CYCLE
()
detector
->
operator
()(
frame
,
mask
,
points
,
descriptors
,
false
);
}
else
CV_TEST_FAIL_NO_IMPL
();
SANITY_CHECK_KEYPOINTS
(
points
,
1e-3
);
SANITY_CHECK
(
descriptors
,
1e-4
);
}
#endif // HAVE_OPENCV_OCL
modules/nonfree/src/nonfree_init.cpp
浏览文件 @
bb05af8e
...
...
@@ -63,6 +63,20 @@ CV_INIT_ALGORITHM(SIFT, "Feature2D.SIFT",
obj
.
info
()
->
addParam
(
obj
,
"edgeThreshold"
,
obj
.
edgeThreshold
);
obj
.
info
()
->
addParam
(
obj
,
"sigma"
,
obj
.
sigma
))
#ifdef HAVE_OPENCV_OCL
namespace
ocl
{
CV_INIT_ALGORITHM
(
SURF_OCL
,
"Feature2D.SURF_OCL"
,
obj
.
info
()
->
addParam
(
obj
,
"hessianThreshold"
,
obj
.
hessianThreshold
);
obj
.
info
()
->
addParam
(
obj
,
"nOctaves"
,
obj
.
nOctaves
);
obj
.
info
()
->
addParam
(
obj
,
"nOctaveLayers"
,
obj
.
nOctaveLayers
);
obj
.
info
()
->
addParam
(
obj
,
"extended"
,
obj
.
extended
);
obj
.
info
()
->
addParam
(
obj
,
"upright"
,
obj
.
upright
))
}
#endif
///////////////////////////////////////////////////////////////////////////////////////////////////////////
bool
initModule_nonfree
(
void
)
...
...
modules/nonfree/src/surf_ocl.cpp
浏览文件 @
bb05af8e
...
...
@@ -283,9 +283,9 @@ private:
cv
::
ocl
::
SURF_OCL
::
SURF_OCL
()
{
hessianThreshold
=
100.0
f
;
extended
=
tru
e
;
extended
=
fals
e
;
nOctaves
=
4
;
nOctaveLayers
=
2
;
nOctaveLayers
=
3
;
keypointsRatio
=
0.01
f
;
upright
=
false
;
}
...
...
@@ -305,6 +305,11 @@ int cv::ocl::SURF_OCL::descriptorSize() const
return
extended
?
128
:
64
;
}
int
cv
::
ocl
::
SURF_OCL
::
descriptorType
()
const
{
return
CV_32F
;
}
void
cv
::
ocl
::
SURF_OCL
::
uploadKeypoints
(
const
vector
<
KeyPoint
>
&
keypoints
,
oclMat
&
keypointsGPU
)
{
if
(
keypoints
.
empty
())
...
...
@@ -447,6 +452,81 @@ void cv::ocl::SURF_OCL::operator()(const oclMat &img, const oclMat &mask, vector
downloadDescriptors
(
descriptorsGPU
,
descriptors
);
}
void
cv
::
ocl
::
SURF_OCL
::
operator
()(
InputArray
img
,
InputArray
mask
,
CV_OUT
vector
<
KeyPoint
>&
keypoints
)
const
{
this
->
operator
()(
img
,
mask
,
keypoints
,
noArray
(),
false
);
}
void
cv
::
ocl
::
SURF_OCL
::
operator
()(
InputArray
img
,
InputArray
mask
,
vector
<
KeyPoint
>
&
keypoints
,
OutputArray
descriptors
,
bool
useProvidedKeypoints
)
const
{
oclMat
_img
,
_mask
;
if
(
img
.
kind
()
==
_InputArray
::
OCL_MAT
)
_img
=
*
(
oclMat
*
)
img
.
obj
;
else
_img
.
upload
(
img
.
getMat
());
if
(
_img
.
channels
()
!=
1
)
{
oclMat
temp
;
cvtColor
(
_img
,
temp
,
COLOR_BGR2GRAY
);
_img
=
temp
;
}
if
(
!
mask
.
empty
()
)
{
if
(
mask
.
kind
()
==
_InputArray
::
OCL_MAT
)
_mask
=
*
(
oclMat
*
)
mask
.
obj
;
else
_mask
.
upload
(
mask
.
getMat
());
}
SURF_OCL_Invoker
surf
((
SURF_OCL
&
)
*
this
,
_img
,
_mask
);
oclMat
keypointsGPU
;
if
(
!
useProvidedKeypoints
||
!
upright
)
((
SURF_OCL
*
)
this
)
->
uploadKeypoints
(
keypoints
,
keypointsGPU
);
if
(
!
useProvidedKeypoints
)
surf
.
detectKeypoints
(
keypointsGPU
);
else
if
(
!
upright
)
surf
.
findOrientation
(
keypointsGPU
);
if
(
keypointsGPU
.
cols
*
keypointsGPU
.
rows
!=
0
)
((
SURF_OCL
*
)
this
)
->
downloadKeypoints
(
keypointsGPU
,
keypoints
);
if
(
descriptors
.
needed
()
)
{
oclMat
descriptorsGPU
;
surf
.
computeDescriptors
(
keypointsGPU
,
descriptorsGPU
,
descriptorSize
());
Size
sz
=
descriptorsGPU
.
size
();
if
(
descriptors
.
kind
()
==
_InputArray
::
STD_VECTOR
)
{
CV_Assert
(
descriptors
.
type
()
==
CV_32F
);
std
::
vector
<
float
>*
v
=
(
std
::
vector
<
float
>*
)
descriptors
.
obj
;
v
->
resize
(
sz
.
width
*
sz
.
height
);
Mat
m
(
sz
,
CV_32F
,
&
v
->
at
(
0
));
descriptorsGPU
.
download
(
m
);
}
else
{
descriptors
.
create
(
sz
,
CV_32F
);
Mat
m
=
descriptors
.
getMat
();
descriptorsGPU
.
download
(
m
);
}
}
}
void
cv
::
ocl
::
SURF_OCL
::
detectImpl
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
const
Mat
&
mask
)
const
{
(
*
this
)(
image
,
mask
,
keypoints
,
noArray
(),
false
);
}
void
cv
::
ocl
::
SURF_OCL
::
computeImpl
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
Mat
&
descriptors
)
const
{
(
*
this
)(
image
,
Mat
(),
keypoints
,
descriptors
,
true
);
}
void
cv
::
ocl
::
SURF_OCL
::
releaseMemory
()
{
sum
.
release
();
...
...
modules/nonfree/test/test_features2d.cpp
浏览文件 @
bb05af8e
...
...
@@ -50,6 +50,22 @@ const string DETECTOR_DIR = FEATURES2D_DIR + "/feature_detectors";
const
string
DESCRIPTOR_DIR
=
FEATURES2D_DIR
+
"/descriptor_extractors"
;
const
string
IMAGE_FILENAME
=
"tsukuba.png"
;
#if defined(HAVE_OPENCV_OCL) && 0 // unblock this to see SURF_OCL tests failures
static
Ptr
<
Feature2D
>
getSURF
()
{
ocl
::
PlatformsInfo
p
;
if
(
ocl
::
getOpenCLPlatforms
(
p
)
>
0
)
return
new
ocl
::
SURF_OCL
;
else
return
new
SURF
;
}
#else
static
Ptr
<
Feature2D
>
getSURF
()
{
return
new
SURF
;
}
#endif
/****************************************************************************************\
* Regression tests for feature detectors comparing keypoints. *
\****************************************************************************************/
...
...
@@ -978,7 +994,7 @@ TEST( Features2d_Detector_SIFT, regression )
TEST
(
Features2d_Detector_SURF
,
regression
)
{
CV_FeatureDetectorTest
test
(
"detector-surf"
,
FeatureDetector
::
create
(
"SURF"
)
);
CV_FeatureDetectorTest
test
(
"detector-surf"
,
Ptr
<
FeatureDetector
>
(
getSURF
()
)
);
test
.
safe_run
();
}
...
...
@@ -995,7 +1011,7 @@ TEST( Features2d_DescriptorExtractor_SIFT, regression )
TEST
(
Features2d_DescriptorExtractor_SURF
,
regression
)
{
CV_DescriptorExtractorTest
<
L2
<
float
>
>
test
(
"descriptor-surf"
,
0.05
f
,
DescriptorExtractor
::
create
(
"SURF"
)
);
Ptr
<
DescriptorExtractor
>
(
getSURF
()
)
);
test
.
safe_run
();
}
...
...
@@ -1036,10 +1052,10 @@ TEST(Features2d_BruteForceDescriptorMatcher_knnMatch, regression)
const
int
sz
=
100
;
const
int
k
=
3
;
Ptr
<
DescriptorExtractor
>
ext
=
DescriptorExtractor
::
create
(
"SURF"
);
Ptr
<
DescriptorExtractor
>
ext
=
Ptr
<
DescriptorExtractor
>
(
getSURF
()
);
ASSERT_TRUE
(
ext
!=
NULL
);
Ptr
<
FeatureDetector
>
det
=
FeatureDetector
::
create
(
"SURF"
);
Ptr
<
FeatureDetector
>
det
=
Ptr
<
FeatureDetector
>
(
getSURF
()
);
//"%YAML:1.0\nhessianThreshold: 8000.\noctaves: 3\noctaveLayers: 4\nupright: 0\n"
ASSERT_TRUE
(
det
!=
NULL
);
...
...
@@ -1096,7 +1112,11 @@ public:
protected:
void
run
(
int
)
{
Ptr
<
Feature2D
>
f
=
Algorithm
::
create
<
Feature2D
>
(
"Feature2D."
+
fname
);
Ptr
<
Feature2D
>
f
;
if
(
fname
==
"SURF"
)
f
=
getSURF
();
else
f
=
Algorithm
::
create
<
Feature2D
>
(
"Feature2D."
+
fname
);
if
(
f
.
empty
())
return
;
string
path
=
string
(
ts
->
get_data_path
())
+
"detectors_descriptors_evaluation/planar/"
;
...
...
modules/nonfree/test/test_rotation_and_scale_invariance.cpp
浏览文件 @
bb05af8e
...
...
@@ -48,6 +48,12 @@ using namespace cv;
const
string
IMAGE_TSUKUBA
=
"/features2d/tsukuba.png"
;
const
string
IMAGE_BIKES
=
"/detectors_descriptors_evaluation/images_datasets/bikes/img1.png"
;
#if defined(HAVE_OPENCV_OCL) && 0 // unblock this to see SURF_OCL tests failures
#define SURF_NAME "Feature2D.SURF_OCL"
#else
#define SURF_NAME "Feature2D.SURF"
#endif
#define SHOW_DEBUG_LOG 0
static
...
...
@@ -615,7 +621,7 @@ protected:
*/
TEST
(
Features2d_RotationInvariance_Detector_SURF
,
regression
)
{
DetectorRotationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SURF"
),
DetectorRotationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
SURF_NAME
),
0.44
f
,
0.76
f
);
test
.
safe_run
();
...
...
@@ -634,8 +640,8 @@ TEST(Features2d_RotationInvariance_Detector_SIFT, DISABLED_regression)
*/
TEST
(
Features2d_RotationInvariance_Descriptor_SURF
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SURF"
),
Algorithm
::
create
<
DescriptorExtractor
>
(
"Feature2D.SURF"
),
DescriptorRotationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
SURF_NAME
),
Algorithm
::
create
<
DescriptorExtractor
>
(
SURF_NAME
),
NORM_L1
,
0.83
f
);
test
.
safe_run
();
...
...
@@ -655,7 +661,7 @@ TEST(Features2d_RotationInvariance_Descriptor_SIFT, regression)
*/
TEST
(
Features2d_ScaleInvariance_Detector_SURF
,
regression
)
{
DetectorScaleInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SURF"
),
DetectorScaleInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
SURF_NAME
),
0.64
f
,
0.84
f
);
test
.
safe_run
();
...
...
@@ -674,8 +680,8 @@ TEST(Features2d_ScaleInvariance_Detector_SIFT, regression)
*/
TEST
(
Features2d_ScaleInvariance_Descriptor_SURF
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SURF"
),
Algorithm
::
create
<
DescriptorExtractor
>
(
"Feature2D.SURF"
),
DescriptorScaleInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
SURF_NAME
),
Algorithm
::
create
<
DescriptorExtractor
>
(
SURF_NAME
),
NORM_L1
,
0.61
f
);
test
.
safe_run
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录