123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.SaliencyModule
- {
- // C++: class ObjectnessBING
- //javadoc: ObjectnessBING
- public class ObjectnessBING : Objectness
- {
- 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)
- saliency_ObjectnessBING_delete (nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose (disposing);
- }
- #else
- return;
- #endif
- }
- protected internal ObjectnessBING (IntPtr addr)
- : base (addr)
- {
- }
- // internal usage only
- public static new ObjectnessBING __fromPtr__ (IntPtr addr)
- {
- return new ObjectnessBING (addr);
- }
- //
- // C++: static Ptr_ObjectnessBING cv::saliency::ObjectnessBING::create()
- //
- //javadoc: ObjectnessBING::create()
- public static ObjectnessBING create ()
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ObjectnessBING retVal = ObjectnessBING.__fromPtr__ (saliency_ObjectnessBING_create_10 ());
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: bool cv::saliency::ObjectnessBING::computeSaliency(Mat image, Mat& saliencyMap)
- //
- //javadoc: ObjectnessBING::computeSaliency(image, saliencyMap)
- public override bool computeSaliency (Mat image, Mat saliencyMap)
- {
- ThrowIfDisposed ();
- if (image != null)
- image.ThrowIfDisposed ();
- if (saliencyMap != null)
- saliencyMap.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bool retVal = saliency_ObjectnessBING_computeSaliency_10 (nativeObj, image.nativeObj, saliencyMap.nativeObj);
-
- return retVal;
- #else
- return false;
- #endif
- }
- //
- // C++: double cv::saliency::ObjectnessBING::getBase()
- //
- //javadoc: ObjectnessBING::getBase()
- public double getBase ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double retVal = saliency_ObjectnessBING_getBase_10 (nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::saliency::ObjectnessBING::getNSS()
- //
- //javadoc: ObjectnessBING::getNSS()
- public int getNSS ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = saliency_ObjectnessBING_getNSS_10 (nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::saliency::ObjectnessBING::getW()
- //
- //javadoc: ObjectnessBING::getW()
- public int getW ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = saliency_ObjectnessBING_getW_10 (nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: vector_float cv::saliency::ObjectnessBING::getobjectnessValues()
- //
- //javadoc: ObjectnessBING::getobjectnessValues()
- public MatOfFloat getobjectnessValues ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- MatOfFloat retVal = MatOfFloat.fromNativeAddr (saliency_ObjectnessBING_getobjectnessValues_10 (nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: void cv::saliency::ObjectnessBING::read()
- //
- //javadoc: ObjectnessBING::read()
- public void read ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- saliency_ObjectnessBING_read_10 (nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::saliency::ObjectnessBING::setBBResDir(String resultsDir)
- //
- //javadoc: ObjectnessBING::setBBResDir(resultsDir)
- public void setBBResDir (string resultsDir)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- saliency_ObjectnessBING_setBBResDir_10 (nativeObj, resultsDir);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::saliency::ObjectnessBING::setBase(double val)
- //
- //javadoc: ObjectnessBING::setBase(val)
- public void setBase (double val)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- saliency_ObjectnessBING_setBase_10 (nativeObj, val);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::saliency::ObjectnessBING::setNSS(int val)
- //
- //javadoc: ObjectnessBING::setNSS(val)
- public void setNSS (int val)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- saliency_ObjectnessBING_setNSS_10 (nativeObj, val);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::saliency::ObjectnessBING::setTrainingPath(String trainingPath)
- //
- //javadoc: ObjectnessBING::setTrainingPath(trainingPath)
- public void setTrainingPath (string trainingPath)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- saliency_ObjectnessBING_setTrainingPath_10 (nativeObj, trainingPath);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::saliency::ObjectnessBING::setW(int val)
- //
- //javadoc: ObjectnessBING::setW(val)
- public void setW (int val)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- saliency_ObjectnessBING_setW_10 (nativeObj, val);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::saliency::ObjectnessBING::write()
- //
- //javadoc: ObjectnessBING::write()
- public void write ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- saliency_ObjectnessBING_write_10 (nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
-
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: static Ptr_ObjectnessBING cv::saliency::ObjectnessBING::create()
- [DllImport (LIBNAME)]
- private static extern IntPtr saliency_ObjectnessBING_create_10 ();
- // C++: bool cv::saliency::ObjectnessBING::computeSaliency(Mat image, Mat& saliencyMap)
- [DllImport (LIBNAME)]
- private static extern bool saliency_ObjectnessBING_computeSaliency_10 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr saliencyMap_nativeObj);
- // C++: double cv::saliency::ObjectnessBING::getBase()
- [DllImport (LIBNAME)]
- private static extern double saliency_ObjectnessBING_getBase_10 (IntPtr nativeObj);
- // C++: int cv::saliency::ObjectnessBING::getNSS()
- [DllImport (LIBNAME)]
- private static extern int saliency_ObjectnessBING_getNSS_10 (IntPtr nativeObj);
- // C++: int cv::saliency::ObjectnessBING::getW()
- [DllImport (LIBNAME)]
- private static extern int saliency_ObjectnessBING_getW_10 (IntPtr nativeObj);
- // C++: vector_float cv::saliency::ObjectnessBING::getobjectnessValues()
- [DllImport (LIBNAME)]
- private static extern IntPtr saliency_ObjectnessBING_getobjectnessValues_10 (IntPtr nativeObj);
- // C++: void cv::saliency::ObjectnessBING::read()
- [DllImport (LIBNAME)]
- private static extern void saliency_ObjectnessBING_read_10 (IntPtr nativeObj);
- // C++: void cv::saliency::ObjectnessBING::setBBResDir(String resultsDir)
- [DllImport (LIBNAME)]
- private static extern void saliency_ObjectnessBING_setBBResDir_10 (IntPtr nativeObj, string resultsDir);
- // C++: void cv::saliency::ObjectnessBING::setBase(double val)
- [DllImport (LIBNAME)]
- private static extern void saliency_ObjectnessBING_setBase_10 (IntPtr nativeObj, double val);
- // C++: void cv::saliency::ObjectnessBING::setNSS(int val)
- [DllImport (LIBNAME)]
- private static extern void saliency_ObjectnessBING_setNSS_10 (IntPtr nativeObj, int val);
- // C++: void cv::saliency::ObjectnessBING::setTrainingPath(String trainingPath)
- [DllImport (LIBNAME)]
- private static extern void saliency_ObjectnessBING_setTrainingPath_10 (IntPtr nativeObj, string trainingPath);
- // C++: void cv::saliency::ObjectnessBING::setW(int val)
- [DllImport (LIBNAME)]
- private static extern void saliency_ObjectnessBING_setW_10 (IntPtr nativeObj, int val);
- // C++: void cv::saliency::ObjectnessBING::write()
- [DllImport (LIBNAME)]
- private static extern void saliency_ObjectnessBING_write_10 (IntPtr nativeObj);
- // native support for java finalize()
- [DllImport (LIBNAME)]
- private static extern void saliency_ObjectnessBING_delete (IntPtr nativeObj);
- }
- }
|