Commit 0cd14e3f authored by berak's avatar berak

java: add support for MatOfRotatedRect

parent c8fc8d21
...@@ -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>",
......
...@@ -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)
{ {
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment