Java API:
* fixed manually ported classes; * added vector<vector<Point>> support; * changed argument types for 3 functions; * finished tests for org.opencv.core.Core class.
This commit is contained in:
@@ -416,9 +416,9 @@ JNIEXPORT jstring JNICALL Java_org_opencv_highgui_VideoCapture_n_1getSupportedPr
|
||||
LOGD("highgui::VideoCapture_n_1set()");
|
||||
#endif // DEBUG
|
||||
VideoCapture* me = (VideoCapture*) self; //TODO: check for NULL
|
||||
double addr = me->get(CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING);
|
||||
char* result = *((char**)&addr);
|
||||
return env->NewStringUTF(result);
|
||||
union {double prop; const char* name;} u;
|
||||
u.prop = me->get(CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING);
|
||||
return env->NewStringUTF(u.name);
|
||||
} catch(cv::Exception e) {
|
||||
#ifdef DEBUG
|
||||
LOGD("highgui::VideoCapture_n_1getSupportedPreviewSizes() catched cv::Exception: %s", e.what());
|
||||
|
@@ -264,6 +264,19 @@ void vector_DMatch_to_Mat(vector<DMatch>& v_dm, Mat& mat)
|
||||
}
|
||||
}
|
||||
|
||||
void Mat_to_vector_vector_Point(Mat& mat, vector< vector< Point > >& vv_pt)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
vm.reserve( mat.rows );
|
||||
Mat_to_vector_Mat(mat, vm);
|
||||
for(size_t i=0; i<vm.size(); i++)
|
||||
{
|
||||
vector<Point> vpt;
|
||||
Mat_to_vector_Point(vm[i], vpt);
|
||||
vv_pt.push_back(vpt);
|
||||
}
|
||||
}
|
||||
|
||||
void Mat_to_vector_vector_KeyPoint(Mat& mat, vector< vector< KeyPoint > >& vv_kp)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
|
@@ -55,3 +55,5 @@ void vector_vector_DMatch_to_Mat(std::vector< std::vector< cv::DMatch > >& vv_dm
|
||||
|
||||
void Mat_to_vector_vector_char(cv::Mat& mat, std::vector< std::vector< char > >& vv_ch);
|
||||
void vector_vector_char_to_Mat(std::vector< std::vector< char > >& vv_ch, cv::Mat& mat);
|
||||
|
||||
void Mat_to_vector_vector_Point(cv::Mat& mat, std::vector< std::vector< cv::Point > >& vv_pt);
|
||||
|
Reference in New Issue
Block a user