Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
78a0b978
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,发现更多精彩内容 >>
提交
78a0b978
编写于
10月 15, 2012
作者:
V
Vadim Pisarevsky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed build errors on Mac; moved test for #2332 from imgproc to highgui
上级
460644b8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
26 deletion
+30
-26
modules/core/src/parallel.cpp
modules/core/src/parallel.cpp
+2
-1
modules/highgui/test/test_grfmt.cpp
modules/highgui/test/test_grfmt.cpp
+28
-0
modules/imgproc/test/test_color.cpp
modules/imgproc/test/test_color.cpp
+0
-25
未找到文件。
modules/core/src/parallel.cpp
浏览文件 @
78a0b978
...
@@ -85,6 +85,7 @@
...
@@ -85,6 +85,7 @@
#include <omp.h>
#include <omp.h>
#elif defined HAVE_GCD
#elif defined HAVE_GCD
#include <dispatch/dispatch.h>
#include <dispatch/dispatch.h>
#include <sys/sysctl.h>
#include <pthread.h>
#include <pthread.h>
#elif defined HAVE_CONCURRENCY
#elif defined HAVE_CONCURRENCY
#include <ppl.h>
#include <ppl.h>
...
@@ -371,7 +372,7 @@ int cv::getThreadNum(void)
...
@@ -371,7 +372,7 @@ int cv::getThreadNum(void)
#elif defined HAVE_OPENMP
#elif defined HAVE_OPENMP
return
omp_get_thread_num
();
return
omp_get_thread_num
();
#elif defined HAVE_GCD
#elif defined HAVE_GCD
return
statc_cast
<
int
>
(
pthread_self
()
);
// no zero-based indexing
return
(
int
)(
size_t
)(
void
*
)
pthread_self
(
);
// no zero-based indexing
#elif defined HAVE_CONCURRENCY
#elif defined HAVE_CONCURRENCY
return
std
::
max
(
0
,
(
int
)
Concurrency
::
Context
::
VirtualProcessorId
());
// zero for master thread, unique number for others but not necessary 1,2,3,...
return
std
::
max
(
0
,
(
int
)
Concurrency
::
Context
::
VirtualProcessorId
());
// zero for master thread, unique number for others but not necessary 1,2,3,...
#else
#else
...
...
modules/highgui/test/test_grfmt.cpp
浏览文件 @
78a0b978
...
@@ -255,3 +255,31 @@ public:
...
@@ -255,3 +255,31 @@ public:
TEST
(
Highgui_Image
,
encode_png
)
{
CV_GrfmtPNGEncodeTest
test
;
test
.
safe_run
();
}
TEST
(
Highgui_Image
,
encode_png
)
{
CV_GrfmtPNGEncodeTest
test
;
test
.
safe_run
();
}
#endif
#endif
#ifdef HAVE_JPEG
TEST
(
Highgui_ImreadVSCvtColor
,
regression
)
{
cvtest
::
TS
&
ts
=
*
cvtest
::
TS
::
ptr
();
const
int
MAX_MEAN_DIFF
=
3
;
const
int
MAX_ABS_DIFF
=
10
;
string
imgName
=
string
(
ts
.
get_data_path
())
+
"/../cv/shared/lena.jpg"
;
Mat
original_image
=
imread
(
imgName
);
Mat
gray_by_codec
=
imread
(
imgName
,
0
);
Mat
gray_by_cvt
;
cvtColor
(
original_image
,
gray_by_cvt
,
CV_BGR2GRAY
);
Mat
diff
;
absdiff
(
gray_by_codec
,
gray_by_cvt
,
diff
);
double
actual_avg_diff
=
(
double
)
mean
(
diff
)[
0
];
double
actual_maxval
,
actual_minval
;
minMaxLoc
(
diff
,
&
actual_minval
,
&
actual_maxval
);
EXPECT_LT
(
actual_avg_diff
,
MAX_MEAN_DIFF
);
EXPECT_LT
(
actual_maxval
,
MAX_ABS_DIFF
);
}
#endif
modules/imgproc/test/test_color.cpp
浏览文件 @
78a0b978
...
@@ -1683,31 +1683,6 @@ TEST(Imgproc_ColorLuv, accuracy) { CV_ColorLuvTest test; test.safe_run(); }
...
@@ -1683,31 +1683,6 @@ TEST(Imgproc_ColorLuv, accuracy) { CV_ColorLuvTest test; test.safe_run(); }
TEST
(
Imgproc_ColorRGB
,
accuracy
)
{
CV_ColorRGBTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_ColorRGB
,
accuracy
)
{
CV_ColorRGBTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_ColorBayer
,
accuracy
)
{
CV_ColorBayerTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_ColorBayer
,
accuracy
)
{
CV_ColorBayerTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_ImreadVSCvtColor
,
regression
)
{
cvtest
::
TS
&
ts
=
*
cvtest
::
TS
::
ptr
();
const
int
MAX_MEAN_DIFF
=
3
;
const
int
MAX_ABS_DIFF
=
10
;
string
imgName
=
string
(
ts
.
get_data_path
())
+
"/shared/lena.jpg"
;
Mat
original_image
=
imread
(
imgName
);
Mat
gray_by_codec
=
imread
(
imgName
,
0
);
Mat
gray_by_cvt
;
cvtColor
(
original_image
,
gray_by_cvt
,
CV_BGR2GRAY
);
Mat
diff
;
absdiff
(
gray_by_codec
,
gray_by_cvt
,
diff
);
double
actual_avg_diff
=
(
double
)
sum
(
diff
)[
0
]
/
countNonZero
(
diff
);
double
actual_maxval
,
actual_minval
;
minMaxLoc
(
diff
,
&
actual_minval
,
&
actual_maxval
);
EXPECT_LT
(
actual_avg_diff
,
MAX_MEAN_DIFF
);
EXPECT_LT
(
actual_maxval
,
MAX_ABS_DIFF
);
}
TEST
(
Imgproc_ColorBayer
,
regression
)
TEST
(
Imgproc_ColorBayer
,
regression
)
{
{
cvtest
::
TS
&
ts
=
*
cvtest
::
TS
::
ptr
();
cvtest
::
TS
&
ts
=
*
cvtest
::
TS
::
ptr
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录