Text recognition

In Chapter 10, Developing Segmentation Algorithms for Text Recognition, we used the Tesseract API directly to recognize the text regions. This time, we'll use OpenCV classes to accomplish the same goal.

In OpenCV, all OCR-specific classes derive from the BaseOCR virtual class. This class provides a common interface for the OCR execution method itself. Specific implementations must inherit from this class. By default, the text module provides three different implementations: OCRTesseract, OCRHMMDecoder, and OCRBeamSearchDecoder.

This hierarchy is depicted in the following class diagram:

With this approach, we can separate the ...

Get Building Computer Vision Projects with OpenCV 4 and C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.