GeneralizedHoughGuil.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Runtime.InteropServices;
  6. namespace OpenCVForUnity.ImgprocModule
  7. {
  8. // C++: class GeneralizedHoughGuil
  9. /**
  10. * finds arbitrary template in the grayscale image using Generalized Hough Transform
  11. *
  12. * Detects position, translation and rotation CITE: Guil1999 .
  13. */
  14. public class GeneralizedHoughGuil : GeneralizedHough
  15. {
  16. protected override void Dispose(bool disposing)
  17. {
  18. try
  19. {
  20. if (disposing)
  21. {
  22. }
  23. if (IsEnabledDispose)
  24. {
  25. if (nativeObj != IntPtr.Zero)
  26. imgproc_GeneralizedHoughGuil_delete(nativeObj);
  27. nativeObj = IntPtr.Zero;
  28. }
  29. }
  30. finally
  31. {
  32. base.Dispose(disposing);
  33. }
  34. }
  35. protected internal GeneralizedHoughGuil(IntPtr addr) : base(addr) { }
  36. // internal usage only
  37. public static new GeneralizedHoughGuil __fromPtr__(IntPtr addr) { return new GeneralizedHoughGuil(addr); }
  38. //
  39. // C++: void cv::GeneralizedHoughGuil::setXi(double xi)
  40. //
  41. public void setXi(double xi)
  42. {
  43. ThrowIfDisposed();
  44. imgproc_GeneralizedHoughGuil_setXi_10(nativeObj, xi);
  45. }
  46. //
  47. // C++: double cv::GeneralizedHoughGuil::getXi()
  48. //
  49. public double getXi()
  50. {
  51. ThrowIfDisposed();
  52. return imgproc_GeneralizedHoughGuil_getXi_10(nativeObj);
  53. }
  54. //
  55. // C++: void cv::GeneralizedHoughGuil::setLevels(int levels)
  56. //
  57. public void setLevels(int levels)
  58. {
  59. ThrowIfDisposed();
  60. imgproc_GeneralizedHoughGuil_setLevels_10(nativeObj, levels);
  61. }
  62. //
  63. // C++: int cv::GeneralizedHoughGuil::getLevels()
  64. //
  65. public int getLevels()
  66. {
  67. ThrowIfDisposed();
  68. return imgproc_GeneralizedHoughGuil_getLevels_10(nativeObj);
  69. }
  70. //
  71. // C++: void cv::GeneralizedHoughGuil::setAngleEpsilon(double angleEpsilon)
  72. //
  73. public void setAngleEpsilon(double angleEpsilon)
  74. {
  75. ThrowIfDisposed();
  76. imgproc_GeneralizedHoughGuil_setAngleEpsilon_10(nativeObj, angleEpsilon);
  77. }
  78. //
  79. // C++: double cv::GeneralizedHoughGuil::getAngleEpsilon()
  80. //
  81. public double getAngleEpsilon()
  82. {
  83. ThrowIfDisposed();
  84. return imgproc_GeneralizedHoughGuil_getAngleEpsilon_10(nativeObj);
  85. }
  86. //
  87. // C++: void cv::GeneralizedHoughGuil::setMinAngle(double minAngle)
  88. //
  89. public void setMinAngle(double minAngle)
  90. {
  91. ThrowIfDisposed();
  92. imgproc_GeneralizedHoughGuil_setMinAngle_10(nativeObj, minAngle);
  93. }
  94. //
  95. // C++: double cv::GeneralizedHoughGuil::getMinAngle()
  96. //
  97. public double getMinAngle()
  98. {
  99. ThrowIfDisposed();
  100. return imgproc_GeneralizedHoughGuil_getMinAngle_10(nativeObj);
  101. }
  102. //
  103. // C++: void cv::GeneralizedHoughGuil::setMaxAngle(double maxAngle)
  104. //
  105. public void setMaxAngle(double maxAngle)
  106. {
  107. ThrowIfDisposed();
  108. imgproc_GeneralizedHoughGuil_setMaxAngle_10(nativeObj, maxAngle);
  109. }
  110. //
  111. // C++: double cv::GeneralizedHoughGuil::getMaxAngle()
  112. //
  113. public double getMaxAngle()
  114. {
  115. ThrowIfDisposed();
  116. return imgproc_GeneralizedHoughGuil_getMaxAngle_10(nativeObj);
  117. }
  118. //
  119. // C++: void cv::GeneralizedHoughGuil::setAngleStep(double angleStep)
  120. //
  121. public void setAngleStep(double angleStep)
  122. {
  123. ThrowIfDisposed();
  124. imgproc_GeneralizedHoughGuil_setAngleStep_10(nativeObj, angleStep);
  125. }
  126. //
  127. // C++: double cv::GeneralizedHoughGuil::getAngleStep()
  128. //
  129. public double getAngleStep()
  130. {
  131. ThrowIfDisposed();
  132. return imgproc_GeneralizedHoughGuil_getAngleStep_10(nativeObj);
  133. }
  134. //
  135. // C++: void cv::GeneralizedHoughGuil::setAngleThresh(int angleThresh)
  136. //
  137. public void setAngleThresh(int angleThresh)
  138. {
  139. ThrowIfDisposed();
  140. imgproc_GeneralizedHoughGuil_setAngleThresh_10(nativeObj, angleThresh);
  141. }
  142. //
  143. // C++: int cv::GeneralizedHoughGuil::getAngleThresh()
  144. //
  145. public int getAngleThresh()
  146. {
  147. ThrowIfDisposed();
  148. return imgproc_GeneralizedHoughGuil_getAngleThresh_10(nativeObj);
  149. }
  150. //
  151. // C++: void cv::GeneralizedHoughGuil::setMinScale(double minScale)
  152. //
  153. public void setMinScale(double minScale)
  154. {
  155. ThrowIfDisposed();
  156. imgproc_GeneralizedHoughGuil_setMinScale_10(nativeObj, minScale);
  157. }
  158. //
  159. // C++: double cv::GeneralizedHoughGuil::getMinScale()
  160. //
  161. public double getMinScale()
  162. {
  163. ThrowIfDisposed();
  164. return imgproc_GeneralizedHoughGuil_getMinScale_10(nativeObj);
  165. }
  166. //
  167. // C++: void cv::GeneralizedHoughGuil::setMaxScale(double maxScale)
  168. //
  169. public void setMaxScale(double maxScale)
  170. {
  171. ThrowIfDisposed();
  172. imgproc_GeneralizedHoughGuil_setMaxScale_10(nativeObj, maxScale);
  173. }
  174. //
  175. // C++: double cv::GeneralizedHoughGuil::getMaxScale()
  176. //
  177. public double getMaxScale()
  178. {
  179. ThrowIfDisposed();
  180. return imgproc_GeneralizedHoughGuil_getMaxScale_10(nativeObj);
  181. }
  182. //
  183. // C++: void cv::GeneralizedHoughGuil::setScaleStep(double scaleStep)
  184. //
  185. public void setScaleStep(double scaleStep)
  186. {
  187. ThrowIfDisposed();
  188. imgproc_GeneralizedHoughGuil_setScaleStep_10(nativeObj, scaleStep);
  189. }
  190. //
  191. // C++: double cv::GeneralizedHoughGuil::getScaleStep()
  192. //
  193. public double getScaleStep()
  194. {
  195. ThrowIfDisposed();
  196. return imgproc_GeneralizedHoughGuil_getScaleStep_10(nativeObj);
  197. }
  198. //
  199. // C++: void cv::GeneralizedHoughGuil::setScaleThresh(int scaleThresh)
  200. //
  201. public void setScaleThresh(int scaleThresh)
  202. {
  203. ThrowIfDisposed();
  204. imgproc_GeneralizedHoughGuil_setScaleThresh_10(nativeObj, scaleThresh);
  205. }
  206. //
  207. // C++: int cv::GeneralizedHoughGuil::getScaleThresh()
  208. //
  209. public int getScaleThresh()
  210. {
  211. ThrowIfDisposed();
  212. return imgproc_GeneralizedHoughGuil_getScaleThresh_10(nativeObj);
  213. }
  214. //
  215. // C++: void cv::GeneralizedHoughGuil::setPosThresh(int posThresh)
  216. //
  217. public void setPosThresh(int posThresh)
  218. {
  219. ThrowIfDisposed();
  220. imgproc_GeneralizedHoughGuil_setPosThresh_10(nativeObj, posThresh);
  221. }
  222. //
  223. // C++: int cv::GeneralizedHoughGuil::getPosThresh()
  224. //
  225. public int getPosThresh()
  226. {
  227. ThrowIfDisposed();
  228. return imgproc_GeneralizedHoughGuil_getPosThresh_10(nativeObj);
  229. }
  230. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  231. const string LIBNAME = "__Internal";
  232. #else
  233. const string LIBNAME = "opencvforunity";
  234. #endif
  235. // C++: void cv::GeneralizedHoughGuil::setXi(double xi)
  236. [DllImport(LIBNAME)]
  237. private static extern void imgproc_GeneralizedHoughGuil_setXi_10(IntPtr nativeObj, double xi);
  238. // C++: double cv::GeneralizedHoughGuil::getXi()
  239. [DllImport(LIBNAME)]
  240. private static extern double imgproc_GeneralizedHoughGuil_getXi_10(IntPtr nativeObj);
  241. // C++: void cv::GeneralizedHoughGuil::setLevels(int levels)
  242. [DllImport(LIBNAME)]
  243. private static extern void imgproc_GeneralizedHoughGuil_setLevels_10(IntPtr nativeObj, int levels);
  244. // C++: int cv::GeneralizedHoughGuil::getLevels()
  245. [DllImport(LIBNAME)]
  246. private static extern int imgproc_GeneralizedHoughGuil_getLevels_10(IntPtr nativeObj);
  247. // C++: void cv::GeneralizedHoughGuil::setAngleEpsilon(double angleEpsilon)
  248. [DllImport(LIBNAME)]
  249. private static extern void imgproc_GeneralizedHoughGuil_setAngleEpsilon_10(IntPtr nativeObj, double angleEpsilon);
  250. // C++: double cv::GeneralizedHoughGuil::getAngleEpsilon()
  251. [DllImport(LIBNAME)]
  252. private static extern double imgproc_GeneralizedHoughGuil_getAngleEpsilon_10(IntPtr nativeObj);
  253. // C++: void cv::GeneralizedHoughGuil::setMinAngle(double minAngle)
  254. [DllImport(LIBNAME)]
  255. private static extern void imgproc_GeneralizedHoughGuil_setMinAngle_10(IntPtr nativeObj, double minAngle);
  256. // C++: double cv::GeneralizedHoughGuil::getMinAngle()
  257. [DllImport(LIBNAME)]
  258. private static extern double imgproc_GeneralizedHoughGuil_getMinAngle_10(IntPtr nativeObj);
  259. // C++: void cv::GeneralizedHoughGuil::setMaxAngle(double maxAngle)
  260. [DllImport(LIBNAME)]
  261. private static extern void imgproc_GeneralizedHoughGuil_setMaxAngle_10(IntPtr nativeObj, double maxAngle);
  262. // C++: double cv::GeneralizedHoughGuil::getMaxAngle()
  263. [DllImport(LIBNAME)]
  264. private static extern double imgproc_GeneralizedHoughGuil_getMaxAngle_10(IntPtr nativeObj);
  265. // C++: void cv::GeneralizedHoughGuil::setAngleStep(double angleStep)
  266. [DllImport(LIBNAME)]
  267. private static extern void imgproc_GeneralizedHoughGuil_setAngleStep_10(IntPtr nativeObj, double angleStep);
  268. // C++: double cv::GeneralizedHoughGuil::getAngleStep()
  269. [DllImport(LIBNAME)]
  270. private static extern double imgproc_GeneralizedHoughGuil_getAngleStep_10(IntPtr nativeObj);
  271. // C++: void cv::GeneralizedHoughGuil::setAngleThresh(int angleThresh)
  272. [DllImport(LIBNAME)]
  273. private static extern void imgproc_GeneralizedHoughGuil_setAngleThresh_10(IntPtr nativeObj, int angleThresh);
  274. // C++: int cv::GeneralizedHoughGuil::getAngleThresh()
  275. [DllImport(LIBNAME)]
  276. private static extern int imgproc_GeneralizedHoughGuil_getAngleThresh_10(IntPtr nativeObj);
  277. // C++: void cv::GeneralizedHoughGuil::setMinScale(double minScale)
  278. [DllImport(LIBNAME)]
  279. private static extern void imgproc_GeneralizedHoughGuil_setMinScale_10(IntPtr nativeObj, double minScale);
  280. // C++: double cv::GeneralizedHoughGuil::getMinScale()
  281. [DllImport(LIBNAME)]
  282. private static extern double imgproc_GeneralizedHoughGuil_getMinScale_10(IntPtr nativeObj);
  283. // C++: void cv::GeneralizedHoughGuil::setMaxScale(double maxScale)
  284. [DllImport(LIBNAME)]
  285. private static extern void imgproc_GeneralizedHoughGuil_setMaxScale_10(IntPtr nativeObj, double maxScale);
  286. // C++: double cv::GeneralizedHoughGuil::getMaxScale()
  287. [DllImport(LIBNAME)]
  288. private static extern double imgproc_GeneralizedHoughGuil_getMaxScale_10(IntPtr nativeObj);
  289. // C++: void cv::GeneralizedHoughGuil::setScaleStep(double scaleStep)
  290. [DllImport(LIBNAME)]
  291. private static extern void imgproc_GeneralizedHoughGuil_setScaleStep_10(IntPtr nativeObj, double scaleStep);
  292. // C++: double cv::GeneralizedHoughGuil::getScaleStep()
  293. [DllImport(LIBNAME)]
  294. private static extern double imgproc_GeneralizedHoughGuil_getScaleStep_10(IntPtr nativeObj);
  295. // C++: void cv::GeneralizedHoughGuil::setScaleThresh(int scaleThresh)
  296. [DllImport(LIBNAME)]
  297. private static extern void imgproc_GeneralizedHoughGuil_setScaleThresh_10(IntPtr nativeObj, int scaleThresh);
  298. // C++: int cv::GeneralizedHoughGuil::getScaleThresh()
  299. [DllImport(LIBNAME)]
  300. private static extern int imgproc_GeneralizedHoughGuil_getScaleThresh_10(IntPtr nativeObj);
  301. // C++: void cv::GeneralizedHoughGuil::setPosThresh(int posThresh)
  302. [DllImport(LIBNAME)]
  303. private static extern void imgproc_GeneralizedHoughGuil_setPosThresh_10(IntPtr nativeObj, int posThresh);
  304. // C++: int cv::GeneralizedHoughGuil::getPosThresh()
  305. [DllImport(LIBNAME)]
  306. private static extern int imgproc_GeneralizedHoughGuil_getPosThresh_10(IntPtr nativeObj);
  307. // native support for java finalize()
  308. [DllImport(LIBNAME)]
  309. private static extern void imgproc_GeneralizedHoughGuil_delete(IntPtr nativeObj);
  310. }
  311. }