HOGDescriptor.cs 47 KB

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