Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
d2233f9d
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,发现更多精彩内容 >>
提交
d2233f9d
编写于
7月 28, 2011
作者:
A
Andrey Pavlenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Java API: converters vector<> to/from Mat are fixed
上级
954f3c1e
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
69 addition
and
76 deletion
+69
-76
modules/java/src/cpp/converters.cpp
modules/java/src/cpp/converters.cpp
+16
-29
modules/java/src/java/Converters.java
modules/java/src/java/Converters.java
+53
-47
未找到文件。
modules/java/src/cpp/converters.cpp
浏览文件 @
d2233f9d
...
...
@@ -18,7 +18,7 @@ using namespace cv;
void
Mat_to_vector_int
(
Mat
&
mat
,
vector
<
int
>&
v_int
)
{
v_int
.
clear
();
CHECK_MAT
(
mat
.
type
()
!=
CV_32SC1
||
mat
.
row
s
!=
1
);
CHECK_MAT
(
mat
.
type
()
!=
CV_32SC1
||
mat
.
col
s
!=
1
);
v_int
=
(
vector
<
int
>
)
mat
;
}
...
...
@@ -33,7 +33,7 @@ void vector_int_to_Mat(vector<int>& v_int, Mat& mat)
void
Mat_to_vector_double
(
Mat
&
mat
,
vector
<
double
>&
v_double
)
{
v_double
.
clear
();
CHECK_MAT
(
mat
.
type
()
!=
CV_64FC1
||
mat
.
row
s
!=
1
);
CHECK_MAT
(
mat
.
type
()
!=
CV_64FC1
||
mat
.
col
s
!=
1
);
v_double
=
(
vector
<
double
>
)
mat
;
}
...
...
@@ -48,7 +48,7 @@ void vector_double_to_Mat(vector<double>& v_double, Mat& mat)
void
Mat_to_vector_float
(
Mat
&
mat
,
vector
<
float
>&
v_float
)
{
v_float
.
clear
();
CHECK_MAT
(
mat
.
type
()
!=
CV_32FC1
||
mat
.
row
s
!=
1
);
CHECK_MAT
(
mat
.
type
()
!=
CV_32FC1
||
mat
.
col
s
!=
1
);
v_float
=
(
vector
<
float
>
)
mat
;
}
...
...
@@ -63,7 +63,7 @@ void vector_float_to_Mat(vector<float>& v_float, Mat& mat)
void
Mat_to_vector_uchar
(
Mat
&
mat
,
vector
<
uchar
>&
v_uchar
)
{
v_uchar
.
clear
();
CHECK_MAT
(
mat
.
type
()
!=
CV_8UC1
||
mat
.
row
s
!=
1
);
CHECK_MAT
(
mat
.
type
()
!=
CV_8UC1
||
mat
.
col
s
!=
1
);
v_uchar
=
(
vector
<
uchar
>
)
mat
;
}
...
...
@@ -73,21 +73,13 @@ void Mat_to_vector_uchar(Mat& mat, vector<uchar>& v_uchar)
void
Mat_to_vector_Rect
(
Mat
&
mat
,
vector
<
Rect
>&
v_rect
)
{
v_rect
.
clear
();
CHECK_MAT
(
mat
.
type
()
!=
CV_32SC4
||
mat
.
row
s
!=
1
);
CHECK_MAT
(
mat
.
type
()
!=
CV_32SC4
||
mat
.
col
s
!=
1
);
v_rect
=
(
vector
<
Rect
>
)
mat
;
/*for(int i=0; i<mat.cols; i++) {
Vec<int, 4> v=mat.at< Vec<int, 4> >(0, i);
v_rect.push_back( Rect(v[0], v[1], v[2], v[3]) );
}*/
}
void
vector_Rect_to_Mat
(
vector
<
Rect
>&
v_rect
,
Mat
&
mat
)
{
mat
=
Mat
(
v_rect
);
/*mat.create(1, v_rect.size(), CV_32SC4);
for(size_t i=0; i<v_rect.size(); i++) {
mat.at< Vec<int, 4> >(0, i) = Vec<int, 4>(v_rect[i].x, v_rect[i].y, v_rect[i].width, v_rect[i].height);
}*/
}
...
...
@@ -95,19 +87,14 @@ void vector_Rect_to_Mat(vector<Rect>& v_rect, Mat& mat)
void
Mat_to_vector_Point
(
Mat
&
mat
,
vector
<
Point
>&
v_point
)
{
v_point
.
clear
();
CHECK_MAT
(
mat
.
type
()
!=
CV_32SC2
||
mat
.
row
s
!=
1
);
CHECK_MAT
(
mat
.
type
()
!=
CV_32SC2
||
mat
.
col
s
!=
1
);
v_point
=
(
vector
<
Point
>
)
mat
;
/*for(int i=0; i<mat.cols; i++)
v_point.push_back( Point( mat.at< Vec<int, 2> >(0, i) ) );*/
}
void
vector_Point_to_Mat
(
vector
<
Point
>&
v_point
,
Mat
&
mat
)
{
mat
=
Mat
(
v_point
);
/*mat.create(1, v_point.size(), CV_32SC2);
for(size_t i=0; i<v_point.size(); i++)
mat.at< Vec<int, 2> >(0, i) = Vec<int, 2>(v_point[i].x, v_point[i].y);*/
}
...
...
@@ -115,10 +102,10 @@ void vector_Point_to_Mat(vector<Point>& v_point, Mat& mat)
void
Mat_to_vector_KeyPoint
(
Mat
&
mat
,
vector
<
KeyPoint
>&
v_kp
)
{
v_kp
.
clear
();
CHECK_MAT
(
mat
.
type
()
!=
CV_64FC
(
7
)
||
mat
.
row
s
!=
1
);
for
(
int
i
=
0
;
i
<
mat
.
col
s
;
i
++
)
CHECK_MAT
(
mat
.
type
()
!=
CV_64FC
(
7
)
||
mat
.
col
s
!=
1
);
for
(
int
i
=
0
;
i
<
mat
.
row
s
;
i
++
)
{
Vec
<
double
,
7
>
v
=
mat
.
at
<
Vec
<
double
,
7
>
>
(
0
,
i
);
Vec
<
double
,
7
>
v
=
mat
.
at
<
Vec
<
double
,
7
>
>
(
i
,
0
);
KeyPoint
kp
((
float
)
v
[
0
],
(
float
)
v
[
1
],
(
float
)
v
[
2
],
(
float
)
v
[
3
],
(
float
)
v
[
4
],
(
int
)
v
[
5
],
(
int
)
v
[
6
]);
v_kp
.
push_back
(
kp
);
}
...
...
@@ -129,11 +116,11 @@ void Mat_to_vector_KeyPoint(Mat& mat, vector<KeyPoint>& v_kp)
void
vector_KeyPoint_to_Mat
(
vector
<
KeyPoint
>&
v_kp
,
Mat
&
mat
)
{
int
count
=
v_kp
.
size
();
mat
.
create
(
1
,
count
,
CV_64FC
(
7
));
mat
.
create
(
count
,
1
,
CV_64FC
(
7
));
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
KeyPoint
kp
=
v_kp
[
i
];
mat
.
at
<
Vec
<
double
,
7
>
>
(
0
,
i
)
=
Vec
<
double
,
7
>
(
kp
.
pt
.
x
,
kp
.
pt
.
y
,
kp
.
size
,
kp
.
angle
,
kp
.
response
,
kp
.
octave
,
kp
.
class_id
);
mat
.
at
<
Vec
<
double
,
7
>
>
(
i
,
0
)
=
Vec
<
double
,
7
>
(
kp
.
pt
.
x
,
kp
.
pt
.
y
,
kp
.
size
,
kp
.
angle
,
kp
.
response
,
kp
.
octave
,
kp
.
class_id
);
}
}
...
...
@@ -142,11 +129,11 @@ void vector_KeyPoint_to_Mat(vector<KeyPoint>& v_kp, Mat& mat)
void
Mat_to_vector_Mat
(
cv
::
Mat
&
mat
,
std
::
vector
<
cv
::
Mat
>&
v_mat
)
{
v_mat
.
clear
();
if
(
mat
.
type
()
==
CV_32SC2
&&
mat
.
row
s
==
1
)
if
(
mat
.
type
()
==
CV_32SC2
&&
mat
.
col
s
==
1
)
{
for
(
int
i
=
0
;
i
<
mat
.
col
s
;
i
++
)
for
(
int
i
=
0
;
i
<
mat
.
row
s
;
i
++
)
{
Vec
<
int
,
2
>
a
=
mat
.
at
<
Vec
<
int
,
2
>
>
(
0
,
i
);
Vec
<
int
,
2
>
a
=
mat
.
at
<
Vec
<
int
,
2
>
>
(
i
,
0
);
long
long
addr
=
(((
long
long
)
a
[
0
])
<<
32
)
|
a
[
1
];
Mat
&
m
=
*
(
(
Mat
*
)
addr
);
v_mat
.
push_back
(
m
);
...
...
@@ -158,10 +145,10 @@ void Mat_to_vector_Mat(cv::Mat& mat, std::vector<cv::Mat>& v_mat)
void
vector_Mat_to_Mat
(
std
::
vector
<
cv
::
Mat
>&
v_mat
,
cv
::
Mat
&
mat
)
{
int
count
=
v_mat
.
size
();
mat
.
create
(
1
,
count
,
CV_32SC2
);
mat
.
create
(
count
,
1
,
CV_32SC2
);
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
long
long
addr
=
(
long
long
)
new
Mat
(
v_mat
[
i
]);
mat
.
at
<
Vec
<
int
,
2
>
>
(
0
,
i
)
=
Vec
<
int
,
2
>
(
addr
>>
32
,
addr
&
0xffffffff
);
mat
.
at
<
Vec
<
int
,
2
>
>
(
i
,
0
)
=
Vec
<
int
,
2
>
(
addr
>>
32
,
addr
&
0xffffffff
);
}
}
modules/java/src/java/Converters.java
浏览文件 @
d2233f9d
...
...
@@ -15,7 +15,7 @@ public class Converters {
Mat
res
;
int
count
=
(
pts
!=
null
)
?
pts
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_32SC2
);
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_32SC2
);
int
[]
buff
=
new
int
[
count
*
2
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
Point
p
=
pts
.
get
(
i
);
...
...
@@ -33,7 +33,7 @@ public class Converters {
Mat
res
;
int
count
=
(
pts
!=
null
)
?
pts
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_32FC2
);
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_32FC2
);
float
[]
buff
=
new
float
[
count
*
2
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
Point
p
=
pts
.
get
(
i
);
...
...
@@ -51,7 +51,7 @@ public class Converters {
Mat
res
;
int
count
=
(
pts
!=
null
)
?
pts
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_32FC3
);
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_32FC3
);
float
[]
buff
=
new
float
[
count
*
3
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
Point3
p
=
pts
.
get
(
i
);
...
...
@@ -68,15 +68,16 @@ public class Converters {
public
static
void
Mat_to_vector_Point
(
Mat
m
,
List
<
Point
>
pts
)
{
if
(
pts
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
CvType
.
CV_32SC2
!=
m
.
type
()
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
throw
new
java
.
lang
.
IllegalArgumentException
(
"pts == null"
);
int
count
=
m
.
rows
();
if
(
CvType
.
CV_32SC2
!=
m
.
type
()
||
m
.
cols
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
(
"CvType.CV_32SC2 != m.type() || m.cols()!=1\n"
+
m
);
pts
.
clear
();
int
[]
buff
=
new
int
[
2
*
co
ls
];
int
[]
buff
=
new
int
[
2
*
co
unt
];
m
.
get
(
0
,
0
,
buff
);
for
(
int
i
=
0
;
i
<
co
ls
;
i
++)
{
for
(
int
i
=
0
;
i
<
co
unt
;
i
++)
{
pts
.
add
(
new
Point
(
buff
[
i
*
2
],
buff
[
i
*
2
+
1
])
);
}
}
...
...
@@ -85,7 +86,7 @@ public class Converters {
Mat
res
;
int
count
=
(
mats
!=
null
)
?
mats
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_32SC2
);
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_32SC2
);
int
[]
buff
=
new
int
[
count
*
2
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
long
addr
=
mats
.
get
(
i
).
nativeObj
;
...
...
@@ -101,15 +102,16 @@ public class Converters {
public
static
void
Mat_to_vector_Mat
(
Mat
m
,
List
<
Mat
>
mats
)
{
if
(
mats
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
CvType
.
CV_32SC2
!=
m
.
type
()
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
throw
new
java
.
lang
.
IllegalArgumentException
(
"mats == null"
);
int
count
=
m
.
rows
();
if
(
CvType
.
CV_32SC2
!=
m
.
type
()
||
m
.
cols
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
(
"CvType.CV_32SC2 != m.type() || m.cols()!=1\n"
+
m
);
mats
.
clear
();
int
[]
buff
=
new
int
[
co
ls
*
2
];
int
[]
buff
=
new
int
[
co
unt
*
2
];
m
.
get
(
0
,
0
,
buff
);
for
(
int
i
=
0
;
i
<
co
ls
;
i
++)
{
for
(
int
i
=
0
;
i
<
co
unt
;
i
++)
{
long
addr
=
(((
long
)
buff
[
i
*
2
])<<
32
)
|
((
long
)
buff
[
i
*
2
+
1
]);
mats
.
add
(
new
Mat
(
addr
)
);
}
...
...
@@ -119,7 +121,7 @@ public class Converters {
Mat
res
;
int
count
=
(
fs
!=
null
)
?
fs
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_32FC1
);
//Point can be saved into double[2]
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_32FC1
);
float
[]
buff
=
new
float
[
count
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
float
f
=
fs
.
get
(
i
);
...
...
@@ -134,15 +136,16 @@ public class Converters {
public
static
void
Mat_to_vector_float
(
Mat
m
,
List
<
Float
>
fs
)
{
if
(
fs
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
CvType
.
CV_32FC1
!=
m
.
type
()
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
throw
new
java
.
lang
.
IllegalArgumentException
(
"fs == null"
);
int
count
=
m
.
rows
();
if
(
CvType
.
CV_32FC1
!=
m
.
type
()
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
(
"CvType.CV_32FC1 != m.type() || m.rows()!=1\n"
+
m
);
fs
.
clear
();
float
[]
buff
=
new
float
[
co
ls
];
float
[]
buff
=
new
float
[
co
unt
];
m
.
get
(
0
,
0
,
buff
);
for
(
int
i
=
0
;
i
<
co
ls
;
i
++)
{
for
(
int
i
=
0
;
i
<
co
unt
;
i
++)
{
fs
.
add
(
new
Float
(
buff
[
i
])
);
}
}
...
...
@@ -151,7 +154,7 @@ public class Converters {
Mat
res
;
int
count
=
(
bs
!=
null
)
?
bs
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_8UC1
);
//Point can be saved into double[2]
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_8UC1
);
byte
[]
buff
=
new
byte
[
count
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
byte
b
=
bs
.
get
(
i
);
...
...
@@ -168,7 +171,7 @@ public class Converters {
Mat
res
;
int
count
=
(
is
!=
null
)
?
is
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_32SC1
);
//Point can be saved into double[2]
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_32SC1
);
int
[]
buff
=
new
int
[
count
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
int
v
=
is
.
get
(
i
);
...
...
@@ -183,15 +186,16 @@ public class Converters {
public
static
void
Mat_to_vector_int
(
Mat
m
,
List
<
Integer
>
is
)
{
if
(
is
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
CvType
.
CV_32SC1
!=
m
.
type
()
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
throw
new
java
.
lang
.
IllegalArgumentException
(
"is == null"
);
int
count
=
m
.
rows
();
if
(
CvType
.
CV_32SC1
!=
m
.
type
()
||
m
.
cols
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
(
"CvType.CV_32SC1 != m.type() || m.cols()!=1\n"
+
m
);
is
.
clear
();
int
[]
buff
=
new
int
[
co
ls
];
int
[]
buff
=
new
int
[
co
unt
];
m
.
get
(
0
,
0
,
buff
);
for
(
int
i
=
0
;
i
<
co
ls
;
i
++)
{
for
(
int
i
=
0
;
i
<
co
unt
;
i
++)
{
is
.
add
(
new
Integer
(
buff
[
i
])
);
}
}
...
...
@@ -200,7 +204,7 @@ public class Converters {
Mat
res
;
int
count
=
(
rs
!=
null
)
?
rs
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_32SC4
);
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_32SC4
);
int
[]
buff
=
new
int
[
4
*
count
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
Rect
r
=
rs
.
get
(
i
);
...
...
@@ -218,15 +222,16 @@ public class Converters {
public
static
void
Mat_to_vector_Rect
(
Mat
m
,
List
<
Rect
>
rs
)
{
if
(
rs
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
CvType
.
CV_32SC4
!=
m
.
type
()
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
throw
new
java
.
lang
.
IllegalArgumentException
(
"rs == null"
);
int
count
=
m
.
rows
();
if
(
CvType
.
CV_32SC4
!=
m
.
type
()
||
m
.
cols
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
(
"CvType.CV_32SC4 != m.type() || m.rows()!=1\n"
+
m
);
rs
.
clear
();
int
[]
buff
=
new
int
[
4
*
co
ls
];
int
[]
buff
=
new
int
[
4
*
co
unt
];
m
.
get
(
0
,
0
,
buff
);
for
(
int
i
=
0
;
i
<
co
ls
;
i
++)
{
for
(
int
i
=
0
;
i
<
co
unt
;
i
++)
{
rs
.
add
(
new
Rect
(
buff
[
4
*
i
],
buff
[
4
*
i
+
1
],
buff
[
4
*
i
+
2
],
buff
[
4
*
i
+
3
])
);
}
}
...
...
@@ -236,7 +241,7 @@ public class Converters {
Mat
res
;
int
count
=
(
kps
!=
null
)
?
kps
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_64FC
(
7
));
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_64FC
(
7
));
double
[]
buff
=
new
double
[
count
*
7
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
KeyPoint
kp
=
kps
.
get
(
i
);
...
...
@@ -257,15 +262,16 @@ public class Converters {
public
static
void
Mat_to_vector_KeyPoint
(
Mat
m
,
List
<
KeyPoint
>
kps
)
{
if
(
kps
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
();
int
cols
=
m
.
cols
();
if
(
CvType
.
CV_64FC
(
7
)
!=
m
.
type
()
||
m
.
rows
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
();
throw
new
java
.
lang
.
IllegalArgumentException
(
"kps == null"
);
int
count
=
m
.
rows
();
if
(
CvType
.
CV_64FC
(
7
)
!=
m
.
type
()
||
m
.
cols
()!=
1
)
throw
new
java
.
lang
.
IllegalArgumentException
(
"CvType.CV_64FC(7) != m.type() || m.cols()!=1\n"
+
m
);
kps
.
clear
();
double
[]
buff
=
new
double
[
7
*
co
ls
];
double
[]
buff
=
new
double
[
7
*
co
unt
];
m
.
get
(
0
,
0
,
buff
);
for
(
int
i
=
0
;
i
<
co
ls
;
i
++)
{
for
(
int
i
=
0
;
i
<
co
unt
;
i
++)
{
kps
.
add
(
new
KeyPoint
(
(
float
)
buff
[
4
*
i
],
(
float
)
buff
[
4
*
i
+
1
],
(
float
)
buff
[
4
*
i
+
2
],
(
float
)
buff
[
4
*
i
+
3
],
(
float
)
buff
[
4
*
i
+
4
],
(
int
)
buff
[
4
*
i
+
5
],
(
int
)
buff
[
4
*
i
+
6
]
)
);
}
...
...
@@ -276,7 +282,7 @@ public class Converters {
Mat
res
;
int
count
=
(
ds
!=
null
)
?
ds
.
size
()
:
0
;
if
(
count
>
0
){
res
=
new
Mat
(
1
,
count
,
CvType
.
CV_64FC1
);
//Point can be saved into double[2]
res
=
new
Mat
(
count
,
1
,
CvType
.
CV_64FC1
);
double
[]
buff
=
new
double
[
count
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
double
v
=
ds
.
get
(
i
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录