123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.XimgprocModule
- {
- // C++: class SelectiveSearchSegmentationStrategyMultiple
- /**
- * Regroup multiple strategies for the selective search segmentation algorithm
- */
- public class SelectiveSearchSegmentationStrategyMultiple : SelectiveSearchSegmentationStrategy
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- ximgproc_SelectiveSearchSegmentationStrategyMultiple_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal SelectiveSearchSegmentationStrategyMultiple(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new SelectiveSearchSegmentationStrategyMultiple __fromPtr__(IntPtr addr) { return new SelectiveSearchSegmentationStrategyMultiple(addr); }
- //
- // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::addStrategy(Ptr_SelectiveSearchSegmentationStrategy g, float weight)
- //
- /**
- * Add a new sub-strategy
- * param g The strategy
- * param weight The weight of the strategy
- */
- public void addStrategy(SelectiveSearchSegmentationStrategy g, float weight)
- {
- ThrowIfDisposed();
- if (g != null) g.ThrowIfDisposed();
- ximgproc_SelectiveSearchSegmentationStrategyMultiple_addStrategy_10(nativeObj, g.getNativeObjAddr(), weight);
- }
- //
- // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::clearStrategies()
- //
- /**
- * Remove all sub-strategies
- */
- public void clearStrategies()
- {
- ThrowIfDisposed();
- ximgproc_SelectiveSearchSegmentationStrategyMultiple_clearStrategies_10(nativeObj);
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::addStrategy(Ptr_SelectiveSearchSegmentationStrategy g, float weight)
- [DllImport(LIBNAME)]
- private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_addStrategy_10(IntPtr nativeObj, IntPtr g_nativeObj, float weight);
- // C++: void cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategyMultiple::clearStrategies()
- [DllImport(LIBNAME)]
- private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_clearStrategies_10(IntPtr nativeObj);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void ximgproc_SelectiveSearchSegmentationStrategyMultiple_delete(IntPtr nativeObj);
- }
- }
|