Tesseract OCR 执行哪些预处理操作? [英] What preprocessing operations are performed by Tesseract OCR?

查看:43
本文介绍了Tesseract OCR 执行哪些预处理操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到详细的文档,也没有浏览源代码的感觉.例如,如果 Tesseract 引擎已经完成了精明的边缘检测,我不想重做.

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.

推荐答案

本文档提供了引擎的概述:https://github.com/tesseract-ocr/docs/blob/master/tesseracticdar2007.pdf

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

所以看起来你不需要实现canny边缘检测.

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

Tesseract 在处理之前使用 Otsu 阈值对图像进行二值化 https://github.com/tesseract-ocr/tesseract/blob/master/ccstruct/otsuthr.h

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

如果您想查看二值化图像,只需在\tessdata\configs\"中创建一个新的配置文件,添加以下行:tessedit_write_images True 并处理您的图像:tesseractyour_image out your_config_file.Tesseract 将二值化图像保存为 tessinput.tif.

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.

这篇关于Tesseract OCR 执行哪些预处理操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆