Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
8a4f3570
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,发现更多精彩内容 >>
提交
8a4f3570
编写于
11月 21, 2013
作者:
A
Andrey Pavlenko
提交者:
OpenCV Buildbot
11月 21, 2013
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1840 from ilya-lavrenov:ocl_cvtColor
上级
2509b795
d764af53
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
8 deletion
+40
-8
modules/ocl/perf/perf_color.cpp
modules/ocl/perf/perf_color.cpp
+40
-8
未找到文件。
modules/ocl/perf/perf_color.cpp
浏览文件 @
8a4f3570
...
...
@@ -46,30 +46,62 @@
#include "perf_precomp.hpp"
using
namespace
perf
;
using
std
::
tr1
::
tuple
;
using
std
::
tr1
::
get
;
using
std
::
tr1
::
make_tuple
;
///////////// cvtColor////////////////////////
typedef
TestBaseWithParam
<
Size
>
cvtColorFixture
;
CV_ENUM
(
ConversionTypes
,
CV_RGB2GRAY
,
CV_RGB2BGR
,
CV_RGB2YUV
,
CV_YUV2RGB
,
CV_RGB2YCrCb
,
CV_YCrCb2RGB
,
CV_RGB2XYZ
,
CV_XYZ2RGB
,
CV_RGB2HSV
,
CV_HSV2RGB
,
CV_RGB2HLS
,
CV_HLS2RGB
,
CV_BGR5652BGR
,
CV_BGR2BGR565
,
CV_RGBA2mRGBA
,
CV_mRGBA2RGBA
,
CV_YUV2RGB_NV12
)
PERF_TEST_P
(
cvtColorFixture
,
cvtColor
,
OCL_TYPICAL_MAT_SIZES
)
typedef
tuple
<
Size
,
tuple
<
ConversionTypes
,
int
,
int
>
>
cvtColorParams
;
typedef
TestBaseWithParam
<
cvtColorParams
>
cvtColorFixture
;
PERF_TEST_P
(
cvtColorFixture
,
cvtColor
,
testing
::
Combine
(
testing
::
Values
(
Size
(
1000
,
1002
),
Size
(
2000
,
2004
),
Size
(
4000
,
4008
)),
testing
::
Values
(
make_tuple
(
ConversionTypes
(
CV_RGB2GRAY
),
3
,
1
),
make_tuple
(
ConversionTypes
(
CV_RGB2BGR
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_RGB2YUV
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_YUV2RGB
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_RGB2YCrCb
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_YCrCb2RGB
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_RGB2XYZ
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_XYZ2RGB
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_RGB2HSV
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_HSV2RGB
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_RGB2HLS
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_HLS2RGB
),
3
,
3
),
make_tuple
(
ConversionTypes
(
CV_BGR5652BGR
),
2
,
3
),
make_tuple
(
ConversionTypes
(
CV_BGR2BGR565
),
3
,
2
),
make_tuple
(
ConversionTypes
(
CV_RGBA2mRGBA
),
4
,
4
),
make_tuple
(
ConversionTypes
(
CV_mRGBA2RGBA
),
4
,
4
),
make_tuple
(
ConversionTypes
(
CV_YUV2RGB_NV12
),
1
,
3
)
)))
{
const
Size
srcSize
=
GetParam
();
cvtColorParams
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
tuple
<
int
,
int
,
int
>
conversionParams
=
get
<
1
>
(
params
);
const
int
code
=
get
<
0
>
(
conversionParams
),
scn
=
get
<
1
>
(
conversionParams
),
dcn
=
get
<
2
>
(
conversionParams
);
Mat
src
(
srcSize
,
CV_8UC
4
),
dst
(
srcSize
,
CV_8UC4
);
Mat
src
(
srcSize
,
CV_8UC
(
scn
)),
dst
(
srcSize
,
CV_8UC
(
scn
)
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
if
(
RUN_OCL_IMPL
)
{
ocl
::
oclMat
oclSrc
(
src
),
oclDst
(
src
.
size
(),
CV_8UC4
);
ocl
::
oclMat
oclSrc
(
src
),
oclDst
(
src
.
size
(),
dst
.
type
()
);
OCL_TEST_CYCLE
()
ocl
::
cvtColor
(
oclSrc
,
oclDst
,
CV_RGBA2GRAY
,
4
);
OCL_TEST_CYCLE
()
ocl
::
cvtColor
(
oclSrc
,
oclDst
,
code
,
dcn
);
oclDst
.
download
(
dst
);
SANITY_CHECK
(
dst
);
SANITY_CHECK
(
dst
,
1
);
}
else
if
(
RUN_PLAIN_IMPL
)
{
TEST_CYCLE
()
cv
::
cvtColor
(
src
,
dst
,
CV_RGBA2GRAY
,
4
);
TEST_CYCLE
()
cv
::
cvtColor
(
src
,
dst
,
code
,
dcn
);
SANITY_CHECK
(
dst
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录