What preprocessing operations are performed by Tesseract OCR?

烂漫一生 提交于 2019-12-23 12:11:15

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!