OpenCV 4.12.0
開源計算機視覺
載入中...
搜尋中...
無匹配項
cv::text::TextDetectorCNN 類參考abstract

TextDetectorCNN 類提供文字邊界框檢測的功能。此類用於查詢給定輸入影像中的文字單詞的邊界框。此類使用 OpenCV dnn 模組載入在 [168] 中描述的預訓練模型。原始儲存庫包含修改後的 SSD Caffe 版本:https://github.com/MhLiao/TextBoxes。模型可以從 DropBox 下載。包含模型描述的修改後的 .prototxt 檔案可以在 opencv_contrib/modules/text/samples/textbox.prototxt 中找到。更多...

#include <opencv2/text/textDetector.hpp>

cv::text::TextDetectorCNN 的協作圖

公共成員函式

virtual void detect (InputArray inputImage, std::vector< Rect > &Bbox, std::vector< float > &confidence) CV_OVERRIDE=0
 
- 從 cv::text::TextDetector 繼承的公共成員函式
virtual ~TextDetector ()
 

靜態公共成員函式

static Ptr< TextDetectorCNNcreate (const String &modelArchFilename, const String &modelWeightsFilename)
 
static Ptr< TextDetectorCNNcreate (const String &modelArchFilename, const String &modelWeightsFilename, std::vector< Size > detectionSizes)
 使用提供的引數建立 TextDetectorCNN 類的例項。
 

詳細描述

TextDetectorCNN 類提供文字邊界框檢測的功能。此類用於查詢給定輸入影像中的文字單詞的邊界框。此類使用 OpenCV dnn 模組載入在 [168] 中描述的預訓練模型。原始儲存庫包含修改後的 SSD Caffe 版本:https://github.com/MhLiao/TextBoxes。模型可以從 DropBox 下載。包含模型描述的修改後的 .prototxt 檔案可以在 opencv_contrib/modules/text/samples/textbox.prototxt 中找到。

成員函式文件

◆ create() [1/2]

static Ptr< TextDetectorCNN > cv::text::TextDetectorCNN::create ( const String & modelArchFilename,
const String & modelWeightsFilename )
static
Python
cv.text.TextDetectorCNN.create(modelArchFilename, modelWeightsFilename) -> retval
cv.text.TextDetectorCNN_create(modelArchFilename, modelWeightsFilename) -> retval

這是一個過載的成員函式,為了方便而提供。它與上面的函式僅在它接受的引數方面有所不同。

◆ create() [2/2]

static Ptr< TextDetectorCNN > cv::text::TextDetectorCNN::create ( const String & modelArchFilename,
const String & modelWeightsFilename,
std::vector< Size > detectionSizes )
static
Python
cv.text.TextDetectorCNN.create(modelArchFilename, modelWeightsFilename) -> retval
cv.text.TextDetectorCNN_create(modelArchFilename, modelWeightsFilename) -> retval

使用提供的引數建立 TextDetectorCNN 類的例項。

引數
modelArchFilename描述分類器架構的 prototxt 檔案的相對或絕對路徑。
modelWeightsFilename包含 caffe 二進位制形式的模型的預訓練權重的檔案的相對或絕對路徑。
detectionSizes多尺度檢測的大小列表。建議在 [168] 中使用值 [(300,300),(700,500),(700,300),(700,700),(1600,1600)] 以獲得最佳質量。

◆ detect()

virtual void cv::text::TextDetectorCNN::detect ( InputArray inputImage,
std::vector< Rect > & Bbox,
std::vector< float > & confidence )
純虛擬函式
Python
cv.text.TextDetectorCNN.detect(inputImage) -> Bbox, confidence

這是一個過載的成員函式,為了方便而提供。它與上面的函式僅在它接受的引數方面有所不同。

引數
inputImage預期為任何大小的 CV_U8C3 的影像
Bbox將儲存檢測到的單詞邊界框的 Rect 向量
confidence一個浮點向量,將被更新為分類器對所選邊界框的置信度

實現 cv::text::TextDetector


此類文件由以下檔案生成