Closed K-Niu closed 7 years ago
Is there functionality to run Tesseract in segmentation mode with inputted zones of interest?
Currently, no.
I'm just wondering, if you already know the zones of interest, wouldn't it be easier to simply cut the image in many smaller ones (Pillow can do that easily) and run Tesseract on each of the smaller images ?
I'll try that, thanks for the suggestion.
Unless someone has a specific use case where Pillow can't cut it, I'm closing this ticket.
Hi, I have been using builders.WordBoxBuilder to get the positions of some words of interest in an image.
Is there functionality to run Tesseract in segmentation mode with inputted zones of interest?
I took a look at your builders.TextBuilder code and saw that I could change the tesseract_layout parameter in the constructor to change segmentation modes. However, some of the modes need an .uzn file that must share the name of the image being processed by Tesseract. The problem is, I can't get the name of the image file because you write to a random temp file in your tesseract.image_to_string code.
Just wondering if there was a straightforward way currently.
Thanks.