SelectiveSearchSegmentationStrategyTexture.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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.XimgprocModule {
  8. // C++: class SelectiveSearchSegmentationStrategyTexture
  9. //javadoc: SelectiveSearchSegmentationStrategyTexture
  10. public class SelectiveSearchSegmentationStrategyTexture : SelectiveSearchSegmentationStrategy {
  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. ximgproc_SelectiveSearchSegmentationStrategyTexture_delete(nativeObj);
  19. nativeObj = IntPtr.Zero;
  20. }
  21. } finally {
  22. base.Dispose(disposing);
  23. }
  24. #else
  25. return;
  26. #endif
  27. }
  28. protected internal SelectiveSearchSegmentationStrategyTexture(IntPtr addr) : base(addr) { }
  29. // internal usage only
  30. public static new SelectiveSearchSegmentationStrategyTexture __fromPtr__(IntPtr addr) { return new SelectiveSearchSegmentationStrategyTexture(addr); }
  31. #if (UNITY_ANDROID && !UNITY_EDITOR)
  32. const string LIBNAME = "opencvforunity";
  33. // native support for java finalize()
  34. [DllImport(LIBNAME)]
  35. private static extern void ximgproc_SelectiveSearchSegmentationStrategyTexture_delete(IntPtr nativeObj);
  36. #endif
  37. }
  38. }