SelectiveSearchSegmentationStrategyMultiple.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 SelectiveSearchSegmentationStrategyMultiple
  9. //javadoc: SelectiveSearchSegmentationStrategyMultiple
  10. public class SelectiveSearchSegmentationStrategyMultiple : 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_SelectiveSearchSegmentationStrategyMultiple_delete(nativeObj);
  19. nativeObj = IntPtr.Zero;
  20. }
  21. } finally {
  22. base.Dispose(disposing);
  23. }
  24. #else
  25. return;
  26. #endif
  27. }
  28. protected internal SelectiveSearchSegmentationStrategyMultiple(IntPtr addr) : base(addr) { }
  29. // internal usage only
  30. public static new SelectiveSearchSegmentationStrategyMultiple __fromPtr__(IntPtr addr) { return new SelectiveSearchSegmentationStrategyMultiple(addr); }
  31. //
  32. // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::addStrategy(Ptr_SelectiveSearchSegmentationStrategy g, float weight)
  33. //
  34. //javadoc: SelectiveSearchSegmentationStrategyMultiple::addStrategy(g, weight)
  35. public void addStrategy(SelectiveSearchSegmentationStrategy g, float weight) {
  36. ThrowIfDisposed();
  37. if (g != null) g.ThrowIfDisposed();
  38. #if (UNITY_ANDROID && !UNITY_EDITOR)
  39. ximgproc_SelectiveSearchSegmentationStrategyMultiple_addStrategy_10(nativeObj, g.getNativeObjAddr(), weight);
  40. return;
  41. #else
  42. return;
  43. #endif
  44. }
  45. //
  46. // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::clearStrategies()
  47. //
  48. //javadoc: SelectiveSearchSegmentationStrategyMultiple::clearStrategies()
  49. public void clearStrategies() {
  50. ThrowIfDisposed();
  51. #if (UNITY_ANDROID && !UNITY_EDITOR)
  52. ximgproc_SelectiveSearchSegmentationStrategyMultiple_clearStrategies_10(nativeObj);
  53. return;
  54. #else
  55. return;
  56. #endif
  57. }
  58. #if (UNITY_ANDROID && !UNITY_EDITOR)
  59. const string LIBNAME = "opencvforunity";
  60. // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::addStrategy(Ptr_SelectiveSearchSegmentationStrategy g, float weight)
  61. [DllImport(LIBNAME)]
  62. private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_addStrategy_10(IntPtr nativeObj, IntPtr g_nativeObj, float weight);
  63. // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::clearStrategies()
  64. [DllImport(LIBNAME)]
  65. private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_clearStrategies_10(IntPtr nativeObj);
  66. // native support for java finalize()
  67. [DllImport(LIBNAME)]
  68. private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_delete(IntPtr nativeObj);
  69. #endif
  70. }
  71. }