explaingit

rmtheis/tess-two

3,767CAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Tess-two is an Android library that lets your app read text from photos using OCR (optical character recognition). It wraps the Tesseract OCR engine with a Java API for Android. Note: the project is no longer maintained, use Tesseract4Android instead.

Mindmap

mindmap
  root((tess-two))
    What it does
      OCR on Android
      Text from images
      Blur detection
    Tech Stack
      C and Tesseract
      Leptonica
      Java API
      Android
    Use Cases
      Photo text scanning
      Form digitization
      Image quality check
    Audience
      Android developers
      Mobile app builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add the ability to read text from photos or screenshots inside an Android app.

USE CASE 2

Scan a business card or printed form with a phone camera and extract the text programmatically.

USE CASE 3

Use the eyes-two module to detect whether a captured image is too blurry before running OCR on it.

Tech stack

CJavaAndroidTesseractLeptonica

Getting it running

Difficulty · moderate Time to first run · 30min

Requires downloading separate Tesseract language data files and placing them in a tessdata folder on the device, project is deprecated so use Tesseract4Android for new projects.

Use, modify, and distribute freely for any purpose including commercial use, as long as you keep the copyright and license notice. Apache 2.0 license.

In plain English

Tess-two is an Android library that adds text recognition from images (called OCR, or optical character recognition) to Android applications. OCR is the process of reading printed or handwritten text out of photos or screenshots. This library packages Tesseract (a widely-used OCR engine) and Leptonica (an image processing library) as compiled C code that runs on Android devices, and provides a Java API so app developers can call those functions from their app code. The project is no longer maintained, and the author recommends looking at active community forks such as Tesseract4Android if you need a current version. When the project was active, using it in an Android app was straightforward: developers added one dependency line to the app's build.gradle configuration file, pointing to the published package. To recognize text in a particular language, the app also needed a trained language data file downloaded separately and placed in a folder named tessdata on the device. The repository includes three modules. The tess-two module is the core library containing the compiled Tesseract and Leptonica code plus the Java wrapper. The eyes-two module adds extra image processing functions taken from the Google Eyes Free project, including text detection, blur detection, optical flow detection, and image thresholding. The tess-two-test module contains unit tests. Eyes-two is optional and not required for basic OCR. The project was licensed under the Apache 2.0 license and supported Android 2.3 and above with Tesseract version 3.05.

Copy-paste prompts

Prompt 1
I'm building an Android app that needs to read text from a photo. How would I have set up tess-two, what goes in build.gradle and how do I place the tessdata language file on the device?
Prompt 2
Using tess-two's Java API, write me the code to load an image bitmap and return the recognized text string from it.
Prompt 3
I want to use the eyes-two module to check if a camera image is too blurry before passing it to Tesseract. How do I call the blur detection function?
Prompt 4
Tess-two is deprecated. Walk me through migrating an existing tess-two integration to Tesseract4Android, highlighting what changes in the API.
Open on GitHub → Explain another repo

← rmtheis on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.