Class cv::text::OCRHolisticWordRecognizer#

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. View details

Collaboration diagram for cv::text::OCRHolisticWordRecognizer:

Public Member Functions#

Public Member Functions inherited from cv::text::BaseOCR

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#

run()#

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 )

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

  • image — Input image CV_8UC1 or CV_8UC3

  • mask — is totally ignored and is only available for compatibillity reasons

  • output_text — Output text of the the word spoting, always one that exists in the dictionary.

  • component_rects — Not applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.

  • component_texts — Not applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.

  • component_confidences — Not applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.

  • component_level — must be OCR_LEVEL_WORD.

run()#

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 )

create()#

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

Creates an instance of the OCRHolisticWordRecognizer class.

Source file#

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