Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
b99c5db1
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
b99c5db1
编写于
7月 29, 2011
作者:
A
Andrey Pavlenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Java API: tests for polylines() and goodFeaturesToTrack(), fix of GFTT corners arg type
上级
418bc6db
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
84 addition
and
13 deletion
+84
-13
modules/java/android_test/src/org/opencv/test/core/coreTest.java
.../java/android_test/src/org/opencv/test/core/coreTest.java
+43
-3
modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java
...android_test/src/org/opencv/test/imgproc/imgprocTest.java
+40
-10
modules/java/gen_java.py
modules/java/gen_java.py
+1
-0
未找到文件。
modules/java/android_test/src/org/opencv/test/core/coreTest.java
浏览文件 @
b99c5db1
...
...
@@ -1243,15 +1243,55 @@ public class coreTest extends OpenCVTestCase {
}
public
void
testPolylinesMatListOfMatBooleanScalar
()
{
fail
(
"Not yet implemented"
);
Mat
img
=
gray0
;
List
<
Point
>
pts
=
new
ArrayList
<
Point
>();
pts
.
add
(
new
Point
(
1
,
1
));
pts
.
add
(
new
Point
(
7
,
1
));
pts
.
add
(
new
Point
(
7
,
6
));
pts
.
add
(
new
Point
(
1
,
6
));
List
<
Mat
>
mats
=
new
ArrayList
<
Mat
>();
mats
.
add
(
Converters
.
vector_Point_to_Mat
(
pts
)
);
assertEquals
(
0
,
Core
.
countNonZero
(
img
));
Core
.
polylines
(
img
,
mats
,
true
,
new
Scalar
(
100
));
assertEquals
(
22
,
Core
.
countNonZero
(
img
));
Core
.
polylines
(
img
,
mats
,
false
,
new
Scalar
(
0
));
assertEquals
(
4
,
Core
.
countNonZero
(
img
));
}
public
void
testPolylinesMatListOfMatBooleanScalarInt
()
{
fail
(
"Not yet implemented"
);
Mat
img
=
gray0
;
List
<
Point
>
pts
=
new
ArrayList
<
Point
>();
pts
.
add
(
new
Point
(
1
,
1
));
pts
.
add
(
new
Point
(
7
,
1
));
pts
.
add
(
new
Point
(
7
,
6
));
pts
.
add
(
new
Point
(
1
,
6
));
List
<
Mat
>
mats
=
new
ArrayList
<
Mat
>();
mats
.
add
(
Converters
.
vector_Point_to_Mat
(
pts
)
);
assertEquals
(
0
,
Core
.
countNonZero
(
img
));
Core
.
polylines
(
img
,
mats
,
true
,
new
Scalar
(
100
),
2
);
assertEquals
(
62
,
Core
.
countNonZero
(
img
));
}
public
void
testPolylinesMatListOfMatBooleanScalarIntInt
()
{
fail
(
"Not yet implemented"
);
Mat
img
=
gray0
;
List
<
Point
>
pts
=
new
ArrayList
<
Point
>();
List
<
Point
>
pts2
=
new
ArrayList
<
Point
>();
pts
.
add
(
new
Point
(
1
,
1
));
pts2
.
add
(
new
Point
(
2
,
2
));
pts
.
add
(
new
Point
(
7
,
1
));
pts2
.
add
(
new
Point
(
14
,
2
));
pts
.
add
(
new
Point
(
7
,
6
));
pts2
.
add
(
new
Point
(
14
,
12
));
pts
.
add
(
new
Point
(
1
,
6
));
pts2
.
add
(
new
Point
(
2
,
12
));
List
<
Mat
>
mats
=
new
ArrayList
<
Mat
>();
List
<
Mat
>
mats2
=
new
ArrayList
<
Mat
>();
mats
.
add
(
Converters
.
vector_Point_to_Mat
(
pts
)
);
mats2
.
add
(
Converters
.
vector_Point_to_Mat
(
pts2
)
);
assertTrue
(
0
==
Core
.
countNonZero
(
img
));
Core
.
polylines
(
img
,
mats
,
true
,
new
Scalar
(
100
),
2
,
8
,
0
);
assertFalse
(
0
==
Core
.
countNonZero
(
img
));
Core
.
polylines
(
img
,
mats2
,
true
,
new
Scalar
(
0
),
2
,
8
,
1
);
assertTrue
(
0
==
Core
.
countNonZero
(
img
));
}
public
void
testPolylinesMatListOfMatBooleanScalarIntIntInt
()
{
...
...
modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java
浏览文件 @
b99c5db1
...
...
@@ -14,6 +14,7 @@ import org.opencv.core.Size;
import
org.opencv.imgproc.Imgproc
;
import
org.opencv.test.OpenCVTestCase
;
public
class
imgprocTest
extends
OpenCVTestCase
{
private
Mat
gray_64f_2
;
...
...
@@ -1000,29 +1001,58 @@ public class imgprocTest extends OpenCVTestCase {
}
public
void
testGoodFeaturesToTrackMatMatIntDoubleDouble
()
{
Mat
src
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_32FC1
,
new
Scalar
(
2.0
))
;
Mat
corners
=
new
Mat
(
1
,
4
,
CvType
.
CV_32FC2
);
corners
.
put
(
0
,
0
,
1.0
,
1.0
,
6.0
,
1.0
,
6.0
,
1.0
,
6.0
,
6.0
);
Mat
src
=
gray0
;
Core
.
rectangle
(
src
,
new
Point
(
2
,
2
),
new
Point
(
8
,
8
),
new
Scalar
(
100
),
-
1
);
List
<
Point
>
lp
=
new
ArrayList
<
Point
>(
);
Imgproc
.
goodFeaturesToTrack
(
src
,
dst
,
100
,
0.01
,
5.0
);
// TODO : How do we test this?
fail
(
"Not yet implemented"
);
Imgproc
.
goodFeaturesToTrack
(
src
,
lp
,
100
,
0.01
,
3
);
assertEquals
(
4
,
lp
.
size
()
);
}
public
void
testGoodFeaturesToTrackMatMatIntDoubleDoubleMat
()
{
fail
(
"Not yet implemented"
);
Mat
src
=
gray128
;
Point
tl
=
new
Point
(
2
,
2
);
Point
br
=
new
Point
(
8
,
8
);
Scalar
color
=
new
Scalar
(
100
);
Core
.
rectangle
(
src
,
tl
,
br
,
color
,
-
1
);
Mat
mask
=
gray0
;
Core
.
circle
(
mask
,
tl
,
3
,
color
,
-
1
);
List
<
Point
>
lp
=
new
ArrayList
<
Point
>();
Imgproc
.
goodFeaturesToTrack
(
src
,
lp
,
100
,
0.01
,
3
,
mask
);
assertEquals
(
1
,
lp
.
size
());
}
public
void
testGoodFeaturesToTrackMatMatIntDoubleDoubleMatInt
()
{
fail
(
"Not yet implemented"
);
Mat
src
=
gray0
;
Core
.
rectangle
(
src
,
new
Point
(
2
,
2
),
new
Point
(
8
,
8
),
new
Scalar
(
100
),
-
1
);
List
<
Point
>
lp
=
new
ArrayList
<
Point
>();
Imgproc
.
goodFeaturesToTrack
(
src
,
lp
,
100
,
0.01
,
3
,
gray1
,
4
);
assertEquals
(
4
,
lp
.
size
());
}
public
void
testGoodFeaturesToTrackMatMatIntDoubleDoubleMatIntBoolean
()
{
fail
(
"Not yet implemented"
);
Mat
src
=
gray0
;
Core
.
rectangle
(
src
,
new
Point
(
2
,
2
),
new
Point
(
8
,
8
),
new
Scalar
(
100
),
-
1
);
List
<
Point
>
lp
=
new
ArrayList
<
Point
>();
Imgproc
.
goodFeaturesToTrack
(
src
,
lp
,
100
,
0.01
,
3
,
gray1
,
4
,
true
);
assertEquals
(
4
,
lp
.
size
());
}
public
void
testGoodFeaturesToTrackMatMatIntDoubleDoubleMatIntBooleanDouble
()
{
fail
(
"Not yet implemented"
);
Mat
src
=
gray0
;
Core
.
rectangle
(
src
,
new
Point
(
2
,
2
),
new
Point
(
8
,
8
),
new
Scalar
(
100
),
-
1
);
List
<
Point
>
lp
=
new
ArrayList
<
Point
>();
Imgproc
.
goodFeaturesToTrack
(
src
,
lp
,
100
,
0.01
,
3
,
gray1
,
4
,
true
,
0
);
assertEquals
(
4
,
lp
.
size
());
}
public
void
testGrabCutMatMatRectMatMatInt
()
{
...
...
modules/java/gen_java.py
浏览文件 @
b99c5db1
...
...
@@ -457,6 +457,7 @@ func_arg_fix = {
'randu'
:
{
'low'
:
'Scalar'
,
'high'
:
'Scalar'
,
},
'randn'
:
{
'mean'
:
'Scalar'
,
'stddev'
:
'Scalar'
,
},
'inRange'
:
{
'lowerb'
:
'Scalar'
,
'upperb'
:
'Scalar'
,
},
'goodFeaturesToTrack'
:
{
'corners'
:
'vector_Point'
},
},
# '', i.e. empty class
}
# func_arg_fix
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录