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

OCRHolisticWordRecognizer 類提供了分詞檢索的功能。給定一個預定義的詞彙表,採用 DictNet 來選擇給定輸入影像的最可能詞語。更多...

#include <opencv2/text/ocr.hpp>

cv::text::OCRHolisticWordRecognizer 的協作圖

公共成員函式

virtual void run (Mat &image, Mat &mask, std::string &output_text, std::vector< Rect > *component_rects=NULL, std::vector< std::string > *component_texts=NULL, std::vector< float > *component_confidences=NULL, int component_level=OCR_LEVEL_WORD) CV_OVERRIDE=0
 使用基於分割的詞語檢索/分類器 cnn 來識別文字。
 
virtual void run (Mat &image, std::string &output_text, std::vector< Rect > *component_rects=NULL, std::vector< std::string > *component_texts=NULL, std::vector< float > *component_confidences=NULL, int component_level=OCR_LEVEL_WORD) CV_OVERRIDE=0
 
- 繼承自 cv::text::BaseOCR 的公共成員函式
virtual ~BaseOCR ()
 

靜態公共成員函式

static Ptr< OCRHolisticWordRecognizercreate (const std::string &archFilename, const std::string &weightsFilename, const std::string &wordsFilename)
 建立 OCRHolisticWordRecognizer 類的例項。
 

詳細描述

OCRHolisticWordRecognizer 類提供了分詞檢索的功能。給定一個預定義的詞彙表,採用 DictNet 來選擇給定輸入影像的最可能詞語。

DictNet 在以下文章中有詳細描述:Max Jaderberg 等人:Reading Text in the Wild with Convolutional Neural Networks, IJCV 2015 http://arxiv.org/abs/1412.1842

成員函式文件

◆ create()

static Ptr< OCRHolisticWordRecognizer > cv::text::OCRHolisticWordRecognizer::create ( const std::string & archFilename,
const std::string & weightsFilename,
const std::string & wordsFilename )
static

建立 OCRHolisticWordRecognizer 類的例項。

◆ run() [1/2]

virtual void cv::text::OCRHolisticWordRecognizer::run ( Mat & image,
Mat & mask,
std::string & output_text,
std::vector< Rect > * component_rects = NULL,
std::vector< std::string > * component_texts = NULL,
std::vector< float > * component_confidences = NULL,
int component_level = OCR_LEVEL_WORD )
純虛擬函式

使用基於分割的詞語檢索/分類器 cnn 來識別文字。

輸入影像,並在 output_text 引數中返回識別的文字。可選地提供找到的單個文字元素(例如,詞語)的矩形,以及這些文字元素的列表及其置信度值。

引數
image輸入影像 CV_8UC1 或 CV_8UC3
mask完全被忽略,僅為了相容性而提供
output_text詞語檢索的輸出文字,始終是詞典中存在的詞語。
component_rects不適用於詞語檢索,如果不是,則可以為 NULL,單個元素將放入向量中。
component_texts不適用於詞語檢索,如果不是,則可以為 NULL,單個元素將放入向量中。
component_confidences不適用於詞語檢索,如果不是,則可以為 NULL,單個元素將放入向量中。
component_level必須是 OCR_LEVEL_WORD。

實現 cv::text::BaseOCR

◆ run() [2/2]

virtual void cv::text::OCRHolisticWordRecognizer::run ( Mat & image,
std::string & output_text,
std::vector< Rect > * component_rects = NULL,
std::vector< std::string > * component_texts = NULL,
std::vector< float > * component_confidences = NULL,
int component_level = OCR_LEVEL_WORD )
純虛擬函式

實現 cv::text::BaseOCR


此類的文件是從以下檔案生成的