Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
0cd14e3f
Commit
0cd14e3f
authored
Nov 01, 2018
by
berak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
java: add support for MatOfRotatedRect
parent
c8fc8d21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
gen_dict.json
modules/core/misc/java/gen_dict.json
+9
-0
converters.cpp
modules/java/generator/src/cpp/converters.cpp
+14
-0
converters.h
modules/java/generator/src/cpp/converters.h
+2
-0
No files found.
modules/core/misc/java/gen_dict.json
View file @
0cd14e3f
...
@@ -765,6 +765,15 @@
...
@@ -765,6 +765,15 @@
"v_type"
:
"Mat"
,
"v_type"
:
"Mat"
,
"j_import"
:
"org.opencv.core.MatOfRect2d"
"j_import"
:
"org.opencv.core.MatOfRect2d"
},
},
"vector_RotatedRect"
:
{
"j_type"
:
"MatOfRotatedRect"
,
"jn_type"
:
"long"
,
"jni_type"
:
"jlong"
,
"jni_var"
:
"std::vector< RotatedRect > %(n)s"
,
"suffix"
:
"J"
,
"v_type"
:
"Mat"
,
"j_import"
:
"org.opencv.core.MatOfRotatedRect"
},
"vector_String"
:
{
"vector_String"
:
{
"j_type"
:
"List<String>"
,
"j_type"
:
"List<String>"
,
"jn_type"
:
"List<String>"
,
"jn_type"
:
"List<String>"
,
...
...
modules/java/generator/src/cpp/converters.cpp
View file @
0cd14e3f
...
@@ -107,6 +107,20 @@ void vector_Rect2d_to_Mat(std::vector<Rect2d>& v_rect, Mat& mat)
...
@@ -107,6 +107,20 @@ void vector_Rect2d_to_Mat(std::vector<Rect2d>& v_rect, Mat& mat)
mat
=
Mat
(
v_rect
,
true
);
mat
=
Mat
(
v_rect
,
true
);
}
}
//vector_RotatedRect
void
Mat_to_vector_RotatedRect
(
Mat
&
mat
,
std
::
vector
<
RotatedRect
>&
v_rect
)
{
v_rect
.
clear
();
CHECK_MAT
(
mat
.
type
()
==
CV_32FC
(
5
)
&&
mat
.
cols
==
1
);
v_rect
=
(
std
::
vector
<
RotatedRect
>
)
mat
;
}
void
vector_RotatedRect_to_Mat
(
std
::
vector
<
RotatedRect
>&
v_rect
,
Mat
&
mat
)
{
mat
=
Mat
(
v_rect
,
true
);
}
//vector_Point
//vector_Point
void
Mat_to_vector_Point
(
Mat
&
mat
,
std
::
vector
<
Point
>&
v_point
)
void
Mat_to_vector_Point
(
Mat
&
mat
,
std
::
vector
<
Point
>&
v_point
)
{
{
...
...
modules/java/generator/src/cpp/converters.h
View file @
0cd14e3f
...
@@ -26,6 +26,8 @@ void vector_Rect_to_Mat(std::vector<cv::Rect>& v_rect, cv::Mat& mat);
...
@@ -26,6 +26,8 @@ void vector_Rect_to_Mat(std::vector<cv::Rect>& v_rect, cv::Mat& mat);
void
Mat_to_vector_Rect2d
(
cv
::
Mat
&
mat
,
std
::
vector
<
cv
::
Rect2d
>&
v_rect
);
void
Mat_to_vector_Rect2d
(
cv
::
Mat
&
mat
,
std
::
vector
<
cv
::
Rect2d
>&
v_rect
);
void
vector_Rect2d_to_Mat
(
std
::
vector
<
cv
::
Rect2d
>&
v_rect
,
cv
::
Mat
&
mat
);
void
vector_Rect2d_to_Mat
(
std
::
vector
<
cv
::
Rect2d
>&
v_rect
,
cv
::
Mat
&
mat
);
void
Mat_to_vector_RotatedRect
(
cv
::
Mat
&
mat
,
std
::
vector
<
cv
::
RotatedRect
>&
v_rect
);
void
vector_RotatedRect_to_Mat
(
std
::
vector
<
cv
::
RotatedRect
>&
v_rect
,
cv
::
Mat
&
mat
);
void
Mat_to_vector_Point
(
cv
::
Mat
&
mat
,
std
::
vector
<
cv
::
Point
>&
v_point
);
void
Mat_to_vector_Point
(
cv
::
Mat
&
mat
,
std
::
vector
<
cv
::
Point
>&
v_point
);
void
Mat_to_vector_Point2f
(
cv
::
Mat
&
mat
,
std
::
vector
<
cv
::
Point2f
>&
v_point
);
void
Mat_to_vector_Point2f
(
cv
::
Mat
&
mat
,
std
::
vector
<
cv
::
Point2f
>&
v_point
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment