OpenCV  4.10.0
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
cv::text::OCRHolisticWordRecognizer Class Referenceabstract

OCRHolisticWordRecognizer class provides the functionallity of segmented wordspotting. Given a predefined vocabulary , a DictNet is employed to select the most probable word given an input image. More...

#include <opencv2/text/ocr.hpp>

Collaboration diagram for cv::text::OCRHolisticWordRecognizer:

Public Member Functions

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
 Recognize text using a segmentation based word-spotting/classifier 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
 
- Public Member Functions inherited from cv::text::BaseOCR
virtual ~BaseOCR ()
 

Static Public Member Functions

static Ptr< OCRHolisticWordRecognizercreate (const std::string &archFilename, const std::string &weightsFilename, const std::string &wordsFilename)
 Creates an instance of the OCRHolisticWordRecognizer class.
 

Detailed Description

OCRHolisticWordRecognizer class provides the functionallity of segmented wordspotting. Given a predefined vocabulary , a DictNet is employed to select the most probable word given an input image.

DictNet is described in detail in: Max Jaderberg et al.: Reading Text in the Wild with Convolutional Neural Networks, IJCV 2015 http://arxiv.org/abs/1412.1842

Member Function Documentation

◆ create()

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

Creates an instance of the OCRHolisticWordRecognizer class.

◆ 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 
)
pure virtual

Recognize text using a segmentation based word-spotting/classifier cnn.

Takes image on input and returns recognized text in the output_text parameter. Optionally provides also the Rects for individual text elements found (e.g. words), and the list of those text elements with their confidence values.

Parameters
imageInput image CV_8UC1 or CV_8UC3
maskis totally ignored and is only available for compatibillity reasons
output_textOutput text of the the word spoting, always one that exists in the dictionary.
component_rectsNot applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.
component_textsNot applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.
component_confidencesNot applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.
component_levelmust be OCR_LEVEL_WORD.

Implements 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 
)
pure virtual

Implements cv::text::BaseOCR.


The documentation for this class was generated from the following file: