UsacParams.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Runtime.InteropServices;
  6. namespace OpenCVForUnity.Calib3dModule
  7. {
  8. // C++: class UsacParams
  9. public class UsacParams : DisposableOpenCVObject
  10. {
  11. protected override void Dispose(bool disposing)
  12. {
  13. try
  14. {
  15. if (disposing)
  16. {
  17. }
  18. if (IsEnabledDispose)
  19. {
  20. if (nativeObj != IntPtr.Zero)
  21. calib3d_UsacParams_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. }
  25. finally
  26. {
  27. base.Dispose(disposing);
  28. }
  29. }
  30. protected internal UsacParams(IntPtr addr) : base(addr) { }
  31. public IntPtr getNativeObjAddr() { return nativeObj; }
  32. // internal usage only
  33. public static UsacParams __fromPtr__(IntPtr addr) { return new UsacParams(addr); }
  34. //
  35. // C++: cv::UsacParams::UsacParams()
  36. //
  37. public UsacParams()
  38. {
  39. nativeObj = DisposableObject.ThrowIfNullIntPtr(calib3d_UsacParams_UsacParams_10());
  40. }
  41. //
  42. // C++: double UsacParams::confidence
  43. //
  44. public double get_confidence()
  45. {
  46. ThrowIfDisposed();
  47. return calib3d_UsacParams_get_1confidence_10(nativeObj);
  48. }
  49. //
  50. // C++: void UsacParams::confidence
  51. //
  52. public void set_confidence(double confidence)
  53. {
  54. ThrowIfDisposed();
  55. calib3d_UsacParams_set_1confidence_10(nativeObj, confidence);
  56. }
  57. //
  58. // C++: bool UsacParams::isParallel
  59. //
  60. public bool get_isParallel()
  61. {
  62. ThrowIfDisposed();
  63. return calib3d_UsacParams_get_1isParallel_10(nativeObj);
  64. }
  65. //
  66. // C++: void UsacParams::isParallel
  67. //
  68. public void set_isParallel(bool isParallel)
  69. {
  70. ThrowIfDisposed();
  71. calib3d_UsacParams_set_1isParallel_10(nativeObj, isParallel);
  72. }
  73. //
  74. // C++: int UsacParams::loIterations
  75. //
  76. public int get_loIterations()
  77. {
  78. ThrowIfDisposed();
  79. return calib3d_UsacParams_get_1loIterations_10(nativeObj);
  80. }
  81. //
  82. // C++: void UsacParams::loIterations
  83. //
  84. public void set_loIterations(int loIterations)
  85. {
  86. ThrowIfDisposed();
  87. calib3d_UsacParams_set_1loIterations_10(nativeObj, loIterations);
  88. }
  89. //
  90. // C++: LocalOptimMethod UsacParams::loMethod
  91. //
  92. public int get_loMethod()
  93. {
  94. ThrowIfDisposed();
  95. return calib3d_UsacParams_get_1loMethod_10(nativeObj);
  96. }
  97. //
  98. // C++: void UsacParams::loMethod
  99. //
  100. public void set_loMethod(int loMethod)
  101. {
  102. ThrowIfDisposed();
  103. calib3d_UsacParams_set_1loMethod_10(nativeObj, loMethod);
  104. }
  105. //
  106. // C++: int UsacParams::loSampleSize
  107. //
  108. public int get_loSampleSize()
  109. {
  110. ThrowIfDisposed();
  111. return calib3d_UsacParams_get_1loSampleSize_10(nativeObj);
  112. }
  113. //
  114. // C++: void UsacParams::loSampleSize
  115. //
  116. public void set_loSampleSize(int loSampleSize)
  117. {
  118. ThrowIfDisposed();
  119. calib3d_UsacParams_set_1loSampleSize_10(nativeObj, loSampleSize);
  120. }
  121. //
  122. // C++: int UsacParams::maxIterations
  123. //
  124. public int get_maxIterations()
  125. {
  126. ThrowIfDisposed();
  127. return calib3d_UsacParams_get_1maxIterations_10(nativeObj);
  128. }
  129. //
  130. // C++: void UsacParams::maxIterations
  131. //
  132. public void set_maxIterations(int maxIterations)
  133. {
  134. ThrowIfDisposed();
  135. calib3d_UsacParams_set_1maxIterations_10(nativeObj, maxIterations);
  136. }
  137. //
  138. // C++: NeighborSearchMethod UsacParams::neighborsSearch
  139. //
  140. public int get_neighborsSearch()
  141. {
  142. ThrowIfDisposed();
  143. return calib3d_UsacParams_get_1neighborsSearch_10(nativeObj);
  144. }
  145. //
  146. // C++: void UsacParams::neighborsSearch
  147. //
  148. public void set_neighborsSearch(int neighborsSearch)
  149. {
  150. ThrowIfDisposed();
  151. calib3d_UsacParams_set_1neighborsSearch_10(nativeObj, neighborsSearch);
  152. }
  153. //
  154. // C++: int UsacParams::randomGeneratorState
  155. //
  156. public int get_randomGeneratorState()
  157. {
  158. ThrowIfDisposed();
  159. return calib3d_UsacParams_get_1randomGeneratorState_10(nativeObj);
  160. }
  161. //
  162. // C++: void UsacParams::randomGeneratorState
  163. //
  164. public void set_randomGeneratorState(int randomGeneratorState)
  165. {
  166. ThrowIfDisposed();
  167. calib3d_UsacParams_set_1randomGeneratorState_10(nativeObj, randomGeneratorState);
  168. }
  169. //
  170. // C++: SamplingMethod UsacParams::sampler
  171. //
  172. public int get_sampler()
  173. {
  174. ThrowIfDisposed();
  175. return calib3d_UsacParams_get_1sampler_10(nativeObj);
  176. }
  177. //
  178. // C++: void UsacParams::sampler
  179. //
  180. public void set_sampler(int sampler)
  181. {
  182. ThrowIfDisposed();
  183. calib3d_UsacParams_set_1sampler_10(nativeObj, sampler);
  184. }
  185. //
  186. // C++: ScoreMethod UsacParams::score
  187. //
  188. public int get_score()
  189. {
  190. ThrowIfDisposed();
  191. return calib3d_UsacParams_get_1score_10(nativeObj);
  192. }
  193. //
  194. // C++: void UsacParams::score
  195. //
  196. public void set_score(int score)
  197. {
  198. ThrowIfDisposed();
  199. calib3d_UsacParams_set_1score_10(nativeObj, score);
  200. }
  201. //
  202. // C++: double UsacParams::threshold
  203. //
  204. public double get_threshold()
  205. {
  206. ThrowIfDisposed();
  207. return calib3d_UsacParams_get_1threshold_10(nativeObj);
  208. }
  209. //
  210. // C++: void UsacParams::threshold
  211. //
  212. public void set_threshold(double threshold)
  213. {
  214. ThrowIfDisposed();
  215. calib3d_UsacParams_set_1threshold_10(nativeObj, threshold);
  216. }
  217. //
  218. // C++: PolishingMethod UsacParams::final_polisher
  219. //
  220. public int get_final_polisher()
  221. {
  222. ThrowIfDisposed();
  223. return calib3d_UsacParams_get_1final_1polisher_10(nativeObj);
  224. }
  225. //
  226. // C++: void UsacParams::final_polisher
  227. //
  228. public void set_final_polisher(int final_polisher)
  229. {
  230. ThrowIfDisposed();
  231. calib3d_UsacParams_set_1final_1polisher_10(nativeObj, final_polisher);
  232. }
  233. //
  234. // C++: int UsacParams::final_polisher_iterations
  235. //
  236. public int get_final_polisher_iterations()
  237. {
  238. ThrowIfDisposed();
  239. return calib3d_UsacParams_get_1final_1polisher_1iterations_10(nativeObj);
  240. }
  241. //
  242. // C++: void UsacParams::final_polisher_iterations
  243. //
  244. public void set_final_polisher_iterations(int final_polisher_iterations)
  245. {
  246. ThrowIfDisposed();
  247. calib3d_UsacParams_set_1final_1polisher_1iterations_10(nativeObj, final_polisher_iterations);
  248. }
  249. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  250. const string LIBNAME = "__Internal";
  251. #else
  252. const string LIBNAME = "opencvforunity";
  253. #endif
  254. // C++: cv::UsacParams::UsacParams()
  255. [DllImport(LIBNAME)]
  256. private static extern IntPtr calib3d_UsacParams_UsacParams_10();
  257. // C++: double UsacParams::confidence
  258. [DllImport(LIBNAME)]
  259. private static extern double calib3d_UsacParams_get_1confidence_10(IntPtr nativeObj);
  260. // C++: void UsacParams::confidence
  261. [DllImport(LIBNAME)]
  262. private static extern void calib3d_UsacParams_set_1confidence_10(IntPtr nativeObj, double confidence);
  263. // C++: bool UsacParams::isParallel
  264. [DllImport(LIBNAME)]
  265. [return: MarshalAs(UnmanagedType.U1)]
  266. private static extern bool calib3d_UsacParams_get_1isParallel_10(IntPtr nativeObj);
  267. // C++: void UsacParams::isParallel
  268. [DllImport(LIBNAME)]
  269. private static extern void calib3d_UsacParams_set_1isParallel_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool isParallel);
  270. // C++: int UsacParams::loIterations
  271. [DllImport(LIBNAME)]
  272. private static extern int calib3d_UsacParams_get_1loIterations_10(IntPtr nativeObj);
  273. // C++: void UsacParams::loIterations
  274. [DllImport(LIBNAME)]
  275. private static extern void calib3d_UsacParams_set_1loIterations_10(IntPtr nativeObj, int loIterations);
  276. // C++: LocalOptimMethod UsacParams::loMethod
  277. [DllImport(LIBNAME)]
  278. private static extern int calib3d_UsacParams_get_1loMethod_10(IntPtr nativeObj);
  279. // C++: void UsacParams::loMethod
  280. [DllImport(LIBNAME)]
  281. private static extern void calib3d_UsacParams_set_1loMethod_10(IntPtr nativeObj, int loMethod);
  282. // C++: int UsacParams::loSampleSize
  283. [DllImport(LIBNAME)]
  284. private static extern int calib3d_UsacParams_get_1loSampleSize_10(IntPtr nativeObj);
  285. // C++: void UsacParams::loSampleSize
  286. [DllImport(LIBNAME)]
  287. private static extern void calib3d_UsacParams_set_1loSampleSize_10(IntPtr nativeObj, int loSampleSize);
  288. // C++: int UsacParams::maxIterations
  289. [DllImport(LIBNAME)]
  290. private static extern int calib3d_UsacParams_get_1maxIterations_10(IntPtr nativeObj);
  291. // C++: void UsacParams::maxIterations
  292. [DllImport(LIBNAME)]
  293. private static extern void calib3d_UsacParams_set_1maxIterations_10(IntPtr nativeObj, int maxIterations);
  294. // C++: NeighborSearchMethod UsacParams::neighborsSearch
  295. [DllImport(LIBNAME)]
  296. private static extern int calib3d_UsacParams_get_1neighborsSearch_10(IntPtr nativeObj);
  297. // C++: void UsacParams::neighborsSearch
  298. [DllImport(LIBNAME)]
  299. private static extern void calib3d_UsacParams_set_1neighborsSearch_10(IntPtr nativeObj, int neighborsSearch);
  300. // C++: int UsacParams::randomGeneratorState
  301. [DllImport(LIBNAME)]
  302. private static extern int calib3d_UsacParams_get_1randomGeneratorState_10(IntPtr nativeObj);
  303. // C++: void UsacParams::randomGeneratorState
  304. [DllImport(LIBNAME)]
  305. private static extern void calib3d_UsacParams_set_1randomGeneratorState_10(IntPtr nativeObj, int randomGeneratorState);
  306. // C++: SamplingMethod UsacParams::sampler
  307. [DllImport(LIBNAME)]
  308. private static extern int calib3d_UsacParams_get_1sampler_10(IntPtr nativeObj);
  309. // C++: void UsacParams::sampler
  310. [DllImport(LIBNAME)]
  311. private static extern void calib3d_UsacParams_set_1sampler_10(IntPtr nativeObj, int sampler);
  312. // C++: ScoreMethod UsacParams::score
  313. [DllImport(LIBNAME)]
  314. private static extern int calib3d_UsacParams_get_1score_10(IntPtr nativeObj);
  315. // C++: void UsacParams::score
  316. [DllImport(LIBNAME)]
  317. private static extern void calib3d_UsacParams_set_1score_10(IntPtr nativeObj, int score);
  318. // C++: double UsacParams::threshold
  319. [DllImport(LIBNAME)]
  320. private static extern double calib3d_UsacParams_get_1threshold_10(IntPtr nativeObj);
  321. // C++: void UsacParams::threshold
  322. [DllImport(LIBNAME)]
  323. private static extern void calib3d_UsacParams_set_1threshold_10(IntPtr nativeObj, double threshold);
  324. // C++: PolishingMethod UsacParams::final_polisher
  325. [DllImport(LIBNAME)]
  326. private static extern int calib3d_UsacParams_get_1final_1polisher_10(IntPtr nativeObj);
  327. // C++: void UsacParams::final_polisher
  328. [DllImport(LIBNAME)]
  329. private static extern void calib3d_UsacParams_set_1final_1polisher_10(IntPtr nativeObj, int final_polisher);
  330. // C++: int UsacParams::final_polisher_iterations
  331. [DllImport(LIBNAME)]
  332. private static extern int calib3d_UsacParams_get_1final_1polisher_1iterations_10(IntPtr nativeObj);
  333. // C++: void UsacParams::final_polisher_iterations
  334. [DllImport(LIBNAME)]
  335. private static extern void calib3d_UsacParams_set_1final_1polisher_1iterations_10(IntPtr nativeObj, int final_polisher_iterations);
  336. // native support for java finalize()
  337. [DllImport(LIBNAME)]
  338. private static extern void calib3d_UsacParams_delete(IntPtr nativeObj);
  339. }
  340. }