EMDL1HistogramCostExtractor.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.ShapeModule
  8. {
  9. // C++: class EMDL1HistogramCostExtractor
  10. //javadoc: EMDL1HistogramCostExtractor
  11. public class EMDL1HistogramCostExtractor : HistogramCostExtractor
  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. shape_EMDL1HistogramCostExtractor_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal EMDL1HistogramCostExtractor (IntPtr addr) : base (addr) { }
  32. // internal usage only
  33. public static new EMDL1HistogramCostExtractor __fromPtr__ (IntPtr addr) { return new EMDL1HistogramCostExtractor (addr); }
  34. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  35. const string LIBNAME = "__Internal";
  36. #else
  37. const string LIBNAME = "opencvforunity";
  38. #endif
  39. // native support for java finalize()
  40. [DllImport (LIBNAME)]
  41. private static extern void shape_EMDL1HistogramCostExtractor_delete (IntPtr nativeObj);
  42. }
  43. }