diff --git a/modules/java/gen_java.py b/modules/java/gen_java.py index bec1a9933..91e31cf5d 100644 --- a/modules/java/gen_java.py +++ b/modules/java/gen_java.py @@ -484,195 +484,6 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize "waitKey" : {'j_code' : '', 'jn_code' : '', 'cpp_code' : '' }, }, # Highgui - 'CvANN_MLP_TrainParams': - { - "CvANN_MLP_TrainParams" : - { - 'j_code' : """ -//javadoc:CvANN_MLP_TrainParams::CvANN_MLP_TrainParams() -public CvANN_MLP_TrainParams() { - nativeObj = n_newObj(); -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvANN_1MLP_1TrainParams_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvANN_MLP_TrainParams(); -} - """ - }, - }, - - 'CvBoostParams': - { - "CvBoostParams" : - { - 'j_code' : """ -//javadoc:CvBoostParams::CvBoostParams() -public CvBoostParams() { - nativeObj = n_newObj(); -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvBoostParams_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvBoostParams(); -} - """ - }, - }, - - 'CvDTreeParams': - { - "CvDTreeParams" : - { - 'j_code' : """ -//javadoc:CvDTreeParams::CvDTreeParams() -public CvDTreeParams() { - nativeObj = n_newObj(); -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvDTreeParams_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvDTreeParams(); -} - """ - }, - }, - - 'CvEMParams': - { - "CvEMParams" : - { - 'j_code' : """ -//javadoc:CvEMParams::CvEMParams() -public CvEMParams() { - nativeObj = n_newObj(); - -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvEMParams_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvEMParams(); -} - """ - }, - }, - - 'CvGBTreesParams': - { - "CvGBTreesParams" : - { - 'j_code' : """ -//javadoc:CvGBTreesParams::CvGBTreesParams() -public CvGBTreesParams() { - nativeObj = n_newObj(); -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvGBTreesParams_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvGBTreesParams(); -} - """ - }, - }, - - 'CvParamGrid': - { - "CvParamGrid" : - { - 'j_code' : """ -//javadoc:CvParamGrid::CvParamGrid() -public CvParamGrid() { - nativeObj = n_newObj(); -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvParamGrid_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvParamGrid(); -} - """ - }, - }, - - 'CvRTParams': - { - "CvRTParams" : - { - 'j_code' : """ -//javadoc:CvRTParams::CvRTParams() -public CvRTParams() { - nativeObj = n_newObj(); -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvRTParams_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvRTParams(); -} - """ - }, - }, - - 'CvStatModel': - { - "CvStatModel" : - { - 'j_code' : """ -//javadoc:CvStatModel::CvStatModel() -public CvStatModel() { - nativeObj = n_newObj(); -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvStatModel_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvStatModel(); -} - """ - }, - }, - - 'CvSVMParams': - { - "CvSVMParams" : - { - 'j_code' : """ -//javadoc:CvSVMParams::CvSVMParams() -public CvSVMParams() { - nativeObj = n_newObj(); -} - """, - 'jn_code' : 'private static native long n_newObj();', - 'cpp_code' : """ -JNIEXPORT jlong JNICALL Java_org_opencv_ml_CvSVMParams_n_1newObj - (JNIEnv* env, jclass cls) -{ - return (jlong) new CvSVMParams(); -} - """ - }, - }, } # { class : { func : {arg_name : ctype} } } @@ -872,6 +683,9 @@ public class %(jc)s { self.classes_simple.append(name) if '/Map' in decl[2]: self.classes_map.append(name) + #adding default c-tor + ffi = FuncFamilyInfo(['cv.'+name+'.'+name, '', [], []]) + classinfo.methods[ffi.jname] = ffi type_dict[name] = \ { "j_type" : classinfo.jname, "jn_type" : "long", "jn_args" : (("__int64", ".nativeObj"),),