OpenCV
4.4.0
Open Source Computer Vision
|
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>
Public Member Functions | |
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 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. More... | |
Public Member Functions inherited from cv::text::BaseOCR | |
virtual | ~BaseOCR () |
Static Public Member Functions | |
static Ptr< OCRHolisticWordRecognizer > | create (const std::string &archFilename, const std::string &weightsFilename, const std::string &wordsFilename) |
Creates an instance of the OCRHolisticWordRecognizer class. More... | |
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
|
static |
Creates an instance of the OCRHolisticWordRecognizer class.
|
pure virtual |
Implements cv::text::BaseOCR.
|
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.
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. |
Implements cv::text::BaseOCR.