123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.ObjdetectModule
- {
- // C++: class CascadeClassifier
- //javadoc: CascadeClassifier
- public class CascadeClassifier : DisposableOpenCVObject
- {
- 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)
- objdetect_CascadeClassifier_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose (disposing);
- }
- #else
- return;
- #endif
- }
- protected internal CascadeClassifier (IntPtr addr) : base (addr) { }
- public IntPtr getNativeObjAddr () { return nativeObj; }
- // internal usage only
- public static CascadeClassifier __fromPtr__ (IntPtr addr) { return new CascadeClassifier (addr); }
- //
- // C++: cv::CascadeClassifier::CascadeClassifier(String filename)
- //
- //javadoc: CascadeClassifier::CascadeClassifier(filename)
- public CascadeClassifier (string filename)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- nativeObj = objdetect_CascadeClassifier_CascadeClassifier_10(filename);
-
- return;
- #else
- return null;
- #endif
- }
- //
- // C++: cv::CascadeClassifier::CascadeClassifier()
- //
- //javadoc: CascadeClassifier::CascadeClassifier()
- public CascadeClassifier ()
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- nativeObj = objdetect_CascadeClassifier_CascadeClassifier_11();
-
- return;
- #else
- return null;
- #endif
- }
- //
- // C++: Size cv::CascadeClassifier::getOriginalWindowSize()
- //
- //javadoc: CascadeClassifier::getOriginalWindowSize()
- public Size getOriginalWindowSize ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- double[] tmpArray = new double[2];
- objdetect_CascadeClassifier_getOriginalWindowSize_10(nativeObj, tmpArray);
- Size retVal = new Size (tmpArray);
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: static bool cv::CascadeClassifier::convert(String oldcascade, String newcascade)
- //
- //javadoc: CascadeClassifier::convert(oldcascade, newcascade)
- public static bool convert (string oldcascade, string newcascade)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bool retVal = objdetect_CascadeClassifier_convert_10(oldcascade, newcascade);
-
- return retVal;
- #else
- return false;
- #endif
- }
- //
- // C++: bool cv::CascadeClassifier::empty()
- //
- //javadoc: CascadeClassifier::empty()
- public bool empty ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bool retVal = objdetect_CascadeClassifier_empty_10(nativeObj);
-
- return retVal;
- #else
- return false;
- #endif
- }
- //
- // C++: bool cv::CascadeClassifier::isOldFormatCascade()
- //
- //javadoc: CascadeClassifier::isOldFormatCascade()
- public bool isOldFormatCascade ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bool retVal = objdetect_CascadeClassifier_isOldFormatCascade_10(nativeObj);
-
- return retVal;
- #else
- return false;
- #endif
- }
- //
- // C++: bool cv::CascadeClassifier::load(String filename)
- //
- //javadoc: CascadeClassifier::load(filename)
- public bool load (string filename)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- bool retVal = objdetect_CascadeClassifier_load_10(nativeObj, filename);
-
- return retVal;
- #else
- return false;
- #endif
- }
- //
- // C++: bool cv::CascadeClassifier::read(FileNode node)
- //
- // Unknown type 'FileNode' (I), skipping the function
- //
- // C++: int cv::CascadeClassifier::getFeatureType()
- //
- //javadoc: CascadeClassifier::getFeatureType()
- public int getFeatureType ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = objdetect_CascadeClassifier_getFeatureType_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
- //
- //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors, flags, minSize, maxSize)
- public void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- objdetect_CascadeClassifier_detectMultiScale_10(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors, flags, minSize)
- public void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- objdetect_CascadeClassifier_detectMultiScale_11(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors, flags)
- public void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- objdetect_CascadeClassifier_detectMultiScale_12(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor, minNeighbors)
- public void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- objdetect_CascadeClassifier_detectMultiScale_13(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale(image, objects, scaleFactor)
- public void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- objdetect_CascadeClassifier_detectMultiScale_14(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale(image, objects)
- public void detectMultiScale (Mat image, MatOfRect objects)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- objdetect_CascadeClassifier_detectMultiScale_15(nativeObj, image.nativeObj, objects_mat.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& numDetections, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
- //
- //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor, minNeighbors, flags, minSize, maxSize)
- public void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (numDetections != null) numDetections.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat numDetections_mat = numDetections;
- objdetect_CascadeClassifier_detectMultiScale2_10(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor, minNeighbors, flags, minSize)
- public void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (numDetections != null) numDetections.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat numDetections_mat = numDetections;
- objdetect_CascadeClassifier_detectMultiScale2_11(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor, minNeighbors, flags)
- public void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (numDetections != null) numDetections.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat numDetections_mat = numDetections;
- objdetect_CascadeClassifier_detectMultiScale2_12(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor, minNeighbors)
- public void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (numDetections != null) numDetections.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat numDetections_mat = numDetections;
- objdetect_CascadeClassifier_detectMultiScale2_13(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections, scaleFactor)
- public void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (numDetections != null) numDetections.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat numDetections_mat = numDetections;
- objdetect_CascadeClassifier_detectMultiScale2_14(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale2(image, objects, numDetections)
- public void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (numDetections != null) numDetections.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat numDetections_mat = numDetections;
- objdetect_CascadeClassifier_detectMultiScale2_15(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& rejectLevels, vector_double& levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size(), bool outputRejectLevels = false)
- //
- //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags, minSize, maxSize, outputRejectLevels)
- public void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, bool outputRejectLevels)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (rejectLevels != null) rejectLevels.ThrowIfDisposed ();
- if (levelWeights != null) levelWeights.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat rejectLevels_mat = rejectLevels;
- Mat levelWeights_mat = levelWeights;
- objdetect_CascadeClassifier_detectMultiScale3_10(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags, minSize, maxSize)
- public void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (rejectLevels != null) rejectLevels.ThrowIfDisposed ();
- if (levelWeights != null) levelWeights.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat rejectLevels_mat = rejectLevels;
- Mat levelWeights_mat = levelWeights;
- objdetect_CascadeClassifier_detectMultiScale3_11(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags, minSize)
- public void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (rejectLevels != null) rejectLevels.ThrowIfDisposed ();
- if (levelWeights != null) levelWeights.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat rejectLevels_mat = rejectLevels;
- Mat levelWeights_mat = levelWeights;
- objdetect_CascadeClassifier_detectMultiScale3_12(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors, flags)
- public void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (rejectLevels != null) rejectLevels.ThrowIfDisposed ();
- if (levelWeights != null) levelWeights.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat rejectLevels_mat = rejectLevels;
- Mat levelWeights_mat = levelWeights;
- objdetect_CascadeClassifier_detectMultiScale3_13(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor, minNeighbors)
- public void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (rejectLevels != null) rejectLevels.ThrowIfDisposed ();
- if (levelWeights != null) levelWeights.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat rejectLevels_mat = rejectLevels;
- Mat levelWeights_mat = levelWeights;
- objdetect_CascadeClassifier_detectMultiScale3_14(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights, scaleFactor)
- public void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (rejectLevels != null) rejectLevels.ThrowIfDisposed ();
- if (levelWeights != null) levelWeights.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat rejectLevels_mat = rejectLevels;
- Mat levelWeights_mat = levelWeights;
- objdetect_CascadeClassifier_detectMultiScale3_15(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: CascadeClassifier::detectMultiScale3(image, objects, rejectLevels, levelWeights)
- public void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
- {
- ThrowIfDisposed ();
- if (image != null) image.ThrowIfDisposed ();
- if (objects != null) objects.ThrowIfDisposed ();
- if (rejectLevels != null) rejectLevels.ThrowIfDisposed ();
- if (levelWeights != null) levelWeights.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat objects_mat = objects;
- Mat rejectLevels_mat = rejectLevels;
- Mat levelWeights_mat = levelWeights;
- objdetect_CascadeClassifier_detectMultiScale3_16(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: cv::CascadeClassifier::CascadeClassifier(String filename)
- [DllImport (LIBNAME)]
- private static extern IntPtr objdetect_CascadeClassifier_CascadeClassifier_10 (string filename);
- // C++: cv::CascadeClassifier::CascadeClassifier()
- [DllImport (LIBNAME)]
- private static extern IntPtr objdetect_CascadeClassifier_CascadeClassifier_11 ();
- // C++: Size cv::CascadeClassifier::getOriginalWindowSize()
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_getOriginalWindowSize_10 (IntPtr nativeObj, double[] retVal);
- // C++: static bool cv::CascadeClassifier::convert(String oldcascade, String newcascade)
- [DllImport (LIBNAME)]
- private static extern bool objdetect_CascadeClassifier_convert_10 (string oldcascade, string newcascade);
- // C++: bool cv::CascadeClassifier::empty()
- [DllImport (LIBNAME)]
- private static extern bool objdetect_CascadeClassifier_empty_10 (IntPtr nativeObj);
- // C++: bool cv::CascadeClassifier::isOldFormatCascade()
- [DllImport (LIBNAME)]
- private static extern bool objdetect_CascadeClassifier_isOldFormatCascade_10 (IntPtr nativeObj);
- // C++: bool cv::CascadeClassifier::load(String filename)
- [DllImport (LIBNAME)]
- private static extern bool objdetect_CascadeClassifier_load_10 (IntPtr nativeObj, string filename);
- // C++: int cv::CascadeClassifier::getFeatureType()
- [DllImport (LIBNAME)]
- private static extern int objdetect_CascadeClassifier_getFeatureType_10 (IntPtr nativeObj);
- // C++: void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale_10 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale_11 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale_12 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, double scaleFactor, int minNeighbors, int flags);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale_13 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, double scaleFactor, int minNeighbors);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale_14 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, double scaleFactor);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale_15 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj);
- // C++: void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& numDetections, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size())
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale2_10 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr numDetections_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale2_11 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr numDetections_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale2_12 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr numDetections_mat_nativeObj, double scaleFactor, int minNeighbors, int flags);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale2_13 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr numDetections_mat_nativeObj, double scaleFactor, int minNeighbors);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale2_14 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr numDetections_mat_nativeObj, double scaleFactor);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale2_15 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr numDetections_mat_nativeObj);
- // C++: void cv::CascadeClassifier::detectMultiScale(Mat image, vector_Rect& objects, vector_int& rejectLevels, vector_double& levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, int flags = 0, Size minSize = Size(), Size maxSize = Size(), bool outputRejectLevels = false)
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale3_10 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr rejectLevels_mat_nativeObj, IntPtr levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height, bool outputRejectLevels);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale3_11 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr rejectLevels_mat_nativeObj, IntPtr levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height, double maxSize_width, double maxSize_height);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale3_12 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr rejectLevels_mat_nativeObj, IntPtr levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags, double minSize_width, double minSize_height);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale3_13 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr rejectLevels_mat_nativeObj, IntPtr levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors, int flags);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale3_14 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr rejectLevels_mat_nativeObj, IntPtr levelWeights_mat_nativeObj, double scaleFactor, int minNeighbors);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale3_15 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr rejectLevels_mat_nativeObj, IntPtr levelWeights_mat_nativeObj, double scaleFactor);
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_detectMultiScale3_16 (IntPtr nativeObj, IntPtr image_nativeObj, IntPtr objects_mat_nativeObj, IntPtr rejectLevels_mat_nativeObj, IntPtr levelWeights_mat_nativeObj);
- // native support for java finalize()
- [DllImport (LIBNAME)]
- private static extern void objdetect_CascadeClassifier_delete (IntPtr nativeObj);
- }
- }
|