I\'m using OpenCV to extract a subimage of a scanned document and would like to use tesseract to perform OCR over this subimage.
I found out that I can use two meth
tesseract::TessBaseAPI tess; cv::Mat sub = image(cv::Rect(50, 200, 300, 100)); tess.SetImage((uchar*)sub.data, sub.size().width, sub.size().height, sub.channels(), sub.step1()); tess.Recognize(0); const char* out = tess.GetUTF8Text();