OCRHolisticWordRecognizer 類提供了分詞檢索的功能。給定一個預定義的詞彙表,採用 DictNet 來選擇給定輸入影像的最可能詞語。更多...
#include <opencv2/text/ocr.hpp>
|
| 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 |
| |
| virtual | ~BaseOCR () |
| |
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 |
◆ 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 ) |
|
純虛擬函式 |
此類的文件是從以下檔案生成的