123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.VideoModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.BgsegmModule
- {
- // C++: class BackgroundSubtractorMOG
- //javadoc: BackgroundSubtractorMOG
- public class BackgroundSubtractorMOG : BackgroundSubtractor
- {
- protected override void Dispose (bool disposing)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- try {
- if (disposing) {
- }
- if (IsEnabledDispose) {
- if (nativeObj != IntPtr.Zero)
- bgsegm_BackgroundSubtractorMOG_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose (disposing);
- }
- #else
- return;
- #endif
- }
- protected internal BackgroundSubtractorMOG (IntPtr addr) : base (addr) { }
- // internal usage only
- public static new BackgroundSubtractorMOG __fromPtr__ (IntPtr addr) { return new BackgroundSubtractorMOG (addr); }
- //
- // C++: double cv::bgsegm::BackgroundSubtractorMOG::getBackgroundRatio()
- //
- //javadoc: BackgroundSubtractorMOG::getBackgroundRatio()
- public double getBackgroundRatio ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double retVal = bgsegm_BackgroundSubtractorMOG_getBackgroundRatio_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: double cv::bgsegm::BackgroundSubtractorMOG::getNoiseSigma()
- //
- //javadoc: BackgroundSubtractorMOG::getNoiseSigma()
- public double getNoiseSigma ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double retVal = bgsegm_BackgroundSubtractorMOG_getNoiseSigma_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::bgsegm::BackgroundSubtractorMOG::getHistory()
- //
- //javadoc: BackgroundSubtractorMOG::getHistory()
- public int getHistory ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = bgsegm_BackgroundSubtractorMOG_getHistory_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::bgsegm::BackgroundSubtractorMOG::getNMixtures()
- //
- //javadoc: BackgroundSubtractorMOG::getNMixtures()
- public int getNMixtures ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = bgsegm_BackgroundSubtractorMOG_getNMixtures_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void cv::bgsegm::BackgroundSubtractorMOG::setBackgroundRatio(double backgroundRatio)
- //
- //javadoc: BackgroundSubtractorMOG::setBackgroundRatio(backgroundRatio)
- public void setBackgroundRatio (double backgroundRatio)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bgsegm_BackgroundSubtractorMOG_setBackgroundRatio_10(nativeObj, backgroundRatio);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::bgsegm::BackgroundSubtractorMOG::setHistory(int nframes)
- //
- //javadoc: BackgroundSubtractorMOG::setHistory(nframes)
- public void setHistory (int nframes)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bgsegm_BackgroundSubtractorMOG_setHistory_10(nativeObj, nframes);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::bgsegm::BackgroundSubtractorMOG::setNMixtures(int nmix)
- //
- //javadoc: BackgroundSubtractorMOG::setNMixtures(nmix)
- public void setNMixtures (int nmix)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bgsegm_BackgroundSubtractorMOG_setNMixtures_10(nativeObj, nmix);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::bgsegm::BackgroundSubtractorMOG::setNoiseSigma(double noiseSigma)
- //
- //javadoc: BackgroundSubtractorMOG::setNoiseSigma(noiseSigma)
- public void setNoiseSigma (double noiseSigma)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bgsegm_BackgroundSubtractorMOG_setNoiseSigma_10(nativeObj, noiseSigma);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: double cv::bgsegm::BackgroundSubtractorMOG::getBackgroundRatio()
- [DllImport (LIBNAME)]
- private static extern double bgsegm_BackgroundSubtractorMOG_getBackgroundRatio_10 (IntPtr nativeObj);
- // C++: double cv::bgsegm::BackgroundSubtractorMOG::getNoiseSigma()
- [DllImport (LIBNAME)]
- private static extern double bgsegm_BackgroundSubtractorMOG_getNoiseSigma_10 (IntPtr nativeObj);
- // C++: int cv::bgsegm::BackgroundSubtractorMOG::getHistory()
- [DllImport (LIBNAME)]
- private static extern int bgsegm_BackgroundSubtractorMOG_getHistory_10 (IntPtr nativeObj);
- // C++: int cv::bgsegm::BackgroundSubtractorMOG::getNMixtures()
- [DllImport (LIBNAME)]
- private static extern int bgsegm_BackgroundSubtractorMOG_getNMixtures_10 (IntPtr nativeObj);
- // C++: void cv::bgsegm::BackgroundSubtractorMOG::setBackgroundRatio(double backgroundRatio)
- [DllImport (LIBNAME)]
- private static extern void bgsegm_BackgroundSubtractorMOG_setBackgroundRatio_10 (IntPtr nativeObj, double backgroundRatio);
- // C++: void cv::bgsegm::BackgroundSubtractorMOG::setHistory(int nframes)
- [DllImport (LIBNAME)]
- private static extern void bgsegm_BackgroundSubtractorMOG_setHistory_10 (IntPtr nativeObj, int nframes);
- // C++: void cv::bgsegm::BackgroundSubtractorMOG::setNMixtures(int nmix)
- [DllImport (LIBNAME)]
- private static extern void bgsegm_BackgroundSubtractorMOG_setNMixtures_10 (IntPtr nativeObj, int nmix);
- // C++: void cv::bgsegm::BackgroundSubtractorMOG::setNoiseSigma(double noiseSigma)
- [DllImport (LIBNAME)]
- private static extern void bgsegm_BackgroundSubtractorMOG_setNoiseSigma_10 (IntPtr nativeObj, double noiseSigma);
- // native support for java finalize()
- [DllImport (LIBNAME)]
- private static extern void bgsegm_BackgroundSubtractorMOG_delete (IntPtr nativeObj);
- }
- }
|