Remove all using directives for STL namespace and members
Made all STL usages explicit to be able automatically find all usages of particular class or function.
This commit is contained in:
@@ -202,32 +202,32 @@ type_dict = {
|
||||
|
||||
# "complex" : { j_type : "?", jn_args : (("", ""),), jn_name : "", jni_var : "", jni_name : "", "suffix" : "?" },
|
||||
|
||||
"vector_Point" : { "j_type" : "MatOfPoint", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Point> %(n)s", "suffix" : "J" },
|
||||
"vector_Point2f" : { "j_type" : "MatOfPoint2f", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Point2f> %(n)s", "suffix" : "J" },
|
||||
#"vector_Point2d" : { "j_type" : "MatOfPoint2d", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Point2d> %(n)s", "suffix" : "J" },
|
||||
"vector_Point3i" : { "j_type" : "MatOfPoint3", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Point3i> %(n)s", "suffix" : "J" },
|
||||
"vector_Point3f" : { "j_type" : "MatOfPoint3f", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Point3f> %(n)s", "suffix" : "J" },
|
||||
#"vector_Point3d" : { "j_type" : "MatOfPoint3d", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Point3d> %(n)s", "suffix" : "J" },
|
||||
"vector_KeyPoint" : { "j_type" : "MatOfKeyPoint", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<KeyPoint> %(n)s", "suffix" : "J" },
|
||||
"vector_DMatch" : { "j_type" : "MatOfDMatch", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<DMatch> %(n)s", "suffix" : "J" },
|
||||
"vector_Rect" : { "j_type" : "MatOfRect", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Rect> %(n)s", "suffix" : "J" },
|
||||
"vector_uchar" : { "j_type" : "MatOfByte", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<uchar> %(n)s", "suffix" : "J" },
|
||||
"vector_char" : { "j_type" : "MatOfByte", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<char> %(n)s", "suffix" : "J" },
|
||||
"vector_int" : { "j_type" : "MatOfInt", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<int> %(n)s", "suffix" : "J" },
|
||||
"vector_float" : { "j_type" : "MatOfFloat", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<float> %(n)s", "suffix" : "J" },
|
||||
"vector_double" : { "j_type" : "MatOfDouble", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<double> %(n)s", "suffix" : "J" },
|
||||
"vector_Vec4i" : { "j_type" : "MatOfInt4", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Vec4i> %(n)s", "suffix" : "J" },
|
||||
"vector_Vec4f" : { "j_type" : "MatOfFloat4", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Vec4f> %(n)s", "suffix" : "J" },
|
||||
"vector_Vec6f" : { "j_type" : "MatOfFloat6", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Vec6f> %(n)s", "suffix" : "J" },
|
||||
"vector_Point" : { "j_type" : "MatOfPoint", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Point> %(n)s", "suffix" : "J" },
|
||||
"vector_Point2f" : { "j_type" : "MatOfPoint2f", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Point2f> %(n)s", "suffix" : "J" },
|
||||
#"vector_Point2d" : { "j_type" : "MatOfPoint2d", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Point2d> %(n)s", "suffix" : "J" },
|
||||
"vector_Point3i" : { "j_type" : "MatOfPoint3", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Point3i> %(n)s", "suffix" : "J" },
|
||||
"vector_Point3f" : { "j_type" : "MatOfPoint3f", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Point3f> %(n)s", "suffix" : "J" },
|
||||
#"vector_Point3d" : { "j_type" : "MatOfPoint3d", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Point3d> %(n)s", "suffix" : "J" },
|
||||
"vector_KeyPoint" : { "j_type" : "MatOfKeyPoint", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<KeyPoint> %(n)s", "suffix" : "J" },
|
||||
"vector_DMatch" : { "j_type" : "MatOfDMatch", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<DMatch> %(n)s", "suffix" : "J" },
|
||||
"vector_Rect" : { "j_type" : "MatOfRect", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Rect> %(n)s", "suffix" : "J" },
|
||||
"vector_uchar" : { "j_type" : "MatOfByte", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<uchar> %(n)s", "suffix" : "J" },
|
||||
"vector_char" : { "j_type" : "MatOfByte", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<char> %(n)s", "suffix" : "J" },
|
||||
"vector_int" : { "j_type" : "MatOfInt", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<int> %(n)s", "suffix" : "J" },
|
||||
"vector_float" : { "j_type" : "MatOfFloat", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<float> %(n)s", "suffix" : "J" },
|
||||
"vector_double" : { "j_type" : "MatOfDouble", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<double> %(n)s", "suffix" : "J" },
|
||||
"vector_Vec4i" : { "j_type" : "MatOfInt4", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Vec4i> %(n)s", "suffix" : "J" },
|
||||
"vector_Vec4f" : { "j_type" : "MatOfFloat4", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Vec4f> %(n)s", "suffix" : "J" },
|
||||
"vector_Vec6f" : { "j_type" : "MatOfFloat6", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Vec6f> %(n)s", "suffix" : "J" },
|
||||
|
||||
"vector_Mat" : { "j_type" : "List<Mat>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector<Mat> %(n)s", "suffix" : "J" },
|
||||
"vector_Mat" : { "j_type" : "List<Mat>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector<Mat> %(n)s", "suffix" : "J" },
|
||||
|
||||
"vector_vector_KeyPoint": { "j_type" : "List<MatOfKeyPoint>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector< vector<KeyPoint> > %(n)s" },
|
||||
"vector_vector_DMatch" : { "j_type" : "List<MatOfDMatch>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector< vector<DMatch> > %(n)s" },
|
||||
"vector_vector_char" : { "j_type" : "List<MatOfByte>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector< vector<char> > %(n)s" },
|
||||
"vector_vector_Point" : { "j_type" : "List<MatOfPoint>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector< vector<Point> > %(n)s" },
|
||||
"vector_vector_Point2f" : { "j_type" : "List<MatOfPoint2f>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector< vector<Point2f> > %(n)s" },
|
||||
"vector_vector_Point3f" : { "j_type" : "List<MatOfPoint3f>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "vector< vector<Point3f> > %(n)s" },
|
||||
"vector_vector_KeyPoint": { "j_type" : "List<MatOfKeyPoint>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector< std::vector<KeyPoint> > %(n)s" },
|
||||
"vector_vector_DMatch" : { "j_type" : "List<MatOfDMatch>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector< std::vector<DMatch> > %(n)s" },
|
||||
"vector_vector_char" : { "j_type" : "List<MatOfByte>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector< std::vector<char> > %(n)s" },
|
||||
"vector_vector_Point" : { "j_type" : "List<MatOfPoint>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector< std::vector<Point> > %(n)s" },
|
||||
"vector_vector_Point2f" : { "j_type" : "List<MatOfPoint2f>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector< std::vector<Point2f> > %(n)s" },
|
||||
"vector_vector_Point3f" : { "j_type" : "List<MatOfPoint3f>", "jn_type" : "long", "jni_type" : "jlong", "jni_var" : "std::vector< std::vector<Point3f> > %(n)s" },
|
||||
|
||||
"Mat" : { "j_type" : "Mat", "jn_type" : "long", "jn_args" : (("__int64", ".nativeObj"),),
|
||||
"jni_var" : "Mat& %(n)s = *((Mat*)%(n)s_nativeObj)",
|
||||
@@ -287,10 +287,6 @@ type_dict = {
|
||||
"jni_type" : "jstring", "jni_name" : "n_%(n)s",
|
||||
"jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); std::string n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',
|
||||
"suffix" : "Ljava_lang_String_2"},
|
||||
"String" : { "j_type" : "String", "jn_type" : "String",
|
||||
"jni_type" : "jstring", "jni_name" : "n_%(n)s",
|
||||
"jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); String n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',
|
||||
"suffix" : "Ljava_lang_String_2"},
|
||||
"c_string": { "j_type" : "String", "jn_type" : "String",
|
||||
"jni_type" : "jstring", "jni_name" : "n_%(n)s.c_str()",
|
||||
"jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); std::string n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',
|
||||
@@ -419,7 +415,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
|
||||
{
|
||||
'j_code' :
|
||||
"""
|
||||
// C++: Size getTextSize(const string& text, int fontFace, double fontScale, int thickness, int* baseLine);
|
||||
// C++: Size getTextSize(const std::string& text, int fontFace, double fontScale, int thickness, int* baseLine);
|
||||
//javadoc:getTextSize(text, fontFace, fontScale, thickness, baseLine)
|
||||
public static Size getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine) {
|
||||
if(baseLine != null && baseLine.length != 1)
|
||||
@@ -432,7 +428,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
|
||||
""" private static native double[] n_getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine);\n""",
|
||||
'cpp_code' :
|
||||
"""
|
||||
// C++: Size getTextSize(const string& text, int fontFace, double fontScale, int thickness, int* baseLine);
|
||||
// C++: Size getTextSize(const std::string& text, int fontFace, double fontScale, int thickness, int* baseLine);
|
||||
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize (JNIEnv*, jclass, jstring, jint, jdouble, jint, jintArray);
|
||||
|
||||
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
|
||||
@@ -1208,6 +1204,8 @@ extern "C" {
|
||||
retval = fi.ctype + " _retval_ = "
|
||||
if fi.ctype == "void":
|
||||
retval = ""
|
||||
elif fi.ctype == "string":
|
||||
retval = "std::" + retval
|
||||
elif fi.ctype.startswith('vector'):
|
||||
retval = type_dict[fi.ctype]['jni_var'] % {"n" : '_ret_val_vector_'} + " = "
|
||||
c_epilogue.append("Mat* _retval_ = new Mat();")
|
||||
|
@@ -8,14 +8,14 @@ using namespace cv;
|
||||
|
||||
// vector_int
|
||||
|
||||
void Mat_to_vector_int(Mat& mat, vector<int>& v_int)
|
||||
void Mat_to_vector_int(Mat& mat, std::vector<int>& v_int)
|
||||
{
|
||||
v_int.clear();
|
||||
CHECK_MAT(mat.type()==CV_32SC1 && mat.cols==1);
|
||||
v_int = (vector<int>) mat;
|
||||
v_int = (std::vector<int>) mat;
|
||||
}
|
||||
|
||||
void vector_int_to_Mat(vector<int>& v_int, Mat& mat)
|
||||
void vector_int_to_Mat(std::vector<int>& v_int, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_int, true);
|
||||
}
|
||||
@@ -23,14 +23,14 @@ void vector_int_to_Mat(vector<int>& v_int, Mat& mat)
|
||||
|
||||
//vector_double
|
||||
|
||||
void Mat_to_vector_double(Mat& mat, vector<double>& v_double)
|
||||
void Mat_to_vector_double(Mat& mat, std::vector<double>& v_double)
|
||||
{
|
||||
v_double.clear();
|
||||
CHECK_MAT(mat.type()==CV_64FC1 && mat.cols==1);
|
||||
v_double = (vector<double>) mat;
|
||||
v_double = (std::vector<double>) mat;
|
||||
}
|
||||
|
||||
void vector_double_to_Mat(vector<double>& v_double, Mat& mat)
|
||||
void vector_double_to_Mat(std::vector<double>& v_double, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_double, true);
|
||||
}
|
||||
@@ -38,14 +38,14 @@ void vector_double_to_Mat(vector<double>& v_double, Mat& mat)
|
||||
|
||||
// vector_float
|
||||
|
||||
void Mat_to_vector_float(Mat& mat, vector<float>& v_float)
|
||||
void Mat_to_vector_float(Mat& mat, std::vector<float>& v_float)
|
||||
{
|
||||
v_float.clear();
|
||||
CHECK_MAT(mat.type()==CV_32FC1 && mat.cols==1);
|
||||
v_float = (vector<float>) mat;
|
||||
v_float = (std::vector<float>) mat;
|
||||
}
|
||||
|
||||
void vector_float_to_Mat(vector<float>& v_float, Mat& mat)
|
||||
void vector_float_to_Mat(std::vector<float>& v_float, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_float, true);
|
||||
}
|
||||
@@ -53,26 +53,26 @@ void vector_float_to_Mat(vector<float>& v_float, Mat& mat)
|
||||
|
||||
//vector_uchar
|
||||
|
||||
void Mat_to_vector_uchar(Mat& mat, vector<uchar>& v_uchar)
|
||||
void Mat_to_vector_uchar(Mat& mat, std::vector<uchar>& v_uchar)
|
||||
{
|
||||
v_uchar.clear();
|
||||
CHECK_MAT(mat.type()==CV_8UC1 && mat.cols==1);
|
||||
v_uchar = (vector<uchar>) mat;
|
||||
v_uchar = (std::vector<uchar>) mat;
|
||||
}
|
||||
|
||||
void vector_uchar_to_Mat(vector<uchar>& v_uchar, Mat& mat)
|
||||
void vector_uchar_to_Mat(std::vector<uchar>& v_uchar, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_uchar, true);
|
||||
}
|
||||
|
||||
void Mat_to_vector_char(Mat& mat, vector<char>& v_char)
|
||||
void Mat_to_vector_char(Mat& mat, std::vector<char>& v_char)
|
||||
{
|
||||
v_char.clear();
|
||||
CHECK_MAT(mat.type()==CV_8SC1 && mat.cols==1);
|
||||
v_char = (vector<char>) mat;
|
||||
v_char = (std::vector<char>) mat;
|
||||
}
|
||||
|
||||
void vector_char_to_Mat(vector<char>& v_char, Mat& mat)
|
||||
void vector_char_to_Mat(std::vector<char>& v_char, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_char, true);
|
||||
}
|
||||
@@ -80,102 +80,102 @@ void vector_char_to_Mat(vector<char>& v_char, Mat& mat)
|
||||
|
||||
//vector_Rect
|
||||
|
||||
void Mat_to_vector_Rect(Mat& mat, vector<Rect>& v_rect)
|
||||
void Mat_to_vector_Rect(Mat& mat, std::vector<Rect>& v_rect)
|
||||
{
|
||||
v_rect.clear();
|
||||
CHECK_MAT(mat.type()==CV_32SC4 && mat.cols==1);
|
||||
v_rect = (vector<Rect>) mat;
|
||||
v_rect = (std::vector<Rect>) mat;
|
||||
}
|
||||
|
||||
void vector_Rect_to_Mat(vector<Rect>& v_rect, Mat& mat)
|
||||
void vector_Rect_to_Mat(std::vector<Rect>& v_rect, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_rect, true);
|
||||
}
|
||||
|
||||
|
||||
//vector_Point
|
||||
void Mat_to_vector_Point(Mat& mat, vector<Point>& v_point)
|
||||
void Mat_to_vector_Point(Mat& mat, std::vector<Point>& v_point)
|
||||
{
|
||||
v_point.clear();
|
||||
CHECK_MAT(mat.type()==CV_32SC2 && mat.cols==1);
|
||||
v_point = (vector<Point>) mat;
|
||||
v_point = (std::vector<Point>) mat;
|
||||
}
|
||||
|
||||
//vector_Point2f
|
||||
void Mat_to_vector_Point2f(Mat& mat, vector<Point2f>& v_point)
|
||||
void Mat_to_vector_Point2f(Mat& mat, std::vector<Point2f>& v_point)
|
||||
{
|
||||
v_point.clear();
|
||||
CHECK_MAT(mat.type()==CV_32FC2 && mat.cols==1);
|
||||
v_point = (vector<Point2f>) mat;
|
||||
v_point = (std::vector<Point2f>) mat;
|
||||
}
|
||||
|
||||
//vector_Point2d
|
||||
void Mat_to_vector_Point2d(Mat& mat, vector<Point2d>& v_point)
|
||||
void Mat_to_vector_Point2d(Mat& mat, std::vector<Point2d>& v_point)
|
||||
{
|
||||
v_point.clear();
|
||||
CHECK_MAT(mat.type()==CV_64FC2 && mat.cols==1);
|
||||
v_point = (vector<Point2d>) mat;
|
||||
v_point = (std::vector<Point2d>) mat;
|
||||
}
|
||||
|
||||
|
||||
//vector_Point3i
|
||||
void Mat_to_vector_Point3i(Mat& mat, vector<Point3i>& v_point)
|
||||
void Mat_to_vector_Point3i(Mat& mat, std::vector<Point3i>& v_point)
|
||||
{
|
||||
v_point.clear();
|
||||
CHECK_MAT(mat.type()==CV_32SC3 && mat.cols==1);
|
||||
v_point = (vector<Point3i>) mat;
|
||||
v_point = (std::vector<Point3i>) mat;
|
||||
}
|
||||
|
||||
//vector_Point3f
|
||||
void Mat_to_vector_Point3f(Mat& mat, vector<Point3f>& v_point)
|
||||
void Mat_to_vector_Point3f(Mat& mat, std::vector<Point3f>& v_point)
|
||||
{
|
||||
v_point.clear();
|
||||
CHECK_MAT(mat.type()==CV_32FC3 && mat.cols==1);
|
||||
v_point = (vector<Point3f>) mat;
|
||||
v_point = (std::vector<Point3f>) mat;
|
||||
}
|
||||
|
||||
//vector_Point3d
|
||||
void Mat_to_vector_Point3d(Mat& mat, vector<Point3d>& v_point)
|
||||
void Mat_to_vector_Point3d(Mat& mat, std::vector<Point3d>& v_point)
|
||||
{
|
||||
v_point.clear();
|
||||
CHECK_MAT(mat.type()==CV_64FC3 && mat.cols==1);
|
||||
v_point = (vector<Point3d>) mat;
|
||||
v_point = (std::vector<Point3d>) mat;
|
||||
}
|
||||
|
||||
|
||||
void vector_Point_to_Mat(vector<Point>& v_point, Mat& mat)
|
||||
void vector_Point_to_Mat(std::vector<Point>& v_point, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_point, true);
|
||||
}
|
||||
|
||||
void vector_Point2f_to_Mat(vector<Point2f>& v_point, Mat& mat)
|
||||
void vector_Point2f_to_Mat(std::vector<Point2f>& v_point, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_point, true);
|
||||
}
|
||||
|
||||
void vector_Point2d_to_Mat(vector<Point2d>& v_point, Mat& mat)
|
||||
void vector_Point2d_to_Mat(std::vector<Point2d>& v_point, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_point, true);
|
||||
}
|
||||
|
||||
void vector_Point3i_to_Mat(vector<Point3i>& v_point, Mat& mat)
|
||||
void vector_Point3i_to_Mat(std::vector<Point3i>& v_point, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_point, true);
|
||||
}
|
||||
|
||||
void vector_Point3f_to_Mat(vector<Point3f>& v_point, Mat& mat)
|
||||
void vector_Point3f_to_Mat(std::vector<Point3f>& v_point, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_point, true);
|
||||
}
|
||||
|
||||
void vector_Point3d_to_Mat(vector<Point3d>& v_point, Mat& mat)
|
||||
void vector_Point3d_to_Mat(std::vector<Point3d>& v_point, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_point, true);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENCV_FEATURES2D
|
||||
//vector_KeyPoint
|
||||
void Mat_to_vector_KeyPoint(Mat& mat, vector<KeyPoint>& v_kp)
|
||||
void Mat_to_vector_KeyPoint(Mat& mat, std::vector<KeyPoint>& v_kp)
|
||||
{
|
||||
v_kp.clear();
|
||||
CHECK_MAT(mat.type()==CV_32FC(7) && mat.cols==1);
|
||||
@@ -189,7 +189,7 @@ void Mat_to_vector_KeyPoint(Mat& mat, vector<KeyPoint>& v_kp)
|
||||
}
|
||||
|
||||
|
||||
void vector_KeyPoint_to_Mat(vector<KeyPoint>& v_kp, Mat& mat)
|
||||
void vector_KeyPoint_to_Mat(std::vector<KeyPoint>& v_kp, Mat& mat)
|
||||
{
|
||||
int count = (int)v_kp.size();
|
||||
mat.create(count, 1, CV_32FC(7));
|
||||
@@ -235,7 +235,7 @@ void vector_Mat_to_Mat(std::vector<cv::Mat>& v_mat, cv::Mat& mat)
|
||||
|
||||
#ifdef HAVE_OPENCV_FEATURES2D
|
||||
//vector_DMatch
|
||||
void Mat_to_vector_DMatch(Mat& mat, vector<DMatch>& v_dm)
|
||||
void Mat_to_vector_DMatch(Mat& mat, std::vector<DMatch>& v_dm)
|
||||
{
|
||||
v_dm.clear();
|
||||
CHECK_MAT(mat.type()==CV_32FC4 && mat.cols==1);
|
||||
@@ -249,7 +249,7 @@ void Mat_to_vector_DMatch(Mat& mat, vector<DMatch>& v_dm)
|
||||
}
|
||||
|
||||
|
||||
void vector_DMatch_to_Mat(vector<DMatch>& v_dm, Mat& mat)
|
||||
void vector_DMatch_to_Mat(std::vector<DMatch>& v_dm, Mat& mat)
|
||||
{
|
||||
int count = (int)v_dm.size();
|
||||
mat.create(count, 1, CV_32FC4);
|
||||
@@ -261,62 +261,62 @@ void vector_DMatch_to_Mat(vector<DMatch>& v_dm, Mat& mat)
|
||||
}
|
||||
#endif
|
||||
|
||||
void Mat_to_vector_vector_Point(Mat& mat, vector< vector< Point > >& vv_pt)
|
||||
void Mat_to_vector_vector_Point(Mat& mat, std::vector< std::vector< Point > >& vv_pt)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::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;
|
||||
std::vector<Point> vpt;
|
||||
Mat_to_vector_Point(vm[i], vpt);
|
||||
vv_pt.push_back(vpt);
|
||||
}
|
||||
}
|
||||
|
||||
void Mat_to_vector_vector_Point2f(Mat& mat, vector< vector< Point2f > >& vv_pt)
|
||||
void Mat_to_vector_vector_Point2f(Mat& mat, std::vector< std::vector< Point2f > >& vv_pt)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( mat.rows );
|
||||
Mat_to_vector_Mat(mat, vm);
|
||||
for(size_t i=0; i<vm.size(); i++)
|
||||
{
|
||||
vector<Point2f> vpt;
|
||||
std::vector<Point2f> vpt;
|
||||
Mat_to_vector_Point2f(vm[i], vpt);
|
||||
vv_pt.push_back(vpt);
|
||||
}
|
||||
}
|
||||
|
||||
void Mat_to_vector_vector_Point3f(Mat& mat, vector< vector< Point3f > >& vv_pt)
|
||||
void Mat_to_vector_vector_Point3f(Mat& mat, std::vector< std::vector< Point3f > >& vv_pt)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( mat.rows );
|
||||
Mat_to_vector_Mat(mat, vm);
|
||||
for(size_t i=0; i<vm.size(); i++)
|
||||
{
|
||||
vector<Point3f> vpt;
|
||||
std::vector<Point3f> vpt;
|
||||
Mat_to_vector_Point3f(vm[i], vpt);
|
||||
vv_pt.push_back(vpt);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENCV_FEATURES2D
|
||||
void Mat_to_vector_vector_KeyPoint(Mat& mat, vector< vector< KeyPoint > >& vv_kp)
|
||||
void Mat_to_vector_vector_KeyPoint(Mat& mat, std::vector< std::vector< KeyPoint > >& vv_kp)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( mat.rows );
|
||||
Mat_to_vector_Mat(mat, vm);
|
||||
for(size_t i=0; i<vm.size(); i++)
|
||||
{
|
||||
vector<KeyPoint> vkp;
|
||||
std::vector<KeyPoint> vkp;
|
||||
Mat_to_vector_KeyPoint(vm[i], vkp);
|
||||
vv_kp.push_back(vkp);
|
||||
}
|
||||
}
|
||||
|
||||
void vector_vector_KeyPoint_to_Mat(vector< vector< KeyPoint > >& vv_kp, Mat& mat)
|
||||
void vector_vector_KeyPoint_to_Mat(std::vector< std::vector< KeyPoint > >& vv_kp, Mat& mat)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( vv_kp.size() );
|
||||
for(size_t i=0; i<vv_kp.size(); i++)
|
||||
{
|
||||
@@ -327,22 +327,22 @@ void vector_vector_KeyPoint_to_Mat(vector< vector< KeyPoint > >& vv_kp, Mat& mat
|
||||
vector_Mat_to_Mat(vm, mat);
|
||||
}
|
||||
|
||||
void Mat_to_vector_vector_DMatch(Mat& mat, vector< vector< DMatch > >& vv_dm)
|
||||
void Mat_to_vector_vector_DMatch(Mat& mat, std::vector< std::vector< DMatch > >& vv_dm)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( mat.rows );
|
||||
Mat_to_vector_Mat(mat, vm);
|
||||
for(size_t i=0; i<vm.size(); i++)
|
||||
{
|
||||
vector<DMatch> vdm;
|
||||
std::vector<DMatch> vdm;
|
||||
Mat_to_vector_DMatch(vm[i], vdm);
|
||||
vv_dm.push_back(vdm);
|
||||
}
|
||||
}
|
||||
|
||||
void vector_vector_DMatch_to_Mat(vector< vector< DMatch > >& vv_dm, Mat& mat)
|
||||
void vector_vector_DMatch_to_Mat(std::vector< std::vector< DMatch > >& vv_dm, Mat& mat)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( vv_dm.size() );
|
||||
for(size_t i=0; i<vv_dm.size(); i++)
|
||||
{
|
||||
@@ -354,22 +354,22 @@ void vector_vector_DMatch_to_Mat(vector< vector< DMatch > >& vv_dm, Mat& mat)
|
||||
}
|
||||
#endif
|
||||
|
||||
void Mat_to_vector_vector_char(Mat& mat, vector< vector< char > >& vv_ch)
|
||||
void Mat_to_vector_vector_char(Mat& mat, std::vector< std::vector< char > >& vv_ch)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( mat.rows );
|
||||
Mat_to_vector_Mat(mat, vm);
|
||||
for(size_t i=0; i<vm.size(); i++)
|
||||
{
|
||||
vector<char> vch;
|
||||
std::vector<char> vch;
|
||||
Mat_to_vector_char(vm[i], vch);
|
||||
vv_ch.push_back(vch);
|
||||
}
|
||||
}
|
||||
|
||||
void vector_vector_char_to_Mat(vector< vector< char > >& vv_ch, Mat& mat)
|
||||
void vector_vector_char_to_Mat(std::vector< std::vector< char > >& vv_ch, Mat& mat)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( vv_ch.size() );
|
||||
for(size_t i=0; i<vv_ch.size(); i++)
|
||||
{
|
||||
@@ -380,9 +380,9 @@ void vector_vector_char_to_Mat(vector< vector< char > >& vv_ch, Mat& mat)
|
||||
vector_Mat_to_Mat(vm, mat);
|
||||
}
|
||||
|
||||
void vector_vector_Point_to_Mat(vector< vector< Point > >& vv_pt, Mat& mat)
|
||||
void vector_vector_Point_to_Mat(std::vector< std::vector< Point > >& vv_pt, Mat& mat)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( vv_pt.size() );
|
||||
for(size_t i=0; i<vv_pt.size(); i++)
|
||||
{
|
||||
@@ -393,9 +393,9 @@ void vector_vector_Point_to_Mat(vector< vector< Point > >& vv_pt, Mat& mat)
|
||||
vector_Mat_to_Mat(vm, mat);
|
||||
}
|
||||
|
||||
void vector_vector_Point2f_to_Mat(vector< vector< Point2f > >& vv_pt, Mat& mat)
|
||||
void vector_vector_Point2f_to_Mat(std::vector< std::vector< Point2f > >& vv_pt, Mat& mat)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( vv_pt.size() );
|
||||
for(size_t i=0; i<vv_pt.size(); i++)
|
||||
{
|
||||
@@ -406,9 +406,9 @@ void vector_vector_Point2f_to_Mat(vector< vector< Point2f > >& vv_pt, Mat& mat)
|
||||
vector_Mat_to_Mat(vm, mat);
|
||||
}
|
||||
|
||||
void vector_vector_Point3f_to_Mat(vector< vector< Point3f > >& vv_pt, Mat& mat)
|
||||
void vector_vector_Point3f_to_Mat(std::vector< std::vector< Point3f > >& vv_pt, Mat& mat)
|
||||
{
|
||||
vector<Mat> vm;
|
||||
std::vector<Mat> vm;
|
||||
vm.reserve( vv_pt.size() );
|
||||
for(size_t i=0; i<vv_pt.size(); i++)
|
||||
{
|
||||
@@ -419,17 +419,17 @@ void vector_vector_Point3f_to_Mat(vector< vector< Point3f > >& vv_pt, Mat& mat)
|
||||
vector_Mat_to_Mat(vm, mat);
|
||||
}
|
||||
|
||||
void vector_Vec4i_to_Mat(vector<Vec4i>& v_vec, Mat& mat)
|
||||
void vector_Vec4i_to_Mat(std::vector<Vec4i>& v_vec, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_vec, true);
|
||||
}
|
||||
|
||||
void vector_Vec4f_to_Mat(vector<Vec4f>& v_vec, Mat& mat)
|
||||
void vector_Vec4f_to_Mat(std::vector<Vec4f>& v_vec, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_vec, true);
|
||||
}
|
||||
|
||||
void vector_Vec6f_to_Mat(vector<Vec6f>& v_vec, Mat& mat)
|
||||
void vector_Vec6f_to_Mat(std::vector<Vec6f>& v_vec, Mat& mat)
|
||||
{
|
||||
mat = Mat(v_vec, true);
|
||||
}
|
||||
|
@@ -16,8 +16,8 @@ class CV_EXPORTS_AS(FeatureDetector) javaFeatureDetector : public FeatureDetecto
|
||||
public:
|
||||
#if 0
|
||||
//DO NOT REMOVE! The block is required for sources parser
|
||||
CV_WRAP void detect( const Mat& image, CV_OUT vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
CV_WRAP void detect( const vector<Mat>& images, CV_OUT vector<vector<KeyPoint> >& keypoints, const vector<Mat>& masks=vector<Mat>() ) const;
|
||||
CV_WRAP void detect( const Mat& image, CV_OUT std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
CV_WRAP void detect( const std::vector<Mat>& images, CV_OUT std::vector<std::vector<KeyPoint> >& keypoints, const std::vector<Mat>& masks=std::vector<Mat>() ) const;
|
||||
CV_WRAP virtual bool empty() const;
|
||||
#endif
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
//not supported: SimpleBlob, Dense
|
||||
CV_WRAP static javaFeatureDetector* create( int detectorType )
|
||||
{
|
||||
string name;
|
||||
std::string name;
|
||||
if (detectorType > DYNAMICDETECTOR)
|
||||
{
|
||||
name = "Dynamic";
|
||||
@@ -146,14 +146,14 @@ public:
|
||||
return (javaFeatureDetector*)((FeatureDetector*) detector);
|
||||
}
|
||||
|
||||
CV_WRAP void write( const string& fileName ) const
|
||||
CV_WRAP void write( const std::string& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
((FeatureDetector*)this)->write(fs);
|
||||
fs.release();
|
||||
}
|
||||
|
||||
CV_WRAP void read( const string& fileName )
|
||||
CV_WRAP void read( const std::string& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
((FeatureDetector*)this)->read(fs.root());
|
||||
@@ -167,25 +167,25 @@ public:
|
||||
#if 0
|
||||
//DO NOT REMOVE! The block is required for sources parser
|
||||
CV_WRAP virtual bool isMaskSupported() const;
|
||||
CV_WRAP virtual void add( const vector<Mat>& descriptors );
|
||||
CV_WRAP const vector<Mat>& getTrainDescriptors() const;
|
||||
CV_WRAP virtual void add( const std::vector<Mat>& descriptors );
|
||||
CV_WRAP const std::vector<Mat>& getTrainDescriptors() const;
|
||||
CV_WRAP virtual void clear();
|
||||
CV_WRAP virtual bool empty() const;
|
||||
CV_WRAP virtual void train();
|
||||
CV_WRAP void match( const Mat& queryDescriptors, const Mat& trainDescriptors,
|
||||
CV_OUT vector<DMatch>& matches, const Mat& mask=Mat() ) const;
|
||||
CV_OUT std::vector<DMatch>& matches, const Mat& mask=Mat() ) const;
|
||||
CV_WRAP void knnMatch( const Mat& queryDescriptors, const Mat& trainDescriptors,
|
||||
CV_OUT vector<vector<DMatch> >& matches, int k,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const;
|
||||
CV_WRAP void radiusMatch( const Mat& queryDescriptors, const Mat& trainDescriptors,
|
||||
CV_OUT vector<vector<DMatch> >& matches, float maxDistance,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const;
|
||||
CV_WRAP void match( const Mat& queryDescriptors, CV_OUT vector<DMatch>& matches,
|
||||
const vector<Mat>& masks=vector<Mat>() );
|
||||
CV_WRAP void knnMatch( const Mat& queryDescriptors, CV_OUT vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
CV_WRAP void radiusMatch( const Mat& queryDescriptors, CV_OUT vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
CV_WRAP void match( const Mat& queryDescriptors, CV_OUT std::vector<DMatch>& matches,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>() );
|
||||
CV_WRAP void knnMatch( const Mat& queryDescriptors, CV_OUT std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
CV_WRAP void radiusMatch( const Mat& queryDescriptors, CV_OUT std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
#endif
|
||||
|
||||
enum
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
//supported: FlannBased, BruteForce, BruteForce-L1, BruteForce-Hamming, BruteForce-HammingLUT
|
||||
CV_WRAP static javaDescriptorMatcher* create( int matcherType )
|
||||
{
|
||||
string name;
|
||||
std::string name;
|
||||
|
||||
switch(matcherType)
|
||||
{
|
||||
@@ -240,14 +240,14 @@ public:
|
||||
return (javaDescriptorMatcher*)((DescriptorMatcher*) matcher);
|
||||
}
|
||||
|
||||
CV_WRAP void write( const string& fileName ) const
|
||||
CV_WRAP void write( const std::string& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
((DescriptorMatcher*)this)->write(fs);
|
||||
fs.release();
|
||||
}
|
||||
|
||||
CV_WRAP void read( const string& fileName )
|
||||
CV_WRAP void read( const std::string& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
((DescriptorMatcher*)this)->read(fs.root());
|
||||
@@ -260,8 +260,8 @@ class CV_EXPORTS_AS(DescriptorExtractor) javaDescriptorExtractor : public Descri
|
||||
public:
|
||||
#if 0
|
||||
//DO NOT REMOVE! The block is required for sources parser
|
||||
CV_WRAP void compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
CV_WRAP void compute( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints, CV_OUT vector<Mat>& descriptors ) const;
|
||||
CV_WRAP void compute( const Mat& image, std::vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
CV_WRAP void compute( const std::vector<Mat>& images, std::vector<std::vector<KeyPoint> >& keypoints, CV_OUT std::vector<Mat>& descriptors ) const;
|
||||
CV_WRAP virtual int descriptorSize() const;
|
||||
CV_WRAP virtual int descriptorType() const;
|
||||
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
//not supported: Calonder
|
||||
CV_WRAP static javaDescriptorExtractor* create( int extractorType )
|
||||
{
|
||||
string name;
|
||||
std::string name;
|
||||
|
||||
if (extractorType > OPPONENTEXTRACTOR)
|
||||
{
|
||||
@@ -332,14 +332,14 @@ public:
|
||||
return (javaDescriptorExtractor*)((DescriptorExtractor*) extractor);
|
||||
}
|
||||
|
||||
CV_WRAP void write( const string& fileName ) const
|
||||
CV_WRAP void write( const std::string& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
((DescriptorExtractor*)this)->write(fs);
|
||||
fs.release();
|
||||
}
|
||||
|
||||
CV_WRAP void read( const string& fileName )
|
||||
CV_WRAP void read( const std::string& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
((DescriptorExtractor*)this)->read(fs.root());
|
||||
@@ -352,35 +352,35 @@ class CV_EXPORTS_AS(GenericDescriptorMatcher) javaGenericDescriptorMatcher : pub
|
||||
public:
|
||||
#if 0
|
||||
//DO NOT REMOVE! The block is required for sources parser
|
||||
CV_WRAP virtual void add( const vector<Mat>& images,
|
||||
vector<vector<KeyPoint> >& keypoints );
|
||||
CV_WRAP const vector<Mat>& getTrainImages() const;
|
||||
CV_WRAP const vector<vector<KeyPoint> >& getTrainKeypoints() const;
|
||||
CV_WRAP virtual void add( const std::vector<Mat>& images,
|
||||
std::vector<std::vector<KeyPoint> >& keypoints );
|
||||
CV_WRAP const std::vector<Mat>& getTrainImages() const;
|
||||
CV_WRAP const std::vector<std::vector<KeyPoint> >& getTrainKeypoints() const;
|
||||
CV_WRAP virtual void clear();
|
||||
CV_WRAP virtual bool isMaskSupported();
|
||||
CV_WRAP virtual void train();
|
||||
CV_WRAP void classify( const Mat& queryImage, CV_IN_OUT vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, vector<KeyPoint>& trainKeypoints ) const;
|
||||
CV_WRAP void classify( const Mat& queryImage, CV_IN_OUT vector<KeyPoint>& queryKeypoints );
|
||||
CV_WRAP void match( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT vector<DMatch>& matches, const Mat& mask=Mat() ) const;
|
||||
CV_WRAP void knnMatch( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT vector<vector<DMatch> >& matches, int k,
|
||||
CV_WRAP void classify( const Mat& queryImage, CV_IN_OUT std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints ) const;
|
||||
CV_WRAP void classify( const Mat& queryImage, CV_IN_OUT std::vector<KeyPoint>& queryKeypoints );
|
||||
CV_WRAP void match( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT std::vector<DMatch>& matches, const Mat& mask=Mat() ) const;
|
||||
CV_WRAP void knnMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const;
|
||||
CV_WRAP void radiusMatch( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT vector<vector<DMatch> >& matches, float maxDistance,
|
||||
CV_WRAP void radiusMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const;
|
||||
CV_WRAP void match( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT vector<DMatch>& matches, const vector<Mat>& masks=vector<Mat>() );
|
||||
CV_WRAP void knnMatch( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
CV_WRAP void radiusMatch( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
CV_WRAP void match( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT std::vector<DMatch>& matches, const std::vector<Mat>& masks=std::vector<Mat>() );
|
||||
CV_WRAP void knnMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
CV_WRAP void radiusMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
CV_WRAP virtual bool empty() const;
|
||||
#endif
|
||||
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
//unsupported: Vector
|
||||
CV_WRAP static javaGenericDescriptorMatcher* create( int matcherType )
|
||||
{
|
||||
string name;
|
||||
std::string name;
|
||||
|
||||
switch(matcherType)
|
||||
{
|
||||
@@ -421,14 +421,14 @@ public:
|
||||
return (javaGenericDescriptorMatcher*)((GenericDescriptorMatcher*) matcher);
|
||||
}
|
||||
|
||||
CV_WRAP void write( const string& fileName ) const
|
||||
CV_WRAP void write( const std::string& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
((GenericDescriptorMatcher*)this)->write(fs);
|
||||
fs.release();
|
||||
}
|
||||
|
||||
CV_WRAP void read( const string& fileName )
|
||||
CV_WRAP void read( const std::string& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
((GenericDescriptorMatcher*)this)->read(fs.root());
|
||||
@@ -448,21 +448,21 @@ enum
|
||||
};
|
||||
|
||||
// Draw keypoints.
|
||||
CV_EXPORTS_W void drawKeypoints( const Mat& image, const vector<KeyPoint>& keypoints, Mat& outImage,
|
||||
CV_EXPORTS_W void drawKeypoints( const Mat& image, const std::vector<KeyPoint>& keypoints, Mat& outImage,
|
||||
const Scalar& color=Scalar::all(-1), int flags=0 );
|
||||
|
||||
// Draws matches of keypints from two images on output image.
|
||||
CV_EXPORTS_W void drawMatches( const Mat& img1, const vector<KeyPoint>& keypoints1,
|
||||
const Mat& img2, const vector<KeyPoint>& keypoints2,
|
||||
const vector<DMatch>& matches1to2, Mat& outImg,
|
||||
CV_EXPORTS_W void drawMatches( const Mat& img1, const std::vector<KeyPoint>& keypoints1,
|
||||
const Mat& img2, const std::vector<KeyPoint>& keypoints2,
|
||||
const std::vector<DMatch>& matches1to2, Mat& outImg,
|
||||
const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1),
|
||||
const vector<char>& matchesMask=vector<char>(), int flags=0 );
|
||||
const std::vector<char>& matchesMask=std::vector<char>(), int flags=0 );
|
||||
|
||||
CV_EXPORTS_AS(drawMatches2) void drawMatches( const Mat& img1, const vector<KeyPoint>& keypoints1,
|
||||
const Mat& img2, const vector<KeyPoint>& keypoints2,
|
||||
const vector<vector<DMatch> >& matches1to2, Mat& outImg,
|
||||
CV_EXPORTS_AS(drawMatches2) void drawMatches( const Mat& img1, const std::vector<KeyPoint>& keypoints1,
|
||||
const Mat& img2, const std::vector<KeyPoint>& keypoints2,
|
||||
const std::vector<std::vector<DMatch> >& matches1to2, Mat& outImg,
|
||||
const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1),
|
||||
const vector<vector<char> >& matchesMask=vector<vector<char> >(), int flags=0);
|
||||
const std::vector<std::vector<char> >& matchesMask=std::vector<std::vector<char> >(), int flags=0);
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user