gen_dict.json 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. {
  2. "module_imports": ["Point2i", "MinMaxLocResult"],
  3. "class_ignore_list" : [
  4. "FileNode",
  5. "FileStorage",
  6. "KDTree",
  7. "KeyPoint",
  8. "DMatch"
  9. ],
  10. "missing_consts" : {
  11. "Core" : {
  12. "private" : [],
  13. "public" : [
  14. ["SVD_MODIFY_A", 1], ["SVD_NO_UV", 2], ["SVD_FULL_UV", 4],
  15. ["FILLED", -1],
  16. ["REDUCE_SUM", 0], ["REDUCE_AVG", 1], ["REDUCE_MAX", 2], ["REDUCE_MIN", 3]
  17. ]
  18. }
  19. },
  20. "ManualFuncs" : {
  21. "Core" : {
  22. "minMaxLoc" : {
  23. "declaration" : [
  24. "// C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())",
  25. "+ (MinMaxLocResult*)minMaxLoc:(Mat*)src mask:(nullable Mat*)mask;",
  26. "\n",
  27. "+ (MinMaxLocResult*)minMaxLoc:(Mat*)src;",
  28. "\n"
  29. ],
  30. "implementation" : [
  31. "// C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())",
  32. "+ (MinMaxLocResult*)minMaxLoc:(Mat*)src mask:(nullable Mat*)mask {",
  33. " double minVal, maxVal;",
  34. " cv::Point minLoc, maxLoc;",
  35. " cv::Mat& rSrc = src.nativeRef;",
  36. " if (mask != nil) {",
  37. " cv::Mat& rMask = mask.nativeRef;",
  38. " cv::minMaxLoc(rSrc, &minVal, &maxVal, &minLoc, &maxLoc, rMask);",
  39. " } else {",
  40. " cv::minMaxLoc(rSrc, &minVal, &maxVal, &minLoc, &maxLoc);",
  41. " }",
  42. " return [[MinMaxLocResult alloc] initWithMinval:minVal maxVal:maxVal minLoc:[Point2i fromNative:minLoc] maxLoc:[Point2i fromNative:maxLoc]];",
  43. "}",
  44. "\n",
  45. "+ (MinMaxLocResult*)minMaxLoc:(Mat*)src {",
  46. " return [self minMaxLoc:src mask:nil];",
  47. "}",
  48. "\n"
  49. ],
  50. "objc_method_name" : "+minMaxLoc:mask:"
  51. },
  52. "checkHardwareSupport" : {"declaration" : [""], "implementation" : [""] },
  53. "setUseOptimized" : {"declaration" : [""], "implementation" : [""] },
  54. "useOptimized" : {"declaration" : [""], "implementation" : [""] }
  55. }
  56. },
  57. "func_arg_fix" : {
  58. "Core": {
  59. "randu" : { "low" : {"ctype" : "double"},
  60. "high" : {"ctype" : "double"} },
  61. "randn" : { "mean" : {"ctype" : "double"},
  62. "stddev" : {"ctype" : "double"} },
  63. "inRange" : { "lowerb" : {"ctype" : "Scalar"},
  64. "upperb" : {"ctype" : "Scalar"} },
  65. "hconcat" : { "src" : {"ctype" : "vector_Mat"} },
  66. "vconcat" : { "src" : {"ctype" : "vector_Mat"} },
  67. "checkRange" : {"pos" : {"ctype" : "*"} },
  68. "meanStdDev" : { "mean" : {"ctype" : "vector_double"},
  69. "stddev" : {"ctype" : "vector_double"} },
  70. "mixChannels" : { "dst" : {"attrib" : []} },
  71. "rotate" : { "rotateCode" : {"ctype" : "RotateFlags"} },
  72. "norm" : { "normType" : {"ctype" : "NormTypes"} },
  73. "batchDistance" : { "normType" : {"ctype" : "NormTypes"} },
  74. "normalize" : { "norm_type" : {"ctype" : "NormTypes"} },
  75. "compare" : { "cmpop" : {"ctype" : "CmpTypes"} },
  76. "copyMakeBorder" : { "borderType" : {"ctype" : "BorderTypes"} },
  77. "borderInterpolate" : { "borderType" : {"ctype" : "BorderTypes"} },
  78. "(void)divide:(double)scale src2:(Mat*)src2 dst:(Mat*)dst dtype:(int)dtype" : { "src2" : {"name" : "src"} }
  79. }
  80. },
  81. "type_dict" : {
  82. "Algorithm": {
  83. "objc_type": "Algorithm*"
  84. },
  85. "CvSlice": {
  86. "objc_type": "Range*"
  87. },
  88. "CvTermCriteria": {
  89. "objc_type": "TermCriteria*",
  90. "to_cpp": "%(n)s.nativeRef",
  91. "from_cpp": "[TermCriteria fromNative:%(n)s]"
  92. },
  93. "DMatch": {
  94. "objc_type": "DMatch*"
  95. },
  96. "KeyPoint": {
  97. "objc_type": "KeyPoint*",
  98. "to_cpp": "%(n)s.nativeRef",
  99. "from_cpp": "[KeyPoint fromNative:%(n)s]"
  100. },
  101. "Mat": {
  102. "objc_type": "Mat*",
  103. "to_cpp": "%(n)s.nativeRef",
  104. "from_cpp": "[Mat fromNative:%(n)s]",
  105. "from_cpp_ptr": "[Mat fromNativePtr:%(n)s]"
  106. },
  107. "Moments": {
  108. "objc_type": "Moments*",
  109. "to_cpp": "%(n)s.nativeRef",
  110. "from_cpp": "[Moments fromNative:%(n)s]"
  111. },
  112. "Point": {
  113. "objc_type": "Point2i*",
  114. "to_cpp": "%(n)s.nativeRef",
  115. "from_cpp": "[Point2i fromNative:%(n)s]",
  116. "swift_type": "Point2i"
  117. },
  118. "Point2i": {
  119. "objc_type": "Point2i*",
  120. "to_cpp": "%(n)s.nativeRef",
  121. "from_cpp": "[Point2i fromNative:%(n)s]",
  122. "swift_type": "Point2i"
  123. },
  124. "Point2f": {
  125. "objc_type": "Point2f*",
  126. "to_cpp": "%(n)s.nativeRef",
  127. "from_cpp": "[Point2f fromNative:%(n)s]"
  128. },
  129. "Point2d": {
  130. "objc_type": "Point2d*",
  131. "to_cpp": "%(n)s.nativeRef",
  132. "from_cpp": "[Point2d fromNative:%(n)s]"
  133. },
  134. "Point3d": {
  135. "objc_type": "Point3d*",
  136. "to_cpp": "%(n)s.nativeRef",
  137. "from_cpp": "[Point3d fromNative:%(n)s]"
  138. },
  139. "Point3f": {
  140. "objc_type": "Point3f*",
  141. "to_cpp": "%(n)s.nativeRef",
  142. "from_cpp": "[Point3f fromNative:%(n)s]"
  143. },
  144. "Point3": {
  145. "objc_type": "Point3i*",
  146. "to_cpp": "%(n)s.nativeRef",
  147. "from_cpp": "[Point3i fromNative:%(n)s]"
  148. },
  149. "Range": {
  150. "objc_type": "Range*"
  151. },
  152. "Rect": {
  153. "objc_type": "Rect2i*",
  154. "to_cpp": "%(n)s.nativeRef",
  155. "from_cpp": "[Rect2i fromNative:%(n)s]",
  156. "swift_type": "Rect2i"
  157. },
  158. "Rect2i": {
  159. "objc_type": "Rect2i*",
  160. "to_cpp": "%(n)s.nativeRef",
  161. "from_cpp": "[Rect2i fromNative:%(n)s]",
  162. "swift_type": "Rect2i"
  163. },
  164. "Rect2f": {
  165. "objc_type": "Rect2f*",
  166. "to_cpp": "%(n)s.nativeRef",
  167. "from_cpp": "[Rect2f fromNative:%(n)s]"
  168. },
  169. "Rect2d": {
  170. "objc_type": "Rect2d*",
  171. "to_cpp": "%(n)s.nativeRef",
  172. "from_cpp": "[Rect2d fromNative:%(n)s]"
  173. },
  174. "RotatedRect": {
  175. "objc_type": "RotatedRect*",
  176. "to_cpp": "%(n)s.nativeRef",
  177. "from_cpp": "[RotatedRect fromNative:%(n)s]"
  178. },
  179. "Scalar": {
  180. "objc_type": "Scalar*",
  181. "to_cpp": "%(n)s.nativeRef",
  182. "from_cpp": "[Scalar fromNative:%(n)s]"
  183. },
  184. "Size": {
  185. "objc_type": "Size2i*",
  186. "to_cpp": "%(n)s.nativeRef",
  187. "from_cpp": "[Size2i fromNative:%(n)s]",
  188. "swift_type": "Size2i"
  189. },
  190. "Size2i": {
  191. "objc_type": "Size2i*",
  192. "to_cpp": "%(n)s.nativeRef",
  193. "from_cpp": "[Size2i fromNative:%(n)s]",
  194. "swift_type": "Size2i"
  195. },
  196. "Size2f": {
  197. "objc_type": "Size2f*",
  198. "to_cpp": "%(n)s.nativeRef",
  199. "from_cpp": "[Size2f fromNative:%(n)s]"
  200. },
  201. "Size2d": {
  202. "objc_type": "Size2d*",
  203. "to_cpp": "%(n)s.nativeRef",
  204. "from_cpp": "[Size2d fromNative:%(n)s]"
  205. },
  206. "String": {
  207. "objc_type": "NSString*",
  208. "to_cpp": "cv::String(%(n)s.UTF8String)",
  209. "from_cpp": "[NSString stringWithUTF8String:%(n)s.c_str()]",
  210. "swift_type": "String"
  211. },
  212. "std::string": {
  213. "objc_type": "NSString*",
  214. "to_cpp": "std::string(%(n)s.UTF8String)",
  215. "from_cpp": "[NSString stringWithUTF8String:%(n)s.c_str()]",
  216. "swift_type": "String"
  217. },
  218. "string": {
  219. "cast_to": "std::string",
  220. "objc_type": "NSString*",
  221. "to_cpp": "std::string(%(n)s.UTF8String)",
  222. "from_cpp": "[NSString stringWithUTF8String:%(n)s.c_str()]",
  223. "swift_type": "String"
  224. },
  225. "TermCriteria": {
  226. "objc_type": "TermCriteria*",
  227. "to_cpp": "%(n)s.nativeRef",
  228. "from_cpp": "[TermCriteria fromNative:%(n)s]"
  229. },
  230. "Vec4f": {
  231. "objc_type": "Float4*",
  232. "to_cpp": "%(n)s.nativeRef",
  233. "from_cpp": "[Float4 fromNative:%(n)s]"
  234. },
  235. "Vec4i": {
  236. "objc_type": "Int4*",
  237. "to_cpp": "%(n)s.nativeRef",
  238. "from_cpp": "[Int4 fromNative:%(n)s]"
  239. },
  240. "Vec6f": {
  241. "objc_type": "Float6*",
  242. "to_cpp": "%(n)s.nativeRef",
  243. "from_cpp": "[Float6 fromNative:%(n)s]"
  244. },
  245. "Vec2d": {
  246. "objc_type": "Double2*",
  247. "to_cpp": "%(n)s.nativeRef",
  248. "from_cpp": "[Double2 fromNative:%(n)s]"
  249. },
  250. "Vec3d": {
  251. "objc_type": "Double3*",
  252. "to_cpp": "%(n)s.nativeRef",
  253. "from_cpp": "[Double3 fromNative:%(n)s]"
  254. },
  255. "c_string": {
  256. "objc_type": "NSString*",
  257. "to_cpp": "%(n)s.UTF8String",
  258. "from_cpp": "[NSString stringWithUTF8String:%(n)s]",
  259. "swift_type": "String"
  260. },
  261. "vector_DMatch": {
  262. "objc_type": "DMatch*",
  263. "v_type": "DMatch"
  264. },
  265. "vector_KeyPoint": {
  266. "objc_type": "KeyPoint*",
  267. "v_type": "KeyPoint"
  268. },
  269. "vector_Mat": {
  270. "objc_type": "Mat*",
  271. "v_type": "Mat"
  272. },
  273. "vector_Point": {
  274. "objc_type": "Point2i*",
  275. "v_type": "Point2i",
  276. "swift_type": "[Point2i]"
  277. },
  278. "vector_Point2f": {
  279. "objc_type": "Point2f*",
  280. "v_type": "Point2f"
  281. },
  282. "vector_Point2d": {
  283. "objc_type": "Point2d*",
  284. "v_type": "Point2d"
  285. },
  286. "vector_Point3": {
  287. "objc_type": "Point3i*",
  288. "v_type": "Point3i"
  289. },
  290. "vector_Point3f": {
  291. "objc_type": "Point3f*",
  292. "v_type": "Point3f"
  293. },
  294. "vector_Point3d": {
  295. "objc_type": "Point3d*",
  296. "v_type": "Point3d"
  297. },
  298. "vector_Rect": {
  299. "objc_type": "Rect2i*",
  300. "v_type": "Rect2i",
  301. "swift_type": "[Rect2i]"
  302. },
  303. "vector_Rect2d": {
  304. "objc_type": "Rect2d*",
  305. "v_type": "Rect2d"
  306. },
  307. "vector_RotatedRect": {
  308. "objc_type": "RotatedRect*",
  309. "v_type": "RotatedRect"
  310. },
  311. "vector_String": {
  312. "objc_type": "NSString*",
  313. "v_type": "String",
  314. "swift_type": "[String]"
  315. },
  316. "vector_string": {
  317. "objc_type": "NSString*",
  318. "v_type": "std::string",
  319. "swift_type": "[String]"
  320. },
  321. "vector_Vec4f": {
  322. "objc_type": "Float4*",
  323. "v_type": "Vec4f"
  324. },
  325. "vector_Vec4i": {
  326. "objc_type": "Int4*",
  327. "v_type": "Vec4i"
  328. },
  329. "vector_Vec6f": {
  330. "objc_type": "Float6*",
  331. "v_type": "Vec6f"
  332. },
  333. "vector_char": {
  334. "objc_type": "ByteVector*",
  335. "to_cpp": "%(n)s.nativeRef",
  336. "from_cpp": "[ByteVector fromNative:%(n)s]",
  337. "cast_to": "std::vector<char>",
  338. "primitive_vector": true,
  339. "swift_type": "[Int8]"
  340. },
  341. "vector_double": {
  342. "objc_type": "DoubleVector*",
  343. "to_cpp": "%(n)s.nativeRef",
  344. "from_cpp": "[DoubleVector fromNative:%(n)s]",
  345. "cast_to": "std::vector<double>",
  346. "primitive_vector": true,
  347. "swift_type": "[Double]"
  348. },
  349. "vector_float": {
  350. "objc_type": "FloatVector*",
  351. "to_cpp": "%(n)s.nativeRef",
  352. "from_cpp": "[FloatVector fromNative:%(n)s]",
  353. "cast_to": "std::vector<float>",
  354. "primitive_vector": true,
  355. "swift_type": "[Float]"
  356. },
  357. "vector_int": {
  358. "objc_type": "IntVector*",
  359. "to_cpp": "%(n)s.nativeRef",
  360. "from_cpp": "[IntVector fromNative:%(n)s]",
  361. "cast_to": "std::vector<int>",
  362. "primitive_vector": true,
  363. "swift_type": "[Int32]"
  364. },
  365. "vector_uchar": {
  366. "objc_type": "ByteVector*",
  367. "to_cpp": "(std::vector<uchar>&)%(n)s.nativeRef",
  368. "from_cpp": "[ByteVector fromNative:(std::vector<char>&)%(n)s]",
  369. "cast_to": "std::vector<uchar>",
  370. "primitive_vector": true,
  371. "swift_type": "[UInt8]",
  372. "unsigned": true
  373. },
  374. "vector_vector_Mat": {
  375. "objc_type": "Mat*",
  376. "v_v_type": "Mat"
  377. },
  378. "vector_vector_DMatch": {
  379. "objc_type": "DMatch*",
  380. "v_v_type": "DMatch"
  381. },
  382. "vector_vector_KeyPoint": {
  383. "objc_type": "KeyPoint*",
  384. "v_v_type": "KeyPoint"
  385. },
  386. "vector_vector_Point": {
  387. "objc_type": "Point2i*",
  388. "v_v_type": "Point2i",
  389. "swift_type": "[[Point2i]]"
  390. },
  391. "vector_vector_Point2f": {
  392. "objc_type": "Point2f*",
  393. "v_v_type": "Point2f"
  394. },
  395. "vector_vector_Point3f": {
  396. "objc_type": "Point3f*",
  397. "v_v_type": "Point3f"
  398. },
  399. "vector_vector_char": {
  400. "objc_type": "ByteVector*",
  401. "v_type": "ByteVector",
  402. "primitive_vector_vector": true,
  403. "swift_type": "[[Int8]]"
  404. },
  405. "vector_vector_int": {
  406. "objc_type": "IntVector*",
  407. "v_type": "IntVector",
  408. "primitive_vector_vector": true,
  409. "swift_type": "[[Int32]]"
  410. },
  411. "vector_vector_float": {
  412. "objc_type": "FloatVector*",
  413. "v_type": "FloatVector",
  414. "primitive_vector_vector": true,
  415. "swift_type": "[[Float]]"
  416. },
  417. "vector_vector_double": {
  418. "objc_type": "DoubleVector*",
  419. "v_type": "DoubleVector",
  420. "primitive_vector_vector": true,
  421. "swift_type": "[[Double]]"
  422. },
  423. "ByteVector": {
  424. "objc_type": "ByteVector*",
  425. "cast_to": "std::vector<char>"
  426. },
  427. "IntVector": {
  428. "objc_type": "IntVector*",
  429. "cast_to": "std::vector<int>"
  430. },
  431. "FloatVector": {
  432. "objc_type": "FloatVector*",
  433. "cast_to": "std::vector<float>"
  434. },
  435. "DoubleVector": {
  436. "objc_type": "DoubleVector*",
  437. "cast_to": "std::vector<double>"
  438. }
  439. }
  440. }