问题
I couldn't find a detailed documentation and I don't feel browsing the source code. I want not to redo canny edge detection for example if it is already done by Tesseract engine.
回答1:
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 Otsu thresholding to binarize the image before processing it https://github.com/tesseract-ocr/tesseract/blob/master/ccstruct/otsuthr.h
Edit: If you want to see the binarized image just create a new config file in "\tessdata\configs\", add this line: tessedit_write_images True
and process your image: tesseract your_image out your_config_file
. Tesseract saves the binarized image as tessinput.tif
.
来源:https://stackoverflow.com/questions/27018224/what-preprocessing-operations-are-performed-by-tesseract-ocr