PhaseUnwrapping.cs 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.Phase_unwrappingModule
  8. {
  9. // C++: class PhaseUnwrapping
  10. //javadoc: PhaseUnwrapping
  11. public class PhaseUnwrapping : Algorithm
  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. phase_1unwrapping_PhaseUnwrapping_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal PhaseUnwrapping (IntPtr addr) : base (addr) { }
  32. // internal usage only
  33. public static new PhaseUnwrapping __fromPtr__ (IntPtr addr) { return new PhaseUnwrapping (addr); }
  34. //
  35. // C++: void cv::phase_unwrapping::PhaseUnwrapping::unwrapPhaseMap(Mat wrappedPhaseMap, Mat& unwrappedPhaseMap, Mat shadowMask = Mat())
  36. //
  37. //javadoc: PhaseUnwrapping::unwrapPhaseMap(wrappedPhaseMap, unwrappedPhaseMap, shadowMask)
  38. public void unwrapPhaseMap (Mat wrappedPhaseMap, Mat unwrappedPhaseMap, Mat shadowMask)
  39. {
  40. ThrowIfDisposed ();
  41. if (wrappedPhaseMap != null) wrappedPhaseMap.ThrowIfDisposed ();
  42. if (unwrappedPhaseMap != null) unwrappedPhaseMap.ThrowIfDisposed ();
  43. if (shadowMask != null) shadowMask.ThrowIfDisposed ();
  44. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  45. phase_1unwrapping_PhaseUnwrapping_unwrapPhaseMap_10(nativeObj, wrappedPhaseMap.nativeObj, unwrappedPhaseMap.nativeObj, shadowMask.nativeObj);
  46. return;
  47. #else
  48. return;
  49. #endif
  50. }
  51. //javadoc: PhaseUnwrapping::unwrapPhaseMap(wrappedPhaseMap, unwrappedPhaseMap)
  52. public void unwrapPhaseMap (Mat wrappedPhaseMap, Mat unwrappedPhaseMap)
  53. {
  54. ThrowIfDisposed ();
  55. if (wrappedPhaseMap != null) wrappedPhaseMap.ThrowIfDisposed ();
  56. if (unwrappedPhaseMap != null) unwrappedPhaseMap.ThrowIfDisposed ();
  57. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  58. phase_1unwrapping_PhaseUnwrapping_unwrapPhaseMap_11(nativeObj, wrappedPhaseMap.nativeObj, unwrappedPhaseMap.nativeObj);
  59. return;
  60. #else
  61. return;
  62. #endif
  63. }
  64. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  65. const string LIBNAME = "__Internal";
  66. #else
  67. const string LIBNAME = "opencvforunity";
  68. #endif
  69. // C++: void cv::phase_unwrapping::PhaseUnwrapping::unwrapPhaseMap(Mat wrappedPhaseMap, Mat& unwrappedPhaseMap, Mat shadowMask = Mat())
  70. [DllImport (LIBNAME)]
  71. private static extern void phase_1unwrapping_PhaseUnwrapping_unwrapPhaseMap_10 (IntPtr nativeObj, IntPtr wrappedPhaseMap_nativeObj, IntPtr unwrappedPhaseMap_nativeObj, IntPtr shadowMask_nativeObj);
  72. [DllImport (LIBNAME)]
  73. private static extern void phase_1unwrapping_PhaseUnwrapping_unwrapPhaseMap_11 (IntPtr nativeObj, IntPtr wrappedPhaseMap_nativeObj, IntPtr unwrappedPhaseMap_nativeObj);
  74. // native support for java finalize()
  75. [DllImport (LIBNAME)]
  76. private static extern void phase_1unwrapping_PhaseUnwrapping_delete (IntPtr nativeObj);
  77. }
  78. }