TonemapDrago.cs 3.5 KB

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