![]() |
OpenCV 4.12.0
開源計算機視覺
|
名稱空間 | |
| 名稱空間 | accessor |
| 名稱空間 | details |
型別定義 | |
| typedef std::map< std::string, std::vector< LayerFactory::Constructor > > | LayerFactory_Impl |
| typedef std::vector< int > | MatShape |
列舉 | |
| 列舉 | Backend { DNN_BACKEND_DEFAULT = 0 , DNN_BACKEND_HALIDE , DNN_BACKEND_INFERENCE_ENGINE , DNN_BACKEND_OPENCV , DNN_BACKEND_VKCOM , DNN_BACKEND_CUDA , DNN_BACKEND_WEBNN , DNN_BACKEND_TIMVX , DNN_BACKEND_CANN } |
| 層支援的計算後端列舉。更多... | |
| 列舉 | DataLayout { DNN_LAYOUT_UNKNOWN = 0 , DNN_LAYOUT_ND = 1 , DNN_LAYOUT_NCHW = 2 , DNN_LAYOUT_NCDHW = 3 , DNN_LAYOUT_NHWC = 4 , DNN_LAYOUT_NDHWC = 5 , DNN_LAYOUT_PLANAR = 6 } |
| 用於模型推理的資料佈局列舉。更多... | |
| 列舉 | ImagePaddingMode { DNN_PMODE_NULL = 0 , DNN_PMODE_CROP_CENTER = 1 , DNN_PMODE_LETTERBOX = 2 } |
影像處理模式列舉。為了方便 dnn 模型預處理要求的專業化。例如,letter box 常用於 Yolo 系列模型。更多... | |
| enum class | SoftNMSMethod { SoftNMSMethod::SOFTNMS_LINEAR = 1 , SoftNMSMethod::SOFTNMS_GAUSSIAN = 2 } |
| Soft NMS 方法列舉。更多... | |
| 列舉 | Target { DNN_TARGET_CPU = 0 , DNN_TARGET_OPENCL , DNN_TARGET_OPENCL_FP16 , DNN_TARGET_MYRIAD , DNN_TARGET_VULKAN , DNN_TARGET_FPGA , DNN_TARGET_CUDA , DNN_TARGET_CUDA_FP16 , DNN_TARGET_HDDL , DNN_TARGET_NPU , DNN_TARGET_CPU_FP16 } |
| 計算目標裝置列舉。更多... | |
函式 | |
| Mat | blobFromImage (InputArray image, double scalefactor=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false, int ddepth=CV_32F) |
從影像建立四維 blob。可選地從中心調整 image 大小並裁剪,減去 mean 值,透過 scalefactor 縮放值,交換藍色和紅色通道。 | |
| void | blobFromImage (InputArray image, OutputArray blob, double scalefactor=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false, int ddepth=CV_32F) |
| 從影像建立4維Blob。 | |
| Mat | blobFromImages (InputArrayOfArrays images, double scalefactor=1.0, Size size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false, int ddepth=CV_32F) |
從一系列影像建立四維 blob。可選地從中心調整 images 大小並裁剪,減去 mean 值,透過 scalefactor 縮放值,交換藍色和紅色通道。 | |
| void | blobFromImages (InputArrayOfArrays images, OutputArray blob, double scalefactor=1.0, Size size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false, int ddepth=CV_32F) |
| 從系列影像建立4維Blob。 | |
| Mat | blobFromImagesWithParams (InputArrayOfArrays images, const Image2BlobParams ¶m=Image2BlobParams()) |
| 使用給定引數從一系列影像建立四維 blob。 | |
| void | blobFromImagesWithParams (InputArrayOfArrays images, OutputArray blob, const Image2BlobParams ¶m=Image2BlobParams()) |
| Mat | blobFromImageWithParams (InputArray image, const Image2BlobParams ¶m=Image2BlobParams()) |
| 根據給定引數從影像建立4維Blob。 | |
| void | blobFromImageWithParams (InputArray image, OutputArray blob, const Image2BlobParams ¶m=Image2BlobParams()) |
| static MatShape | concat (const MatShape &a, const MatShape &b) |
| void | enableModelDiagnostics (bool isDiagnosticsMode) |
| 啟用使用 CV DNN API 載入 DNN 模型的詳細日誌記錄。 | |
| std::vector< std::pair< Backend, Target > > | getAvailableBackends () |
| std::vector< Target > | getAvailableTargets (dnn::Backend be) |
| cv::String | getInferenceEngineBackendType () |
| 返回 Inference Engine 內部後端 API。 | |
| cv::String | getInferenceEngineCPUType () |
| 返回 Inference Engine CPU 型別。 | |
| cv::String | getInferenceEngineVPUType () |
| 返回 Inference Engine VPU 型別。 | |
| LayerFactory_Impl & | getLayerFactoryImpl () |
| Mutex & | getLayerFactoryMutex () |
| 獲取守護 LayerFactory_Impl 的互斥鎖,參見 getLayerFactoryImpl() 函式。 | |
| static Mat | getPlane (const Mat &m, int n, int cn) |
| void | imagesFromBlob (const cv::Mat &blob_, OutputArrayOfArrays images_) |
| 解析一個四維 blob,並透過更簡單的資料結構 (std::vector<cv::Mat>) 將其包含的影像作為二維陣列輸出。 | |
| static bool | isAllOnes (const MatShape &inputShape, int startPos, int endPos) |
| void | NMSBoxes (const std::vector< Rect > &bboxes, const std::vector< float > &scores, const float score_threshold, const float nms_threshold, std::vector< int > &indices, const float eta=1.f, const int top_k=0) |
| 對給定邊界框和對應分數執行非極大值抑制。 | |
| void | NMSBoxes (const std::vector< Rect2d > &bboxes, const std::vector< float > &scores, const float score_threshold, const float nms_threshold, std::vector< int > &indices, const float eta=1.f, const int top_k=0) |
| void | NMSBoxes (const std::vector< RotatedRect > &bboxes, const std::vector< float > &scores, const float score_threshold, const float nms_threshold, std::vector< int > &indices, const float eta=1.f, const int top_k=0) |
| void | NMSBoxesBatched (const std::vector< Rect > &bboxes, const std::vector< float > &scores, const std::vector< int > &class_ids, const float score_threshold, const float nms_threshold, std::vector< int > &indices, const float eta=1.f, const int top_k=0) |
| 對給定邊界框和對應分數在不同類別上執行批處理非極大值抑制。 | |
| void | NMSBoxesBatched (const std::vector< Rect2d > &bboxes, const std::vector< float > &scores, const std::vector< int > &class_ids, const float score_threshold, const float nms_threshold, std::vector< int > &indices, const float eta=1.f, const int top_k=0) |
| static int | normalize_axis (int axis, const MatShape &shape) |
| static int | normalize_axis (int axis, int dims) |
將軸從 [-dims; dims)(類似於 Python 的切片表示法)轉換為 [0; dims) 範圍。 | |
| static Range | normalize_axis_range (const Range &r, int axisSize) |
| template<typename _Tp > | |
| static std::ostream & | operator<< (std::ostream &out, const std::vector< _Tp > &shape) |
| template<typename _Tp > | |
| static void | print (const std::vector< _Tp > &shape, const String &name="") |
| Net | readNet (const String &framework, const std::vector< uchar > &bufferModel, const std::vector< uchar > &bufferConfig=std::vector< uchar >()) |
| 讀取以受支援格式之一表示的深度學習網路。 | |
| Net | readNet (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config="", const String &framework="") |
| 讀取以受支援格式之一表示的深度學習網路。 | |
| Net | readNetFromCaffe (const char *bufferProto, size_t lenProto, const char *bufferModel=NULL, size_t lenModel=0) |
| 讀取記憶體中以Caffe模型格式儲存的網路模型。 | |
| Net | readNetFromCaffe (const std::vector< uchar > &bufferProto, const std::vector< uchar > &bufferModel=std::vector< uchar >()) |
| 讀取記憶體中以Caffe模型格式儲存的網路模型。 | |
| Net | readNetFromCaffe (CV_WRAP_FILE_PATH const String &prototxt, CV_WRAP_FILE_PATH const String &caffeModel=String()) |
| 讀取以 Caffe 框架格式儲存的網路模型。 | |
| Net | readNetFromDarknet (const char *bufferCfg, size_t lenCfg, const char *bufferModel=NULL, size_t lenModel=0) |
| 讀取以 Darknet 模型檔案格式儲存的網路模型。 | |
| Net | readNetFromDarknet (const std::vector< uchar > &bufferCfg, const std::vector< uchar > &bufferModel=std::vector< uchar >()) |
| 讀取以 Darknet 模型檔案格式儲存的網路模型。 | |
| Net | readNetFromDarknet (CV_WRAP_FILE_PATH const String &cfgFile, CV_WRAP_FILE_PATH const String &darknetModel=String()) |
| 讀取以 Darknet 模型檔案格式儲存的網路模型。 | |
| Net | readNetFromModelOptimizer (const std::vector< uchar > &bufferModelConfig, const std::vector< uchar > &bufferWeights) |
| 從 Intel 的 Model Optimizer 中間表示載入網路。 | |
| Net | readNetFromModelOptimizer (const uchar *bufferModelConfigPtr, size_t bufferModelConfigSize, const uchar *bufferWeightsPtr, size_t bufferWeightsSize) |
| 從 Intel 的 Model Optimizer 中間表示載入網路。 | |
| Net | readNetFromModelOptimizer (CV_WRAP_FILE_PATH const String &xml, CV_WRAP_FILE_PATH const String &bin="") |
| 從 Intel 的 Model Optimizer 中間表示載入網路。 | |
| Net | readNetFromONNX (const char *buffer, size_t sizeBuffer) |
| 從 ONNX 記憶體緩衝區讀取網路模型。 | |
| Net | readNetFromONNX (const std::vector< uchar > &buffer) |
| 從 ONNX 記憶體緩衝區讀取網路模型。 | |
| Net | readNetFromONNX (CV_WRAP_FILE_PATH const String &onnxFile) |
| 讀取 ONNX 網路模型。 | |
| Net | readNetFromTensorflow (const char *bufferModel, size_t lenModel, const char *bufferConfig=NULL, size_t lenConfig=0) |
| 讀取以 TensorFlow 框架格式儲存的網路模型。 | |
| Net | readNetFromTensorflow (const std::vector< uchar > &bufferModel, const std::vector< uchar > &bufferConfig=std::vector< uchar >()) |
| 讀取以 TensorFlow 框架格式儲存的網路模型。 | |
| Net | readNetFromTensorflow (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config=String()) |
| 讀取以 TensorFlow 框架格式儲存的網路模型。 | |
| Net | readNetFromTFLite (const char *bufferModel, size_t lenModel) |
| 讀取以 TFLite 框架格式儲存的網路模型。 | |
| Net | readNetFromTFLite (const std::vector< uchar > &bufferModel) |
| 讀取以 TFLite 框架格式儲存的網路模型。 | |
| Net | readNetFromTFLite (CV_WRAP_FILE_PATH const String &model) |
| 讀取以 TFLite 框架格式儲存的網路模型。 | |
| Net | readNetFromTorch (CV_WRAP_FILE_PATH const String &model, bool isBinary=true, bool evaluate=true) |
| 讀取以 Torch7 框架格式儲存的網路模型。 | |
| Mat | readTensorFromONNX (CV_WRAP_FILE_PATH const String &path) |
| 從 .pb 檔案建立Blob。 | |
| Mat | readTorchBlob (const String &filename, bool isBinary=true) |
| 載入作為 Torch7 框架的 torch.Tensor 物件序列化的 blob。 | |
| void | releaseHDDLPlugin () |
| 釋放 HDDL 外掛。 | |
| void | resetMyriadDevice () |
| 釋放 Myriad 裝置(由 OpenCV 繫結)。 | |
| cv::String | setInferenceEngineBackendType (const cv::String &newBackendType) |
| 指定 Inference Engine 內部後端 API。 | |
| static MatShape | shape (const int *dims, const int n) |
| static MatShape | shape (const Mat &mat) |
| static MatShape | shape (const MatSize &sz) |
| static MatShape | shape (const UMat &mat) |
| static MatShape | shape (int a0, int a1=-1, int a2=-1, int a3=-1) |
| void | shrinkCaffeModel (CV_WRAP_FILE_PATH const String &src, CV_WRAP_FILE_PATH const String &dst, const std::vector< String > &layersTypes=std::vector< String >()) |
| 將 Caffe 網路的所有權重轉換為半精度浮點數。 | |
| void | skipModelImport (bool skip) |
| 在 readNet() 函式的診斷執行後跳過模型匯入。 | |
| static Mat | slice (const Mat &m, const _Range &r0) |
| static Mat | slice (const Mat &m, const _Range &r0, const _Range &r1) |
| static Mat | slice (const Mat &m, const _Range &r0, const _Range &r1, const _Range &r2) |
| static Mat | slice (const Mat &m, const _Range &r0, const _Range &r1, const _Range &r2, const _Range &r3) |
| void | softNMSBoxes (const std::vector< Rect > &bboxes, const std::vector< float > &scores, std::vector< float > &updated_scores, const float score_threshold, const float nms_threshold, std::vector< int > &indices, size_t top_k=0, const float sigma=0.5, SoftNMSMethod method=SoftNMSMethod::SOFTNMS_GAUSSIAN) |
| 對給定邊界框和對應分數執行軟非極大值抑制。參考:https://arxiv.org/abs/1704.04503。 | |
| template<typename _Tp > | |
| cv::toLowerCase (const std::string &str) | toString (const std::vector< _Tp > &shape, const String &name="") |
| static int | total (const Mat &mat, int start=-1, int end=-1) |
| static int | total (const MatShape &shape, int start=-1, int end=-1) |
| void | writeTextGraph (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &output) |
| 為以協議緩衝區格式儲存的二進位制網路建立文字表示。 | |
| cv::String cv::dnn::getInferenceEngineBackendType | ( | ) |
返回 Inference Engine 內部後端 API。
請參閱 CV_DNN_BACKEND_INFERENCE_ENGINE_* 宏的值。
自 4.6.0 版本起,OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE 執行時引數(環境變數)將被忽略。
| cv::String cv::dnn::getInferenceEngineCPUType | ( | ) |
返回 Inference Engine CPU 型別。
指定 OpenVINO 外掛:CPU 或 ARM。
| cv::String cv::dnn::getInferenceEngineVPUType | ( | ) |
返回 Inference Engine VPU 型別。
請參閱 CV_DNN_INFERENCE_ENGINE_VPU_TYPE_* 宏的值。
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
將軸從 [-dims; dims)(類似於 Python 的切片表示法)轉換為 [0; dims) 範圍。
|
inlinestatic |
|
inlinestatic |
| void cv::dnn::releaseHDDLPlugin | ( | ) |
釋放 HDDL 外掛。
| void cv::dnn::resetMyriadDevice | ( | ) |
釋放 Myriad 裝置(由 OpenCV 繫結)。
使用 Inference Engine 的 Myriad 外掛時,單個 Myriad 裝置無法跨多個程序共享。
| cv::String cv::dnn::setInferenceEngineBackendType | ( | const cv::String & | newBackendType | ) |
|
inlinestatic |
|
inlinestatic |
| void cv::dnn::skipModelImport | ( | bool | skip | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |