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 ) |
|
纯虚函数 |
此类的文档是从以下文件生成的