CalibrateDebevec.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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 CalibrateDebevec
  9. //javadoc: CalibrateDebevec
  10. public class CalibrateDebevec : CalibrateCRF {
  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_CalibrateDebevec_delete(nativeObj);
  19. nativeObj = IntPtr.Zero;
  20. }
  21. } finally {
  22. base.Dispose(disposing);
  23. }
  24. #else
  25. return;
  26. #endif
  27. }
  28. protected internal CalibrateDebevec(IntPtr addr) : base(addr) { }
  29. // internal usage only
  30. public static new CalibrateDebevec __fromPtr__(IntPtr addr) { return new CalibrateDebevec(addr); }
  31. //
  32. // C++: bool cv::CalibrateDebevec::getRandom()
  33. //
  34. //javadoc: CalibrateDebevec::getRandom()
  35. public bool getRandom() {
  36. ThrowIfDisposed();
  37. #if (UNITY_ANDROID && !UNITY_EDITOR)
  38. bool retVal = photo_CalibrateDebevec_getRandom_10(nativeObj);
  39. return retVal;
  40. #else
  41. return false;
  42. #endif
  43. }
  44. //
  45. // C++: float cv::CalibrateDebevec::getLambda()
  46. //
  47. //javadoc: CalibrateDebevec::getLambda()
  48. public float getLambda() {
  49. ThrowIfDisposed();
  50. #if (UNITY_ANDROID && !UNITY_EDITOR)
  51. float retVal = photo_CalibrateDebevec_getLambda_10(nativeObj);
  52. return retVal;
  53. #else
  54. return -1;
  55. #endif
  56. }
  57. //
  58. // C++: int cv::CalibrateDebevec::getSamples()
  59. //
  60. //javadoc: CalibrateDebevec::getSamples()
  61. public int getSamples() {
  62. ThrowIfDisposed();
  63. #if (UNITY_ANDROID && !UNITY_EDITOR)
  64. int retVal = photo_CalibrateDebevec_getSamples_10(nativeObj);
  65. return retVal;
  66. #else
  67. return -1;
  68. #endif
  69. }
  70. //
  71. // C++: void cv::CalibrateDebevec::setLambda(float lambda)
  72. //
  73. //javadoc: CalibrateDebevec::setLambda(lambda)
  74. public void setLambda(float lambda) {
  75. ThrowIfDisposed();
  76. #if (UNITY_ANDROID && !UNITY_EDITOR)
  77. photo_CalibrateDebevec_setLambda_10(nativeObj, lambda);
  78. return;
  79. #else
  80. return;
  81. #endif
  82. }
  83. //
  84. // C++: void cv::CalibrateDebevec::setRandom(bool random)
  85. //
  86. //javadoc: CalibrateDebevec::setRandom(random)
  87. public void setRandom(bool random) {
  88. ThrowIfDisposed();
  89. #if (UNITY_ANDROID && !UNITY_EDITOR)
  90. photo_CalibrateDebevec_setRandom_10(nativeObj, random);
  91. return;
  92. #else
  93. return;
  94. #endif
  95. }
  96. //
  97. // C++: void cv::CalibrateDebevec::setSamples(int samples)
  98. //
  99. //javadoc: CalibrateDebevec::setSamples(samples)
  100. public void setSamples(int samples) {
  101. ThrowIfDisposed();
  102. #if (UNITY_ANDROID && !UNITY_EDITOR)
  103. photo_CalibrateDebevec_setSamples_10(nativeObj, samples);
  104. return;
  105. #else
  106. return;
  107. #endif
  108. }
  109. #if (UNITY_ANDROID && !UNITY_EDITOR)
  110. const string LIBNAME = "opencvforunity";
  111. // C++: bool cv::CalibrateDebevec::getRandom()
  112. [DllImport(LIBNAME)]
  113. private static extern bool photo_CalibrateDebevec_getRandom_10(IntPtr nativeObj);
  114. // C++: float cv::CalibrateDebevec::getLambda()
  115. [DllImport(LIBNAME)]
  116. private static extern float photo_CalibrateDebevec_getLambda_10(IntPtr nativeObj);
  117. // C++: int cv::CalibrateDebevec::getSamples()
  118. [DllImport(LIBNAME)]
  119. private static extern int photo_CalibrateDebevec_getSamples_10(IntPtr nativeObj);
  120. // C++: void cv::CalibrateDebevec::setLambda(float lambda)
  121. [DllImport(LIBNAME)]
  122. private static extern void photo_CalibrateDebevec_setLambda_10(IntPtr nativeObj, float lambda);
  123. // C++: void cv::CalibrateDebevec::setRandom(bool random)
  124. [DllImport(LIBNAME)]
  125. private static extern void photo_CalibrateDebevec_setRandom_10(IntPtr nativeObj, bool random);
  126. // C++: void cv::CalibrateDebevec::setSamples(int samples)
  127. [DllImport(LIBNAME)]
  128. private static extern void photo_CalibrateDebevec_setSamples_10(IntPtr nativeObj, int samples);
  129. // native support for java finalize()
  130. [DllImport(LIBNAME)]
  131. private static extern void photo_CalibrateDebevec_delete(IntPtr nativeObj);
  132. #endif
  133. }
  134. }