MergeRobertson.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 MergeRobertson
  10. //javadoc: MergeRobertson
  11. public class MergeRobertson : MergeExposures
  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_MergeRobertson_delete (nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal MergeRobertson (IntPtr addr)
  32. : base (addr)
  33. {
  34. }
  35. // internal usage only
  36. public static new MergeRobertson __fromPtr__ (IntPtr addr)
  37. {
  38. return new MergeRobertson (addr);
  39. }
  40. //
  41. // C++: void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times, Mat response)
  42. //
  43. //javadoc: MergeRobertson::process(src, dst, times, response)
  44. public override void process (List<Mat> src, Mat dst, Mat times, Mat response)
  45. {
  46. ThrowIfDisposed ();
  47. if (dst != null)
  48. dst.ThrowIfDisposed ();
  49. if (times != null)
  50. times.ThrowIfDisposed ();
  51. if (response != null)
  52. response.ThrowIfDisposed ();
  53. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  54. Mat src_mat = Converters.vector_Mat_to_Mat (src);
  55. photo_MergeRobertson_process_10 (nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
  56. return;
  57. #else
  58. return;
  59. #endif
  60. }
  61. //
  62. // C++: void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times)
  63. //
  64. //javadoc: MergeRobertson::process(src, dst, times)
  65. public void process (List<Mat> src, Mat dst, Mat times)
  66. {
  67. ThrowIfDisposed ();
  68. if (dst != null)
  69. dst.ThrowIfDisposed ();
  70. if (times != null)
  71. times.ThrowIfDisposed ();
  72. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  73. Mat src_mat = Converters.vector_Mat_to_Mat (src);
  74. photo_MergeRobertson_process_11 (nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
  75. return;
  76. #else
  77. return;
  78. #endif
  79. }
  80. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  81. const string LIBNAME = "__Internal";
  82. #else
  83. const string LIBNAME = "opencvforunity";
  84. #endif
  85. // C++: void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times, Mat response)
  86. [DllImport (LIBNAME)]
  87. private static extern void photo_MergeRobertson_process_10 (IntPtr nativeObj, IntPtr src_mat_nativeObj, IntPtr dst_nativeObj, IntPtr times_nativeObj, IntPtr response_nativeObj);
  88. // C++: void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times)
  89. [DllImport (LIBNAME)]
  90. private static extern void photo_MergeRobertson_process_11 (IntPtr nativeObj, IntPtr src_mat_nativeObj, IntPtr dst_nativeObj, IntPtr times_nativeObj);
  91. // native support for java finalize()
  92. [DllImport (LIBNAME)]
  93. private static extern void photo_MergeRobertson_delete (IntPtr nativeObj);
  94. }
  95. }