MotionSaliencyBinWangApr2014.cs 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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.SaliencyModule
  8. {
  9. // C++: class MotionSaliencyBinWangApr2014
  10. //javadoc: MotionSaliencyBinWangApr2014
  11. public class MotionSaliencyBinWangApr2014 : MotionSaliency
  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. saliency_MotionSaliencyBinWangApr2014_delete (nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal MotionSaliencyBinWangApr2014 (IntPtr addr)
  32. : base (addr)
  33. {
  34. }
  35. // internal usage only
  36. public static new MotionSaliencyBinWangApr2014 __fromPtr__ (IntPtr addr)
  37. {
  38. return new MotionSaliencyBinWangApr2014 (addr);
  39. }
  40. //
  41. // C++: static Ptr_MotionSaliencyBinWangApr2014 cv::saliency::MotionSaliencyBinWangApr2014::create()
  42. //
  43. //javadoc: MotionSaliencyBinWangApr2014::create()
  44. public static MotionSaliencyBinWangApr2014 create ()
  45. {
  46. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  47. MotionSaliencyBinWangApr2014 retVal = MotionSaliencyBinWangApr2014.__fromPtr__ (saliency_MotionSaliencyBinWangApr2014_create_10 ());
  48. return retVal;
  49. #else
  50. return null;
  51. #endif
  52. }
  53. //
  54. // C++: bool cv::saliency::MotionSaliencyBinWangApr2014::computeSaliency(Mat image, Mat& saliencyMap)
  55. //
  56. //javadoc: MotionSaliencyBinWangApr2014::computeSaliency(image, saliencyMap)
  57. public override bool computeSaliency (Mat image, Mat saliencyMap)
  58. {
  59. ThrowIfDisposed ();
  60. if (image != null)
  61. image.ThrowIfDisposed ();
  62. if (saliencyMap != null)
  63. saliencyMap.ThrowIfDisposed ();
  64. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  65. bool retVal = saliency_MotionSaliencyBinWangApr2014_computeSaliency_10 (nativeObj, image.nativeObj, saliencyMap.nativeObj);
  66. return retVal;
  67. #else
  68. return false;
  69. #endif
  70. }
  71. //
  72. // C++: bool cv::saliency::MotionSaliencyBinWangApr2014::init()
  73. //
  74. //javadoc: MotionSaliencyBinWangApr2014::init()
  75. public bool init ()
  76. {
  77. ThrowIfDisposed ();
  78. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  79. bool retVal = saliency_MotionSaliencyBinWangApr2014_init_10 (nativeObj);
  80. return retVal;
  81. #else
  82. return false;
  83. #endif
  84. }
  85. //
  86. // C++: int cv::saliency::MotionSaliencyBinWangApr2014::getImageHeight()
  87. //
  88. //javadoc: MotionSaliencyBinWangApr2014::getImageHeight()
  89. public int getImageHeight ()
  90. {
  91. ThrowIfDisposed ();
  92. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  93. int retVal = saliency_MotionSaliencyBinWangApr2014_getImageHeight_10 (nativeObj);
  94. return retVal;
  95. #else
  96. return -1;
  97. #endif
  98. }
  99. //
  100. // C++: int cv::saliency::MotionSaliencyBinWangApr2014::getImageWidth()
  101. //
  102. //javadoc: MotionSaliencyBinWangApr2014::getImageWidth()
  103. public int getImageWidth ()
  104. {
  105. ThrowIfDisposed ();
  106. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  107. int retVal = saliency_MotionSaliencyBinWangApr2014_getImageWidth_10 (nativeObj);
  108. return retVal;
  109. #else
  110. return -1;
  111. #endif
  112. }
  113. //
  114. // C++: void cv::saliency::MotionSaliencyBinWangApr2014::setImageHeight(int val)
  115. //
  116. //javadoc: MotionSaliencyBinWangApr2014::setImageHeight(val)
  117. public void setImageHeight (int val)
  118. {
  119. ThrowIfDisposed ();
  120. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  121. saliency_MotionSaliencyBinWangApr2014_setImageHeight_10 (nativeObj, val);
  122. return;
  123. #else
  124. return;
  125. #endif
  126. }
  127. //
  128. // C++: void cv::saliency::MotionSaliencyBinWangApr2014::setImageWidth(int val)
  129. //
  130. //javadoc: MotionSaliencyBinWangApr2014::setImageWidth(val)
  131. public void setImageWidth (int val)
  132. {
  133. ThrowIfDisposed ();
  134. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  135. saliency_MotionSaliencyBinWangApr2014_setImageWidth_10 (nativeObj, val);
  136. return;
  137. #else
  138. return;
  139. #endif
  140. }
  141. //
  142. // C++: void cv::saliency::MotionSaliencyBinWangApr2014::setImagesize(int W, int H)
  143. //
  144. //javadoc: MotionSaliencyBinWangApr2014::setImagesize(W, H)
  145. public void setImagesize (int W, int H)
  146. {
  147. ThrowIfDisposed ();
  148. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  149. saliency_MotionSaliencyBinWangApr2014_setImagesize_10 (nativeObj, W, H);
  150. return;
  151. #else
  152. return;
  153. #endif
  154. }
  155. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  156. const string LIBNAME = "__Internal";
  157. #else
  158. const string LIBNAME = "opencvforunity";
  159. #endif
  160. // C++: static Ptr_MotionSaliencyBinWangApr2014 cv::saliency::MotionSaliencyBinWangApr2014::create()
  161. [DllImport (LIBNAME)]
  162. private static extern IntPtr saliency_MotionSaliencyBinWangApr2014_create_10 ();
  163. // C++: bool cv::saliency::MotionSaliencyBinWangApr2014::computeSaliency(Mat image, Mat& saliencyMap)
  164. [DllImport (LIBNAME)]
  165. private static extern bool saliency_MotionSaliencyBinWangApr2014_computeSaliency_10 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr saliencyMap_nativeObj);
  166. // C++: bool cv::saliency::MotionSaliencyBinWangApr2014::init()
  167. [DllImport (LIBNAME)]
  168. private static extern bool saliency_MotionSaliencyBinWangApr2014_init_10 (IntPtr nativeObj);
  169. // C++: int cv::saliency::MotionSaliencyBinWangApr2014::getImageHeight()
  170. [DllImport (LIBNAME)]
  171. private static extern int saliency_MotionSaliencyBinWangApr2014_getImageHeight_10 (IntPtr nativeObj);
  172. // C++: int cv::saliency::MotionSaliencyBinWangApr2014::getImageWidth()
  173. [DllImport (LIBNAME)]
  174. private static extern int saliency_MotionSaliencyBinWangApr2014_getImageWidth_10 (IntPtr nativeObj);
  175. // C++: void cv::saliency::MotionSaliencyBinWangApr2014::setImageHeight(int val)
  176. [DllImport (LIBNAME)]
  177. private static extern void saliency_MotionSaliencyBinWangApr2014_setImageHeight_10 (IntPtr nativeObj, int val);
  178. // C++: void cv::saliency::MotionSaliencyBinWangApr2014::setImageWidth(int val)
  179. [DllImport (LIBNAME)]
  180. private static extern void saliency_MotionSaliencyBinWangApr2014_setImageWidth_10 (IntPtr nativeObj, int val);
  181. // C++: void cv::saliency::MotionSaliencyBinWangApr2014::setImagesize(int W, int H)
  182. [DllImport (LIBNAME)]
  183. private static extern void saliency_MotionSaliencyBinWangApr2014_setImagesize_10 (IntPtr nativeObj, int W, int H);
  184. // native support for java finalize()
  185. [DllImport (LIBNAME)]
  186. private static extern void saliency_MotionSaliencyBinWangApr2014_delete (IntPtr nativeObj);
  187. }
  188. }