Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
5c961169
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,发现更多精彩内容 >>
提交
5c961169
编写于
8月 03, 2017
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #9308 from alalek:akaze_fixes
上级
922ac1a1
94dbc35d
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
289 addition
and
279 deletion
+289
-279
modules/features2d/src/kaze/AKAZEFeatures.cpp
modules/features2d/src/kaze/AKAZEFeatures.cpp
+223
-227
modules/features2d/src/kaze/AKAZEFeatures.h
modules/features2d/src/kaze/AKAZEFeatures.h
+4
-9
modules/features2d/test/test_descriptors_regression.cpp
modules/features2d/test/test_descriptors_regression.cpp
+57
-42
modules/ts/misc/run_long.py
modules/ts/misc/run_long.py
+5
-1
未找到文件。
modules/features2d/src/kaze/AKAZEFeatures.cpp
浏览文件 @
5c961169
此差异已折叠。
点击以展开。
modules/features2d/src/kaze/AKAZEFeatures.h
浏览文件 @
5c961169
...
@@ -29,15 +29,10 @@ struct Evolution
...
@@ -29,15 +29,10 @@ struct Evolution
border
=
0
;
border
=
0
;
}
}
UMat
Lx
,
Ly
;
///< First order spatial derivatives
Mat
Lx
,
Ly
;
///< First order spatial derivatives
UMat
Lt
;
///< Evolution image
Mat
Lt
;
///< Evolution image
UMat
Lsmooth
;
///< Smoothed image, used only for computing determinant, released afterwards
Mat
Lsmooth
;
///< Smoothed image, used only for computing determinant, released afterwards
UMat
Ldet
;
///< Detector response
Mat
Ldet
;
///< Detector response
// the same as above, holding CPU mapping to UMats above
Mat
Mx
,
My
;
Mat
Mt
;
Mat
Mdet
;
Size
size
;
///< Size of the layer
Size
size
;
///< Size of the layer
float
etime
;
///< Evolution time
float
etime
;
///< Evolution time
...
...
modules/features2d/test/test_descriptors_regression.cpp
浏览文件 @
5c961169
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
using
namespace
std
;
using
namespace
std
;
using
namespace
cv
;
using
namespace
cv
;
using
namespace
testing
;
const
string
FEATURES2D_DIR
=
"features2d"
;
const
string
FEATURES2D_DIR
=
"features2d"
;
const
string
IMAGE_FILENAME
=
"tsukuba.png"
;
const
string
IMAGE_FILENAME
=
"tsukuba.png"
;
...
@@ -417,68 +418,82 @@ TEST( Features2d_DescriptorExtractor, batch )
...
@@ -417,68 +418,82 @@ TEST( Features2d_DescriptorExtractor, batch )
}
}
}
}
TEST
(
Features2d_Feature2d
,
no_crash
)
class
DescriptorImage
:
public
TestWithParam
<
std
::
string
>
{
protected:
virtual
void
SetUp
()
{
pattern
=
GetParam
();
}
std
::
string
pattern
;
};
TEST_P
(
DescriptorImage
,
no_crash
)
{
{
const
String
&
pattern
=
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
"shared/*.png"
);
vector
<
String
>
fnames
;
vector
<
String
>
fnames
;
glob
(
pattern
,
fnames
,
false
);
glob
(
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
pattern
,
fnames
,
false
);
sort
(
fnames
.
begin
(),
fnames
.
end
());
sort
(
fnames
.
begin
(),
fnames
.
end
());
Ptr
<
AKAZE
>
akaze
=
AKAZE
::
create
();
Ptr
<
AKAZE
>
akaze_mldb
=
AKAZE
::
create
(
AKAZE
::
DESCRIPTOR_MLDB
);
Ptr
<
AKAZE
>
akaze_mldb_upright
=
AKAZE
::
create
(
AKAZE
::
DESCRIPTOR_MLDB_UPRIGHT
);
Ptr
<
AKAZE
>
akaze_mldb_256
=
AKAZE
::
create
(
AKAZE
::
DESCRIPTOR_MLDB
,
256
);
Ptr
<
AKAZE
>
akaze_mldb_upright_256
=
AKAZE
::
create
(
AKAZE
::
DESCRIPTOR_MLDB_UPRIGHT
,
256
);
Ptr
<
AKAZE
>
akaze_kaze
=
AKAZE
::
create
(
AKAZE
::
DESCRIPTOR_KAZE
);
Ptr
<
AKAZE
>
akaze_kaze_upright
=
AKAZE
::
create
(
AKAZE
::
DESCRIPTOR_KAZE_UPRIGHT
);
Ptr
<
ORB
>
orb
=
ORB
::
create
();
Ptr
<
ORB
>
orb
=
ORB
::
create
();
Ptr
<
KAZE
>
kaze
=
KAZE
::
create
();
Ptr
<
KAZE
>
kaze
=
KAZE
::
create
();
Ptr
<
BRISK
>
brisk
=
BRISK
::
create
();
Ptr
<
BRISK
>
brisk
=
BRISK
::
create
();
size_t
i
,
n
=
fnames
.
size
();
size_t
n
=
fnames
.
size
();
vector
<
KeyPoint
>
keypoints
;
vector
<
KeyPoint
>
keypoints
;
Mat
descriptors
;
Mat
descriptors
;
orb
->
setMaxFeatures
(
5000
);
orb
->
setMaxFeatures
(
5000
);
for
(
i
=
0
;
i
<
n
;
i
++
)
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
{
{
printf
(
"%d. image: %s:
\n
"
,
(
int
)
i
,
fnames
[
i
].
c_str
());
printf
(
"%d. image: %s:
\n
"
,
(
int
)
i
,
fnames
[
i
].
c_str
());
if
(
strstr
(
fnames
[
i
].
c_str
(),
"MP.png"
)
!=
0
)
if
(
strstr
(
fnames
[
i
].
c_str
(),
"MP.png"
)
!=
0
)
{
printf
(
"
\t
skip
\n
"
);
continue
;
continue
;
}
bool
checkCount
=
strstr
(
fnames
[
i
].
c_str
(),
"templ.png"
)
==
0
;
bool
checkCount
=
strstr
(
fnames
[
i
].
c_str
(),
"templ.png"
)
==
0
;
Mat
img
=
imread
(
fnames
[
i
],
-
1
);
Mat
img
=
imread
(
fnames
[
i
],
-
1
);
printf
(
"
\t
AKAZE ... "
);
fflush
(
stdout
);
akaze
->
detectAndCompute
(
img
,
noArray
(),
keypoints
,
descriptors
);
printf
(
"(%d keypoints) "
,
(
int
)
keypoints
.
size
());
fflush
(
stdout
);
if
(
checkCount
)
{
EXPECT_GT
((
int
)
keypoints
.
size
(),
0
);
}
ASSERT_EQ
(
descriptors
.
rows
,
(
int
)
keypoints
.
size
());
printf
(
"ok
\n
"
);
printf
(
"
\t
KAZE ... "
);
fflush
(
stdout
);
printf
(
"
\t
%dx%d
\n
"
,
img
.
cols
,
img
.
rows
);
kaze
->
detectAndCompute
(
img
,
noArray
(),
keypoints
,
descriptors
);
printf
(
"(%d keypoints) "
,
(
int
)
keypoints
.
size
());
fflush
(
stdout
);
#define TEST_DETECTOR(name, descriptor) \
if
(
checkCount
)
keypoints.clear(); descriptors.release(); \
{
printf("\t" name "\n"); fflush(stdout); \
EXPECT_GT
((
int
)
keypoints
.
size
(),
0
);
descriptor->detectAndCompute(img, noArray(), keypoints, descriptors); \
}
printf("\t\t\t(%d keypoints, descriptor size = %d)\n", (int)keypoints.size(), descriptors.cols); fflush(stdout); \
if (checkCount) \
{ \
EXPECT_GT((int)keypoints.size(), 0); \
} \
ASSERT_EQ(descriptors.rows, (int)keypoints.size());
ASSERT_EQ(descriptors.rows, (int)keypoints.size());
printf
(
"ok
\n
"
);
printf
(
"
\t
ORB ... "
);
fflush
(
stdout
);
TEST_DETECTOR
(
"AKAZE:MLDB"
,
akaze_mldb
);
orb
->
detectAndCompute
(
img
,
noArray
(),
keypoints
,
descriptors
);
TEST_DETECTOR
(
"AKAZE:MLDB_UPRIGHT"
,
akaze_mldb_upright
);
printf
(
"(%d keypoints) "
,
(
int
)
keypoints
.
size
());
fflush
(
stdout
);
TEST_DETECTOR
(
"AKAZE:MLDB_256"
,
akaze_mldb_256
);
if
(
checkCount
)
TEST_DETECTOR
(
"AKAZE:MLDB_UPRIGHT_256"
,
akaze_mldb_upright_256
);
{
TEST_DETECTOR
(
"AKAZE:KAZE"
,
akaze_kaze
);
EXPECT_GT
((
int
)
keypoints
.
size
(),
0
);
TEST_DETECTOR
(
"AKAZE:KAZE_UPRIGHT"
,
akaze_kaze_upright
);
}
TEST_DETECTOR
(
"KAZE"
,
kaze
);
ASSERT_EQ
(
descriptors
.
rows
,
(
int
)
keypoints
.
size
());
TEST_DETECTOR
(
"ORB"
,
orb
);
printf
(
"ok
\n
"
);
TEST_DETECTOR
(
"BRISK"
,
brisk
);
printf
(
"
\t
BRISK ... "
);
fflush
(
stdout
);
brisk
->
detectAndCompute
(
img
,
noArray
(),
keypoints
,
descriptors
);
printf
(
"(%d keypoints) "
,
(
int
)
keypoints
.
size
());
fflush
(
stdout
);
if
(
checkCount
)
{
EXPECT_GT
((
int
)
keypoints
.
size
(),
0
);
}
ASSERT_EQ
(
descriptors
.
rows
,
(
int
)
keypoints
.
size
());
printf
(
"ok
\n
"
);
}
}
}
}
INSTANTIATE_TEST_CASE_P
(
Features2d
,
DescriptorImage
,
testing
::
Values
(
"shared/lena.png"
,
"shared/box*.png"
,
"shared/fruits*.png"
,
"shared/airplane.png"
,
"shared/graffiti.png"
,
"shared/1_itseez-0001*.png"
,
"shared/pic*.png"
,
"shared/templ.png"
)
);
modules/ts/misc/run_long.py
浏览文件 @
5c961169
...
@@ -8,7 +8,11 @@ from pprint import PrettyPrinter as PP
...
@@ -8,7 +8,11 @@ from pprint import PrettyPrinter as PP
LONG_TESTS_DEBUG_VALGRIND
=
[
LONG_TESTS_DEBUG_VALGRIND
=
[
(
'calib3d'
,
'Calib3d_InitUndistortRectifyMap.accuracy'
,
2017.22
),
(
'calib3d'
,
'Calib3d_InitUndistortRectifyMap.accuracy'
,
2017.22
),
(
'dnn'
,
'Reproducibility*'
,
1000
),
# large DNN models
(
'dnn'
,
'Reproducibility*'
,
1000
),
# large DNN models
(
'features2d'
,
'Features2d_Feature2d.no_crash'
,
1235.68
),
(
'features2d'
,
'Features2d/DescriptorImage.no_crash/3'
,
1000
),
(
'features2d'
,
'Features2d/DescriptorImage.no_crash/4'
,
1000
),
(
'features2d'
,
'Features2d/DescriptorImage.no_crash/5'
,
1000
),
(
'features2d'
,
'Features2d/DescriptorImage.no_crash/6'
,
1000
),
(
'features2d'
,
'Features2d/DescriptorImage.no_crash/7'
,
1000
),
(
'imgcodecs'
,
'Imgcodecs_Png.write_big'
,
1000
),
# memory limit
(
'imgcodecs'
,
'Imgcodecs_Png.write_big'
,
1000
),
# memory limit
(
'imgcodecs'
,
'Imgcodecs_Tiff.decode_tile16384x16384'
,
1000
),
# memory limit
(
'imgcodecs'
,
'Imgcodecs_Tiff.decode_tile16384x16384'
,
1000
),
# memory limit
(
'ml'
,
'ML_RTrees.regression'
,
1423.47
),
(
'ml'
,
'ML_RTrees.regression'
,
1423.47
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录