CalibrateRobertson.cs 4.2 KB

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