MapperPyramid.cs 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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.RegModule
  8. {
  9. // C++: class MapperPyramid
  10. //javadoc: MapperPyramid
  11. public class MapperPyramid : Mapper
  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. reg_MapperPyramid_delete (nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal MapperPyramid (IntPtr addr)
  32. : base (addr)
  33. {
  34. }
  35. // internal usage only
  36. public static new MapperPyramid __fromPtr__ (IntPtr addr)
  37. {
  38. return new MapperPyramid (addr);
  39. }
  40. //
  41. // C++: cv::reg::MapperPyramid::MapperPyramid(Ptr_Mapper baseMapper)
  42. //
  43. //javadoc: MapperPyramid::MapperPyramid(baseMapper)
  44. public MapperPyramid (Mapper baseMapper) :
  45. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  46. base (reg_MapperPyramid_MapperPyramid_10 (baseMapper.getNativeObjAddr ()))
  47. #else
  48. base (IntPtr.Zero)
  49. #endif
  50. {
  51. return;
  52. }
  53. //
  54. // C++: Ptr_Map cv::reg::MapperPyramid::calculate(Mat img1, Mat img2, Ptr_Map init = cv::Ptr<Map>())
  55. //
  56. //javadoc: MapperPyramid::calculate(img1, img2, init)
  57. public override Map calculate (Mat img1, Mat img2, Map init)
  58. {
  59. ThrowIfDisposed ();
  60. if (img1 != null)
  61. img1.ThrowIfDisposed ();
  62. if (img2 != null)
  63. img2.ThrowIfDisposed ();
  64. if (init != null)
  65. init.ThrowIfDisposed ();
  66. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  67. Map retVal = Map.__fromPtr__ (reg_MapperPyramid_calculate_10 (nativeObj, img1.nativeObj, img2.nativeObj, init.getNativeObjAddr ()));
  68. return retVal;
  69. #else
  70. return null;
  71. #endif
  72. }
  73. //javadoc: MapperPyramid::calculate(img1, img2)
  74. public override Map calculate (Mat img1, Mat img2)
  75. {
  76. ThrowIfDisposed ();
  77. if (img1 != null)
  78. img1.ThrowIfDisposed ();
  79. if (img2 != null)
  80. img2.ThrowIfDisposed ();
  81. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  82. Map retVal = Map.__fromPtr__ (reg_MapperPyramid_calculate_11 (nativeObj, img1.nativeObj, img2.nativeObj));
  83. return retVal;
  84. #else
  85. return null;
  86. #endif
  87. }
  88. //
  89. // C++: Ptr_Map cv::reg::MapperPyramid::getMap()
  90. //
  91. //javadoc: MapperPyramid::getMap()
  92. public override Map getMap ()
  93. {
  94. ThrowIfDisposed ();
  95. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  96. Map retVal = Map.__fromPtr__ (reg_MapperPyramid_getMap_10 (nativeObj));
  97. return retVal;
  98. #else
  99. return null;
  100. #endif
  101. }
  102. //
  103. // C++: int MapperPyramid::numLev_
  104. //
  105. //javadoc: MapperPyramid::get_numLev_()
  106. public int get_numLev_ ()
  107. {
  108. ThrowIfDisposed ();
  109. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  110. int retVal = reg_MapperPyramid_get_1numLev_1_10 (nativeObj);
  111. return retVal;
  112. #else
  113. return -1;
  114. #endif
  115. }
  116. //
  117. // C++: void MapperPyramid::numLev_
  118. //
  119. //javadoc: MapperPyramid::set_numLev_(numLev_)
  120. public void set_numLev_ (int numLev_)
  121. {
  122. ThrowIfDisposed ();
  123. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  124. reg_MapperPyramid_set_1numLev_1_10 (nativeObj, numLev_);
  125. return;
  126. #else
  127. return;
  128. #endif
  129. }
  130. //
  131. // C++: int MapperPyramid::numIterPerScale_
  132. //
  133. //javadoc: MapperPyramid::get_numIterPerScale_()
  134. public int get_numIterPerScale_ ()
  135. {
  136. ThrowIfDisposed ();
  137. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  138. int retVal = reg_MapperPyramid_get_1numIterPerScale_1_10 (nativeObj);
  139. return retVal;
  140. #else
  141. return -1;
  142. #endif
  143. }
  144. //
  145. // C++: void MapperPyramid::numIterPerScale_
  146. //
  147. //javadoc: MapperPyramid::set_numIterPerScale_(numIterPerScale_)
  148. public void set_numIterPerScale_ (int numIterPerScale_)
  149. {
  150. ThrowIfDisposed ();
  151. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  152. reg_MapperPyramid_set_1numIterPerScale_1_10 (nativeObj, numIterPerScale_);
  153. return;
  154. #else
  155. return;
  156. #endif
  157. }
  158. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  159. const string LIBNAME = "__Internal";
  160. #else
  161. const string LIBNAME = "opencvforunity";
  162. #endif
  163. // C++: cv::reg::MapperPyramid::MapperPyramid(Ptr_Mapper baseMapper)
  164. [DllImport (LIBNAME)]
  165. private static extern IntPtr reg_MapperPyramid_MapperPyramid_10 (IntPtr baseMapper_nativeObj);
  166. // C++: Ptr_Map cv::reg::MapperPyramid::calculate(Mat img1, Mat img2, Ptr_Map init = cv::Ptr<Map>())
  167. [DllImport (LIBNAME)]
  168. private static extern IntPtr reg_MapperPyramid_calculate_10 (IntPtr nativeObj, IntPtr img1_nativeObj, IntPtr img2_nativeObj, IntPtr init_nativeObj);
  169. [DllImport (LIBNAME)]
  170. private static extern IntPtr reg_MapperPyramid_calculate_11 (IntPtr nativeObj, IntPtr img1_nativeObj, IntPtr img2_nativeObj);
  171. // C++: Ptr_Map cv::reg::MapperPyramid::getMap()
  172. [DllImport (LIBNAME)]
  173. private static extern IntPtr reg_MapperPyramid_getMap_10 (IntPtr nativeObj);
  174. // C++: int MapperPyramid::numLev_
  175. [DllImport (LIBNAME)]
  176. private static extern int reg_MapperPyramid_get_1numLev_1_10 (IntPtr nativeObj);
  177. // C++: void MapperPyramid::numLev_
  178. [DllImport (LIBNAME)]
  179. private static extern void reg_MapperPyramid_set_1numLev_1_10 (IntPtr nativeObj, int numLev_);
  180. // C++: int MapperPyramid::numIterPerScale_
  181. [DllImport (LIBNAME)]
  182. private static extern int reg_MapperPyramid_get_1numIterPerScale_1_10 (IntPtr nativeObj);
  183. // C++: void MapperPyramid::numIterPerScale_
  184. [DllImport (LIBNAME)]
  185. private static extern void reg_MapperPyramid_set_1numIterPerScale_1_10 (IntPtr nativeObj, int numIterPerScale_);
  186. // native support for java finalize()
  187. [DllImport (LIBNAME)]
  188. private static extern void reg_MapperPyramid_delete (IntPtr nativeObj);
  189. }
  190. }