CalibrateCRF.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 CalibrateCRF
  9. //javadoc: CalibrateCRF
  10. public class CalibrateCRF : Algorithm {
  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_CalibrateCRF_delete(nativeObj);
  19. nativeObj = IntPtr.Zero;
  20. }
  21. } finally {
  22. base.Dispose(disposing);
  23. }
  24. #else
  25. return;
  26. #endif
  27. }
  28. protected internal CalibrateCRF(IntPtr addr) : base(addr) { }
  29. // internal usage only
  30. public static new CalibrateCRF __fromPtr__(IntPtr addr) { return new CalibrateCRF(addr); }
  31. //
  32. // C++: void cv::CalibrateCRF::process(vector_Mat src, Mat& dst, Mat times)
  33. //
  34. //javadoc: CalibrateCRF::process(src, dst, times)
  35. public void process(List<Mat> src, Mat dst, Mat times) {
  36. ThrowIfDisposed();
  37. if (dst != null) dst.ThrowIfDisposed();
  38. if (times != null) times.ThrowIfDisposed();
  39. #if (UNITY_ANDROID && !UNITY_EDITOR)
  40. Mat src_mat = Converters.vector_Mat_to_Mat(src);
  41. photo_CalibrateCRF_process_10(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
  42. return;
  43. #else
  44. return;
  45. #endif
  46. }
  47. #if (UNITY_ANDROID && !UNITY_EDITOR)
  48. const string LIBNAME = "opencvforunity";
  49. // C++: void cv::CalibrateCRF::process(vector_Mat src, Mat& dst, Mat times)
  50. [DllImport(LIBNAME)]
  51. private static extern void photo_CalibrateCRF_process_10(IntPtr nativeObj, IntPtr src_mat_nativeObj, IntPtr dst_nativeObj, IntPtr times_nativeObj);
  52. // native support for java finalize()
  53. [DllImport(LIBNAME)]
  54. private static extern void photo_CalibrateCRF_delete(IntPtr nativeObj);
  55. #endif
  56. }
  57. }