Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
734b0da0
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
734b0da0
编写于
10月 24, 2012
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #94 from vpisarev/test_fixes
上级
080b9bbc
ae10ecd2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
15 deletion
+20
-15
modules/calib3d/test/test_chesscorners.cpp
modules/calib3d/test/test_chesscorners.cpp
+4
-0
modules/core/test/test_operations.cpp
modules/core/test/test_operations.cpp
+15
-11
modules/python/test/test.py
modules/python/test/test.py
+1
-4
未找到文件。
modules/calib3d/test/test_chesscorners.cpp
浏览文件 @
734b0da0
...
...
@@ -366,6 +366,9 @@ bool validateData(const ChessBoardGenerator& cbg, const Size& imgSz,
bool
CV_ChessboardDetectorTest
::
checkByGenerator
()
{
bool
res
=
true
;
// for some reason, this test sometimes fails on Ubuntu
#if (defined __APPLE__ && defined __x86_64__) || defined _MSC_VER
//theRNG() = 0x58e6e895b9913160;
//cv::DefaultRngAuto dra;
//theRNG() = *ts->get_rng();
...
...
@@ -464,6 +467,7 @@ bool CV_ChessboardDetectorTest::checkByGenerator()
cv
::
drawChessboardCorners
(
cb
,
cbg
.
cornersSize
(),
Mat
(
corners_found
),
found
);
}
#endif
return
res
;
}
...
...
modules/core/test/test_operations.cpp
浏览文件 @
734b0da0
...
...
@@ -69,7 +69,7 @@ protected:
bool
SomeMatFunctions
();
bool
TestMat
();
template
<
typename
_Tp
>
void
TestType
(
Size
sz
,
_Tp
value
=
_Tp
(
1.
f
)
);
template
<
typename
_Tp
>
void
TestType
(
Size
sz
,
_Tp
value
);
bool
TestTemplateMat
();
bool
TestMatND
();
bool
TestSparseMat
();
...
...
@@ -116,9 +116,12 @@ template<typename _Tp> void CV_OperationsTest::TestType(Size sz, _Tp value)
m
.
elemSize
()
==
sizeof
(
_Tp
)
&&
m
.
step
==
m
.
elemSize
()
*
m
.
cols
);
for
(
int
y
=
0
;
y
<
sz
.
height
;
y
++
)
for
(
int
x
=
0
;
x
<
sz
.
width
;
x
++
)
m
(
y
,
x
)
=
value
;
{
m
(
y
,
x
)
=
value
;
}
CV_Assert
(
sum
(
m
.
reshape
(
1
,
1
))[
0
]
==
(
double
)
sz
.
width
*
sz
.
height
);
double
s
=
sum
(
Mat
(
m
).
reshape
(
1
))[
0
];
CV_Assert
(
s
==
(
double
)
sz
.
width
*
sz
.
height
);
}
bool
CV_OperationsTest
::
TestMat
()
...
...
@@ -795,15 +798,16 @@ bool CV_OperationsTest::TestTemplateMat()
}
CV_Assert
(
badarg_catched
);
#include <iostream>
#include <opencv2/core/core.hpp>
Size
size
(
2
,
5
);
TestType
<
float
>
(
size
);
TestType
<
cv
::
Vec3f
>
(
size
);
TestType
<
cv
::
Matx31f
>
(
size
);
TestType
<
cv
::
Matx41f
>
(
size
);
TestType
<
cv
::
Matx32f
>
(
size
);
TestType
<
float
>
(
size
,
1.
f
);
cv
::
Vec3f
val1
=
1.
f
;
TestType
<
cv
::
Vec3f
>
(
size
,
val1
);
cv
::
Matx31f
val2
=
1.
f
;
TestType
<
cv
::
Matx31f
>
(
size
,
val2
);
cv
::
Matx41f
val3
=
1.
f
;
TestType
<
cv
::
Matx41f
>
(
size
,
val3
);
cv
::
Matx32f
val4
=
1.
f
;
TestType
<
cv
::
Matx32f
>
(
size
,
val4
);
}
catch
(
const
test_excep
&
e
)
{
...
...
modules/python/test/test.py
浏览文件 @
734b0da0
...
...
@@ -390,10 +390,7 @@ class FunctionTests(OpenCVTests):
def
test_DrawChessboardCorners
(
self
):
im
=
cv
.
CreateImage
((
512
,
512
),
cv
.
IPL_DEPTH_8U
,
3
)
cv
.
SetZero
(
im
)
cv
.
DrawChessboardCorners
(
im
,
(
5
,
5
),
[
(
100
,
100
)
for
i
in
range
(
5
*
5
)
],
1
)
self
.
assert_
(
cv
.
Sum
(
im
)[
0
]
>
0
)
self
.
assertRaises
(
TypeError
,
lambda
:
cv
.
DrawChessboardCorners
(
im
,
(
4
,
5
),
[
(
100
,
100
)
for
i
in
range
(
5
*
5
)
],
1
))
cv
.
DrawChessboardCorners
(
im
,
(
5
,
5
),
[
((
i
/
5
)
*
100
+
50
,(
i
%
5
)
*
100
+
50
)
for
i
in
range
(
5
*
5
)
],
1
)
def
test_ExtractSURF
(
self
):
img
=
self
.
get_sample
(
"samples/c/lena.jpg"
,
0
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录