TonemapDrago.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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 TonemapDrago
  10. //javadoc: TonemapDrago
  11. public class TonemapDrago : 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_TonemapDrago_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal TonemapDrago (IntPtr addr) : base (addr) { }
  32. // internal usage only
  33. public static new TonemapDrago __fromPtr__ (IntPtr addr) { return new TonemapDrago (addr); }
  34. //
  35. // C++: float cv::TonemapDrago::getBias()
  36. //
  37. //javadoc: TonemapDrago::getBias()
  38. public float getBias ()
  39. {
  40. ThrowIfDisposed ();
  41. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  42. float retVal = photo_TonemapDrago_getBias_10(nativeObj);
  43. return retVal;
  44. #else
  45. return -1;
  46. #endif
  47. }
  48. //
  49. // C++: float cv::TonemapDrago::getSaturation()
  50. //
  51. //javadoc: TonemapDrago::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_TonemapDrago_getSaturation_10(nativeObj);
  57. return retVal;
  58. #else
  59. return -1;
  60. #endif
  61. }
  62. //
  63. // C++: void cv::TonemapDrago::setBias(float bias)
  64. //
  65. //javadoc: TonemapDrago::setBias(bias)
  66. public void setBias (float bias)
  67. {
  68. ThrowIfDisposed ();
  69. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  70. photo_TonemapDrago_setBias_10(nativeObj, bias);
  71. return;
  72. #else
  73. return;
  74. #endif
  75. }
  76. //
  77. // C++: void cv::TonemapDrago::setSaturation(float saturation)
  78. //
  79. //javadoc: TonemapDrago::setSaturation(saturation)
  80. public void setSaturation (float saturation)
  81. {
  82. ThrowIfDisposed ();
  83. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  84. photo_TonemapDrago_setSaturation_10(nativeObj, saturation);
  85. return;
  86. #else
  87. return;
  88. #endif
  89. }
  90. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  91. const string LIBNAME = "__Internal";
  92. #else
  93. const string LIBNAME = "opencvforunity";
  94. #endif
  95. // C++: float cv::TonemapDrago::getBias()
  96. [DllImport (LIBNAME)]
  97. private static extern float photo_TonemapDrago_getBias_10 (IntPtr nativeObj);
  98. // C++: float cv::TonemapDrago::getSaturation()
  99. [DllImport (LIBNAME)]
  100. private static extern float photo_TonemapDrago_getSaturation_10 (IntPtr nativeObj);
  101. // C++: void cv::TonemapDrago::setBias(float bias)
  102. [DllImport (LIBNAME)]
  103. private static extern void photo_TonemapDrago_setBias_10 (IntPtr nativeObj, float bias);
  104. // C++: void cv::TonemapDrago::setSaturation(float saturation)
  105. [DllImport (LIBNAME)]
  106. private static extern void photo_TonemapDrago_setSaturation_10 (IntPtr nativeObj, float saturation);
  107. // native support for java finalize()
  108. [DllImport (LIBNAME)]
  109. private static extern void photo_TonemapDrago_delete (IntPtr nativeObj);
  110. }
  111. }