MergeRobertson.cs 3.3 KB

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