CalibrateRobertson.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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 CalibrateRobertson
  10. //javadoc: CalibrateRobertson
  11. public class CalibrateRobertson : CalibrateCRF
  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_CalibrateRobertson_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal CalibrateRobertson (IntPtr addr) : base (addr) { }
  32. // internal usage only
  33. public static new CalibrateRobertson __fromPtr__ (IntPtr addr) { return new CalibrateRobertson (addr); }
  34. //
  35. // C++: Mat cv::CalibrateRobertson::getRadiance()
  36. //
  37. //javadoc: CalibrateRobertson::getRadiance()
  38. public Mat getRadiance ()
  39. {
  40. ThrowIfDisposed ();
  41. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  42. Mat retVal = new Mat(photo_CalibrateRobertson_getRadiance_10(nativeObj));
  43. return retVal;
  44. #else
  45. return null;
  46. #endif
  47. }
  48. //
  49. // C++: float cv::CalibrateRobertson::getThreshold()
  50. //
  51. //javadoc: CalibrateRobertson::getThreshold()
  52. public float getThreshold ()
  53. {
  54. ThrowIfDisposed ();
  55. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  56. float retVal = photo_CalibrateRobertson_getThreshold_10(nativeObj);
  57. return retVal;
  58. #else
  59. return -1;
  60. #endif
  61. }
  62. //
  63. // C++: int cv::CalibrateRobertson::getMaxIter()
  64. //
  65. //javadoc: CalibrateRobertson::getMaxIter()
  66. public int getMaxIter ()
  67. {
  68. ThrowIfDisposed ();
  69. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  70. int retVal = photo_CalibrateRobertson_getMaxIter_10(nativeObj);
  71. return retVal;
  72. #else
  73. return -1;
  74. #endif
  75. }
  76. //
  77. // C++: void cv::CalibrateRobertson::setMaxIter(int max_iter)
  78. //
  79. //javadoc: CalibrateRobertson::setMaxIter(max_iter)
  80. public void setMaxIter (int max_iter)
  81. {
  82. ThrowIfDisposed ();
  83. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  84. photo_CalibrateRobertson_setMaxIter_10(nativeObj, max_iter);
  85. return;
  86. #else
  87. return;
  88. #endif
  89. }
  90. //
  91. // C++: void cv::CalibrateRobertson::setThreshold(float threshold)
  92. //
  93. //javadoc: CalibrateRobertson::setThreshold(threshold)
  94. public void setThreshold (float threshold)
  95. {
  96. ThrowIfDisposed ();
  97. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  98. photo_CalibrateRobertson_setThreshold_10(nativeObj, threshold);
  99. return;
  100. #else
  101. return;
  102. #endif
  103. }
  104. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  105. const string LIBNAME = "__Internal";
  106. #else
  107. const string LIBNAME = "opencvforunity";
  108. #endif
  109. // C++: Mat cv::CalibrateRobertson::getRadiance()
  110. [DllImport (LIBNAME)]
  111. private static extern IntPtr photo_CalibrateRobertson_getRadiance_10 (IntPtr nativeObj);
  112. // C++: float cv::CalibrateRobertson::getThreshold()
  113. [DllImport (LIBNAME)]
  114. private static extern float photo_CalibrateRobertson_getThreshold_10 (IntPtr nativeObj);
  115. // C++: int cv::CalibrateRobertson::getMaxIter()
  116. [DllImport (LIBNAME)]
  117. private static extern int photo_CalibrateRobertson_getMaxIter_10 (IntPtr nativeObj);
  118. // C++: void cv::CalibrateRobertson::setMaxIter(int max_iter)
  119. [DllImport (LIBNAME)]
  120. private static extern void photo_CalibrateRobertson_setMaxIter_10 (IntPtr nativeObj, int max_iter);
  121. // C++: void cv::CalibrateRobertson::setThreshold(float threshold)
  122. [DllImport (LIBNAME)]
  123. private static extern void photo_CalibrateRobertson_setThreshold_10 (IntPtr nativeObj, float threshold);
  124. // native support for java finalize()
  125. [DllImport (LIBNAME)]
  126. private static extern void photo_CalibrateRobertson_delete (IntPtr nativeObj);
  127. }
  128. }