As Tesseract OCR is already integrated with OpenCV 3.0, it still worth studying its API since it allows a finer-grained control over Tesseract parameters. The integration will be studied in the next chapter.
We'll change the previous example to work with Tesseract. We will start with adding
fstream tesseracts to the list:
#include <opencv2/opencv.hpp> #include <tesseract/baseapi.h> #include <vector> #include <fstream>
Then, we'll create a global
TessBaseAPI object that represents our Tesseract OCR engine:
ocr engine is completely self-contained. If you want to create multithreaded OCR software, just add a different
TessBaseAPI object to each thread, and ...