1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00
Files
opencv/modules/core/misc/objc/gen_dict.json
T
Giles Payne 02385472b6 Merge pull request #17165 from komakai:objc-binding
Objc binding

* Initial work on Objective-C wrapper

* Objective-C generator script; update manually generated wrappers

* Add Mat tests

* Core Tests

* Imgproc wrapper generation and tests

* Fixes for Imgcodecs wrapper

* Miscellaneous fixes. Swift build support

* Objective-C wrapper build/install

* Add Swift wrappers for videoio/objdetect/feature2d

* Framework build;iOS support

* Fix toArray functions;Use enum types whenever possible

* Use enum types where possible;prepare test build

* Update test

* Add test runner scripts for iOS and macOS

* Add test scripts and samples

* Build fixes

* Fix build (cmake 3.17.x compatibility)

* Fix warnings

* Fix enum name conflicting handling

* Add support for document generation with Jazzy

* Swift/Native fast accessor functions

* Add Objective-C wrapper for calib3d, dnn, ml, photo and video modules

* Remove IntOut/FloatOut/DoubleOut classes

* Fix iOS default test platform value

* Fix samples

* Revert default framework name to opencv2

* Add converter util functions

* Fix failing test

* Fix whitespace

* Add handling for deprecated methods;fix warnings;define __OPENCV_BUILD

* Suppress cmake warnings

* Reduce severity of "jazzy not found" log message

* Fix incorrect #include of compatibility header in ios.h

* Use explicit returns in subscript/get implementation

* Reduce minimum required cmake version to 3.15 for Objective-C/Swift binding
2020-06-08 18:32:53 +00:00

376 lines
13 KiB
JSON

{
"module_imports": ["Point2i", "MinMaxLocResult"],
"class_ignore_list" : [
"FileNode",
"FileStorage",
"KDTree",
"KeyPoint",
"DMatch"
],
"missing_consts" : {
"Core" : {
"private" : [],
"public" : [
["SVD_MODIFY_A", 1], ["SVD_NO_UV", 2], ["SVD_FULL_UV", 4],
["FILLED", -1],
["REDUCE_SUM", 0], ["REDUCE_AVG", 1], ["REDUCE_MAX", 2], ["REDUCE_MIN", 3]
]
}
},
"ManualFuncs" : {
"Core" : {
"minMaxLoc" : {
"declaration" : [
"// C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())",
"+ (MinMaxLocResult*)minMaxLoc:(Mat*)src mask:(nullable Mat*)mask;",
"\n",
"+ (MinMaxLocResult*)minMaxLoc:(Mat*)src;",
"\n"
],
"implementation" : [
"// C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())",
"+ (MinMaxLocResult*)minMaxLoc:(Mat*)src mask:(nullable Mat*)mask {",
" double minVal, maxVal;",
" cv::Point minLoc, maxLoc;",
" cv::Mat& rSrc = src.nativeRef;",
" if (mask != nil) {",
" cv::Mat& rMask = mask.nativeRef;",
" cv::minMaxLoc(rSrc, &minVal, &maxVal, &minLoc, &maxLoc, rMask);",
" } else {",
" cv::minMaxLoc(rSrc, &minVal, &maxVal, &minLoc, &maxLoc);",
" }",
" return [[MinMaxLocResult alloc] initWithMinval:minVal maxVal:maxVal minLoc:[Point2i fromNative:minLoc] maxLoc:[Point2i fromNative:maxLoc]];",
"}",
"\n",
"+ (MinMaxLocResult*)minMaxLoc:(Mat*)src {",
" return [self minMaxLoc:src mask:nil];",
"}",
"\n"
],
"objc_method_name" : "+minMaxLoc:mask:"
},
"checkHardwareSupport" : {"declaration" : [""], "implementation" : [""] },
"setUseOptimized" : {"declaration" : [""], "implementation" : [""] },
"useOptimized" : {"declaration" : [""], "implementation" : [""] }
}
},
"func_arg_fix" : {
"randu" : { "low" : {"ctype" : "double"},
"high" : {"ctype" : "double"} },
"randn" : { "mean" : {"ctype" : "double"},
"stddev" : {"ctype" : "double"} },
"inRange" : { "lowerb" : {"ctype" : "Scalar"},
"upperb" : {"ctype" : "Scalar"} },
"boundingRect" : { "points" : {"ctype" : "vector_Point"} },
"hconcat" : { "src" : {"ctype" : "vector_Mat"} },
"vconcat" : { "src" : {"ctype" : "vector_Mat"} },
"checkRange" : {"pos" : {"ctype" : "*"} },
"meanStdDev" : { "mean" : {"ctype" : "vector_double"},
"stddev" : {"ctype" : "vector_double"} },
"mixChannels" : { "dst" : {"attrib" : []} },
"rotate" : { "rotateCode" : {"ctype" : "RotateFlags"} },
"norm" : { "normType" : {"ctype" : "NormTypes"} },
"batchDistance" : { "normType" : {"ctype" : "NormTypes"} },
"normalize" : { "norm_type" : {"ctype" : "NormTypes"} },
"compare" : { "cmpop" : {"ctype" : "CmpTypes"} },
"copyMakeBorder" : { "borderType" : {"ctype" : "BorderTypes"} },
"borderInterpolate" : { "borderType" : {"ctype" : "BorderTypes"} },
"(void)divide:(double)scale src2:(Mat*)src2 dst:(Mat*)dst dtype:(int)dtype" : { "src2" : {"name" : "src"} }
},
"type_dict" : {
"Algorithm": {
"objc_type": "Algorithm*"
},
"CvSlice": {
"objc_type": "Range*"
},
"CvTermCriteria": {
"objc_type": "TermCriteria*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[TermCriteria fromNative:%(n)s]"
},
"DMatch": {
"objc_type": "DMatch*"
},
"KeyPoint": {
"objc_type": "KeyPoint*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[KeyPoint fromNative:%(n)s]"
},
"Mat": {
"objc_type": "Mat*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Mat fromNative:%(n)s]",
"from_cpp_ptr": "[Mat fromNativePtr:%(n)s]"
},
"Moments": {
"objc_type": "Moments*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Moments fromNative:%(n)s]"
},
"Point": {
"objc_type": "Point2i*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Point2i fromNative:%(n)s]"
},
"Point2f": {
"objc_type": "Point2f*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Point2f fromNative:%(n)s]"
},
"Point2d": {
"objc_type": "Point2d*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Point2d fromNative:%(n)s]"
},
"Point3d": {
"objc_type": "Point3d*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Point3d fromNative:%(n)s]"
},
"Point3f": {
"objc_type": "Point3f*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Point3f fromNative:%(n)s]"
},
"Point3": {
"objc_type": "Point3i*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Point3i fromNative:%(n)s]"
},
"Range": {
"objc_type": "Range*"
},
"Rect": {
"objc_type": "Rect2i*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Rect2i fromNative:%(n)s]"
},
"Rect2i": {
"objc_type": "Rect2i*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Rect2i fromNative:%(n)s]"
},
"Rect2f": {
"objc_type": "Rect2f*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Rect2f fromNative:%(n)s]"
},
"Rect2d": {
"objc_type": "Rect2d*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Rect2d fromNative:%(n)s]"
},
"RotatedRect": {
"objc_type": "RotatedRect*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[RotatedRect fromNative:%(n)s]"
},
"Scalar": {
"objc_type": "Scalar*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Scalar fromNative:%(n)s]"
},
"Size": {
"objc_type": "Size2i*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Size2i fromNative:%(n)s]"
},
"Size2f": {
"objc_type": "Size2f*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Size2f fromNative:%(n)s]"
},
"Size2d": {
"objc_type": "Size2d*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Size2d fromNative:%(n)s]"
},
"String": {
"objc_type": "NSString*",
"to_cpp": "cv::String(%(n)s.UTF8String)",
"from_cpp": "[NSString stringWithUTF8String:%(n)s.c_str()]"
},
"std::string": {
"objc_type": "NSString*",
"to_cpp": "std::string(%(n)s.UTF8String)",
"from_cpp": "[NSString stringWithUTF8String:%(n)s.c_str()]"
},
"TermCriteria": {
"objc_type": "TermCriteria*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[TermCriteria fromNative:%(n)s]"
},
"Vec4f": {
"objc_type": "Float4*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Float4 fromNative:%(n)s]"
},
"Vec4i": {
"objc_type": "Int4*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Int4 fromNative:%(n)s]"
},
"Vec6f": {
"objc_type": "Float6*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Float6 fromNative:%(n)s]"
},
"Vec2d": {
"objc_type": "Double2*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Double2 fromNative:%(n)s]"
},
"Vec3d": {
"objc_type": "Double3*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[Double3 fromNative:%(n)s]"
},
"c_string": {
"objc_type": "NSString*"
},
"vector_DMatch": {
"objc_type": "DMatch*",
"v_type": "DMatch"
},
"vector_KeyPoint": {
"objc_type": "KeyPoint*",
"v_type": "KeyPoint"
},
"vector_Mat": {
"objc_type": "Mat*",
"v_type": "Mat"
},
"vector_Point": {
"objc_type": "Point2i*",
"v_type": "Point"
},
"vector_Point2f": {
"objc_type": "Point2f*",
"v_type": "Point2f"
},
"vector_Point2d": {
"objc_type": "Point2d*",
"v_type": "Point2d"
},
"vector_Point3": {
"objc_type": "Point3i*",
"v_type": "Point3i"
},
"vector_Point3f": {
"objc_type": "Point3f*",
"v_type": "Point3f"
},
"vector_Point3d": {
"objc_type": "Point3d*",
"v_type": "Point3d"
},
"vector_Rect": {
"objc_type": "Rect2i*",
"v_type": "Rect2i"
},
"vector_Rect2d": {
"objc_type": "Rect2d*",
"v_type": "Rect2d"
},
"vector_RotatedRect": {
"objc_type": "RotatedRect*",
"v_type": "RotatedRect"
},
"vector_String": {
"objc_type": "NSString*",
"v_type": "String"
},
"vector_string": {
"objc_type": "NSString*",
"v_type": "std::string"
},
"vector_Vec4f": {
"objc_type": "Float4*",
"v_type": "Vec4f"
},
"vector_Vec4i": {
"objc_type": "Int4*",
"v_type": "Vec4i"
},
"vector_Vec6f": {
"objc_type": "Float6*",
"v_type": "Vec6f"
},
"vector_char": {
"objc_type": "ByteVector*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[ByteVector fromNative:%(n)s]",
"cast_to": "std::vector<char>"
},
"vector_double": {
"objc_type": "DoubleVector*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[DoubleVector fromNative:%(n)s]",
"cast_to": "std::vector<double>"
},
"vector_float": {
"objc_type": "FloatVector*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[FloatVector fromNative:%(n)s]",
"cast_to": "std::vector<float>"
},
"vector_int": {
"objc_type": "IntVector*",
"to_cpp": "%(n)s.nativeRef",
"from_cpp": "[IntVector fromNative:%(n)s]",
"cast_to": "std::vector<int>"
},
"vector_uchar": {
"objc_type": "ByteVector*",
"to_cpp": "(std::vector<uchar>&)%(n)s.nativeRef",
"from_cpp": "[ByteVector fromNative:(std::vector<char>&)%(n)s]",
"cast_to": "std::vector<uchar>"
},
"vector_vector_Mat": {
"objc_type": "Mat*",
"v_v_type": "Mat"
},
"vector_vector_DMatch": {
"objc_type": "DMatch*",
"v_v_type": "DMatch"
},
"vector_vector_KeyPoint": {
"objc_type": "KeyPoint*",
"v_v_type": "KeyPoint"
},
"vector_vector_Point": {
"objc_type": "Point2i*",
"v_v_type": "Point"
},
"vector_vector_Point2f": {
"objc_type": "Point2f*",
"v_v_type": "Point2f"
},
"vector_vector_Point3f": {
"objc_type": "Point3f*",
"v_v_type": "Point3f"
},
"vector_vector_char": {
"objc_type": "ByteVector*",
"v_type": "ByteVector"
},
"ByteVector": {
"objc_type": "ByteVector*",
"cast_to": "std::vector<char>"
},
"IntVector": {
"objc_type": "IntVector*",
"cast_to": "std::vector<int>"
},
"FloatVector": {
"objc_type": "FloatVector*",
"cast_to": "std::vector<float>"
},
"DoubleVector": {
"objc_type": "DoubleVector*",
"cast_to": "std::vector<double>"
}
}
}