CascadeClassifier.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/objdetect.hpp"
  8. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. @class DoubleVector;
  13. @class IntVector;
  14. @class Mat;
  15. @class Rect2i;
  16. @class Size2i;
  17. NS_ASSUME_NONNULL_BEGIN
  18. // C++: class CascadeClassifier
  19. /**
  20. * Cascade classifier class for object detection.
  21. *
  22. * Member of `Objdetect`
  23. */
  24. CV_EXPORTS @interface CascadeClassifier : NSObject
  25. #ifdef __cplusplus
  26. @property(readonly)cv::Ptr<cv::CascadeClassifier> nativePtr;
  27. #endif
  28. #ifdef __cplusplus
  29. - (instancetype)initWithNativePtr:(cv::Ptr<cv::CascadeClassifier>)nativePtr;
  30. + (instancetype)fromNative:(cv::Ptr<cv::CascadeClassifier>)nativePtr;
  31. #endif
  32. #pragma mark - Methods
  33. //
  34. // cv::CascadeClassifier::CascadeClassifier()
  35. //
  36. - (instancetype)init;
  37. //
  38. // cv::CascadeClassifier::CascadeClassifier(String filename)
  39. //
  40. /**
  41. * Loads a classifier from a file.
  42. *
  43. * @param filename Name of the file from which the classifier is loaded.
  44. */
  45. - (instancetype)initWithFilename:(NSString*)filename;
  46. //
  47. // bool cv::CascadeClassifier::empty()
  48. //
  49. /**
  50. * Checks whether the classifier has been loaded.
  51. */
  52. - (BOOL)empty NS_SWIFT_NAME(empty());
  53. //
  54. // bool cv::CascadeClassifier::load(String filename)
  55. //
  56. /**
  57. * Loads a classifier from a file.
  58. *
  59. * @param filename Name of the file from which the classifier is loaded. The file may contain an old
  60. * HAAR classifier trained by the haartraining application or a new cascade classifier trained by the
  61. * traincascade application.
  62. */
  63. - (BOOL)load:(NSString*)filename NS_SWIFT_NAME(load(filename:));
  64. //
  65. // bool cv::CascadeClassifier::read(FileNode node)
  66. //
  67. // Unknown type 'FileNode' (I), skipping the function
  68. //
  69. // void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
  70. //
  71. /**
  72. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  73. * of rectangles.
  74. *
  75. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  76. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  77. * rectangles may be partially outside the original image.
  78. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  79. * @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
  80. * to retain it.
  81. * @param flags Parameter with the same meaning for an old cascade as in the function
  82. * cvHaarDetectObjects. It is not used for a new cascade.
  83. * @param minSize Minimum possible object size. Objects smaller than that are ignored.
  84. * @param maxSize Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale.
  85. */
  86. - (void)detectMultiScale:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags minSize:(Size2i*)minSize maxSize:(Size2i*)maxSize NS_SWIFT_NAME(detectMultiScale(image:objects:scaleFactor:minNeighbors:flags:minSize:maxSize:));
  87. /**
  88. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  89. * of rectangles.
  90. *
  91. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  92. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  93. * rectangles may be partially outside the original image.
  94. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  95. * @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
  96. * to retain it.
  97. * @param flags Parameter with the same meaning for an old cascade as in the function
  98. * cvHaarDetectObjects. It is not used for a new cascade.
  99. * @param minSize Minimum possible object size. Objects smaller than that are ignored.
  100. */
  101. - (void)detectMultiScale:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags minSize:(Size2i*)minSize NS_SWIFT_NAME(detectMultiScale(image:objects:scaleFactor:minNeighbors:flags:minSize:));
  102. /**
  103. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  104. * of rectangles.
  105. *
  106. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  107. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  108. * rectangles may be partially outside the original image.
  109. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  110. * @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
  111. * to retain it.
  112. * @param flags Parameter with the same meaning for an old cascade as in the function
  113. * cvHaarDetectObjects. It is not used for a new cascade.
  114. */
  115. - (void)detectMultiScale:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags NS_SWIFT_NAME(detectMultiScale(image:objects:scaleFactor:minNeighbors:flags:));
  116. /**
  117. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  118. * of rectangles.
  119. *
  120. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  121. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  122. * rectangles may be partially outside the original image.
  123. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  124. * @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
  125. * to retain it.
  126. * cvHaarDetectObjects. It is not used for a new cascade.
  127. */
  128. - (void)detectMultiScale:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors NS_SWIFT_NAME(detectMultiScale(image:objects:scaleFactor:minNeighbors:));
  129. /**
  130. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  131. * of rectangles.
  132. *
  133. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  134. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  135. * rectangles may be partially outside the original image.
  136. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  137. * to retain it.
  138. * cvHaarDetectObjects. It is not used for a new cascade.
  139. */
  140. - (void)detectMultiScale:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects scaleFactor:(double)scaleFactor NS_SWIFT_NAME(detectMultiScale(image:objects:scaleFactor:));
  141. /**
  142. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  143. * of rectangles.
  144. *
  145. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  146. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  147. * rectangles may be partially outside the original image.
  148. * to retain it.
  149. * cvHaarDetectObjects. It is not used for a new cascade.
  150. */
  151. - (void)detectMultiScale:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects NS_SWIFT_NAME(detectMultiScale(image:objects:));
  152. //
  153. // void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& numDetections, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
  154. //
  155. /**
  156. *
  157. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  158. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  159. * rectangles may be partially outside the original image.
  160. * @param numDetections Vector of detection numbers for the corresponding objects. An object's number
  161. * of detections is the number of neighboring positively classified rectangles that were joined
  162. * together to form the object.
  163. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  164. * @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
  165. * to retain it.
  166. * @param flags Parameter with the same meaning for an old cascade as in the function
  167. * cvHaarDetectObjects. It is not used for a new cascade.
  168. * @param minSize Minimum possible object size. Objects smaller than that are ignored.
  169. * @param maxSize Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale.
  170. */
  171. - (void)detectMultiScale2:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects numDetections:(IntVector*)numDetections scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags minSize:(Size2i*)minSize maxSize:(Size2i*)maxSize NS_SWIFT_NAME(detectMultiScale(image:objects:numDetections:scaleFactor:minNeighbors:flags:minSize:maxSize:));
  172. /**
  173. *
  174. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  175. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  176. * rectangles may be partially outside the original image.
  177. * @param numDetections Vector of detection numbers for the corresponding objects. An object's number
  178. * of detections is the number of neighboring positively classified rectangles that were joined
  179. * together to form the object.
  180. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  181. * @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
  182. * to retain it.
  183. * @param flags Parameter with the same meaning for an old cascade as in the function
  184. * cvHaarDetectObjects. It is not used for a new cascade.
  185. * @param minSize Minimum possible object size. Objects smaller than that are ignored.
  186. */
  187. - (void)detectMultiScale2:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects numDetections:(IntVector*)numDetections scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags minSize:(Size2i*)minSize NS_SWIFT_NAME(detectMultiScale(image:objects:numDetections:scaleFactor:minNeighbors:flags:minSize:));
  188. /**
  189. *
  190. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  191. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  192. * rectangles may be partially outside the original image.
  193. * @param numDetections Vector of detection numbers for the corresponding objects. An object's number
  194. * of detections is the number of neighboring positively classified rectangles that were joined
  195. * together to form the object.
  196. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  197. * @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
  198. * to retain it.
  199. * @param flags Parameter with the same meaning for an old cascade as in the function
  200. * cvHaarDetectObjects. It is not used for a new cascade.
  201. */
  202. - (void)detectMultiScale2:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects numDetections:(IntVector*)numDetections scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags NS_SWIFT_NAME(detectMultiScale(image:objects:numDetections:scaleFactor:minNeighbors:flags:));
  203. /**
  204. *
  205. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  206. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  207. * rectangles may be partially outside the original image.
  208. * @param numDetections Vector of detection numbers for the corresponding objects. An object's number
  209. * of detections is the number of neighboring positively classified rectangles that were joined
  210. * together to form the object.
  211. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  212. * @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
  213. * to retain it.
  214. * cvHaarDetectObjects. It is not used for a new cascade.
  215. */
  216. - (void)detectMultiScale2:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects numDetections:(IntVector*)numDetections scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors NS_SWIFT_NAME(detectMultiScale(image:objects:numDetections:scaleFactor:minNeighbors:));
  217. /**
  218. *
  219. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  220. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  221. * rectangles may be partially outside the original image.
  222. * @param numDetections Vector of detection numbers for the corresponding objects. An object's number
  223. * of detections is the number of neighboring positively classified rectangles that were joined
  224. * together to form the object.
  225. * @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
  226. * to retain it.
  227. * cvHaarDetectObjects. It is not used for a new cascade.
  228. */
  229. - (void)detectMultiScale2:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects numDetections:(IntVector*)numDetections scaleFactor:(double)scaleFactor NS_SWIFT_NAME(detectMultiScale(image:objects:numDetections:scaleFactor:));
  230. /**
  231. *
  232. * @param image Matrix of the type CV_8U containing an image where objects are detected.
  233. * @param objects Vector of rectangles where each rectangle contains the detected object, the
  234. * rectangles may be partially outside the original image.
  235. * @param numDetections Vector of detection numbers for the corresponding objects. An object's number
  236. * of detections is the number of neighboring positively classified rectangles that were joined
  237. * together to form the object.
  238. * to retain it.
  239. * cvHaarDetectObjects. It is not used for a new cascade.
  240. */
  241. - (void)detectMultiScale2:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects numDetections:(IntVector*)numDetections NS_SWIFT_NAME(detectMultiScale(image:objects:numDetections:));
  242. //
  243. // void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& rejectLevels, vector_double& levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size(), bool outputRejectLevels = false)
  244. //
  245. /**
  246. *
  247. * This function allows you to retrieve the final stage decision certainty of classification.
  248. * For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter.
  249. * For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage.
  250. * This value can then be used to separate strong from weaker classifications.
  251. *
  252. * A code sample on how to use it efficiently can be found below:
  253. *
  254. * Mat img;
  255. * vector<double> weights;
  256. * vector<int> levels;
  257. * vector<Rect> detections;
  258. * CascadeClassifier model("/path/to/your/model.xml");
  259. * model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
  260. * cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
  261. *
  262. */
  263. - (void)detectMultiScale3:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects rejectLevels:(IntVector*)rejectLevels levelWeights:(DoubleVector*)levelWeights scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags minSize:(Size2i*)minSize maxSize:(Size2i*)maxSize outputRejectLevels:(BOOL)outputRejectLevels NS_SWIFT_NAME(detectMultiScale(image:objects:rejectLevels:levelWeights:scaleFactor:minNeighbors:flags:minSize:maxSize:outputRejectLevels:));
  264. /**
  265. *
  266. * This function allows you to retrieve the final stage decision certainty of classification.
  267. * For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter.
  268. * For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage.
  269. * This value can then be used to separate strong from weaker classifications.
  270. *
  271. * A code sample on how to use it efficiently can be found below:
  272. *
  273. * Mat img;
  274. * vector<double> weights;
  275. * vector<int> levels;
  276. * vector<Rect> detections;
  277. * CascadeClassifier model("/path/to/your/model.xml");
  278. * model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
  279. * cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
  280. *
  281. */
  282. - (void)detectMultiScale3:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects rejectLevels:(IntVector*)rejectLevels levelWeights:(DoubleVector*)levelWeights scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags minSize:(Size2i*)minSize maxSize:(Size2i*)maxSize NS_SWIFT_NAME(detectMultiScale(image:objects:rejectLevels:levelWeights:scaleFactor:minNeighbors:flags:minSize:maxSize:));
  283. /**
  284. *
  285. * This function allows you to retrieve the final stage decision certainty of classification.
  286. * For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter.
  287. * For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage.
  288. * This value can then be used to separate strong from weaker classifications.
  289. *
  290. * A code sample on how to use it efficiently can be found below:
  291. *
  292. * Mat img;
  293. * vector<double> weights;
  294. * vector<int> levels;
  295. * vector<Rect> detections;
  296. * CascadeClassifier model("/path/to/your/model.xml");
  297. * model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
  298. * cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
  299. *
  300. */
  301. - (void)detectMultiScale3:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects rejectLevels:(IntVector*)rejectLevels levelWeights:(DoubleVector*)levelWeights scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags minSize:(Size2i*)minSize NS_SWIFT_NAME(detectMultiScale(image:objects:rejectLevels:levelWeights:scaleFactor:minNeighbors:flags:minSize:));
  302. /**
  303. *
  304. * This function allows you to retrieve the final stage decision certainty of classification.
  305. * For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter.
  306. * For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage.
  307. * This value can then be used to separate strong from weaker classifications.
  308. *
  309. * A code sample on how to use it efficiently can be found below:
  310. *
  311. * Mat img;
  312. * vector<double> weights;
  313. * vector<int> levels;
  314. * vector<Rect> detections;
  315. * CascadeClassifier model("/path/to/your/model.xml");
  316. * model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
  317. * cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
  318. *
  319. */
  320. - (void)detectMultiScale3:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects rejectLevels:(IntVector*)rejectLevels levelWeights:(DoubleVector*)levelWeights scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors flags:(int)flags NS_SWIFT_NAME(detectMultiScale(image:objects:rejectLevels:levelWeights:scaleFactor:minNeighbors:flags:));
  321. /**
  322. *
  323. * This function allows you to retrieve the final stage decision certainty of classification.
  324. * For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter.
  325. * For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage.
  326. * This value can then be used to separate strong from weaker classifications.
  327. *
  328. * A code sample on how to use it efficiently can be found below:
  329. *
  330. * Mat img;
  331. * vector<double> weights;
  332. * vector<int> levels;
  333. * vector<Rect> detections;
  334. * CascadeClassifier model("/path/to/your/model.xml");
  335. * model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
  336. * cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
  337. *
  338. */
  339. - (void)detectMultiScale3:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects rejectLevels:(IntVector*)rejectLevels levelWeights:(DoubleVector*)levelWeights scaleFactor:(double)scaleFactor minNeighbors:(int)minNeighbors NS_SWIFT_NAME(detectMultiScale(image:objects:rejectLevels:levelWeights:scaleFactor:minNeighbors:));
  340. /**
  341. *
  342. * This function allows you to retrieve the final stage decision certainty of classification.
  343. * For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter.
  344. * For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage.
  345. * This value can then be used to separate strong from weaker classifications.
  346. *
  347. * A code sample on how to use it efficiently can be found below:
  348. *
  349. * Mat img;
  350. * vector<double> weights;
  351. * vector<int> levels;
  352. * vector<Rect> detections;
  353. * CascadeClassifier model("/path/to/your/model.xml");
  354. * model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
  355. * cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
  356. *
  357. */
  358. - (void)detectMultiScale3:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects rejectLevels:(IntVector*)rejectLevels levelWeights:(DoubleVector*)levelWeights scaleFactor:(double)scaleFactor NS_SWIFT_NAME(detectMultiScale(image:objects:rejectLevels:levelWeights:scaleFactor:));
  359. /**
  360. *
  361. * This function allows you to retrieve the final stage decision certainty of classification.
  362. * For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter.
  363. * For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage.
  364. * This value can then be used to separate strong from weaker classifications.
  365. *
  366. * A code sample on how to use it efficiently can be found below:
  367. *
  368. * Mat img;
  369. * vector<double> weights;
  370. * vector<int> levels;
  371. * vector<Rect> detections;
  372. * CascadeClassifier model("/path/to/your/model.xml");
  373. * model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
  374. * cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
  375. *
  376. */
  377. - (void)detectMultiScale3:(Mat*)image objects:(NSMutableArray<Rect2i*>*)objects rejectLevels:(IntVector*)rejectLevels levelWeights:(DoubleVector*)levelWeights NS_SWIFT_NAME(detectMultiScale(image:objects:rejectLevels:levelWeights:));
  378. //
  379. // bool cv::CascadeClassifier::isOldFormatCascade()
  380. //
  381. - (BOOL)isOldFormatCascade NS_SWIFT_NAME(isOldFormatCascade());
  382. //
  383. // Size cv::CascadeClassifier::getOriginalWindowSize()
  384. //
  385. - (Size2i*)getOriginalWindowSize NS_SWIFT_NAME(getOriginalWindowSize());
  386. //
  387. // int cv::CascadeClassifier::getFeatureType()
  388. //
  389. - (int)getFeatureType NS_SWIFT_NAME(getFeatureType());
  390. //
  391. // static bool cv::CascadeClassifier::convert(String oldcascade, String newcascade)
  392. //
  393. + (BOOL)convert:(NSString*)oldcascade newcascade:(NSString*)newcascade NS_SWIFT_NAME(convert(oldcascade:newcascade:));
  394. @end
  395. NS_ASSUME_NONNULL_END