TonemapDurand.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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.PhotoModule
  8. {
  9. // C++: class TonemapDurand
  10. //javadoc: TonemapDurand
  11. public class TonemapDurand : Tonemap
  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. photo_TonemapDurand_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal TonemapDurand (IntPtr addr) : base (addr) { }
  32. // internal usage only
  33. public static new TonemapDurand __fromPtr__ (IntPtr addr) { return new TonemapDurand (addr); }
  34. //
  35. // C++: float cv::TonemapDurand::getContrast()
  36. //
  37. //javadoc: TonemapDurand::getContrast()
  38. public float getContrast ()
  39. {
  40. ThrowIfDisposed ();
  41. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  42. float retVal = photo_TonemapDurand_getContrast_10(nativeObj);
  43. return retVal;
  44. #else
  45. return -1;
  46. #endif
  47. }
  48. //
  49. // C++: float cv::TonemapDurand::getSaturation()
  50. //
  51. //javadoc: TonemapDurand::getSaturation()
  52. public float getSaturation ()
  53. {
  54. ThrowIfDisposed ();
  55. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  56. float retVal = photo_TonemapDurand_getSaturation_10(nativeObj);
  57. return retVal;
  58. #else
  59. return -1;
  60. #endif
  61. }
  62. //
  63. // C++: float cv::TonemapDurand::getSigmaColor()
  64. //
  65. //javadoc: TonemapDurand::getSigmaColor()
  66. public float getSigmaColor ()
  67. {
  68. ThrowIfDisposed ();
  69. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  70. float retVal = photo_TonemapDurand_getSigmaColor_10(nativeObj);
  71. return retVal;
  72. #else
  73. return -1;
  74. #endif
  75. }
  76. //
  77. // C++: float cv::TonemapDurand::getSigmaSpace()
  78. //
  79. //javadoc: TonemapDurand::getSigmaSpace()
  80. public float getSigmaSpace ()
  81. {
  82. ThrowIfDisposed ();
  83. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  84. float retVal = photo_TonemapDurand_getSigmaSpace_10(nativeObj);
  85. return retVal;
  86. #else
  87. return -1;
  88. #endif
  89. }
  90. //
  91. // C++: void cv::TonemapDurand::setContrast(float contrast)
  92. //
  93. //javadoc: TonemapDurand::setContrast(contrast)
  94. public void setContrast (float contrast)
  95. {
  96. ThrowIfDisposed ();
  97. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  98. photo_TonemapDurand_setContrast_10(nativeObj, contrast);
  99. return;
  100. #else
  101. return;
  102. #endif
  103. }
  104. //
  105. // C++: void cv::TonemapDurand::setSaturation(float saturation)
  106. //
  107. //javadoc: TonemapDurand::setSaturation(saturation)
  108. public void setSaturation (float saturation)
  109. {
  110. ThrowIfDisposed ();
  111. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  112. photo_TonemapDurand_setSaturation_10(nativeObj, saturation);
  113. return;
  114. #else
  115. return;
  116. #endif
  117. }
  118. //
  119. // C++: void cv::TonemapDurand::setSigmaColor(float sigma_color)
  120. //
  121. //javadoc: TonemapDurand::setSigmaColor(sigma_color)
  122. public void setSigmaColor (float sigma_color)
  123. {
  124. ThrowIfDisposed ();
  125. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  126. photo_TonemapDurand_setSigmaColor_10(nativeObj, sigma_color);
  127. return;
  128. #else
  129. return;
  130. #endif
  131. }
  132. //
  133. // C++: void cv::TonemapDurand::setSigmaSpace(float sigma_space)
  134. //
  135. //javadoc: TonemapDurand::setSigmaSpace(sigma_space)
  136. public void setSigmaSpace (float sigma_space)
  137. {
  138. ThrowIfDisposed ();
  139. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  140. photo_TonemapDurand_setSigmaSpace_10(nativeObj, sigma_space);
  141. return;
  142. #else
  143. return;
  144. #endif
  145. }
  146. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  147. const string LIBNAME = "__Internal";
  148. #else
  149. const string LIBNAME = "opencvforunity";
  150. #endif
  151. // C++: float cv::TonemapDurand::getContrast()
  152. [DllImport (LIBNAME)]
  153. private static extern float photo_TonemapDurand_getContrast_10 (IntPtr nativeObj);
  154. // C++: float cv::TonemapDurand::getSaturation()
  155. [DllImport (LIBNAME)]
  156. private static extern float photo_TonemapDurand_getSaturation_10 (IntPtr nativeObj);
  157. // C++: float cv::TonemapDurand::getSigmaColor()
  158. [DllImport (LIBNAME)]
  159. private static extern float photo_TonemapDurand_getSigmaColor_10 (IntPtr nativeObj);
  160. // C++: float cv::TonemapDurand::getSigmaSpace()
  161. [DllImport (LIBNAME)]
  162. private static extern float photo_TonemapDurand_getSigmaSpace_10 (IntPtr nativeObj);
  163. // C++: void cv::TonemapDurand::setContrast(float contrast)
  164. [DllImport (LIBNAME)]
  165. private static extern void photo_TonemapDurand_setContrast_10 (IntPtr nativeObj, float contrast);
  166. // C++: void cv::TonemapDurand::setSaturation(float saturation)
  167. [DllImport (LIBNAME)]
  168. private static extern void photo_TonemapDurand_setSaturation_10 (IntPtr nativeObj, float saturation);
  169. // C++: void cv::TonemapDurand::setSigmaColor(float sigma_color)
  170. [DllImport (LIBNAME)]
  171. private static extern void photo_TonemapDurand_setSigmaColor_10 (IntPtr nativeObj, float sigma_color);
  172. // C++: void cv::TonemapDurand::setSigmaSpace(float sigma_space)
  173. [DllImport (LIBNAME)]
  174. private static extern void photo_TonemapDurand_setSigmaSpace_10 (IntPtr nativeObj, float sigma_space);
  175. // native support for java finalize()
  176. [DllImport (LIBNAME)]
  177. private static extern void photo_TonemapDurand_delete (IntPtr nativeObj);
  178. }
  179. }