SelectiveSearchSegmentationStrategyTexture.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Runtime.InteropServices;
  6. namespace OpenCVForUnity.XimgprocModule
  7. {
  8. // C++: class SelectiveSearchSegmentationStrategyTexture
  9. /**
  10. * Texture-based strategy for the selective search segmentation algorithm
  11. * The class is implemented from the algorithm described in CITE: uijlings2013selective.
  12. */
  13. public class SelectiveSearchSegmentationStrategyTexture : SelectiveSearchSegmentationStrategy
  14. {
  15. protected override void Dispose(bool disposing)
  16. {
  17. try
  18. {
  19. if (disposing)
  20. {
  21. }
  22. if (IsEnabledDispose)
  23. {
  24. if (nativeObj != IntPtr.Zero)
  25. ximgproc_SelectiveSearchSegmentationStrategyTexture_delete(nativeObj);
  26. nativeObj = IntPtr.Zero;
  27. }
  28. }
  29. finally
  30. {
  31. base.Dispose(disposing);
  32. }
  33. }
  34. protected internal SelectiveSearchSegmentationStrategyTexture(IntPtr addr) : base(addr) { }
  35. // internal usage only
  36. public static new SelectiveSearchSegmentationStrategyTexture __fromPtr__(IntPtr addr) { return new SelectiveSearchSegmentationStrategyTexture(addr); }
  37. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  38. const string LIBNAME = "__Internal";
  39. #else
  40. const string LIBNAME = "opencvforunity";
  41. #endif
  42. // native support for java finalize()
  43. [DllImport(LIBNAME)]
  44. private static extern void ximgproc_SelectiveSearchSegmentationStrategyTexture_delete(IntPtr nativeObj);
  45. }
  46. }