What pre-processing operations are performed by Tesseract OCR?

I could not find the detailed documentation, and I do not feel like looking at the source code. I want to not redo the canny edge detection if this has already been done by the Tesseract engine.

+5
source share
1 answer

This document provides an overview of the engine: https://github.com/tesseract-ocr/docs/blob/master/tesseracticdar2007.pdf

So it looks like you don't need to implement canny edge detection.

Tesseract uses the Otsu threshold to binarize the image before processing it https://github.com/tesseract-ocr/tesseract/blob/master/ccstruct/otsuthr.h

Edit: if you want the binarized image to simply create a new configuration file in "\ tessdata \ configs", add this line: tessedit_write_images True and process the image: tesseract your_image out your_config_file . Tesseract saves the binarized image as tessinput.tif .

+6
source

Source: https://habr.com/ru/post/1207215/


All Articles