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


此类的文档是从以下文件生成的