HOGDescriptor.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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 FloatVector;
  14. @class Mat;
  15. @class Point2i;
  16. @class Rect2i;
  17. @class Size2i;
  18. // C++: enum DescriptorStorageFormat (cv.HOGDescriptor.DescriptorStorageFormat)
  19. typedef NS_ENUM(int, DescriptorStorageFormat) {
  20. DESCR_FORMAT_COL_BY_COL = 0,
  21. DESCR_FORMAT_ROW_BY_ROW = 1
  22. };
  23. // C++: enum HistogramNormType (cv.HOGDescriptor.HistogramNormType)
  24. typedef NS_ENUM(int, HistogramNormType) {
  25. L2Hys = 0
  26. };
  27. NS_ASSUME_NONNULL_BEGIN
  28. // C++: class HOGDescriptor
  29. /**
  30. * Implementation of HOG (Histogram of Oriented Gradients) descriptor and object detector.
  31. *
  32. * the HOG descriptor algorithm introduced by Navneet Dalal and Bill Triggs CITE: Dalal2005 .
  33. *
  34. * useful links:
  35. *
  36. * https://hal.inria.fr/inria-00548512/document/
  37. *
  38. * https://en.wikipedia.org/wiki/Histogram_of_oriented_gradients
  39. *
  40. * https://software.intel.com/en-us/ipp-dev-reference-histogram-of-oriented-gradients-hog-descriptor
  41. *
  42. * http://www.learnopencv.com/histogram-of-oriented-gradients
  43. *
  44. * http://www.learnopencv.com/handwritten-digits-classification-an-opencv-c-python-tutorial
  45. *
  46. * Member of `Objdetect`
  47. */
  48. CV_EXPORTS @interface HOGDescriptor : NSObject
  49. #ifdef __cplusplus
  50. @property(readonly)cv::Ptr<cv::HOGDescriptor> nativePtr;
  51. #endif
  52. #ifdef __cplusplus
  53. - (instancetype)initWithNativePtr:(cv::Ptr<cv::HOGDescriptor>)nativePtr;
  54. + (instancetype)fromNative:(cv::Ptr<cv::HOGDescriptor>)nativePtr;
  55. #endif
  56. #pragma mark - Class Constants
  57. @property (class, readonly) int DEFAULT_NLEVELS NS_SWIFT_NAME(DEFAULT_NLEVELS);
  58. #pragma mark - Methods
  59. //
  60. // cv::HOGDescriptor::HOGDescriptor()
  61. //
  62. /**
  63. * Creates the HOG descriptor and detector with default parameters.
  64. *
  65. * aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
  66. */
  67. - (instancetype)init;
  68. //
  69. // cv::HOGDescriptor::HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture = 1, double _winSigma = -1, HOGDescriptor_HistogramNormType _histogramNormType = HOGDescriptor::L2Hys, double _L2HysThreshold = 0.2, bool _gammaCorrection = false, int _nlevels = HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient = false)
  70. //
  71. /**
  72. *
  73. * @param _winSize sets winSize with given value.
  74. * @param _blockSize sets blockSize with given value.
  75. * @param _blockStride sets blockStride with given value.
  76. * @param _cellSize sets cellSize with given value.
  77. * @param _nbins sets nbins with given value.
  78. * @param _derivAperture sets derivAperture with given value.
  79. * @param _winSigma sets winSigma with given value.
  80. * @param _histogramNormType sets histogramNormType with given value.
  81. * @param _L2HysThreshold sets L2HysThreshold with given value.
  82. * @param _gammaCorrection sets gammaCorrection with given value.
  83. * @param _nlevels sets nlevels with given value.
  84. * @param _signedGradient sets signedGradient with given value.
  85. */
  86. - (instancetype)initWith_winSize:(Size2i*)_winSize _blockSize:(Size2i*)_blockSize _blockStride:(Size2i*)_blockStride _cellSize:(Size2i*)_cellSize _nbins:(int)_nbins _derivAperture:(int)_derivAperture _winSigma:(double)_winSigma _histogramNormType:(HistogramNormType)_histogramNormType _L2HysThreshold:(double)_L2HysThreshold _gammaCorrection:(BOOL)_gammaCorrection _nlevels:(int)_nlevels _signedGradient:(BOOL)_signedGradient;
  87. /**
  88. *
  89. * @param _winSize sets winSize with given value.
  90. * @param _blockSize sets blockSize with given value.
  91. * @param _blockStride sets blockStride with given value.
  92. * @param _cellSize sets cellSize with given value.
  93. * @param _nbins sets nbins with given value.
  94. * @param _derivAperture sets derivAperture with given value.
  95. * @param _winSigma sets winSigma with given value.
  96. * @param _histogramNormType sets histogramNormType with given value.
  97. * @param _L2HysThreshold sets L2HysThreshold with given value.
  98. * @param _gammaCorrection sets gammaCorrection with given value.
  99. * @param _nlevels sets nlevels with given value.
  100. */
  101. - (instancetype)initWith_winSize:(Size2i*)_winSize _blockSize:(Size2i*)_blockSize _blockStride:(Size2i*)_blockStride _cellSize:(Size2i*)_cellSize _nbins:(int)_nbins _derivAperture:(int)_derivAperture _winSigma:(double)_winSigma _histogramNormType:(HistogramNormType)_histogramNormType _L2HysThreshold:(double)_L2HysThreshold _gammaCorrection:(BOOL)_gammaCorrection _nlevels:(int)_nlevels;
  102. /**
  103. *
  104. * @param _winSize sets winSize with given value.
  105. * @param _blockSize sets blockSize with given value.
  106. * @param _blockStride sets blockStride with given value.
  107. * @param _cellSize sets cellSize with given value.
  108. * @param _nbins sets nbins with given value.
  109. * @param _derivAperture sets derivAperture with given value.
  110. * @param _winSigma sets winSigma with given value.
  111. * @param _histogramNormType sets histogramNormType with given value.
  112. * @param _L2HysThreshold sets L2HysThreshold with given value.
  113. * @param _gammaCorrection sets gammaCorrection with given value.
  114. */
  115. - (instancetype)initWith_winSize:(Size2i*)_winSize _blockSize:(Size2i*)_blockSize _blockStride:(Size2i*)_blockStride _cellSize:(Size2i*)_cellSize _nbins:(int)_nbins _derivAperture:(int)_derivAperture _winSigma:(double)_winSigma _histogramNormType:(HistogramNormType)_histogramNormType _L2HysThreshold:(double)_L2HysThreshold _gammaCorrection:(BOOL)_gammaCorrection;
  116. /**
  117. *
  118. * @param _winSize sets winSize with given value.
  119. * @param _blockSize sets blockSize with given value.
  120. * @param _blockStride sets blockStride with given value.
  121. * @param _cellSize sets cellSize with given value.
  122. * @param _nbins sets nbins with given value.
  123. * @param _derivAperture sets derivAperture with given value.
  124. * @param _winSigma sets winSigma with given value.
  125. * @param _histogramNormType sets histogramNormType with given value.
  126. * @param _L2HysThreshold sets L2HysThreshold with given value.
  127. */
  128. - (instancetype)initWith_winSize:(Size2i*)_winSize _blockSize:(Size2i*)_blockSize _blockStride:(Size2i*)_blockStride _cellSize:(Size2i*)_cellSize _nbins:(int)_nbins _derivAperture:(int)_derivAperture _winSigma:(double)_winSigma _histogramNormType:(HistogramNormType)_histogramNormType _L2HysThreshold:(double)_L2HysThreshold;
  129. /**
  130. *
  131. * @param _winSize sets winSize with given value.
  132. * @param _blockSize sets blockSize with given value.
  133. * @param _blockStride sets blockStride with given value.
  134. * @param _cellSize sets cellSize with given value.
  135. * @param _nbins sets nbins with given value.
  136. * @param _derivAperture sets derivAperture with given value.
  137. * @param _winSigma sets winSigma with given value.
  138. * @param _histogramNormType sets histogramNormType with given value.
  139. */
  140. - (instancetype)initWith_winSize:(Size2i*)_winSize _blockSize:(Size2i*)_blockSize _blockStride:(Size2i*)_blockStride _cellSize:(Size2i*)_cellSize _nbins:(int)_nbins _derivAperture:(int)_derivAperture _winSigma:(double)_winSigma _histogramNormType:(HistogramNormType)_histogramNormType;
  141. /**
  142. *
  143. * @param _winSize sets winSize with given value.
  144. * @param _blockSize sets blockSize with given value.
  145. * @param _blockStride sets blockStride with given value.
  146. * @param _cellSize sets cellSize with given value.
  147. * @param _nbins sets nbins with given value.
  148. * @param _derivAperture sets derivAperture with given value.
  149. * @param _winSigma sets winSigma with given value.
  150. */
  151. - (instancetype)initWith_winSize:(Size2i*)_winSize _blockSize:(Size2i*)_blockSize _blockStride:(Size2i*)_blockStride _cellSize:(Size2i*)_cellSize _nbins:(int)_nbins _derivAperture:(int)_derivAperture _winSigma:(double)_winSigma;
  152. /**
  153. *
  154. * @param _winSize sets winSize with given value.
  155. * @param _blockSize sets blockSize with given value.
  156. * @param _blockStride sets blockStride with given value.
  157. * @param _cellSize sets cellSize with given value.
  158. * @param _nbins sets nbins with given value.
  159. * @param _derivAperture sets derivAperture with given value.
  160. */
  161. - (instancetype)initWith_winSize:(Size2i*)_winSize _blockSize:(Size2i*)_blockSize _blockStride:(Size2i*)_blockStride _cellSize:(Size2i*)_cellSize _nbins:(int)_nbins _derivAperture:(int)_derivAperture;
  162. /**
  163. *
  164. * @param _winSize sets winSize with given value.
  165. * @param _blockSize sets blockSize with given value.
  166. * @param _blockStride sets blockStride with given value.
  167. * @param _cellSize sets cellSize with given value.
  168. * @param _nbins sets nbins with given value.
  169. */
  170. - (instancetype)initWith_winSize:(Size2i*)_winSize _blockSize:(Size2i*)_blockSize _blockStride:(Size2i*)_blockStride _cellSize:(Size2i*)_cellSize _nbins:(int)_nbins;
  171. //
  172. // cv::HOGDescriptor::HOGDescriptor(String filename)
  173. //
  174. /**
  175. *
  176. *
  177. * Creates the HOG descriptor and detector and loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.
  178. * @param filename The file name containing HOGDescriptor properties and coefficients for the linear SVM classifier.
  179. */
  180. - (instancetype)initWithFilename:(NSString*)filename;
  181. //
  182. // size_t cv::HOGDescriptor::getDescriptorSize()
  183. //
  184. /**
  185. * Returns the number of coefficients required for the classification.
  186. */
  187. - (size_t)getDescriptorSize NS_SWIFT_NAME(getDescriptorSize());
  188. //
  189. // bool cv::HOGDescriptor::checkDetectorSize()
  190. //
  191. /**
  192. * Checks if detector size equal to descriptor size.
  193. */
  194. - (BOOL)checkDetectorSize NS_SWIFT_NAME(checkDetectorSize());
  195. //
  196. // double cv::HOGDescriptor::getWinSigma()
  197. //
  198. /**
  199. * Returns winSigma value
  200. */
  201. - (double)getWinSigma NS_SWIFT_NAME(getWinSigma());
  202. //
  203. // void cv::HOGDescriptor::setSVMDetector(Mat svmdetector)
  204. //
  205. /**
  206. * Sets coefficients for the linear SVM classifier.
  207. * @param svmdetector coefficients for the linear SVM classifier.
  208. */
  209. - (void)setSVMDetector:(Mat*)svmdetector NS_SWIFT_NAME(setSVMDetector(svmdetector:));
  210. //
  211. // bool cv::HOGDescriptor::load(String filename, String objname = String())
  212. //
  213. /**
  214. * loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file
  215. * @param filename Name of the file to read.
  216. * @param objname The optional name of the node to read (if empty, the first top-level node will be used).
  217. */
  218. - (BOOL)load:(NSString*)filename objname:(NSString*)objname NS_SWIFT_NAME(load(filename:objname:));
  219. /**
  220. * loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file
  221. * @param filename Name of the file to read.
  222. */
  223. - (BOOL)load:(NSString*)filename NS_SWIFT_NAME(load(filename:));
  224. //
  225. // void cv::HOGDescriptor::save(String filename, String objname = String())
  226. //
  227. /**
  228. * saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file
  229. * @param filename File name
  230. * @param objname Object name
  231. */
  232. - (void)save:(NSString*)filename objname:(NSString*)objname NS_SWIFT_NAME(save(filename:objname:));
  233. /**
  234. * saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file
  235. * @param filename File name
  236. */
  237. - (void)save:(NSString*)filename NS_SWIFT_NAME(save(filename:));
  238. //
  239. // void cv::HOGDescriptor::compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
  240. //
  241. /**
  242. * Computes HOG descriptors of given image.
  243. * @param img Matrix of the type CV_8U containing an image where HOG features will be calculated.
  244. * @param descriptors Matrix of the type CV_32F
  245. * @param winStride Window stride. It must be a multiple of block stride.
  246. * @param padding Padding
  247. * @param locations Vector of Point
  248. */
  249. - (void)compute:(Mat*)img descriptors:(FloatVector*)descriptors winStride:(Size2i*)winStride padding:(Size2i*)padding locations:(NSArray<Point2i*>*)locations NS_SWIFT_NAME(compute(img:descriptors:winStride:padding:locations:));
  250. /**
  251. * Computes HOG descriptors of given image.
  252. * @param img Matrix of the type CV_8U containing an image where HOG features will be calculated.
  253. * @param descriptors Matrix of the type CV_32F
  254. * @param winStride Window stride. It must be a multiple of block stride.
  255. * @param padding Padding
  256. */
  257. - (void)compute:(Mat*)img descriptors:(FloatVector*)descriptors winStride:(Size2i*)winStride padding:(Size2i*)padding NS_SWIFT_NAME(compute(img:descriptors:winStride:padding:));
  258. /**
  259. * Computes HOG descriptors of given image.
  260. * @param img Matrix of the type CV_8U containing an image where HOG features will be calculated.
  261. * @param descriptors Matrix of the type CV_32F
  262. * @param winStride Window stride. It must be a multiple of block stride.
  263. */
  264. - (void)compute:(Mat*)img descriptors:(FloatVector*)descriptors winStride:(Size2i*)winStride NS_SWIFT_NAME(compute(img:descriptors:winStride:));
  265. /**
  266. * Computes HOG descriptors of given image.
  267. * @param img Matrix of the type CV_8U containing an image where HOG features will be calculated.
  268. * @param descriptors Matrix of the type CV_32F
  269. */
  270. - (void)compute:(Mat*)img descriptors:(FloatVector*)descriptors NS_SWIFT_NAME(compute(img:descriptors:));
  271. //
  272. // void cv::HOGDescriptor::detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
  273. //
  274. /**
  275. * Performs object detection without a multi-scale window.
  276. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  277. * @param foundLocations Vector of point where each point contains left-top corner point of detected object boundaries.
  278. * @param weights Vector that will contain confidence values for each detected object.
  279. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  280. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  281. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  282. * @param winStride Window stride. It must be a multiple of block stride.
  283. * @param padding Padding
  284. * @param searchLocations Vector of Point includes set of requested locations to be evaluated.
  285. */
  286. - (void)detect:(Mat*)img foundLocations:(NSMutableArray<Point2i*>*)foundLocations weights:(DoubleVector*)weights hitThreshold:(double)hitThreshold winStride:(Size2i*)winStride padding:(Size2i*)padding searchLocations:(NSArray<Point2i*>*)searchLocations NS_SWIFT_NAME(detect(img:foundLocations:weights:hitThreshold:winStride:padding:searchLocations:));
  287. /**
  288. * Performs object detection without a multi-scale window.
  289. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  290. * @param foundLocations Vector of point where each point contains left-top corner point of detected object boundaries.
  291. * @param weights Vector that will contain confidence values for each detected object.
  292. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  293. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  294. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  295. * @param winStride Window stride. It must be a multiple of block stride.
  296. * @param padding Padding
  297. */
  298. - (void)detect:(Mat*)img foundLocations:(NSMutableArray<Point2i*>*)foundLocations weights:(DoubleVector*)weights hitThreshold:(double)hitThreshold winStride:(Size2i*)winStride padding:(Size2i*)padding NS_SWIFT_NAME(detect(img:foundLocations:weights:hitThreshold:winStride:padding:));
  299. /**
  300. * Performs object detection without a multi-scale window.
  301. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  302. * @param foundLocations Vector of point where each point contains left-top corner point of detected object boundaries.
  303. * @param weights Vector that will contain confidence values for each detected object.
  304. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  305. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  306. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  307. * @param winStride Window stride. It must be a multiple of block stride.
  308. */
  309. - (void)detect:(Mat*)img foundLocations:(NSMutableArray<Point2i*>*)foundLocations weights:(DoubleVector*)weights hitThreshold:(double)hitThreshold winStride:(Size2i*)winStride NS_SWIFT_NAME(detect(img:foundLocations:weights:hitThreshold:winStride:));
  310. /**
  311. * Performs object detection without a multi-scale window.
  312. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  313. * @param foundLocations Vector of point where each point contains left-top corner point of detected object boundaries.
  314. * @param weights Vector that will contain confidence values for each detected object.
  315. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  316. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  317. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  318. */
  319. - (void)detect:(Mat*)img foundLocations:(NSMutableArray<Point2i*>*)foundLocations weights:(DoubleVector*)weights hitThreshold:(double)hitThreshold NS_SWIFT_NAME(detect(img:foundLocations:weights:hitThreshold:));
  320. /**
  321. * Performs object detection without a multi-scale window.
  322. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  323. * @param foundLocations Vector of point where each point contains left-top corner point of detected object boundaries.
  324. * @param weights Vector that will contain confidence values for each detected object.
  325. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  326. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  327. */
  328. - (void)detect:(Mat*)img foundLocations:(NSMutableArray<Point2i*>*)foundLocations weights:(DoubleVector*)weights NS_SWIFT_NAME(detect(img:foundLocations:weights:));
  329. //
  330. // void cv::HOGDescriptor::detectMultiScale(Mat img, vector_Rect& foundLocations, vector_double& foundWeights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), double scale = 1.05, double groupThreshold = 2.0, bool useMeanshiftGrouping = false)
  331. //
  332. /**
  333. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  334. * of rectangles.
  335. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  336. * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
  337. * @param foundWeights Vector that will contain confidence values for each detected object.
  338. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  339. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  340. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  341. * @param winStride Window stride. It must be a multiple of block stride.
  342. * @param padding Padding
  343. * @param scale Coefficient of the detection window increase.
  344. * @param groupThreshold Coefficient to regulate the similarity threshold. When detected, some objects can be covered
  345. * by many rectangles. 0 means not to perform grouping.
  346. * @param useMeanshiftGrouping indicates grouping algorithm
  347. */
  348. - (void)detectMultiScale:(Mat*)img foundLocations:(NSMutableArray<Rect2i*>*)foundLocations foundWeights:(DoubleVector*)foundWeights hitThreshold:(double)hitThreshold winStride:(Size2i*)winStride padding:(Size2i*)padding scale:(double)scale groupThreshold:(double)groupThreshold useMeanshiftGrouping:(BOOL)useMeanshiftGrouping NS_SWIFT_NAME(detectMultiScale(img:foundLocations:foundWeights:hitThreshold:winStride:padding:scale:groupThreshold:useMeanshiftGrouping:));
  349. /**
  350. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  351. * of rectangles.
  352. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  353. * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
  354. * @param foundWeights Vector that will contain confidence values for each detected object.
  355. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  356. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  357. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  358. * @param winStride Window stride. It must be a multiple of block stride.
  359. * @param padding Padding
  360. * @param scale Coefficient of the detection window increase.
  361. * @param groupThreshold Coefficient to regulate the similarity threshold. When detected, some objects can be covered
  362. * by many rectangles. 0 means not to perform grouping.
  363. */
  364. - (void)detectMultiScale:(Mat*)img foundLocations:(NSMutableArray<Rect2i*>*)foundLocations foundWeights:(DoubleVector*)foundWeights hitThreshold:(double)hitThreshold winStride:(Size2i*)winStride padding:(Size2i*)padding scale:(double)scale groupThreshold:(double)groupThreshold NS_SWIFT_NAME(detectMultiScale(img:foundLocations:foundWeights:hitThreshold:winStride:padding:scale:groupThreshold:));
  365. /**
  366. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  367. * of rectangles.
  368. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  369. * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
  370. * @param foundWeights Vector that will contain confidence values for each detected object.
  371. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  372. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  373. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  374. * @param winStride Window stride. It must be a multiple of block stride.
  375. * @param padding Padding
  376. * @param scale Coefficient of the detection window increase.
  377. * by many rectangles. 0 means not to perform grouping.
  378. */
  379. - (void)detectMultiScale:(Mat*)img foundLocations:(NSMutableArray<Rect2i*>*)foundLocations foundWeights:(DoubleVector*)foundWeights hitThreshold:(double)hitThreshold winStride:(Size2i*)winStride padding:(Size2i*)padding scale:(double)scale NS_SWIFT_NAME(detectMultiScale(img:foundLocations:foundWeights:hitThreshold:winStride:padding:scale:));
  380. /**
  381. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  382. * of rectangles.
  383. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  384. * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
  385. * @param foundWeights Vector that will contain confidence values for each detected object.
  386. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  387. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  388. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  389. * @param winStride Window stride. It must be a multiple of block stride.
  390. * @param padding Padding
  391. * by many rectangles. 0 means not to perform grouping.
  392. */
  393. - (void)detectMultiScale:(Mat*)img foundLocations:(NSMutableArray<Rect2i*>*)foundLocations foundWeights:(DoubleVector*)foundWeights hitThreshold:(double)hitThreshold winStride:(Size2i*)winStride padding:(Size2i*)padding NS_SWIFT_NAME(detectMultiScale(img:foundLocations:foundWeights:hitThreshold:winStride:padding:));
  394. /**
  395. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  396. * of rectangles.
  397. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  398. * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
  399. * @param foundWeights Vector that will contain confidence values for each detected object.
  400. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  401. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  402. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  403. * @param winStride Window stride. It must be a multiple of block stride.
  404. * by many rectangles. 0 means not to perform grouping.
  405. */
  406. - (void)detectMultiScale:(Mat*)img foundLocations:(NSMutableArray<Rect2i*>*)foundLocations foundWeights:(DoubleVector*)foundWeights hitThreshold:(double)hitThreshold winStride:(Size2i*)winStride NS_SWIFT_NAME(detectMultiScale(img:foundLocations:foundWeights:hitThreshold:winStride:));
  407. /**
  408. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  409. * of rectangles.
  410. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  411. * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
  412. * @param foundWeights Vector that will contain confidence values for each detected object.
  413. * @param hitThreshold Threshold for the distance between features and SVM classifying plane.
  414. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  415. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  416. * by many rectangles. 0 means not to perform grouping.
  417. */
  418. - (void)detectMultiScale:(Mat*)img foundLocations:(NSMutableArray<Rect2i*>*)foundLocations foundWeights:(DoubleVector*)foundWeights hitThreshold:(double)hitThreshold NS_SWIFT_NAME(detectMultiScale(img:foundLocations:foundWeights:hitThreshold:));
  419. /**
  420. * Detects objects of different sizes in the input image. The detected objects are returned as a list
  421. * of rectangles.
  422. * @param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
  423. * @param foundLocations Vector of rectangles where each rectangle contains the detected object.
  424. * @param foundWeights Vector that will contain confidence values for each detected object.
  425. * Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
  426. * But if the free coefficient is omitted (which is allowed), you can specify it manually here.
  427. * by many rectangles. 0 means not to perform grouping.
  428. */
  429. - (void)detectMultiScale:(Mat*)img foundLocations:(NSMutableArray<Rect2i*>*)foundLocations foundWeights:(DoubleVector*)foundWeights NS_SWIFT_NAME(detectMultiScale(img:foundLocations:foundWeights:));
  430. //
  431. // void cv::HOGDescriptor::computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
  432. //
  433. /**
  434. * Computes gradients and quantized gradient orientations.
  435. * @param img Matrix contains the image to be computed
  436. * @param grad Matrix of type CV_32FC2 contains computed gradients
  437. * @param angleOfs Matrix of type CV_8UC2 contains quantized gradient orientations
  438. * @param paddingTL Padding from top-left
  439. * @param paddingBR Padding from bottom-right
  440. */
  441. - (void)computeGradient:(Mat*)img grad:(Mat*)grad angleOfs:(Mat*)angleOfs paddingTL:(Size2i*)paddingTL paddingBR:(Size2i*)paddingBR NS_SWIFT_NAME(computeGradient(img:grad:angleOfs:paddingTL:paddingBR:));
  442. /**
  443. * Computes gradients and quantized gradient orientations.
  444. * @param img Matrix contains the image to be computed
  445. * @param grad Matrix of type CV_32FC2 contains computed gradients
  446. * @param angleOfs Matrix of type CV_8UC2 contains quantized gradient orientations
  447. * @param paddingTL Padding from top-left
  448. */
  449. - (void)computeGradient:(Mat*)img grad:(Mat*)grad angleOfs:(Mat*)angleOfs paddingTL:(Size2i*)paddingTL NS_SWIFT_NAME(computeGradient(img:grad:angleOfs:paddingTL:));
  450. /**
  451. * Computes gradients and quantized gradient orientations.
  452. * @param img Matrix contains the image to be computed
  453. * @param grad Matrix of type CV_32FC2 contains computed gradients
  454. * @param angleOfs Matrix of type CV_8UC2 contains quantized gradient orientations
  455. */
  456. - (void)computeGradient:(Mat*)img grad:(Mat*)grad angleOfs:(Mat*)angleOfs NS_SWIFT_NAME(computeGradient(img:grad:angleOfs:));
  457. //
  458. // static vector_float cv::HOGDescriptor::getDefaultPeopleDetector()
  459. //
  460. /**
  461. * Returns coefficients of the classifier trained for people detection (for 64x128 windows).
  462. */
  463. + (FloatVector*)getDefaultPeopleDetector NS_SWIFT_NAME(getDefaultPeopleDetector());
  464. //
  465. // static vector_float cv::HOGDescriptor::getDaimlerPeopleDetector()
  466. //
  467. /**
  468. * Returns coefficients of the classifier trained for people detection (for 48x96 windows).
  469. */
  470. + (FloatVector*)getDaimlerPeopleDetector NS_SWIFT_NAME(getDaimlerPeopleDetector());
  471. //
  472. // C++: Size cv::HOGDescriptor::winSize
  473. //
  474. @property (readonly) Size2i* winSize;
  475. //
  476. // C++: Size cv::HOGDescriptor::blockSize
  477. //
  478. @property (readonly) Size2i* blockSize;
  479. //
  480. // C++: Size cv::HOGDescriptor::blockStride
  481. //
  482. @property (readonly) Size2i* blockStride;
  483. //
  484. // C++: Size cv::HOGDescriptor::cellSize
  485. //
  486. @property (readonly) Size2i* cellSize;
  487. //
  488. // C++: int cv::HOGDescriptor::nbins
  489. //
  490. @property (readonly) int nbins;
  491. //
  492. // C++: int cv::HOGDescriptor::derivAperture
  493. //
  494. @property (readonly) int derivAperture;
  495. //
  496. // C++: double cv::HOGDescriptor::winSigma
  497. //
  498. @property (readonly) double winSigma;
  499. //
  500. // C++: HOGDescriptor_HistogramNormType cv::HOGDescriptor::histogramNormType
  501. //
  502. @property (readonly) HistogramNormType histogramNormType;
  503. //
  504. // C++: double cv::HOGDescriptor::L2HysThreshold
  505. //
  506. @property (readonly) double L2HysThreshold;
  507. //
  508. // C++: bool cv::HOGDescriptor::gammaCorrection
  509. //
  510. @property (readonly) BOOL gammaCorrection;
  511. //
  512. // C++: vector_float cv::HOGDescriptor::svmDetector
  513. //
  514. @property (readonly) FloatVector* svmDetector;
  515. //
  516. // C++: int cv::HOGDescriptor::nlevels
  517. //
  518. @property (readonly) int nlevels;
  519. //
  520. // C++: bool cv::HOGDescriptor::signedGradient
  521. //
  522. @property (readonly) BOOL signedGradient;
  523. @end
  524. NS_ASSUME_NONNULL_END