12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121 |
- #if !UNITY_WSA_10_0
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.DnnModule
- {
- // C++: class Dnn
- //javadoc: Dnn
- public class Dnn
- {
- // C++: enum Backend
- public const int DNN_BACKEND_DEFAULT = 0;
- public const int DNN_BACKEND_HALIDE = 1;
- public const int DNN_BACKEND_INFERENCE_ENGINE = 2;
- public const int DNN_BACKEND_OPENCV = 3;
- public const int DNN_BACKEND_VKCOM = 4;
- // C++: enum Target
- public const int DNN_TARGET_CPU = 0;
- public const int DNN_TARGET_OPENCL = 1;
- public const int DNN_TARGET_OPENCL_FP16 = 2;
- public const int DNN_TARGET_MYRIAD = 3;
- public const int DNN_TARGET_VULKAN = 4;
- //
- // C++: Mat cv::dnn::blobFromImage(Mat image, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = false, bool crop = false, int ddepth = CV_32F)
- //
- //javadoc: blobFromImage(image, scalefactor, size, mean, swapRB, crop, ddepth)
- public static Mat blobFromImage (Mat image, double scalefactor, Size size, Scalar mean, bool swapRB, bool crop, int ddepth)
- {
- if (image != null)
- image.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_blobFromImage_10 (image.nativeObj, scalefactor, size.width, size.height, mean.val [0], mean.val [1], mean.val [2], mean.val [3], swapRB, crop, ddepth));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImage(image, scalefactor, size, mean, swapRB, crop)
- public static Mat blobFromImage (Mat image, double scalefactor, Size size, Scalar mean, bool swapRB, bool crop)
- {
- if (image != null)
- image.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_blobFromImage_11 (image.nativeObj, scalefactor, size.width, size.height, mean.val [0], mean.val [1], mean.val [2], mean.val [3], swapRB, crop));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImage(image, scalefactor, size, mean, swapRB)
- public static Mat blobFromImage (Mat image, double scalefactor, Size size, Scalar mean, bool swapRB)
- {
- if (image != null)
- image.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_blobFromImage_12 (image.nativeObj, scalefactor, size.width, size.height, mean.val [0], mean.val [1], mean.val [2], mean.val [3], swapRB));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImage(image, scalefactor, size, mean)
- public static Mat blobFromImage (Mat image, double scalefactor, Size size, Scalar mean)
- {
- if (image != null)
- image.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_blobFromImage_13 (image.nativeObj, scalefactor, size.width, size.height, mean.val [0], mean.val [1], mean.val [2], mean.val [3]));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImage(image, scalefactor, size)
- public static Mat blobFromImage (Mat image, double scalefactor, Size size)
- {
- if (image != null)
- image.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_blobFromImage_14 (image.nativeObj, scalefactor, size.width, size.height));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImage(image, scalefactor)
- public static Mat blobFromImage (Mat image, double scalefactor)
- {
- if (image != null)
- image.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_blobFromImage_15 (image.nativeObj, scalefactor));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImage(image)
- public static Mat blobFromImage (Mat image)
- {
- if (image != null)
- image.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_blobFromImage_16 (image.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Mat cv::dnn::blobFromImages(vector_Mat images, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = false, bool crop = false, int ddepth = CV_32F)
- //
- //javadoc: blobFromImages(images, scalefactor, size, mean, swapRB, crop, ddepth)
- public static Mat blobFromImages (List<Mat> images, double scalefactor, Size size, Scalar mean, bool swapRB, bool crop, int ddepth)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat images_mat = Converters.vector_Mat_to_Mat (images);
- Mat retVal = new Mat (dnn_Dnn_blobFromImages_10 (images_mat.nativeObj, scalefactor, size.width, size.height, mean.val [0], mean.val [1], mean.val [2], mean.val [3], swapRB, crop, ddepth));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImages(images, scalefactor, size, mean, swapRB, crop)
- public static Mat blobFromImages (List<Mat> images, double scalefactor, Size size, Scalar mean, bool swapRB, bool crop)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat images_mat = Converters.vector_Mat_to_Mat (images);
- Mat retVal = new Mat (dnn_Dnn_blobFromImages_11 (images_mat.nativeObj, scalefactor, size.width, size.height, mean.val [0], mean.val [1], mean.val [2], mean.val [3], swapRB, crop));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImages(images, scalefactor, size, mean, swapRB)
- public static Mat blobFromImages (List<Mat> images, double scalefactor, Size size, Scalar mean, bool swapRB)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat images_mat = Converters.vector_Mat_to_Mat (images);
- Mat retVal = new Mat (dnn_Dnn_blobFromImages_12 (images_mat.nativeObj, scalefactor, size.width, size.height, mean.val [0], mean.val [1], mean.val [2], mean.val [3], swapRB));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImages(images, scalefactor, size, mean)
- public static Mat blobFromImages (List<Mat> images, double scalefactor, Size size, Scalar mean)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat images_mat = Converters.vector_Mat_to_Mat (images);
- Mat retVal = new Mat (dnn_Dnn_blobFromImages_13 (images_mat.nativeObj, scalefactor, size.width, size.height, mean.val [0], mean.val [1], mean.val [2], mean.val [3]));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImages(images, scalefactor, size)
- public static Mat blobFromImages (List<Mat> images, double scalefactor, Size size)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat images_mat = Converters.vector_Mat_to_Mat (images);
- Mat retVal = new Mat (dnn_Dnn_blobFromImages_14 (images_mat.nativeObj, scalefactor, size.width, size.height));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImages(images, scalefactor)
- public static Mat blobFromImages (List<Mat> images, double scalefactor)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat images_mat = Converters.vector_Mat_to_Mat (images);
- Mat retVal = new Mat (dnn_Dnn_blobFromImages_15 (images_mat.nativeObj, scalefactor));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: blobFromImages(images)
- public static Mat blobFromImages (List<Mat> images)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat images_mat = Converters.vector_Mat_to_Mat (images);
- Mat retVal = new Mat (dnn_Dnn_blobFromImages_16 (images_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Mat cv::dnn::readTensorFromONNX(String path)
- //
- //javadoc: readTensorFromONNX(path)
- public static Mat readTensorFromONNX (string path)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_readTensorFromONNX_10 (path));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Mat cv::dnn::readTorchBlob(String filename, bool isBinary = true)
- //
- //javadoc: readTorchBlob(filename, isBinary)
- public static Mat readTorchBlob (string filename, bool isBinary)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_readTorchBlob_10 (filename, isBinary));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readTorchBlob(filename)
- public static Mat readTorchBlob (string filename)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Mat retVal = new Mat (dnn_Dnn_readTorchBlob_11 (filename));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNet(String framework, vector_uchar bufferModel, vector_uchar bufferConfig = std::vector<uchar>())
- //
- //javadoc: readNet(framework, bufferModel, bufferConfig)
- public static Net readNet (string framework, MatOfByte bufferModel, MatOfByte bufferConfig)
- {
- if (bufferModel != null)
- bufferModel.ThrowIfDisposed ();
- if (bufferConfig != null)
- bufferConfig.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bufferModel_mat = bufferModel;
- Mat bufferConfig_mat = bufferConfig;
- Net retVal = new Net (dnn_Dnn_readNet_10 (framework, bufferModel_mat.nativeObj, bufferConfig_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNet(framework, bufferModel)
- public static Net readNet (string framework, MatOfByte bufferModel)
- {
- if (bufferModel != null)
- bufferModel.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bufferModel_mat = bufferModel;
- Net retVal = new Net (dnn_Dnn_readNet_11 (framework, bufferModel_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNet(String model, String config = "", String framework = "")
- //
- //javadoc: readNet(model, config, framework)
- public static Net readNet (string model, string config, string framework)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNet_12 (model, config, framework));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNet(model, config)
- public static Net readNet (string model, string config)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNet_13 (model, config));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNet(model)
- public static Net readNet (string model)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNet_14 (model));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromCaffe(String prototxt, String caffeModel = String())
- //
- //javadoc: readNetFromCaffe(prototxt, caffeModel)
- public static Net readNetFromCaffe (string prototxt, string caffeModel)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromCaffe_10 (prototxt, caffeModel));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNetFromCaffe(prototxt)
- public static Net readNetFromCaffe (string prototxt)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromCaffe_11 (prototxt));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromCaffe(vector_uchar bufferProto, vector_uchar bufferModel = std::vector<uchar>())
- //
- //javadoc: readNetFromCaffe(bufferProto, bufferModel)
- public static Net readNetFromCaffe (MatOfByte bufferProto, MatOfByte bufferModel)
- {
- if (bufferProto != null)
- bufferProto.ThrowIfDisposed ();
- if (bufferModel != null)
- bufferModel.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bufferProto_mat = bufferProto;
- Mat bufferModel_mat = bufferModel;
- Net retVal = new Net (dnn_Dnn_readNetFromCaffe_12 (bufferProto_mat.nativeObj, bufferModel_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNetFromCaffe(bufferProto)
- public static Net readNetFromCaffe (MatOfByte bufferProto)
- {
- if (bufferProto != null)
- bufferProto.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bufferProto_mat = bufferProto;
- Net retVal = new Net (dnn_Dnn_readNetFromCaffe_13 (bufferProto_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromDarknet(String cfgFile, String darknetModel = String())
- //
- //javadoc: readNetFromDarknet(cfgFile, darknetModel)
- public static Net readNetFromDarknet (string cfgFile, string darknetModel)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromDarknet_10 (cfgFile, darknetModel));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNetFromDarknet(cfgFile)
- public static Net readNetFromDarknet (string cfgFile)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromDarknet_11 (cfgFile));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromDarknet(vector_uchar bufferCfg, vector_uchar bufferModel = std::vector<uchar>())
- //
- //javadoc: readNetFromDarknet(bufferCfg, bufferModel)
- public static Net readNetFromDarknet (MatOfByte bufferCfg, MatOfByte bufferModel)
- {
- if (bufferCfg != null)
- bufferCfg.ThrowIfDisposed ();
- if (bufferModel != null)
- bufferModel.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bufferCfg_mat = bufferCfg;
- Mat bufferModel_mat = bufferModel;
- Net retVal = new Net (dnn_Dnn_readNetFromDarknet_12 (bufferCfg_mat.nativeObj, bufferModel_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNetFromDarknet(bufferCfg)
- public static Net readNetFromDarknet (MatOfByte bufferCfg)
- {
- if (bufferCfg != null)
- bufferCfg.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bufferCfg_mat = bufferCfg;
- Net retVal = new Net (dnn_Dnn_readNetFromDarknet_13 (bufferCfg_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromModelOptimizer(String xml, String bin)
- //
- //javadoc: readNetFromModelOptimizer(xml, bin)
- public static Net readNetFromModelOptimizer (string xml, string bin)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromModelOptimizer_10 (xml, bin));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromONNX(String onnxFile)
- //
- //javadoc: readNetFromONNX(onnxFile)
- public static Net readNetFromONNX (string onnxFile)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromONNX_10 (onnxFile));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromTensorflow(String model, String config = String())
- //
- //javadoc: readNetFromTensorflow(model, config)
- public static Net readNetFromTensorflow (string model, string config)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromTensorflow_10 (model, config));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNetFromTensorflow(model)
- public static Net readNetFromTensorflow (string model)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromTensorflow_11 (model));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromTensorflow(vector_uchar bufferModel, vector_uchar bufferConfig = std::vector<uchar>())
- //
- //javadoc: readNetFromTensorflow(bufferModel, bufferConfig)
- public static Net readNetFromTensorflow (MatOfByte bufferModel, MatOfByte bufferConfig)
- {
- if (bufferModel != null)
- bufferModel.ThrowIfDisposed ();
- if (bufferConfig != null)
- bufferConfig.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bufferModel_mat = bufferModel;
- Mat bufferConfig_mat = bufferConfig;
- Net retVal = new Net (dnn_Dnn_readNetFromTensorflow_12 (bufferModel_mat.nativeObj, bufferConfig_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNetFromTensorflow(bufferModel)
- public static Net readNetFromTensorflow (MatOfByte bufferModel)
- {
- if (bufferModel != null)
- bufferModel.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bufferModel_mat = bufferModel;
- Net retVal = new Net (dnn_Dnn_readNetFromTensorflow_13 (bufferModel_mat.nativeObj));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: Net cv::dnn::readNetFromTorch(String model, bool isBinary = true)
- //
- //javadoc: readNetFromTorch(model, isBinary)
- public static Net readNetFromTorch (string model, bool isBinary)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromTorch_10 (model, isBinary));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //javadoc: readNetFromTorch(model)
- public static Net readNetFromTorch (string model)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- Net retVal = new Net (dnn_Dnn_readNetFromTorch_11 (model));
-
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: void cv::dnn::NMSBoxes(vector_Rect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
- //
- //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices, eta, top_k)
- public static void NMSBoxes (MatOfRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxes_10 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta, top_k);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices, eta)
- public static void NMSBoxes (MatOfRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxes_11 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices)
- public static void NMSBoxes (MatOfRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxes_12 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::dnn::NMSBoxes(vector_Rect2d bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
- //
- //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices, eta, top_k)
- public static void NMSBoxes (MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxes_13 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta, top_k);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices, eta)
- public static void NMSBoxes (MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxes_14 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: NMSBoxes(bboxes, scores, score_threshold, nms_threshold, indices)
- public static void NMSBoxes (MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxes_15 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::dnn::NMSBoxes(vector_RotatedRect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
- //
- //javadoc: NMSBoxesRotated(bboxes, scores, score_threshold, nms_threshold, indices, eta, top_k)
- public static void NMSBoxesRotated (MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxesRotated_10 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta, top_k);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: NMSBoxesRotated(bboxes, scores, score_threshold, nms_threshold, indices, eta)
- public static void NMSBoxesRotated (MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxesRotated_11 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj, eta);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: NMSBoxesRotated(bboxes, scores, score_threshold, nms_threshold, indices)
- public static void NMSBoxesRotated (MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
- {
- if (bboxes != null)
- bboxes.ThrowIfDisposed ();
- if (scores != null)
- scores.ThrowIfDisposed ();
- if (indices != null)
- indices.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat bboxes_mat = bboxes;
- Mat scores_mat = scores;
- Mat indices_mat = indices;
- dnn_Dnn_NMSBoxesRotated_12 (bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::dnn::imagesFromBlob(Mat blob_, vector_Mat& images_)
- //
- //javadoc: imagesFromBlob(blob_, images_)
- public static void imagesFromBlob (Mat blob_, List<Mat> images_)
- {
- if (blob_ != null)
- blob_.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat images__mat = new Mat ();
- dnn_Dnn_imagesFromBlob_10 (blob_.nativeObj, images__mat.nativeObj);
- Converters.Mat_to_vector_Mat (images__mat, images_);
- images__mat.release ();
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::dnn::resetMyriadDevice()
- //
- //javadoc: resetMyriadDevice()
- public static void resetMyriadDevice ()
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- dnn_Dnn_resetMyriadDevice_10 ();
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::dnn::shrinkCaffeModel(String src, String dst, vector_String layersTypes = std::vector<String>())
- //
- //javadoc: shrinkCaffeModel(src, dst, layersTypes)
- public static void shrinkCaffeModel (string src, string dst, List<string> layersTypes)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- Mat layersTypes_mat = Converters.vector_String_to_Mat (layersTypes);
- dnn_Dnn_shrinkCaffeModel_10 (src, dst, layersTypes_mat.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //javadoc: shrinkCaffeModel(src, dst)
- public static void shrinkCaffeModel (string src, string dst)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- dnn_Dnn_shrinkCaffeModel_11 (src, dst);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::dnn::writeTextGraph(String model, String output)
- //
- //javadoc: writeTextGraph(model, output)
- public static void writeTextGraph (string model, string output)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- dnn_Dnn_writeTextGraph_10 (model, output);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
-
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: Mat cv::dnn::blobFromImage(Mat image, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = false, bool crop = false, int ddepth = CV_32F)
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImage_10 (IntPtr image_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3, bool swapRB, bool crop, int ddepth);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImage_11 (IntPtr image_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3, bool swapRB, bool crop);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImage_12 (IntPtr image_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3, bool swapRB);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImage_13 (IntPtr image_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImage_14 (IntPtr image_nativeObj, double scalefactor, double size_width, double size_height);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImage_15 (IntPtr image_nativeObj, double scalefactor);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImage_16 (IntPtr image_nativeObj);
- // C++: Mat cv::dnn::blobFromImages(vector_Mat images, double scalefactor = 1.0, Size size = Size(), Scalar mean = Scalar(), bool swapRB = false, bool crop = false, int ddepth = CV_32F)
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImages_10 (IntPtr images_mat_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3, bool swapRB, bool crop, int ddepth);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImages_11 (IntPtr images_mat_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3, bool swapRB, bool crop);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImages_12 (IntPtr images_mat_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3, bool swapRB);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImages_13 (IntPtr images_mat_nativeObj, double scalefactor, double size_width, double size_height, double mean_val0, double mean_val1, double mean_val2, double mean_val3);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImages_14 (IntPtr images_mat_nativeObj, double scalefactor, double size_width, double size_height);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImages_15 (IntPtr images_mat_nativeObj, double scalefactor);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_blobFromImages_16 (IntPtr images_mat_nativeObj);
- // C++: Mat cv::dnn::readTensorFromONNX(String path)
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readTensorFromONNX_10 (string path);
- // C++: Mat cv::dnn::readTorchBlob(String filename, bool isBinary = true)
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readTorchBlob_10 (string filename, bool isBinary);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readTorchBlob_11 (string filename);
- // C++: Net cv::dnn::readNet(String framework, vector_uchar bufferModel, vector_uchar bufferConfig = std::vector<uchar>())
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNet_10 (string framework, IntPtr bufferModel_mat_nativeObj, IntPtr bufferConfig_mat_nativeObj);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNet_11 (string framework, IntPtr bufferModel_mat_nativeObj);
- // C++: Net cv::dnn::readNet(String model, String config = "", String framework = "")
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNet_12 (string model, string config, string framework);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNet_13 (string model, string config);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNet_14 (string model);
- // C++: Net cv::dnn::readNetFromCaffe(String prototxt, String caffeModel = String())
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromCaffe_10 (string prototxt, string caffeModel);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromCaffe_11 (string prototxt);
- // C++: Net cv::dnn::readNetFromCaffe(vector_uchar bufferProto, vector_uchar bufferModel = std::vector<uchar>())
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromCaffe_12 (IntPtr bufferProto_mat_nativeObj, IntPtr bufferModel_mat_nativeObj);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromCaffe_13 (IntPtr bufferProto_mat_nativeObj);
- // C++: Net cv::dnn::readNetFromDarknet(String cfgFile, String darknetModel = String())
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromDarknet_10 (string cfgFile, string darknetModel);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromDarknet_11 (string cfgFile);
- // C++: Net cv::dnn::readNetFromDarknet(vector_uchar bufferCfg, vector_uchar bufferModel = std::vector<uchar>())
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromDarknet_12 (IntPtr bufferCfg_mat_nativeObj, IntPtr bufferModel_mat_nativeObj);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromDarknet_13 (IntPtr bufferCfg_mat_nativeObj);
- // C++: Net cv::dnn::readNetFromModelOptimizer(String xml, String bin)
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromModelOptimizer_10 (string xml, string bin);
- // C++: Net cv::dnn::readNetFromONNX(String onnxFile)
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromONNX_10 (string onnxFile);
- // C++: Net cv::dnn::readNetFromTensorflow(String model, String config = String())
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromTensorflow_10 (string model, string config);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromTensorflow_11 (string model);
- // C++: Net cv::dnn::readNetFromTensorflow(vector_uchar bufferModel, vector_uchar bufferConfig = std::vector<uchar>())
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromTensorflow_12 (IntPtr bufferModel_mat_nativeObj, IntPtr bufferConfig_mat_nativeObj);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromTensorflow_13 (IntPtr bufferModel_mat_nativeObj);
- // C++: Net cv::dnn::readNetFromTorch(String model, bool isBinary = true)
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromTorch_10 (string model, bool isBinary);
- [DllImport (LIBNAME)]
- private static extern IntPtr dnn_Dnn_readNetFromTorch_11 (string model);
- // C++: void cv::dnn::NMSBoxes(vector_Rect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxes_10 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj, float eta, int top_k);
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxes_11 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj, float eta);
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxes_12 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj);
- // C++: void cv::dnn::NMSBoxes(vector_Rect2d bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxes_13 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj, float eta, int top_k);
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxes_14 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj, float eta);
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxes_15 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj);
- // C++: void cv::dnn::NMSBoxes(vector_RotatedRect bboxes, vector_float scores, float score_threshold, float nms_threshold, vector_int& indices, float eta = 1.f, int top_k = 0)
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxesRotated_10 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj, float eta, int top_k);
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxesRotated_11 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj, float eta);
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_NMSBoxesRotated_12 (IntPtr bboxes_mat_nativeObj, IntPtr scores_mat_nativeObj, float score_threshold, float nms_threshold, IntPtr indices_mat_nativeObj);
- // C++: void cv::dnn::imagesFromBlob(Mat blob_, vector_Mat& images_)
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_imagesFromBlob_10 (IntPtr blob__nativeObj, IntPtr images__mat_nativeObj);
- // C++: void cv::dnn::resetMyriadDevice()
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_resetMyriadDevice_10 ();
- // C++: void cv::dnn::shrinkCaffeModel(String src, String dst, vector_String layersTypes = std::vector<String>())
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_shrinkCaffeModel_10 (string src, string dst, IntPtr layersTypes_mat_nativeObj);
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_shrinkCaffeModel_11 (string src, string dst);
- // C++: void cv::dnn::writeTextGraph(String model, String output)
- [DllImport (LIBNAME)]
- private static extern void dnn_Dnn_writeTextGraph_10 (string model, string output);
- }
- }
- #endif
|