文字檢測網路基類。 更多...
#include <opencv2/dnn/dnn.hpp>
|
| void | detect (InputArray frame, std::vector< std::vector< Point > > &detections) const |
| |
| void | detect (InputArray frame, std::vector< std::vector< Point > > &detections, std::vector< float > &confidences) const |
| | 執行檢測。
|
| |
| void | detectTextRectangles (InputArray frame, std::vector< cv::RotatedRect > &detections) const |
| |
| void | detectTextRectangles (InputArray frame, std::vector< cv::RotatedRect > &detections, std::vector< float > &confidences) const |
| | 執行檢測。
|
| |
| | Model (模型) () |
| |
| | Model (const Model &)=default |
| |
| | Model (const Net &network) |
| | 從深度學習網路建立模型。
|
| |
| | Model (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config="") |
| | 從支援的格式之一表示的深度學習網路建立模型。 model 和 config 引數的順序無關緊要。
|
| |
| | Model (Model &&)=default |
| |
| Model & | enableWinograd (bool useWinograd) |
| |
| Impl * | getImpl () const |
| |
| Impl & | getImplRef () const |
| |
| Net & | getNetwork_ () |
| |
| Net & | getNetwork_ () const |
| |
| | operator Net & () const |
| |
| Model & | operator= (const Model &)=default |
| |
| Model & | operator= (Model &&)=default |
| |
| void | predict (InputArray frame, OutputArrayOfArrays outs) const |
| | 給定 input 幀,建立輸入 blob,執行網路並返回輸出 blobs。
|
| |
| Model & | setInputCrop (bool crop) |
| | 設定幀的 crop 標誌。
|
| |
| Model & | setInputMean (const Scalar &mean) |
| | 設定幀的均值。
|
| |
| void | setInputParams (double scale=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false) |
| | 設定幀的預處理引數。
|
| |
| Model & | setInputScale (const Scalar &scale) |
| | 設定幀的 scalefactor 值。
|
| |
| Model & | setInputSize (const Size &size) |
| | 設定幀的輸入大小。
|
| |
| Model & | setInputSize (int width, int height) |
| |
| Model & | setInputSwapRB (bool swapRB) |
| | 設定幀的 swapRB 標誌。
|
| |
| Model & | setOutputNames (const std::vector< String > &outNames) |
| | 設定幀的輸出名稱。
|
| |
| Model & | setPreferableBackend (dnn::Backend backendId) |
| |
| Model & | setPreferableTarget (dnn::Target targetId) |
| |
◆ TextDetectionModel()
| cv::dnn::TextDetectionModel::TextDetectionModel |
( |
| ) |
|
|
保護 |
◆ detect() [1/2]
| void cv::dnn::TextDetectionModel::detect |
( |
InputArray | frame, |
|
|
std::vector< std::vector< Point > > & | detections ) const |
| Python |
|---|
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | 檢測 |
這是一個過載的成員函式,為了方便而提供。它與上述函式的不同之處僅在於它接受的引數。
◆ detect() [2/2]
| void cv::dnn::TextDetectionModel::detect |
( |
InputArray | frame, |
|
|
std::vector< std::vector< Point > > & | 檢測, |
|
|
std::vector< float > & | confidences ) const |
| Python |
|---|
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | 檢測 |
◆ detectTextRectangles() [1/2]
| void cv::dnn::TextDetectionModel::detectTextRectangles |
( |
InputArray | frame, |
|
|
std::vector< cv::RotatedRect > & | detections ) const |
| Python |
|---|
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | 檢測 |
這是一個過載的成員函式,為了方便而提供。它與上述函式的不同之處僅在於它接受的引數。
◆ detectTextRectangles() [2/2]
| void cv::dnn::TextDetectionModel::detectTextRectangles |
( |
InputArray | frame, |
|
|
std::vector< cv::RotatedRect > & | 檢測, |
|
|
std::vector< float > & | confidences ) const |
| Python |
|---|
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | 檢測 |
執行檢測。
給定輸入 frame,準備網路輸入,執行網路推理,後處理網路輸出並返回結果檢測。
每個結果都是旋轉的矩形。
- 注意
- 在強透視變換的情況下,結果可能不準確。
- 引數
-
| [輸入] | frame | 輸入影像 |
| [輸出] | 檢測 | 具有檢測到的 RotationRect 結果的陣列 |
| [輸出] | confidences | 具有檢測置信度的陣列 |
該類的文件由以下檔案生成