Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
e9ba5c22
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,发现更多精彩内容 >>
提交
e9ba5c22
编写于
10月 23, 2012
作者:
D
Daniil Osokin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
extended perf test warpPerspectiveLarge
上级
22e352d9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
22 deletion
+38
-22
modules/imgproc/perf/perf_warp.cpp
modules/imgproc/perf/perf_warp.cpp
+38
-22
未找到文件。
modules/imgproc/perf/perf_warp.cpp
浏览文件 @
e9ba5c22
...
...
@@ -15,6 +15,7 @@ CV_ENUM(RemapMode, HALF_SIZE, UPSIDE_DOWN, REFLECTION_X, REFLECTION_BOTH)
typedef
TestBaseWithParam
<
tr1
::
tuple
<
Size
,
InterType
,
BorderMode
>
>
TestWarpAffine
;
typedef
TestBaseWithParam
<
tr1
::
tuple
<
Size
,
InterType
,
BorderMode
>
>
TestWarpPerspective
;
typedef
TestBaseWithParam
<
tr1
::
tuple
<
Size
,
InterType
,
BorderMode
,
MatType
>
>
TestWarpPerspectiveNear_t
;
typedef
TestBaseWithParam
<
tr1
::
tuple
<
MatType
,
Size
,
InterType
,
BorderMode
,
RemapMode
>
>
TestRemap
;
void
update_map
(
const
Mat
&
src
,
Mat
&
map_x
,
Mat
&
map_y
,
const
int
remapMode
);
...
...
@@ -80,44 +81,59 @@ PERF_TEST_P( TestWarpPerspective, WarpPerspective,
SANITY_CHECK
(
dst
);
}
PERF_TEST_P
(
TestWarpPerspective
,
WarpPerspectiveLarge
,
PERF_TEST_P
(
TestWarpPerspective
Near_t
,
WarpPerspectiveNear
,
Combine
(
Values
(
sz3MP
,
sz5MP
),
ValuesIn
(
InterType
::
all
()
),
ValuesIn
(
BorderMode
::
all
()
)
Values
(
Size
(
176
,
144
),
Size
(
320
,
240
),
Size
(
352
,
288
),
Size
(
480
,
480
),
Size
(
640
,
480
),
Size
(
704
,
576
),
Size
(
720
,
408
),
Size
(
720
,
480
),
Size
(
720
,
576
),
Size
(
768
,
432
),
Size
(
800
,
448
),
Size
(
960
,
720
),
Size
(
1024
,
768
),
Size
(
1280
,
720
),
Size
(
1280
,
960
),
Size
(
1360
,
720
),
Size
(
1600
,
1200
),
Size
(
1920
,
1080
),
Size
(
2048
,
1536
),
Size
(
2592
,
1920
),
Size
(
2592
,
1944
),
Size
(
3264
,
2448
),
Size
(
4096
,
3072
),
Size
(
4208
,
3120
)
),
ValuesIn
(
InterType
::
all
()
),
ValuesIn
(
BorderMode
::
all
()
),
Values
(
CV_8UC1
,
CV_8UC4
)
)
)
)
{
Size
s
z
;
int
borderMode
,
interType
;
s
z
=
get
<
0
>
(
GetParam
());
Size
s
ize
;
int
borderMode
,
interType
,
type
;
s
ize
=
get
<
0
>
(
GetParam
());
borderMode
=
get
<
1
>
(
GetParam
());
interType
=
get
<
2
>
(
GetParam
());
type
=
get
<
3
>
(
GetParam
());
Mat
src
,
img
=
imread
(
getDataPath
(
"cv/shared/5MP.png"
));
string
resolution
;
if
(
sz
==
sz3MP
)
resolution
=
"3MP"
;
else
if
(
sz
==
sz5MP
)
resolution
=
"5MP"
;
if
(
type
==
CV_8UC1
)
{
cvtColor
(
img
,
src
,
COLOR_BGR2GRAY
,
1
);
}
else
if
(
type
==
CV_8UC4
)
{
cvtColor
(
img
,
src
,
COLOR_BGR2BGRA
,
4
);
}
else
{
FAIL
();
}
Mat
src
,
img
=
imread
(
getDataPath
(
"cv/shared/"
+
resolution
+
".png"
));
cvtColor
(
img
,
src
,
COLOR_BGR2BGRA
,
4
);
resize
(
src
,
src
,
size
);
int
shift
=
103
;
Mat
srcVertices
=
(
Mat_
<
Vec2f
>
(
1
,
4
)
<<
Vec2f
(
0
,
0
),
Vec2f
(
s
z
.
width
-
1
,
0
),
Vec2f
(
s
z
.
width
-
1
,
sz
.
height
-
1
),
Vec2f
(
0
,
sz
.
height
-
1
));
Mat
dstVertices
=
(
Mat_
<
Vec2f
>
(
1
,
4
)
<<
Vec2f
(
0
,
shift
),
Vec2f
(
s
z
.
width
-
shift
/
2
,
0
),
Vec2f
(
s
z
.
width
-
shift
,
sz
.
height
-
shift
),
Vec2f
(
shift
/
2
,
sz
.
height
-
1
));
int
shift
=
src
.
cols
*
0.04
;
Mat
srcVertices
=
(
Mat_
<
Vec2f
>
(
1
,
4
)
<<
Vec2f
(
0
,
0
),
Vec2f
(
s
ize
.
width
-
1
,
0
),
Vec2f
(
s
ize
.
width
-
1
,
size
.
height
-
1
),
Vec2f
(
0
,
size
.
height
-
1
));
Mat
dstVertices
=
(
Mat_
<
Vec2f
>
(
1
,
4
)
<<
Vec2f
(
0
,
shift
),
Vec2f
(
s
ize
.
width
-
shift
/
2
,
0
),
Vec2f
(
s
ize
.
width
-
shift
,
size
.
height
-
shift
),
Vec2f
(
shift
/
2
,
size
.
height
-
1
));
Mat
warpMat
=
getPerspectiveTransform
(
srcVertices
,
dstVertices
);
Mat
dst
(
s
z
,
CV_8UC4
);
Mat
dst
(
s
ize
,
type
);
declare
.
in
(
src
).
out
(
dst
);
TEST_CYCLE
()
warpPerspective
(
src
,
dst
,
warpMat
,
sz
,
interType
,
borderMode
,
Scalar
::
all
(
150
)
);
{
warpPerspective
(
src
,
dst
,
warpMat
,
size
,
interType
,
borderMode
,
Scalar
::
all
(
150
)
);
}
SANITY_CHECK
(
dst
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录