图像与视频理解 · 中文选型解读

tesseract

已解读GitHubApache-2.0C++

Tesseract是一款开源OCR引擎,支持超100种语言的文字识别,支持多格式输入输出,可直接使用或供开发者二次集成。

76.4kstar7 天前更新维护状态Apache-2.0 · 可评估商用商用提醒
在 GitHub 查看官方项目
适合解决识别图片和视频中的对象、文字与场景
更适合质检、内容审核、文档处理和媒体团队
投入判断上手门槛:需评估。需要准备真实样本验证识别准确率
一分钟看懂

这个项目值得继续研究吗?

AI 依据上游资料解读 · 2026/9/10

Tesseract是一款开源OCR引擎,支持超100种语言的文字识别,支持多格式输入输出,可直接使用或供开发者二次集成。

解决什么问题
企业日常产生的扫描件、截图、照片等非结构化图像资料,人工转录文字效率低、出错率高;商用OCR服务多按调用量计费,长期使用成本高,还存在敏感数据外传的安全风险。
适合什么团队
适合有批量图像文字识别需求、需本地化部署保障数据安全、希望降低OCR使用成本的业务团队,以及需集成OCR能力的开发团队。
使用前注意
该工具无自带图形操作界面,需GUI可使用第三方工具;识别准确率受输入图像质量影响较大,从源码编译需使用官方支持的编译器。

本页用于缩短初步筛选时间,不构成技术、采购或法律结论。 正式使用前请在真实业务数据上验证,并以官方说明与许可证为准。

项目导读

从官方资料看清能力、部署与采用边界

AI 翻译整理 · 保留官方来源

以下内容依据项目公开 README 或模型卡翻译整理,代码、命令和产品名保持原样。

项目定位

Tesseract是一款开源OCR(光学字符识别,指将图像中的文字转换成可编辑文本的技术)引擎,最早由惠普在1985-1998年间研发,2005年惠普将其开源,2006年至2017年由谷歌负责开发,目前仍处于活跃维护状态,最新稳定版本为5.x系列,许可证为Apache-2.0。

核心能力

  1. 多语言支持:内置支持超100种语言的文字识别,支持Unicode(UTF-8)编码,也支持自定义训练来识别新增语言。
  2. 多格式兼容:支持PNG、JPEG、TIFF等常见图像格式输入,可输出纯文本、hOCR(HTML格式)、PDF、仅含隐形文字的PDF、TSV、ALTO、PAGE等多种格式。
  3. 双识别引擎:Tesseract 4及以上版本新增基于LSTM(长短期记忆网络,一种常用于序列类内容识别的神经网络技术)的识别引擎,主打行级识别;同时兼容Tesseract 3的传统字符模式识别引擎,可通过参数切换使用。
  4. 集成能力:提供libtesseract库及C、C++ API,也有第三方封装的多语言绑定包,可供开发者集成到自有系统中。

典型使用方式

命令行直接调用

非开发场景可直接通过官方提供的命令行工具使用,基础调用语法为:

tesseract imagename outputbase [-l lang] [--oem ocrenginemode] [--psm pagesegmode] [configfiles...]

可通过tesseract --help或官方文档查看详细参数说明,适合小批量、无需融入业务流程的识别需求。

二次开发集成

开发者可通过libtesseract的原生C/C++ API,或第三方提供的其他编程语言绑定包,将OCR能力集成到自有业务系统中,比如嵌入档案管理、票据识别、内容审核等业务流程,实现自动化文字提取。

部署要求

Tesseract支持两种部署方式:

  1. 直接使用官方提供的预编译二进制包,无需编译,安装即可使用,适合普通用户。
  2. 从源码编译,编译前需确认使用的编译器属于官方支持的范围,适合有定制需求的用户。

部署需依赖Leptonica图像处理库用于读取输入图像,建议使用内置zlib、png、tiff支持的Leptonica版本,以获得更完善的多格式图像支持。

支持与维护

项目当前处于活跃维护状态,代码仍在持续更新。遇到问题可先查阅官方文档、常见问题解答,或搜索用户论坛、历史issue寻找解决方案;仅可在issue中提交bug报告,不支持提交咨询类问题。

许可证与采用建议

Tesseract使用Apache-2.0许可证,支持免费商用、修改、重新分发,依赖的Leptonica库使用BSD 2-clause许可证,也对商用非常友好。

建议符合以下条件的团队优先考虑采用:

  1. 有批量图像文字识别需求,希望降低OCR使用成本;
  2. 处理的是敏感数据,需本地化部署避免数据外传;
  3. 有一定技术能力可以完成部署、调试,或需要将OCR能力集成到自有业务流程中。

使用前需注意,Tesseract无自带图形操作界面,需要GUI的用户可使用官方推荐的第三方工具;若要获得更高的识别准确率,建议先对输入图像的质量进行优化。

可核对的事实层

官方资料与来源

查看来源 →
  • hacktoberfest
  • lstm
  • machine-learning
  • ocr
  • ocr-engine
  • tesseract
  • tesseract-ocr
默认分支main
关注仓库1.7k
复刻次数10.8k
开放议题483
近期更新2026/9/8
仓库状态未标记归档
上游部署线索
## Installing Tesseract

You can either [Install Tesseract via pre-built binary package](https://tesseract-ocr.github.io/tessdoc/Installation.html)
or [build it from source](https://tesseract-ocr.github.io/tessdoc/Compiling.html).

Before building Tesseract from source, please check that your system has a compiler which is one of the [supported compilers](https://tesseract-ocr.github.io/tessdoc/supported-compilers.html).

该片段来自项目 README,仅用于初步判断;实际部署请以官方文档为准。

核对上游原始说明节选

Tesseract Open Source OCR Engine (main repository)

Tesseract OCR

Coverity Scan Build Status CodeQL OSS-Fuzz \ GitHub license Downloads

Table of Contents

  • Tesseract OCR
  • About
  • Brief history
  • Installing Tesseract
  • Running Tesseract
  • For developers
  • Support
  • License
  • Dependencies
  • Latest Version of README

About

This package contains an OCR engine - libtesseract and a command line program - tesseract.

Tesseract 4 adds a new neural net (LSTM) based OCR engine which is focused on line recognition, but also still supports the legacy Tesseract OCR engine of Tesseract 3 which works by recognizing character patterns. Compatibility with Tesseract 3 is enabled by using the Legacy OCR Engine mode (--oem 0). It also needs traineddata files which support the legacy engine, for example those from the tessdata repository.

Stefan Weil is the current lead developer. Ray Smith was the lead developer until 2017. The maintainer is Zdenko Podobny. For a list of contributors see AUTHORS and GitHub's log of contributors.

Tesseract has unicode (UTF-8) support, and can recognize more than 100 languages "out of the box".

Tesseract supports various image formats including PNG, JPEG and TIFF.

Tesseract supports various output formats: plain text, hOCR (HTML), PDF, invisible-text-only PDF, TSV, ALTO and PAGE.

You should note that in many cases, in order to get better OCR results, you'll need to improve the quality of the image you are giving Tesseract.

This project does not include a GUI application. If you need one, please see the 3rdParty documentation.

Tesseract can be trained to recognize other languages. See Tesseract Training for more information.

Brief history

Tesseract was originally developed at Hewlett-Packard Laboratories Bristol UK and at Hewlett-Packard Co, Greeley Colorado USA between 1985 and 1994, with some more changes made in 1996 to port to Windows, and some C++izing in 1998. In 2005 Tesseract was open sourced by HP. From 2006 until August 2017 it was developed by Google.

Major version 5 is the current stable version and started with release 5.0.0 on November 30, 2021. Newer minor versions and bugfix versions are available from GitHub.

Latest source code is available from main branch on GitHub. Open issues can be found in issue tracker, and planning documentation.

See Release Notes and Change Log for more details of the releases.

Installing Tesseract

You can either Install Tesseract via pre-built binary package or build it from source.

Before building Tesseract from source, please check that your system has a compiler which is one of the supported compilers.

Running Tesseract

Basic command line usage:

tesseract imagename outputbase [-l lang] [--oem ocrenginemode] [--psm pagesegmode] [configfiles...]

For more information about the various command line options use tesseract --help or man tesseract.

Examples can be found in the documentation.

For developers

Developers can use libtesseract C or C++ API to build their own application. If you need bindings to libtesseract for other programming languages, please see the wrapper section in the AddOns documentation.

Documentation of Tesseract generated from source code by doxygen can be found on tesseract-ocr.github.io.

Support

Before you submit an issue, please review the guidelines for this repository.

For support, first read the documentation, particularly the FAQ to see if your problem is addressed there. If not, search the Tesseract user forum, the Tesseract developer forum and past issues, and if you still can't find what you need, ask for support in the mailing-lists.

Mailing-lists:

  • tesseract-ocr - For tesseract users.
  • tesseract-dev - For tesseract developers.

Please report an issue only for a bug, not for asking questions.

License

The code in this repository is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

NOTE: This software depends on other packages that may be licensed under different open source licenses.

Tesseract uses the Leptonica library which essentially uses a BSD 2-clause license.

Dependencies

Tesseract uses Leptonica library for opening input images (e.g. not documents like pdf). It is suggested to use leptonica with built-in support for zlib, png and tiff (for multipage tiff).

Latest Version of README

For the latest online version of the README.md see: