Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
fa0daa48
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,发现更多精彩内容 >>
提交
fa0daa48
编写于
8月 03, 2011
作者:
A
Andrey Pavlenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Java API: fixing converters (copyData=true) and samples compilation
Testing: 1079/0/592
上级
6935e95c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
33 addition
and
28 deletion
+33
-28
modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java
...android_test/src/org/opencv/test/imgproc/imgprocTest.java
+7
-3
modules/java/gen_java.py
modules/java/gen_java.py
+4
-3
modules/java/src/cpp/converters.cpp
modules/java/src/cpp/converters.cpp
+10
-10
samples/android/15-puzzle/src/org/opencv/samples/puzzle15/puzzle15View.java
...-puzzle/src/org/opencv/samples/puzzle15/puzzle15View.java
+2
-2
samples/android/face-detection/src/org/opencv/samples/fd/FdView.java
...roid/face-detection/src/org/opencv/samples/fd/FdView.java
+2
-2
samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsView.java
...cv/samples/imagemanipulations/ImageManipulationsView.java
+2
-2
samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1View.java
...dopencv/src/org/opencv/samples/tutorial1/Sample1View.java
+2
-2
samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2View.java
...vcamera/src/org/opencv/samples/tutorial2/Sample2View.java
+2
-2
samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java
...4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java
+2
-2
未找到文件。
modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java
浏览文件 @
fa0daa48
...
...
@@ -16,6 +16,7 @@ import org.opencv.imgproc.Imgproc;
import
org.opencv.test.OpenCVTestCase
;
import
org.opencv.test.OpenCVTestRunner
;
public
class
imgprocTest
extends
OpenCVTestCase
{
private
Mat
gray_64f_2
;
...
...
@@ -1407,11 +1408,14 @@ public class imgprocTest extends OpenCVTestCase {
}
public
void
testMinEnclosingCircle
()
{
Mat
points
=
new
Mat
(
1
,
4
,
CvType
.
CV_32FC2
);
points
.
put
(
0
,
0
,
-
1.0
,
0.0
,
0.0
,
1.0
,
1.0
,
0.0
,
0.0
,
-
1.0
);
List
<
Point
>
points
=
new
ArrayList
<
Point
>();
points
.
add
(
new
Point
(
0
,
0
));
points
.
add
(
new
Point
(-
1
,
0
));
points
.
add
(
new
Point
(
0
,
-
1
));
points
.
add
(
new
Point
(
1
,
0
));
points
.
add
(
new
Point
(
0
,
1
));
OpenCVTestRunner
.
Log
(
points
.
toString
());
OpenCVTestRunner
.
Log
(
points
.
dump
());
Point
actualCenter
=
new
Point
();
float
radius
=
347.0f
;
// FIXME: Unexpected radius is returned i.e 0
...
...
modules/java/gen_java.py
浏览文件 @
fa0daa48
...
...
@@ -474,6 +474,7 @@ func_arg_fix = {
'goodFeaturesToTrack'
:
{
'corners'
:
'vector_Point'
,
},
'findFundamentalMat'
:
{
'points1'
:
'vector_Point2d'
,
'points2'
:
'vector_Point2d'
,
},
'cornerSubPix'
:
{
'corners'
:
'vector_Point2f'
,
},
'minEnclosingCircle'
:
{
'points'
:
'vector_Point2f'
,
},
'findHomography'
:
{
'srcPoints'
:
'vector_Point2f'
,
'dstPoints'
:
'vector_Point2f'
,
},
'solvePnP'
:
{
'objectPoints'
:
'vector_Point3f'
,
'imagePoints'
:
'vector_Point2f'
,
},
'solvePnPRansac'
:
{
'objectPoints'
:
'vector_Point3f'
,
'imagePoints'
:
'vector_Point2f'
,
},
...
...
@@ -940,7 +941,7 @@ extern "C" {
jn_code
.
write
(
Template
(
\
" private static native $type $name($args);
\n
"
).
substitute
(
\
type
=
type_dict
[
fi
.
ctype
].
get
(
"jn_type"
,
"double[]"
),
\
name
=
fi
.
jname
+
'_'
+
`suffix_counter`
,
\
name
=
fi
.
jname
+
'_'
+
str
(
suffix_counter
)
,
\
args
=
", "
.
join
([
"%s %s"
%
(
type_dict
[
a
.
ctype
][
"jn_type"
],
a
.
name
.
replace
(
"."
,
"_"
).
replace
(
"["
,
""
).
replace
(
"]"
,
""
))
for
a
in
jn_args
])
)
);
...
...
@@ -1007,7 +1008,7 @@ extern "C" {
j_type
=
type_dict
[
fi
.
ctype
][
"j_type"
],
\
j_name
=
fi
.
jname
,
\
j_args
=
", "
.
join
([
"%s %s"
%
(
type_dict
[
a
.
ctype
][
"j_type"
],
a
.
name
)
for
a
in
args
]),
\
jn_name
=
fi
.
jname
+
'_'
+
`suffix_counter`
,
\
jn_name
=
fi
.
jname
+
'_'
+
str
(
suffix_counter
)
,
\
jn_args_call
=
", "
.
join
(
[
a
.
name
for
a
in
jn_args
]
),
\
)
)
...
...
@@ -1109,7 +1110,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname
rtype
=
rtype
,
\
module
=
self
.
module
,
\
clazz
=
clazz
,
\
fname
=
(
fi
.
jname
+
'_'
+
`suffix_counter`
).
replace
(
'_'
,
'_1'
),
\
fname
=
(
fi
.
jname
+
'_'
+
str
(
suffix_counter
)
).
replace
(
'_'
,
'_1'
),
\
args
=
", "
.
join
([
"%s %s"
%
(
type_dict
[
a
.
ctype
].
get
(
"jni_type"
),
a
.
name
)
for
a
in
jni_args
]),
\
prologue
=
"
\n
"
.
join
(
c_prologue
),
\
epilogue
=
" "
.
join
(
c_epilogue
),
\
...
...
modules/java/src/cpp/converters.cpp
浏览文件 @
fa0daa48
...
...
@@ -24,7 +24,7 @@ void Mat_to_vector_int(Mat& mat, vector<int>& v_int)
void
vector_int_to_Mat
(
vector
<
int
>&
v_int
,
Mat
&
mat
)
{
mat
=
Mat
(
v_int
);
mat
=
Mat
(
v_int
,
true
);
}
...
...
@@ -39,7 +39,7 @@ void Mat_to_vector_double(Mat& mat, vector<double>& v_double)
void
vector_double_to_Mat
(
vector
<
double
>&
v_double
,
Mat
&
mat
)
{
mat
=
Mat
(
v_double
);
mat
=
Mat
(
v_double
,
true
);
}
...
...
@@ -54,7 +54,7 @@ void Mat_to_vector_float(Mat& mat, vector<float>& v_float)
void
vector_float_to_Mat
(
vector
<
float
>&
v_float
,
Mat
&
mat
)
{
mat
=
Mat
(
v_float
);
mat
=
Mat
(
v_float
,
true
);
}
...
...
@@ -86,7 +86,7 @@ void Mat_to_vector_Rect(Mat& mat, vector<Rect>& v_rect)
void
vector_Rect_to_Mat
(
vector
<
Rect
>&
v_rect
,
Mat
&
mat
)
{
mat
=
Mat
(
v_rect
);
mat
=
Mat
(
v_rect
,
true
);
}
...
...
@@ -142,32 +142,32 @@ void Mat_to_vector_Point3d(Mat& mat, vector<Point3d>& v_point)
void
vector_Point_to_Mat
(
vector
<
Point
>&
v_point
,
Mat
&
mat
)
{
mat
=
Mat
(
v_point
);
mat
=
Mat
(
v_point
,
true
);
}
void
vector_Point2f_to_Mat
(
vector
<
Point2f
>&
v_point
,
Mat
&
mat
)
{
mat
=
Mat
(
v_point
);
mat
=
Mat
(
v_point
,
true
);
}
void
vector_Point2d_to_Mat
(
vector
<
Point2d
>&
v_point
,
Mat
&
mat
)
{
mat
=
Mat
(
v_point
);
mat
=
Mat
(
v_point
,
true
);
}
void
vector_Point3i_to_Mat
(
vector
<
Point3i
>&
v_point
,
Mat
&
mat
)
{
mat
=
Mat
(
v_point
);
mat
=
Mat
(
v_point
,
true
);
}
void
vector_Point3f_to_Mat
(
vector
<
Point3f
>&
v_point
,
Mat
&
mat
)
{
mat
=
Mat
(
v_point
);
mat
=
Mat
(
v_point
,
true
);
}
void
vector_Point3d_to_Mat
(
vector
<
Point3d
>&
v_point
,
Mat
&
mat
)
{
mat
=
Mat
(
v_point
);
mat
=
Mat
(
v_point
,
true
);
}
...
...
samples/android/15-puzzle/src/org/opencv/samples/puzzle15/puzzle15View.java
浏览文件 @
fa0daa48
package
org.opencv.samples.puzzle15
;
import
org.opencv.
Android
;
import
org.opencv.
android.Utils
;
import
org.opencv.core.Core
;
import
org.opencv.core.Mat
;
import
org.opencv.core.Size
;
...
...
@@ -137,7 +137,7 @@ public class puzzle15View extends SampleCvViewBase implements OnTouchListener {
drawGrid
(
cols
,
rows
);
Bitmap
bmp
=
Bitmap
.
createBitmap
(
cols
,
rows
,
Bitmap
.
Config
.
ARGB_8888
);
if
(
Android
.
MatToBitmap
(
mRgba15
,
bmp
))
if
(
Utils
.
MatToBitmap
(
mRgba15
,
bmp
))
return
bmp
;
bmp
.
recycle
();
...
...
samples/android/face-detection/src/org/opencv/samples/fd/FdView.java
浏览文件 @
fa0daa48
...
...
@@ -7,7 +7,7 @@ import java.io.InputStream;
import
java.util.LinkedList
;
import
java.util.List
;
import
org.opencv.
Android
;
import
org.opencv.
android.Utils
;
import
org.opencv.core.Core
;
import
org.opencv.core.Mat
;
import
org.opencv.core.Rect
;
...
...
@@ -91,7 +91,7 @@ class FdView extends SampleCvViewBase {
Bitmap
bmp
=
Bitmap
.
createBitmap
(
mRgba
.
cols
(),
mRgba
.
rows
(),
Bitmap
.
Config
.
ARGB_8888
);
if
(
Android
.
MatToBitmap
(
mRgba
,
bmp
))
if
(
Utils
.
MatToBitmap
(
mRgba
,
bmp
))
return
bmp
;
bmp
.
recycle
();
...
...
samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsView.java
浏览文件 @
fa0daa48
package
org.opencv.samples.imagemanipulations
;
import
org.opencv.
Android
;
import
org.opencv.
android.Utils
;
import
org.opencv.core.Core
;
import
org.opencv.core.Mat
;
import
org.opencv.core.Size
;
...
...
@@ -135,7 +135,7 @@ class ImageManipulationsView extends SampleCvViewBase {
Bitmap
bmp
=
Bitmap
.
createBitmap
(
mRgba
.
cols
(),
mRgba
.
rows
(),
Bitmap
.
Config
.
ARGB_8888
);
if
(
Android
.
MatToBitmap
(
mRgba
,
bmp
))
if
(
Utils
.
MatToBitmap
(
mRgba
,
bmp
))
return
bmp
;
bmp
.
recycle
();
...
...
samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1View.java
浏览文件 @
fa0daa48
package
org.opencv.samples.tutorial1
;
import
org.opencv.
Android
;
import
org.opencv.
android.Utils
;
import
org.opencv.core.Core
;
import
org.opencv.core.Mat
;
import
org.opencv.core.Point
;
...
...
@@ -56,7 +56,7 @@ class Sample1View extends SampleViewBase {
Bitmap
bmp
=
Bitmap
.
createBitmap
(
getFrameWidth
(),
getFrameHeight
(),
Bitmap
.
Config
.
ARGB_8888
);
if
(
Android
.
MatToBitmap
(
mRgba
,
bmp
))
if
(
Utils
.
MatToBitmap
(
mRgba
,
bmp
))
return
bmp
;
bmp
.
recycle
();
...
...
samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2View.java
浏览文件 @
fa0daa48
package
org.opencv.samples.tutorial2
;
import
org.opencv.
Android
;
import
org.opencv.
android.Utils
;
import
org.opencv.core.Core
;
import
org.opencv.core.Mat
;
import
org.opencv.core.Point
;
...
...
@@ -54,7 +54,7 @@ class Sample2View extends SampleCvViewBase {
Bitmap
bmp
=
Bitmap
.
createBitmap
(
mRgba
.
cols
(),
mRgba
.
rows
(),
Bitmap
.
Config
.
ARGB_8888
);
if
(
Android
.
MatToBitmap
(
mRgba
,
bmp
))
if
(
Utils
.
MatToBitmap
(
mRgba
,
bmp
))
return
bmp
;
bmp
.
recycle
();
...
...
samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java
浏览文件 @
fa0daa48
package
org.opencv.samples.tutorial4
;
import
org.opencv.
Android
;
import
org.opencv.
android.Utils
;
import
org.opencv.core.Mat
;
import
org.opencv.core.CvType
;
import
org.opencv.imgproc.Imgproc
;
...
...
@@ -56,7 +56,7 @@ class Sample4View extends SampleViewBase {
Bitmap
bmp
=
Bitmap
.
createBitmap
(
getFrameWidth
(),
getFrameHeight
(),
Bitmap
.
Config
.
ARGB_8888
);
if
(
Android
.
MatToBitmap
(
mRgba
,
bmp
))
if
(
Utils
.
MatToBitmap
(
mRgba
,
bmp
))
return
bmp
;
bmp
.
recycle
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录