123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.VideoModule
- {
- // C++: class SparsePyrLKOpticalFlow
- //javadoc: SparsePyrLKOpticalFlow
- public class SparsePyrLKOpticalFlow : SparseOpticalFlow
- {
- 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)
- video_SparsePyrLKOpticalFlow_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose (disposing);
- }
- #else
- return;
- #endif
- }
- protected internal SparsePyrLKOpticalFlow (IntPtr addr) : base (addr) { }
- // internal usage only
- public static new SparsePyrLKOpticalFlow __fromPtr__ (IntPtr addr) { return new SparsePyrLKOpticalFlow (addr); }
- //
- // C++: static Ptr_SparsePyrLKOpticalFlow cv::SparsePyrLKOpticalFlow::create(Size winSize = Size(21, 21), int maxLevel = 3, TermCriteria crit = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
- //
- //javadoc: SparsePyrLKOpticalFlow::create(winSize, maxLevel, crit, flags, minEigThreshold)
- public static SparsePyrLKOpticalFlow create (Size winSize, int maxLevel, TermCriteria crit, int flags, double minEigThreshold)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(video_SparsePyrLKOpticalFlow_create_10(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon, flags, minEigThreshold));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: SparsePyrLKOpticalFlow::create(winSize, maxLevel, crit, flags)
- public static SparsePyrLKOpticalFlow create (Size winSize, int maxLevel, TermCriteria crit, int flags)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(video_SparsePyrLKOpticalFlow_create_11(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon, flags));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: SparsePyrLKOpticalFlow::create(winSize, maxLevel, crit)
- public static SparsePyrLKOpticalFlow create (Size winSize, int maxLevel, TermCriteria crit)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(video_SparsePyrLKOpticalFlow_create_12(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: SparsePyrLKOpticalFlow::create(winSize, maxLevel)
- public static SparsePyrLKOpticalFlow create (Size winSize, int maxLevel)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(video_SparsePyrLKOpticalFlow_create_13(winSize.width, winSize.height, maxLevel));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: SparsePyrLKOpticalFlow::create(winSize)
- public static SparsePyrLKOpticalFlow create (Size winSize)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(video_SparsePyrLKOpticalFlow_create_14(winSize.width, winSize.height));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: SparsePyrLKOpticalFlow::create()
- public static SparsePyrLKOpticalFlow create ()
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- SparsePyrLKOpticalFlow retVal = SparsePyrLKOpticalFlow.__fromPtr__(video_SparsePyrLKOpticalFlow_create_15());
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Size cv::SparsePyrLKOpticalFlow::getWinSize()
- //
- //javadoc: SparsePyrLKOpticalFlow::getWinSize()
- public Size getWinSize ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double[] tmpArray = new double[2];
- video_SparsePyrLKOpticalFlow_getWinSize_10(nativeObj, tmpArray);
- Size retVal = new Size (tmpArray);
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: TermCriteria cv::SparsePyrLKOpticalFlow::getTermCriteria()
- //
- //javadoc: SparsePyrLKOpticalFlow::getTermCriteria()
- public TermCriteria getTermCriteria ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double[] tmpArray = new double[3];
- video_SparsePyrLKOpticalFlow_getTermCriteria_10(nativeObj, tmpArray);
- TermCriteria retVal = new TermCriteria (tmpArray);
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: double cv::SparsePyrLKOpticalFlow::getMinEigThreshold()
- //
- //javadoc: SparsePyrLKOpticalFlow::getMinEigThreshold()
- public double getMinEigThreshold ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double retVal = video_SparsePyrLKOpticalFlow_getMinEigThreshold_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::SparsePyrLKOpticalFlow::getFlags()
- //
- //javadoc: SparsePyrLKOpticalFlow::getFlags()
- public int getFlags ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = video_SparsePyrLKOpticalFlow_getFlags_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::SparsePyrLKOpticalFlow::getMaxLevel()
- //
- //javadoc: SparsePyrLKOpticalFlow::getMaxLevel()
- public int getMaxLevel ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = video_SparsePyrLKOpticalFlow_getMaxLevel_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void cv::SparsePyrLKOpticalFlow::setFlags(int flags)
- //
- //javadoc: SparsePyrLKOpticalFlow::setFlags(flags)
- public void setFlags (int flags)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- video_SparsePyrLKOpticalFlow_setFlags_10(nativeObj, flags);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::SparsePyrLKOpticalFlow::setMaxLevel(int maxLevel)
- //
- //javadoc: SparsePyrLKOpticalFlow::setMaxLevel(maxLevel)
- public void setMaxLevel (int maxLevel)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- video_SparsePyrLKOpticalFlow_setMaxLevel_10(nativeObj, maxLevel);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::SparsePyrLKOpticalFlow::setMinEigThreshold(double minEigThreshold)
- //
- //javadoc: SparsePyrLKOpticalFlow::setMinEigThreshold(minEigThreshold)
- public void setMinEigThreshold (double minEigThreshold)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- video_SparsePyrLKOpticalFlow_setMinEigThreshold_10(nativeObj, minEigThreshold);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::SparsePyrLKOpticalFlow::setTermCriteria(TermCriteria crit)
- //
- //javadoc: SparsePyrLKOpticalFlow::setTermCriteria(crit)
- public void setTermCriteria (TermCriteria crit)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- video_SparsePyrLKOpticalFlow_setTermCriteria_10(nativeObj, crit.type, crit.maxCount, crit.epsilon);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::SparsePyrLKOpticalFlow::setWinSize(Size winSize)
- //
- //javadoc: SparsePyrLKOpticalFlow::setWinSize(winSize)
- public void setWinSize (Size winSize)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- video_SparsePyrLKOpticalFlow_setWinSize_10(nativeObj, winSize.width, winSize.height);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: static Ptr_SparsePyrLKOpticalFlow cv::SparsePyrLKOpticalFlow::create(Size winSize = Size(21, 21), int maxLevel = 3, TermCriteria crit = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)
- [DllImport (LIBNAME)]
- private static extern IntPtr video_SparsePyrLKOpticalFlow_create_10 (double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon, int flags, double minEigThreshold);
- [DllImport (LIBNAME)]
- private static extern IntPtr video_SparsePyrLKOpticalFlow_create_11 (double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon, int flags);
- [DllImport (LIBNAME)]
- private static extern IntPtr video_SparsePyrLKOpticalFlow_create_12 (double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon);
- [DllImport (LIBNAME)]
- private static extern IntPtr video_SparsePyrLKOpticalFlow_create_13 (double winSize_width, double winSize_height, int maxLevel);
- [DllImport (LIBNAME)]
- private static extern IntPtr video_SparsePyrLKOpticalFlow_create_14 (double winSize_width, double winSize_height);
- [DllImport (LIBNAME)]
- private static extern IntPtr video_SparsePyrLKOpticalFlow_create_15 ();
- // C++: Size cv::SparsePyrLKOpticalFlow::getWinSize()
- [DllImport (LIBNAME)]
- private static extern void video_SparsePyrLKOpticalFlow_getWinSize_10 (IntPtr nativeObj, double[] retVal);
- // C++: TermCriteria cv::SparsePyrLKOpticalFlow::getTermCriteria()
- [DllImport (LIBNAME)]
- private static extern void video_SparsePyrLKOpticalFlow_getTermCriteria_10 (IntPtr nativeObj, double[] retVal);
- // C++: double cv::SparsePyrLKOpticalFlow::getMinEigThreshold()
- [DllImport (LIBNAME)]
- private static extern double video_SparsePyrLKOpticalFlow_getMinEigThreshold_10 (IntPtr nativeObj);
- // C++: int cv::SparsePyrLKOpticalFlow::getFlags()
- [DllImport (LIBNAME)]
- private static extern int video_SparsePyrLKOpticalFlow_getFlags_10 (IntPtr nativeObj);
- // C++: int cv::SparsePyrLKOpticalFlow::getMaxLevel()
- [DllImport (LIBNAME)]
- private static extern int video_SparsePyrLKOpticalFlow_getMaxLevel_10 (IntPtr nativeObj);
- // C++: void cv::SparsePyrLKOpticalFlow::setFlags(int flags)
- [DllImport (LIBNAME)]
- private static extern void video_SparsePyrLKOpticalFlow_setFlags_10 (IntPtr nativeObj, int flags);
- // C++: void cv::SparsePyrLKOpticalFlow::setMaxLevel(int maxLevel)
- [DllImport (LIBNAME)]
- private static extern void video_SparsePyrLKOpticalFlow_setMaxLevel_10 (IntPtr nativeObj, int maxLevel);
- // C++: void cv::SparsePyrLKOpticalFlow::setMinEigThreshold(double minEigThreshold)
- [DllImport (LIBNAME)]
- private static extern void video_SparsePyrLKOpticalFlow_setMinEigThreshold_10 (IntPtr nativeObj, double minEigThreshold);
- // C++: void cv::SparsePyrLKOpticalFlow::setTermCriteria(TermCriteria crit)
- [DllImport (LIBNAME)]
- private static extern void video_SparsePyrLKOpticalFlow_setTermCriteria_10 (IntPtr nativeObj, int crit_type, int crit_maxCount, double crit_epsilon);
- // C++: void cv::SparsePyrLKOpticalFlow::setWinSize(Size winSize)
- [DllImport (LIBNAME)]
- private static extern void video_SparsePyrLKOpticalFlow_setWinSize_10 (IntPtr nativeObj, double winSize_width, double winSize_height);
- // native support for java finalize()
- [DllImport (LIBNAME)]
- private static extern void video_SparsePyrLKOpticalFlow_delete (IntPtr nativeObj);
- }
- }
|