HOGDescriptor.cs 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158
  1. 
  2. using OpenCVForUnity.CoreModule;
  3. using OpenCVForUnity.UtilsModule;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Runtime.InteropServices;
  7. namespace OpenCVForUnity.ObjdetectModule
  8. {
  9. // C++: class HOGDescriptor
  10. //javadoc: HOGDescriptor
  11. public class HOGDescriptor : DisposableOpenCVObject
  12. {
  13. protected override void Dispose (bool disposing)
  14. {
  15. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  16. try {
  17. if (disposing) {
  18. }
  19. if (IsEnabledDispose) {
  20. if (nativeObj != IntPtr.Zero)
  21. objdetect_HOGDescriptor_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal HOGDescriptor (IntPtr addr) : base (addr) { }
  32. public IntPtr getNativeObjAddr () { return nativeObj; }
  33. // internal usage only
  34. public static HOGDescriptor __fromPtr__ (IntPtr addr) { return new HOGDescriptor (addr); }
  35. // C++: enum HistogramNormType
  36. public const int L2Hys = 0;
  37. // C++: enum DescriptorStorageFormat
  38. public const int DESCR_FORMAT_COL_BY_COL = 0;
  39. public const int DESCR_FORMAT_ROW_BY_ROW = 1;
  40. // C++: enum <unnamed>
  41. public const int DEFAULT_NLEVELS = 64;
  42. //
  43. // C++: 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)
  44. //
  45. //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient)
  46. public HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection, int _nlevels, bool _signedGradient)
  47. {
  48. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  49. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_10(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient);
  50. return;
  51. #else
  52. return null;
  53. #endif
  54. }
  55. //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels)
  56. public HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection, int _nlevels)
  57. {
  58. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  59. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_11(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels);
  60. return;
  61. #else
  62. return null;
  63. #endif
  64. }
  65. //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection)
  66. public HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection)
  67. {
  68. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  69. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_12(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection);
  70. return;
  71. #else
  72. return null;
  73. #endif
  74. }
  75. //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold)
  76. public HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold)
  77. {
  78. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  79. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_13(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold);
  80. return;
  81. #else
  82. return null;
  83. #endif
  84. }
  85. //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType)
  86. public HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType)
  87. {
  88. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  89. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_14(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType);
  90. return;
  91. #else
  92. return null;
  93. #endif
  94. }
  95. //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma)
  96. public HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma)
  97. {
  98. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  99. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_15(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma);
  100. return;
  101. #else
  102. return null;
  103. #endif
  104. }
  105. //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture)
  106. public HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture)
  107. {
  108. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  109. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_16(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture);
  110. return;
  111. #else
  112. return null;
  113. #endif
  114. }
  115. //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins)
  116. public HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins)
  117. {
  118. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  119. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_17(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins);
  120. return;
  121. #else
  122. return null;
  123. #endif
  124. }
  125. //
  126. // C++: cv::HOGDescriptor::HOGDescriptor(String filename)
  127. //
  128. //javadoc: HOGDescriptor::HOGDescriptor(filename)
  129. public HOGDescriptor (string filename)
  130. {
  131. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  132. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_18(filename);
  133. return;
  134. #else
  135. return null;
  136. #endif
  137. }
  138. //
  139. // C++: cv::HOGDescriptor::HOGDescriptor()
  140. //
  141. //javadoc: HOGDescriptor::HOGDescriptor()
  142. public HOGDescriptor ()
  143. {
  144. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  145. nativeObj = objdetect_HOGDescriptor_HOGDescriptor_19();
  146. return;
  147. #else
  148. return null;
  149. #endif
  150. }
  151. //
  152. // C++: bool cv::HOGDescriptor::checkDetectorSize()
  153. //
  154. //javadoc: HOGDescriptor::checkDetectorSize()
  155. public bool checkDetectorSize ()
  156. {
  157. ThrowIfDisposed ();
  158. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  159. bool retVal = objdetect_HOGDescriptor_checkDetectorSize_10(nativeObj);
  160. return retVal;
  161. #else
  162. return false;
  163. #endif
  164. }
  165. //
  166. // C++: bool cv::HOGDescriptor::load(String filename, String objname = String())
  167. //
  168. //javadoc: HOGDescriptor::load(filename, objname)
  169. public bool load (string filename, string objname)
  170. {
  171. ThrowIfDisposed ();
  172. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  173. bool retVal = objdetect_HOGDescriptor_load_10(nativeObj, filename, objname);
  174. return retVal;
  175. #else
  176. return false;
  177. #endif
  178. }
  179. //javadoc: HOGDescriptor::load(filename)
  180. public bool load (string filename)
  181. {
  182. ThrowIfDisposed ();
  183. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  184. bool retVal = objdetect_HOGDescriptor_load_11(nativeObj, filename);
  185. return retVal;
  186. #else
  187. return false;
  188. #endif
  189. }
  190. //
  191. // C++: double cv::HOGDescriptor::getWinSigma()
  192. //
  193. //javadoc: HOGDescriptor::getWinSigma()
  194. public double getWinSigma ()
  195. {
  196. ThrowIfDisposed ();
  197. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  198. double retVal = objdetect_HOGDescriptor_getWinSigma_10(nativeObj);
  199. return retVal;
  200. #else
  201. return -1;
  202. #endif
  203. }
  204. //
  205. // C++: size_t cv::HOGDescriptor::getDescriptorSize()
  206. //
  207. //javadoc: HOGDescriptor::getDescriptorSize()
  208. public long getDescriptorSize ()
  209. {
  210. ThrowIfDisposed ();
  211. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  212. long retVal = objdetect_HOGDescriptor_getDescriptorSize_10(nativeObj);
  213. return retVal;
  214. #else
  215. return -1;
  216. #endif
  217. }
  218. //
  219. // C++: static vector_float cv::HOGDescriptor::getDaimlerPeopleDetector()
  220. //
  221. //javadoc: HOGDescriptor::getDaimlerPeopleDetector()
  222. public static MatOfFloat getDaimlerPeopleDetector ()
  223. {
  224. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  225. MatOfFloat retVal = MatOfFloat.fromNativeAddr(objdetect_HOGDescriptor_getDaimlerPeopleDetector_10());
  226. return retVal;
  227. #else
  228. return null;
  229. #endif
  230. }
  231. //
  232. // C++: static vector_float cv::HOGDescriptor::getDefaultPeopleDetector()
  233. //
  234. //javadoc: HOGDescriptor::getDefaultPeopleDetector()
  235. public static MatOfFloat getDefaultPeopleDetector ()
  236. {
  237. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  238. MatOfFloat retVal = MatOfFloat.fromNativeAddr(objdetect_HOGDescriptor_getDefaultPeopleDetector_10());
  239. return retVal;
  240. #else
  241. return null;
  242. #endif
  243. }
  244. //
  245. // C++: void cv::HOGDescriptor::compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
  246. //
  247. //javadoc: HOGDescriptor::compute(img, descriptors, winStride, padding, locations)
  248. public void compute (Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
  249. {
  250. ThrowIfDisposed ();
  251. if (img != null) img.ThrowIfDisposed ();
  252. if (descriptors != null) descriptors.ThrowIfDisposed ();
  253. if (locations != null) locations.ThrowIfDisposed ();
  254. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  255. Mat descriptors_mat = descriptors;
  256. Mat locations_mat = locations;
  257. objdetect_HOGDescriptor_compute_10(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);
  258. return;
  259. #else
  260. return;
  261. #endif
  262. }
  263. //javadoc: HOGDescriptor::compute(img, descriptors, winStride, padding)
  264. public void compute (Mat img, MatOfFloat descriptors, Size winStride, Size padding)
  265. {
  266. ThrowIfDisposed ();
  267. if (img != null) img.ThrowIfDisposed ();
  268. if (descriptors != null) descriptors.ThrowIfDisposed ();
  269. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  270. Mat descriptors_mat = descriptors;
  271. objdetect_HOGDescriptor_compute_11(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height);
  272. return;
  273. #else
  274. return;
  275. #endif
  276. }
  277. //javadoc: HOGDescriptor::compute(img, descriptors, winStride)
  278. public void compute (Mat img, MatOfFloat descriptors, Size winStride)
  279. {
  280. ThrowIfDisposed ();
  281. if (img != null) img.ThrowIfDisposed ();
  282. if (descriptors != null) descriptors.ThrowIfDisposed ();
  283. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  284. Mat descriptors_mat = descriptors;
  285. objdetect_HOGDescriptor_compute_12(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height);
  286. return;
  287. #else
  288. return;
  289. #endif
  290. }
  291. //javadoc: HOGDescriptor::compute(img, descriptors)
  292. public void compute (Mat img, MatOfFloat descriptors)
  293. {
  294. ThrowIfDisposed ();
  295. if (img != null) img.ThrowIfDisposed ();
  296. if (descriptors != null) descriptors.ThrowIfDisposed ();
  297. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  298. Mat descriptors_mat = descriptors;
  299. objdetect_HOGDescriptor_compute_13(nativeObj, img.nativeObj, descriptors_mat.nativeObj);
  300. return;
  301. #else
  302. return;
  303. #endif
  304. }
  305. //
  306. // C++: void cv::HOGDescriptor::computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
  307. //
  308. //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs, paddingTL, paddingBR)
  309. public void computeGradient (Mat img, Mat grad, Mat angleOfs, Size paddingTL, Size paddingBR)
  310. {
  311. ThrowIfDisposed ();
  312. if (img != null) img.ThrowIfDisposed ();
  313. if (grad != null) grad.ThrowIfDisposed ();
  314. if (angleOfs != null) angleOfs.ThrowIfDisposed ();
  315. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  316. objdetect_HOGDescriptor_computeGradient_10(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj, paddingTL.width, paddingTL.height, paddingBR.width, paddingBR.height);
  317. return;
  318. #else
  319. return;
  320. #endif
  321. }
  322. //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs, paddingTL)
  323. public void computeGradient (Mat img, Mat grad, Mat angleOfs, Size paddingTL)
  324. {
  325. ThrowIfDisposed ();
  326. if (img != null) img.ThrowIfDisposed ();
  327. if (grad != null) grad.ThrowIfDisposed ();
  328. if (angleOfs != null) angleOfs.ThrowIfDisposed ();
  329. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  330. objdetect_HOGDescriptor_computeGradient_11(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj, paddingTL.width, paddingTL.height);
  331. return;
  332. #else
  333. return;
  334. #endif
  335. }
  336. //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs)
  337. public void computeGradient (Mat img, Mat grad, Mat angleOfs)
  338. {
  339. ThrowIfDisposed ();
  340. if (img != null) img.ThrowIfDisposed ();
  341. if (grad != null) grad.ThrowIfDisposed ();
  342. if (angleOfs != null) angleOfs.ThrowIfDisposed ();
  343. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  344. objdetect_HOGDescriptor_computeGradient_12(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj);
  345. return;
  346. #else
  347. return;
  348. #endif
  349. }
  350. //
  351. // C++: 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>())
  352. //
  353. //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride, padding, searchLocations)
  354. public void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)
  355. {
  356. ThrowIfDisposed ();
  357. if (img != null) img.ThrowIfDisposed ();
  358. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  359. if (weights != null) weights.ThrowIfDisposed ();
  360. if (searchLocations != null) searchLocations.ThrowIfDisposed ();
  361. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  362. Mat foundLocations_mat = foundLocations;
  363. Mat weights_mat = weights;
  364. Mat searchLocations_mat = searchLocations;
  365. objdetect_HOGDescriptor_detect_10(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, searchLocations_mat.nativeObj);
  366. return;
  367. #else
  368. return;
  369. #endif
  370. }
  371. //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride, padding)
  372. public void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding)
  373. {
  374. ThrowIfDisposed ();
  375. if (img != null) img.ThrowIfDisposed ();
  376. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  377. if (weights != null) weights.ThrowIfDisposed ();
  378. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  379. Mat foundLocations_mat = foundLocations;
  380. Mat weights_mat = weights;
  381. objdetect_HOGDescriptor_detect_11(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height);
  382. return;
  383. #else
  384. return;
  385. #endif
  386. }
  387. //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride)
  388. public void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride)
  389. {
  390. ThrowIfDisposed ();
  391. if (img != null) img.ThrowIfDisposed ();
  392. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  393. if (weights != null) weights.ThrowIfDisposed ();
  394. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  395. Mat foundLocations_mat = foundLocations;
  396. Mat weights_mat = weights;
  397. objdetect_HOGDescriptor_detect_12(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height);
  398. return;
  399. #else
  400. return;
  401. #endif
  402. }
  403. //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold)
  404. public void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold)
  405. {
  406. ThrowIfDisposed ();
  407. if (img != null) img.ThrowIfDisposed ();
  408. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  409. if (weights != null) weights.ThrowIfDisposed ();
  410. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  411. Mat foundLocations_mat = foundLocations;
  412. Mat weights_mat = weights;
  413. objdetect_HOGDescriptor_detect_13(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold);
  414. return;
  415. #else
  416. return;
  417. #endif
  418. }
  419. //javadoc: HOGDescriptor::detect(img, foundLocations, weights)
  420. public void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights)
  421. {
  422. ThrowIfDisposed ();
  423. if (img != null) img.ThrowIfDisposed ();
  424. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  425. if (weights != null) weights.ThrowIfDisposed ();
  426. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  427. Mat foundLocations_mat = foundLocations;
  428. Mat weights_mat = weights;
  429. objdetect_HOGDescriptor_detect_14(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);
  430. return;
  431. #else
  432. return;
  433. #endif
  434. }
  435. //
  436. // C++: 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 finalThreshold = 2.0, bool useMeanshiftGrouping = false)
  437. //
  438. //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale, finalThreshold, useMeanshiftGrouping)
  439. public void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, bool useMeanshiftGrouping)
  440. {
  441. ThrowIfDisposed ();
  442. if (img != null) img.ThrowIfDisposed ();
  443. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  444. if (foundWeights != null) foundWeights.ThrowIfDisposed ();
  445. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  446. Mat foundLocations_mat = foundLocations;
  447. Mat foundWeights_mat = foundWeights;
  448. objdetect_HOGDescriptor_detectMultiScale_10(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
  449. return;
  450. #else
  451. return;
  452. #endif
  453. }
  454. //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale, finalThreshold)
  455. public void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold)
  456. {
  457. ThrowIfDisposed ();
  458. if (img != null) img.ThrowIfDisposed ();
  459. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  460. if (foundWeights != null) foundWeights.ThrowIfDisposed ();
  461. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  462. Mat foundLocations_mat = foundLocations;
  463. Mat foundWeights_mat = foundWeights;
  464. objdetect_HOGDescriptor_detectMultiScale_11(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold);
  465. return;
  466. #else
  467. return;
  468. #endif
  469. }
  470. //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale)
  471. public void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale)
  472. {
  473. ThrowIfDisposed ();
  474. if (img != null) img.ThrowIfDisposed ();
  475. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  476. if (foundWeights != null) foundWeights.ThrowIfDisposed ();
  477. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  478. Mat foundLocations_mat = foundLocations;
  479. Mat foundWeights_mat = foundWeights;
  480. objdetect_HOGDescriptor_detectMultiScale_12(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale);
  481. return;
  482. #else
  483. return;
  484. #endif
  485. }
  486. //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding)
  487. public void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding)
  488. {
  489. ThrowIfDisposed ();
  490. if (img != null) img.ThrowIfDisposed ();
  491. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  492. if (foundWeights != null) foundWeights.ThrowIfDisposed ();
  493. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  494. Mat foundLocations_mat = foundLocations;
  495. Mat foundWeights_mat = foundWeights;
  496. objdetect_HOGDescriptor_detectMultiScale_13(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height);
  497. return;
  498. #else
  499. return;
  500. #endif
  501. }
  502. //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride)
  503. public void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride)
  504. {
  505. ThrowIfDisposed ();
  506. if (img != null) img.ThrowIfDisposed ();
  507. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  508. if (foundWeights != null) foundWeights.ThrowIfDisposed ();
  509. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  510. Mat foundLocations_mat = foundLocations;
  511. Mat foundWeights_mat = foundWeights;
  512. objdetect_HOGDescriptor_detectMultiScale_14(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height);
  513. return;
  514. #else
  515. return;
  516. #endif
  517. }
  518. //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold)
  519. public void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold)
  520. {
  521. ThrowIfDisposed ();
  522. if (img != null) img.ThrowIfDisposed ();
  523. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  524. if (foundWeights != null) foundWeights.ThrowIfDisposed ();
  525. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  526. Mat foundLocations_mat = foundLocations;
  527. Mat foundWeights_mat = foundWeights;
  528. objdetect_HOGDescriptor_detectMultiScale_15(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold);
  529. return;
  530. #else
  531. return;
  532. #endif
  533. }
  534. //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights)
  535. public void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
  536. {
  537. ThrowIfDisposed ();
  538. if (img != null) img.ThrowIfDisposed ();
  539. if (foundLocations != null) foundLocations.ThrowIfDisposed ();
  540. if (foundWeights != null) foundWeights.ThrowIfDisposed ();
  541. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  542. Mat foundLocations_mat = foundLocations;
  543. Mat foundWeights_mat = foundWeights;
  544. objdetect_HOGDescriptor_detectMultiScale_16(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
  545. return;
  546. #else
  547. return;
  548. #endif
  549. }
  550. //
  551. // C++: void cv::HOGDescriptor::save(String filename, String objname = String())
  552. //
  553. //javadoc: HOGDescriptor::save(filename, objname)
  554. public void save (string filename, string objname)
  555. {
  556. ThrowIfDisposed ();
  557. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  558. objdetect_HOGDescriptor_save_10(nativeObj, filename, objname);
  559. return;
  560. #else
  561. return;
  562. #endif
  563. }
  564. //javadoc: HOGDescriptor::save(filename)
  565. public void save (string filename)
  566. {
  567. ThrowIfDisposed ();
  568. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  569. objdetect_HOGDescriptor_save_11(nativeObj, filename);
  570. return;
  571. #else
  572. return;
  573. #endif
  574. }
  575. //
  576. // C++: void cv::HOGDescriptor::setSVMDetector(Mat svmdetector)
  577. //
  578. //javadoc: HOGDescriptor::setSVMDetector(svmdetector)
  579. public void setSVMDetector (Mat svmdetector)
  580. {
  581. ThrowIfDisposed ();
  582. if (svmdetector != null) svmdetector.ThrowIfDisposed ();
  583. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  584. objdetect_HOGDescriptor_setSVMDetector_10(nativeObj, svmdetector.nativeObj);
  585. return;
  586. #else
  587. return;
  588. #endif
  589. }
  590. //
  591. // C++: Size HOGDescriptor::winSize
  592. //
  593. //javadoc: HOGDescriptor::get_winSize()
  594. public Size get_winSize ()
  595. {
  596. ThrowIfDisposed ();
  597. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  598. double[] tmpArray = new double[2];
  599. objdetect_HOGDescriptor_get_1winSize_10(nativeObj, tmpArray);
  600. Size retVal = new Size (tmpArray);
  601. return retVal;
  602. #else
  603. return null;
  604. #endif
  605. }
  606. //
  607. // C++: Size HOGDescriptor::blockSize
  608. //
  609. //javadoc: HOGDescriptor::get_blockSize()
  610. public Size get_blockSize ()
  611. {
  612. ThrowIfDisposed ();
  613. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  614. double[] tmpArray = new double[2];
  615. objdetect_HOGDescriptor_get_1blockSize_10(nativeObj, tmpArray);
  616. Size retVal = new Size (tmpArray);
  617. return retVal;
  618. #else
  619. return null;
  620. #endif
  621. }
  622. //
  623. // C++: Size HOGDescriptor::blockStride
  624. //
  625. //javadoc: HOGDescriptor::get_blockStride()
  626. public Size get_blockStride ()
  627. {
  628. ThrowIfDisposed ();
  629. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  630. double[] tmpArray = new double[2];
  631. objdetect_HOGDescriptor_get_1blockStride_10(nativeObj, tmpArray);
  632. Size retVal = new Size (tmpArray);
  633. return retVal;
  634. #else
  635. return null;
  636. #endif
  637. }
  638. //
  639. // C++: Size HOGDescriptor::cellSize
  640. //
  641. //javadoc: HOGDescriptor::get_cellSize()
  642. public Size get_cellSize ()
  643. {
  644. ThrowIfDisposed ();
  645. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  646. double[] tmpArray = new double[2];
  647. objdetect_HOGDescriptor_get_1cellSize_10(nativeObj, tmpArray);
  648. Size retVal = new Size (tmpArray);
  649. return retVal;
  650. #else
  651. return null;
  652. #endif
  653. }
  654. //
  655. // C++: int HOGDescriptor::nbins
  656. //
  657. //javadoc: HOGDescriptor::get_nbins()
  658. public int get_nbins ()
  659. {
  660. ThrowIfDisposed ();
  661. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  662. int retVal = objdetect_HOGDescriptor_get_1nbins_10(nativeObj);
  663. return retVal;
  664. #else
  665. return -1;
  666. #endif
  667. }
  668. //
  669. // C++: int HOGDescriptor::derivAperture
  670. //
  671. //javadoc: HOGDescriptor::get_derivAperture()
  672. public int get_derivAperture ()
  673. {
  674. ThrowIfDisposed ();
  675. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  676. int retVal = objdetect_HOGDescriptor_get_1derivAperture_10(nativeObj);
  677. return retVal;
  678. #else
  679. return -1;
  680. #endif
  681. }
  682. //
  683. // C++: double HOGDescriptor::winSigma
  684. //
  685. //javadoc: HOGDescriptor::get_winSigma()
  686. public double get_winSigma ()
  687. {
  688. ThrowIfDisposed ();
  689. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  690. double retVal = objdetect_HOGDescriptor_get_1winSigma_10(nativeObj);
  691. return retVal;
  692. #else
  693. return -1;
  694. #endif
  695. }
  696. //
  697. // C++: HOGDescriptor_HistogramNormType HOGDescriptor::histogramNormType
  698. //
  699. //javadoc: HOGDescriptor::get_histogramNormType()
  700. public int get_histogramNormType ()
  701. {
  702. ThrowIfDisposed ();
  703. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  704. int retVal = objdetect_HOGDescriptor_get_1histogramNormType_10(nativeObj);
  705. return retVal;
  706. #else
  707. return -1;
  708. #endif
  709. }
  710. //
  711. // C++: double HOGDescriptor::L2HysThreshold
  712. //
  713. //javadoc: HOGDescriptor::get_L2HysThreshold()
  714. public double get_L2HysThreshold ()
  715. {
  716. ThrowIfDisposed ();
  717. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  718. double retVal = objdetect_HOGDescriptor_get_1L2HysThreshold_10(nativeObj);
  719. return retVal;
  720. #else
  721. return -1;
  722. #endif
  723. }
  724. //
  725. // C++: bool HOGDescriptor::gammaCorrection
  726. //
  727. //javadoc: HOGDescriptor::get_gammaCorrection()
  728. public bool get_gammaCorrection ()
  729. {
  730. ThrowIfDisposed ();
  731. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  732. bool retVal = objdetect_HOGDescriptor_get_1gammaCorrection_10(nativeObj);
  733. return retVal;
  734. #else
  735. return false;
  736. #endif
  737. }
  738. //
  739. // C++: vector_float HOGDescriptor::svmDetector
  740. //
  741. //javadoc: HOGDescriptor::get_svmDetector()
  742. public MatOfFloat get_svmDetector ()
  743. {
  744. ThrowIfDisposed ();
  745. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  746. MatOfFloat retVal = MatOfFloat.fromNativeAddr(objdetect_HOGDescriptor_get_1svmDetector_10(nativeObj));
  747. return retVal;
  748. #else
  749. return null;
  750. #endif
  751. }
  752. //
  753. // C++: int HOGDescriptor::nlevels
  754. //
  755. //javadoc: HOGDescriptor::get_nlevels()
  756. public int get_nlevels ()
  757. {
  758. ThrowIfDisposed ();
  759. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  760. int retVal = objdetect_HOGDescriptor_get_1nlevels_10(nativeObj);
  761. return retVal;
  762. #else
  763. return -1;
  764. #endif
  765. }
  766. //
  767. // C++: bool HOGDescriptor::signedGradient
  768. //
  769. //javadoc: HOGDescriptor::get_signedGradient()
  770. public bool get_signedGradient ()
  771. {
  772. ThrowIfDisposed ();
  773. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  774. bool retVal = objdetect_HOGDescriptor_get_1signedGradient_10(nativeObj);
  775. return retVal;
  776. #else
  777. return false;
  778. #endif
  779. }
  780. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  781. const string LIBNAME = "__Internal";
  782. #else
  783. const string LIBNAME = "opencvforunity";
  784. #endif
  785. // C++: 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)
  786. [DllImport (LIBNAME)]
  787. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_10 (double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection, int _nlevels, bool _signedGradient);
  788. [DllImport (LIBNAME)]
  789. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_11 (double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection, int _nlevels);
  790. [DllImport (LIBNAME)]
  791. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_12 (double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection);
  792. [DllImport (LIBNAME)]
  793. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_13 (double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold);
  794. [DllImport (LIBNAME)]
  795. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_14 (double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType);
  796. [DllImport (LIBNAME)]
  797. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_15 (double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma);
  798. [DllImport (LIBNAME)]
  799. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_16 (double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture);
  800. [DllImport (LIBNAME)]
  801. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_17 (double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins);
  802. // C++: cv::HOGDescriptor::HOGDescriptor(String filename)
  803. [DllImport (LIBNAME)]
  804. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_18 (string filename);
  805. // C++: cv::HOGDescriptor::HOGDescriptor()
  806. [DllImport (LIBNAME)]
  807. private static extern IntPtr objdetect_HOGDescriptor_HOGDescriptor_19 ();
  808. // C++: bool cv::HOGDescriptor::checkDetectorSize()
  809. [DllImport (LIBNAME)]
  810. private static extern bool objdetect_HOGDescriptor_checkDetectorSize_10 (IntPtr nativeObj);
  811. // C++: bool cv::HOGDescriptor::load(String filename, String objname = String())
  812. [DllImport (LIBNAME)]
  813. private static extern bool objdetect_HOGDescriptor_load_10 (IntPtr nativeObj, string filename, string objname);
  814. [DllImport (LIBNAME)]
  815. private static extern bool objdetect_HOGDescriptor_load_11 (IntPtr nativeObj, string filename);
  816. // C++: double cv::HOGDescriptor::getWinSigma()
  817. [DllImport (LIBNAME)]
  818. private static extern double objdetect_HOGDescriptor_getWinSigma_10 (IntPtr nativeObj);
  819. // C++: size_t cv::HOGDescriptor::getDescriptorSize()
  820. [DllImport (LIBNAME)]
  821. private static extern long objdetect_HOGDescriptor_getDescriptorSize_10 (IntPtr nativeObj);
  822. // C++: static vector_float cv::HOGDescriptor::getDaimlerPeopleDetector()
  823. [DllImport (LIBNAME)]
  824. private static extern IntPtr objdetect_HOGDescriptor_getDaimlerPeopleDetector_10 ();
  825. // C++: static vector_float cv::HOGDescriptor::getDefaultPeopleDetector()
  826. [DllImport (LIBNAME)]
  827. private static extern IntPtr objdetect_HOGDescriptor_getDefaultPeopleDetector_10 ();
  828. // C++: void cv::HOGDescriptor::compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
  829. [DllImport (LIBNAME)]
  830. private static extern void objdetect_HOGDescriptor_compute_10 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr descriptors_mat_nativeObj, double winStride_width, double winStride_height, double padding_width, double padding_height, IntPtr locations_mat_nativeObj);
  831. [DllImport (LIBNAME)]
  832. private static extern void objdetect_HOGDescriptor_compute_11 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr descriptors_mat_nativeObj, double winStride_width, double winStride_height, double padding_width, double padding_height);
  833. [DllImport (LIBNAME)]
  834. private static extern void objdetect_HOGDescriptor_compute_12 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr descriptors_mat_nativeObj, double winStride_width, double winStride_height);
  835. [DllImport (LIBNAME)]
  836. private static extern void objdetect_HOGDescriptor_compute_13 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr descriptors_mat_nativeObj);
  837. // C++: void cv::HOGDescriptor::computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
  838. [DllImport (LIBNAME)]
  839. private static extern void objdetect_HOGDescriptor_computeGradient_10 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr grad_nativeObj, IntPtr angleOfs_nativeObj, double paddingTL_width, double paddingTL_height, double paddingBR_width, double paddingBR_height);
  840. [DllImport (LIBNAME)]
  841. private static extern void objdetect_HOGDescriptor_computeGradient_11 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr grad_nativeObj, IntPtr angleOfs_nativeObj, double paddingTL_width, double paddingTL_height);
  842. [DllImport (LIBNAME)]
  843. private static extern void objdetect_HOGDescriptor_computeGradient_12 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr grad_nativeObj, IntPtr angleOfs_nativeObj);
  844. // C++: 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>())
  845. [DllImport (LIBNAME)]
  846. private static extern void objdetect_HOGDescriptor_detect_10 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr weights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, IntPtr searchLocations_mat_nativeObj);
  847. [DllImport (LIBNAME)]
  848. private static extern void objdetect_HOGDescriptor_detect_11 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr weights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height);
  849. [DllImport (LIBNAME)]
  850. private static extern void objdetect_HOGDescriptor_detect_12 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr weights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height);
  851. [DllImport (LIBNAME)]
  852. private static extern void objdetect_HOGDescriptor_detect_13 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr weights_mat_nativeObj, double hitThreshold);
  853. [DllImport (LIBNAME)]
  854. private static extern void objdetect_HOGDescriptor_detect_14 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr weights_mat_nativeObj);
  855. // C++: 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 finalThreshold = 2.0, bool useMeanshiftGrouping = false)
  856. [DllImport (LIBNAME)]
  857. private static extern void objdetect_HOGDescriptor_detectMultiScale_10 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, double scale, double finalThreshold, bool useMeanshiftGrouping);
  858. [DllImport (LIBNAME)]
  859. private static extern void objdetect_HOGDescriptor_detectMultiScale_11 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, double scale, double finalThreshold);
  860. [DllImport (LIBNAME)]
  861. private static extern void objdetect_HOGDescriptor_detectMultiScale_12 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, double scale);
  862. [DllImport (LIBNAME)]
  863. private static extern void objdetect_HOGDescriptor_detectMultiScale_13 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height);
  864. [DllImport (LIBNAME)]
  865. private static extern void objdetect_HOGDescriptor_detectMultiScale_14 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height);
  866. [DllImport (LIBNAME)]
  867. private static extern void objdetect_HOGDescriptor_detectMultiScale_15 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr foundWeights_mat_nativeObj, double hitThreshold);
  868. [DllImport (LIBNAME)]
  869. private static extern void objdetect_HOGDescriptor_detectMultiScale_16 (IntPtr nativeObj, IntPtr img_nativeObj, IntPtr foundLocations_mat_nativeObj, IntPtr foundWeights_mat_nativeObj);
  870. // C++: void cv::HOGDescriptor::save(String filename, String objname = String())
  871. [DllImport (LIBNAME)]
  872. private static extern void objdetect_HOGDescriptor_save_10 (IntPtr nativeObj, string filename, string objname);
  873. [DllImport (LIBNAME)]
  874. private static extern void objdetect_HOGDescriptor_save_11 (IntPtr nativeObj, string filename);
  875. // C++: void cv::HOGDescriptor::setSVMDetector(Mat svmdetector)
  876. [DllImport (LIBNAME)]
  877. private static extern void objdetect_HOGDescriptor_setSVMDetector_10 (IntPtr nativeObj, IntPtr svmdetector_nativeObj);
  878. // C++: Size HOGDescriptor::winSize
  879. [DllImport (LIBNAME)]
  880. private static extern void objdetect_HOGDescriptor_get_1winSize_10 (IntPtr nativeObj, double[] retVal);
  881. // C++: Size HOGDescriptor::blockSize
  882. [DllImport (LIBNAME)]
  883. private static extern void objdetect_HOGDescriptor_get_1blockSize_10 (IntPtr nativeObj, double[] retVal);
  884. // C++: Size HOGDescriptor::blockStride
  885. [DllImport (LIBNAME)]
  886. private static extern void objdetect_HOGDescriptor_get_1blockStride_10 (IntPtr nativeObj, double[] retVal);
  887. // C++: Size HOGDescriptor::cellSize
  888. [DllImport (LIBNAME)]
  889. private static extern void objdetect_HOGDescriptor_get_1cellSize_10 (IntPtr nativeObj, double[] retVal);
  890. // C++: int HOGDescriptor::nbins
  891. [DllImport (LIBNAME)]
  892. private static extern int objdetect_HOGDescriptor_get_1nbins_10 (IntPtr nativeObj);
  893. // C++: int HOGDescriptor::derivAperture
  894. [DllImport (LIBNAME)]
  895. private static extern int objdetect_HOGDescriptor_get_1derivAperture_10 (IntPtr nativeObj);
  896. // C++: double HOGDescriptor::winSigma
  897. [DllImport (LIBNAME)]
  898. private static extern double objdetect_HOGDescriptor_get_1winSigma_10 (IntPtr nativeObj);
  899. // C++: HOGDescriptor_HistogramNormType HOGDescriptor::histogramNormType
  900. [DllImport (LIBNAME)]
  901. private static extern int objdetect_HOGDescriptor_get_1histogramNormType_10 (IntPtr nativeObj);
  902. // C++: double HOGDescriptor::L2HysThreshold
  903. [DllImport (LIBNAME)]
  904. private static extern double objdetect_HOGDescriptor_get_1L2HysThreshold_10 (IntPtr nativeObj);
  905. // C++: bool HOGDescriptor::gammaCorrection
  906. [DllImport (LIBNAME)]
  907. private static extern bool objdetect_HOGDescriptor_get_1gammaCorrection_10 (IntPtr nativeObj);
  908. // C++: vector_float HOGDescriptor::svmDetector
  909. [DllImport (LIBNAME)]
  910. private static extern IntPtr objdetect_HOGDescriptor_get_1svmDetector_10 (IntPtr nativeObj);
  911. // C++: int HOGDescriptor::nlevels
  912. [DllImport (LIBNAME)]
  913. private static extern int objdetect_HOGDescriptor_get_1nlevels_10 (IntPtr nativeObj);
  914. // C++: bool HOGDescriptor::signedGradient
  915. [DllImport (LIBNAME)]
  916. private static extern bool objdetect_HOGDescriptor_get_1signedGradient_10 (IntPtr nativeObj);
  917. // native support for java finalize()
  918. [DllImport (LIBNAME)]
  919. private static extern void objdetect_HOGDescriptor_delete (IntPtr nativeObj);
  920. }
  921. }