O'Reilly logo

Learn OpenCV 4 by Building Projects - Second Edition by Prateek Joshi, Vinicius G. Mendonca, David Millan Escriva

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required