EdgeAwareInterpolator.cs 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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.XimgprocModule
  8. {
  9. // C++: class EdgeAwareInterpolator
  10. //javadoc: EdgeAwareInterpolator
  11. public class EdgeAwareInterpolator : SparseMatchInterpolator
  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. ximgproc_EdgeAwareInterpolator_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal EdgeAwareInterpolator (IntPtr addr) : base (addr) { }
  32. // internal usage only
  33. public static new EdgeAwareInterpolator __fromPtr__ (IntPtr addr) { return new EdgeAwareInterpolator (addr); }
  34. //
  35. // C++: bool cv::ximgproc::EdgeAwareInterpolator::getUsePostProcessing()
  36. //
  37. //javadoc: EdgeAwareInterpolator::getUsePostProcessing()
  38. public bool getUsePostProcessing ()
  39. {
  40. ThrowIfDisposed ();
  41. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  42. bool retVal = ximgproc_EdgeAwareInterpolator_getUsePostProcessing_10(nativeObj);
  43. return retVal;
  44. #else
  45. return false;
  46. #endif
  47. }
  48. //
  49. // C++: float cv::ximgproc::EdgeAwareInterpolator::getFGSLambda()
  50. //
  51. //javadoc: EdgeAwareInterpolator::getFGSLambda()
  52. public float getFGSLambda ()
  53. {
  54. ThrowIfDisposed ();
  55. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  56. float retVal = ximgproc_EdgeAwareInterpolator_getFGSLambda_10(nativeObj);
  57. return retVal;
  58. #else
  59. return -1;
  60. #endif
  61. }
  62. //
  63. // C++: float cv::ximgproc::EdgeAwareInterpolator::getFGSSigma()
  64. //
  65. //javadoc: EdgeAwareInterpolator::getFGSSigma()
  66. public float getFGSSigma ()
  67. {
  68. ThrowIfDisposed ();
  69. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  70. float retVal = ximgproc_EdgeAwareInterpolator_getFGSSigma_10(nativeObj);
  71. return retVal;
  72. #else
  73. return -1;
  74. #endif
  75. }
  76. //
  77. // C++: float cv::ximgproc::EdgeAwareInterpolator::getLambda()
  78. //
  79. //javadoc: EdgeAwareInterpolator::getLambda()
  80. public float getLambda ()
  81. {
  82. ThrowIfDisposed ();
  83. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  84. float retVal = ximgproc_EdgeAwareInterpolator_getLambda_10(nativeObj);
  85. return retVal;
  86. #else
  87. return -1;
  88. #endif
  89. }
  90. //
  91. // C++: float cv::ximgproc::EdgeAwareInterpolator::getSigma()
  92. //
  93. //javadoc: EdgeAwareInterpolator::getSigma()
  94. public float getSigma ()
  95. {
  96. ThrowIfDisposed ();
  97. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  98. float retVal = ximgproc_EdgeAwareInterpolator_getSigma_10(nativeObj);
  99. return retVal;
  100. #else
  101. return -1;
  102. #endif
  103. }
  104. //
  105. // C++: int cv::ximgproc::EdgeAwareInterpolator::getK()
  106. //
  107. //javadoc: EdgeAwareInterpolator::getK()
  108. public int getK ()
  109. {
  110. ThrowIfDisposed ();
  111. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  112. int retVal = ximgproc_EdgeAwareInterpolator_getK_10(nativeObj);
  113. return retVal;
  114. #else
  115. return -1;
  116. #endif
  117. }
  118. //
  119. // C++: void cv::ximgproc::EdgeAwareInterpolator::setFGSLambda(float _lambda)
  120. //
  121. //javadoc: EdgeAwareInterpolator::setFGSLambda(_lambda)
  122. public void setFGSLambda (float _lambda)
  123. {
  124. ThrowIfDisposed ();
  125. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  126. ximgproc_EdgeAwareInterpolator_setFGSLambda_10(nativeObj, _lambda);
  127. return;
  128. #else
  129. return;
  130. #endif
  131. }
  132. //
  133. // C++: void cv::ximgproc::EdgeAwareInterpolator::setFGSSigma(float _sigma)
  134. //
  135. //javadoc: EdgeAwareInterpolator::setFGSSigma(_sigma)
  136. public void setFGSSigma (float _sigma)
  137. {
  138. ThrowIfDisposed ();
  139. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  140. ximgproc_EdgeAwareInterpolator_setFGSSigma_10(nativeObj, _sigma);
  141. return;
  142. #else
  143. return;
  144. #endif
  145. }
  146. //
  147. // C++: void cv::ximgproc::EdgeAwareInterpolator::setK(int _k)
  148. //
  149. //javadoc: EdgeAwareInterpolator::setK(_k)
  150. public void setK (int _k)
  151. {
  152. ThrowIfDisposed ();
  153. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  154. ximgproc_EdgeAwareInterpolator_setK_10(nativeObj, _k);
  155. return;
  156. #else
  157. return;
  158. #endif
  159. }
  160. //
  161. // C++: void cv::ximgproc::EdgeAwareInterpolator::setLambda(float _lambda)
  162. //
  163. //javadoc: EdgeAwareInterpolator::setLambda(_lambda)
  164. public void setLambda (float _lambda)
  165. {
  166. ThrowIfDisposed ();
  167. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  168. ximgproc_EdgeAwareInterpolator_setLambda_10(nativeObj, _lambda);
  169. return;
  170. #else
  171. return;
  172. #endif
  173. }
  174. //
  175. // C++: void cv::ximgproc::EdgeAwareInterpolator::setSigma(float _sigma)
  176. //
  177. //javadoc: EdgeAwareInterpolator::setSigma(_sigma)
  178. public void setSigma (float _sigma)
  179. {
  180. ThrowIfDisposed ();
  181. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  182. ximgproc_EdgeAwareInterpolator_setSigma_10(nativeObj, _sigma);
  183. return;
  184. #else
  185. return;
  186. #endif
  187. }
  188. //
  189. // C++: void cv::ximgproc::EdgeAwareInterpolator::setUsePostProcessing(bool _use_post_proc)
  190. //
  191. //javadoc: EdgeAwareInterpolator::setUsePostProcessing(_use_post_proc)
  192. public void setUsePostProcessing (bool _use_post_proc)
  193. {
  194. ThrowIfDisposed ();
  195. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  196. ximgproc_EdgeAwareInterpolator_setUsePostProcessing_10(nativeObj, _use_post_proc);
  197. return;
  198. #else
  199. return;
  200. #endif
  201. }
  202. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  203. const string LIBNAME = "__Internal";
  204. #else
  205. const string LIBNAME = "opencvforunity";
  206. #endif
  207. // C++: bool cv::ximgproc::EdgeAwareInterpolator::getUsePostProcessing()
  208. [DllImport (LIBNAME)]
  209. private static extern bool ximgproc_EdgeAwareInterpolator_getUsePostProcessing_10 (IntPtr nativeObj);
  210. // C++: float cv::ximgproc::EdgeAwareInterpolator::getFGSLambda()
  211. [DllImport (LIBNAME)]
  212. private static extern float ximgproc_EdgeAwareInterpolator_getFGSLambda_10 (IntPtr nativeObj);
  213. // C++: float cv::ximgproc::EdgeAwareInterpolator::getFGSSigma()
  214. [DllImport (LIBNAME)]
  215. private static extern float ximgproc_EdgeAwareInterpolator_getFGSSigma_10 (IntPtr nativeObj);
  216. // C++: float cv::ximgproc::EdgeAwareInterpolator::getLambda()
  217. [DllImport (LIBNAME)]
  218. private static extern float ximgproc_EdgeAwareInterpolator_getLambda_10 (IntPtr nativeObj);
  219. // C++: float cv::ximgproc::EdgeAwareInterpolator::getSigma()
  220. [DllImport (LIBNAME)]
  221. private static extern float ximgproc_EdgeAwareInterpolator_getSigma_10 (IntPtr nativeObj);
  222. // C++: int cv::ximgproc::EdgeAwareInterpolator::getK()
  223. [DllImport (LIBNAME)]
  224. private static extern int ximgproc_EdgeAwareInterpolator_getK_10 (IntPtr nativeObj);
  225. // C++: void cv::ximgproc::EdgeAwareInterpolator::setFGSLambda(float _lambda)
  226. [DllImport (LIBNAME)]
  227. private static extern void ximgproc_EdgeAwareInterpolator_setFGSLambda_10 (IntPtr nativeObj, float _lambda);
  228. // C++: void cv::ximgproc::EdgeAwareInterpolator::setFGSSigma(float _sigma)
  229. [DllImport (LIBNAME)]
  230. private static extern void ximgproc_EdgeAwareInterpolator_setFGSSigma_10 (IntPtr nativeObj, float _sigma);
  231. // C++: void cv::ximgproc::EdgeAwareInterpolator::setK(int _k)
  232. [DllImport (LIBNAME)]
  233. private static extern void ximgproc_EdgeAwareInterpolator_setK_10 (IntPtr nativeObj, int _k);
  234. // C++: void cv::ximgproc::EdgeAwareInterpolator::setLambda(float _lambda)
  235. [DllImport (LIBNAME)]
  236. private static extern void ximgproc_EdgeAwareInterpolator_setLambda_10 (IntPtr nativeObj, float _lambda);
  237. // C++: void cv::ximgproc::EdgeAwareInterpolator::setSigma(float _sigma)
  238. [DllImport (LIBNAME)]
  239. private static extern void ximgproc_EdgeAwareInterpolator_setSigma_10 (IntPtr nativeObj, float _sigma);
  240. // C++: void cv::ximgproc::EdgeAwareInterpolator::setUsePostProcessing(bool _use_post_proc)
  241. [DllImport (LIBNAME)]
  242. private static extern void ximgproc_EdgeAwareInterpolator_setUsePostProcessing_10 (IntPtr nativeObj, bool _use_post_proc);
  243. // native support for java finalize()
  244. [DllImport (LIBNAME)]
  245. private static extern void ximgproc_EdgeAwareInterpolator_delete (IntPtr nativeObj);
  246. }
  247. }