i made a Optical Character Recognition program by using Tesseract, however it works slower than its intended to. Im using ocrb traineddata which i found on github and i believe creating my own trained data with smaller size will increase execution speed. I'm relatively new to OCR so do you have any tips to increase time efficiency? Maybe an alternative for Pix?
Its runtime is 0.1 second in my computer, it would be perfect if its below 0.066. Here is my function:
std::string imageToText() {
tesseract::TessBaseAPI api;
api.Init("./tessdata", "ocrb_int");
Pix* image = pixRead("randommrz.jpg");
api.SetImage(image);
return api.GetUTF8Text();
}
Also i'm aware of lack of garbage collecting