123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.VideoModule {
- // C++: class BackgroundSubtractorKNN
- //javadoc: BackgroundSubtractorKNN
- public class BackgroundSubtractorKNN : BackgroundSubtractor {
- protected override void Dispose(bool disposing) {
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- try {
- if (disposing) {
- }
- if (IsEnabledDispose) {
- if (nativeObj != IntPtr.Zero)
- video_BackgroundSubtractorKNN_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose(disposing);
- }
- #else
- return;
- #endif
- }
- protected internal BackgroundSubtractorKNN(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new BackgroundSubtractorKNN __fromPtr__(IntPtr addr) { return new BackgroundSubtractorKNN(addr); }
- //
- // C++: bool cv::BackgroundSubtractorKNN::getDetectShadows()
- //
- //javadoc: BackgroundSubtractorKNN::getDetectShadows()
- public bool getDetectShadows() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- bool retVal = video_BackgroundSubtractorKNN_getDetectShadows_10(nativeObj);
- return retVal;
- #else
- return false;
- #endif
- }
- //
- // C++: double cv::BackgroundSubtractorKNN::getDist2Threshold()
- //
- //javadoc: BackgroundSubtractorKNN::getDist2Threshold()
- public double getDist2Threshold() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- double retVal = video_BackgroundSubtractorKNN_getDist2Threshold_10(nativeObj);
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: double cv::BackgroundSubtractorKNN::getShadowThreshold()
- //
- //javadoc: BackgroundSubtractorKNN::getShadowThreshold()
- public double getShadowThreshold() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- double retVal = video_BackgroundSubtractorKNN_getShadowThreshold_10(nativeObj);
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::BackgroundSubtractorKNN::getHistory()
- //
- //javadoc: BackgroundSubtractorKNN::getHistory()
- public int getHistory() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- int retVal = video_BackgroundSubtractorKNN_getHistory_10(nativeObj);
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::BackgroundSubtractorKNN::getNSamples()
- //
- //javadoc: BackgroundSubtractorKNN::getNSamples()
- public int getNSamples() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- int retVal = video_BackgroundSubtractorKNN_getNSamples_10(nativeObj);
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::BackgroundSubtractorKNN::getShadowValue()
- //
- //javadoc: BackgroundSubtractorKNN::getShadowValue()
- public int getShadowValue() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- int retVal = video_BackgroundSubtractorKNN_getShadowValue_10(nativeObj);
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::BackgroundSubtractorKNN::getkNNSamples()
- //
- //javadoc: BackgroundSubtractorKNN::getkNNSamples()
- public int getkNNSamples() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- int retVal = video_BackgroundSubtractorKNN_getkNNSamples_10(nativeObj);
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void cv::BackgroundSubtractorKNN::setDetectShadows(bool detectShadows)
- //
- //javadoc: BackgroundSubtractorKNN::setDetectShadows(detectShadows)
- public void setDetectShadows(bool detectShadows) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- video_BackgroundSubtractorKNN_setDetectShadows_10(nativeObj, detectShadows);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::BackgroundSubtractorKNN::setDist2Threshold(double _dist2Threshold)
- //
- //javadoc: BackgroundSubtractorKNN::setDist2Threshold(_dist2Threshold)
- public void setDist2Threshold(double _dist2Threshold) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- video_BackgroundSubtractorKNN_setDist2Threshold_10(nativeObj, _dist2Threshold);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::BackgroundSubtractorKNN::setHistory(int history)
- //
- //javadoc: BackgroundSubtractorKNN::setHistory(history)
- public void setHistory(int history) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- video_BackgroundSubtractorKNN_setHistory_10(nativeObj, history);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::BackgroundSubtractorKNN::setNSamples(int _nN)
- //
- //javadoc: BackgroundSubtractorKNN::setNSamples(_nN)
- public void setNSamples(int _nN) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- video_BackgroundSubtractorKNN_setNSamples_10(nativeObj, _nN);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::BackgroundSubtractorKNN::setShadowThreshold(double threshold)
- //
- //javadoc: BackgroundSubtractorKNN::setShadowThreshold(threshold)
- public void setShadowThreshold(double threshold) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- video_BackgroundSubtractorKNN_setShadowThreshold_10(nativeObj, threshold);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::BackgroundSubtractorKNN::setShadowValue(int value)
- //
- //javadoc: BackgroundSubtractorKNN::setShadowValue(value)
- public void setShadowValue(int value) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- video_BackgroundSubtractorKNN_setShadowValue_10(nativeObj, value);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::BackgroundSubtractorKNN::setkNNSamples(int _nkNN)
- //
- //javadoc: BackgroundSubtractorKNN::setkNNSamples(_nkNN)
- public void setkNNSamples(int _nkNN) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- video_BackgroundSubtractorKNN_setkNNSamples_10(nativeObj, _nkNN);
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- const string LIBNAME = "opencvforunity";
- // C++: bool cv::BackgroundSubtractorKNN::getDetectShadows()
- [DllImport(LIBNAME)]
- private static extern bool video_BackgroundSubtractorKNN_getDetectShadows_10(IntPtr nativeObj);
- // C++: double cv::BackgroundSubtractorKNN::getDist2Threshold()
- [DllImport(LIBNAME)]
- private static extern double video_BackgroundSubtractorKNN_getDist2Threshold_10(IntPtr nativeObj);
- // C++: double cv::BackgroundSubtractorKNN::getShadowThreshold()
- [DllImport(LIBNAME)]
- private static extern double video_BackgroundSubtractorKNN_getShadowThreshold_10(IntPtr nativeObj);
- // C++: int cv::BackgroundSubtractorKNN::getHistory()
- [DllImport(LIBNAME)]
- private static extern int video_BackgroundSubtractorKNN_getHistory_10(IntPtr nativeObj);
- // C++: int cv::BackgroundSubtractorKNN::getNSamples()
- [DllImport(LIBNAME)]
- private static extern int video_BackgroundSubtractorKNN_getNSamples_10(IntPtr nativeObj);
- // C++: int cv::BackgroundSubtractorKNN::getShadowValue()
- [DllImport(LIBNAME)]
- private static extern int video_BackgroundSubtractorKNN_getShadowValue_10(IntPtr nativeObj);
- // C++: int cv::BackgroundSubtractorKNN::getkNNSamples()
- [DllImport(LIBNAME)]
- private static extern int video_BackgroundSubtractorKNN_getkNNSamples_10(IntPtr nativeObj);
- // C++: void cv::BackgroundSubtractorKNN::setDetectShadows(bool detectShadows)
- [DllImport(LIBNAME)]
- private static extern void video_BackgroundSubtractorKNN_setDetectShadows_10(IntPtr nativeObj, bool detectShadows);
- // C++: void cv::BackgroundSubtractorKNN::setDist2Threshold(double _dist2Threshold)
- [DllImport(LIBNAME)]
- private static extern void video_BackgroundSubtractorKNN_setDist2Threshold_10(IntPtr nativeObj, double _dist2Threshold);
- // C++: void cv::BackgroundSubtractorKNN::setHistory(int history)
- [DllImport(LIBNAME)]
- private static extern void video_BackgroundSubtractorKNN_setHistory_10(IntPtr nativeObj, int history);
- // C++: void cv::BackgroundSubtractorKNN::setNSamples(int _nN)
- [DllImport(LIBNAME)]
- private static extern void video_BackgroundSubtractorKNN_setNSamples_10(IntPtr nativeObj, int _nN);
- // C++: void cv::BackgroundSubtractorKNN::setShadowThreshold(double threshold)
- [DllImport(LIBNAME)]
- private static extern void video_BackgroundSubtractorKNN_setShadowThreshold_10(IntPtr nativeObj, double threshold);
- // C++: void cv::BackgroundSubtractorKNN::setShadowValue(int value)
- [DllImport(LIBNAME)]
- private static extern void video_BackgroundSubtractorKNN_setShadowValue_10(IntPtr nativeObj, int value);
- // C++: void cv::BackgroundSubtractorKNN::setkNNSamples(int _nkNN)
- [DllImport(LIBNAME)]
- private static extern void video_BackgroundSubtractorKNN_setkNNSamples_10(IntPtr nativeObj, int _nkNN);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void video_BackgroundSubtractorKNN_delete(IntPtr nativeObj);
- #endif
- }
- }
|