Tesseract OCR · prebuilt

12 problèmes de compilation. Zéro pour vous.

Cross-compiler Tesseract + Leptonica pour Android signifie se battre contre des shims CMake, des headers manquants, des conflits de linking et des erreurs NDK cryptiques. On s'est battu pour que vous n'ayez pas à le faire. Une ligne Gradle, anglais inclus, texte reconnu.

// Tesseract 5.x · Leptonica · arm64-v8a · API 24+ · English bundled · 100+ langues

The alternative — compile it yourself
cpu_features/CpuFeaturesNdkCompat not found
find_package(Leptonica CONFIG) — no config file
tesseract/version.h: No such file or directory
endianness.h: generated header not found
libleptonica.so built static — symbols missing
install(EXPORT) conflicts with export()
...6 more issues... BUILD FAILED

// or — one Gradle line
implementation("dev.ffmpegkit-maintained:tesseract-android:1.0.0")
BUILD SUCCESSFUL SCANNING
Pourquoi ça existe

Tesseract sur Android ne devrait pas exiger une semaine de CMake.

Tesseract depends on Leptonica, which also needs cross-compiling. That's two native libraries, NDK toolchains, generated headers, linking order — 12 documented issues between you and working OCR. Our prebuilt AAR ships both libraries ready to use, with English bundled so it works out of the box.

Tesseract 5.x + Leptonica · prebuilt English bundled · works immediately 100+ langues · add any .traineddata On-device · no cloud, no API key Prebuilt .aar · no NDK, no CMake arm64-v8a · 16 KB aligned · API 24+ Maven Central · dev.ffmpegkit-maintained Pairs with OpenCV for scan-to-text
Gratuit et Pro

Scannez du texte gratuitement. Passez au Pro pour la vitesse et les langues.

The free tier gives you full Tesseract OCR with English out of the box. Pro adds OpenMP multithreading (2-3x faster), 12 languages in maximum accuracy, and multi-ABI for emulators and Chromebooks.

Free Apache 2.0
$0 · Maven / JitPack / GitHub
  • Tesseract 5.x + Leptonica prebuilt
  • English bundled (tessdata_fast, ~4 MB) — works immediately
  • 100+ langues — download any .traineddata
  • Clean Kotlin coroutine API
  • Words with bounding boxes + confidence
  • arm64-v8a · single thread
3x faster
Pro Apache 2.0
$24 · $62 team (5)
  • Everything in Free
  • OpenMP multithreading — 2-3x faster on multi-core
  • 12 languages bundled (tessdata_best — max accuracy)
  • eng, fra, spa, deu, ita, por, chi_sim, jpn, kor, ara, rus, hin
  • arm64-v8a + x86_64 (emulators, Chromebooks)
  • Advanced API: HOCR output, batch OCR, word-level confidence
Une ligne Gradle

Ajoutez la dépendance. Scannez du texte. C'est tout.

English is bundled in the AAR — no extra download, no tessdata setup. Add languages anytime with a single .traineddata file.

app/build.gradle.kts
// Free — Maven Central (English bundled)
implementation("dev.ffmpegkit-maintained:tesseract-android:1.0.0")
// Free — JitPack (alternative)
implementation("com.github.ffmpegkit-maintained:TesseractOCR:v1.0.0")
// Pro — OpenMP + 12 languages + multi-ABI
implementation("dev.ffmpegkit-maintained:tesseract-android-pro:1.0.0")
MainActivity.kt — scan text in 4 lines
// initialize once (extracts bundled English data)
TesseractOCR.initialize(context)
// recognize text from any image
val result = TesseractOCR.recognize(bitmap)
Log.d("OCR", result.text) // → "Invoice #12345..."
Log.d("OCR", "Confidence: ${result.confidence}%")
100+ langues

Anglais inclus. Ajoutez n'importe quelle langue en un fichier.

Download a .traineddata file from the Tesseract project, place it in your app — done. Three quality tiers available.

Language data guide
tessdata_fast  ~4 MB/lang   fastest  · good quality · bundled in Free
tessdata      ~15 MB/lang  standard · better accuracy
tessdata_best ~15 MB/lang  slower  · maximum accuracy · bundled in Pro
// download from GitHub
Fonctionne avec OpenCV

Prétraitement → Reconnaissance. Pipeline scan-to-text complet sur l'appareil.

Pair Tesseract with OpenCV for a complete document scanning pipeline. OpenCV handles deskew, binarization and text detection; Tesseract handles the OCR. Both on-device, no cloud.

Pipeline: OpenCV → Tesseract
// 1. OpenCV: preprocess the image
val gray = Imgproc.cvtColor(src, COLOR_BGR2GRAY)
val binary = Imgproc.adaptiveThreshold(gray, ...)
// 2. Tesseract: recognize text
val result = TesseractOCR.recognize(binary.toBitmap())
Log.d("OCR", result.text) SCANNED