reasonpun / tesseract_ocr

Tesseract OCR for flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tesseract OCR for Flutter

Tesseract OCR 4.0 for flutter This plugin is based on Tesseract OCR 4 This plugin uses Tesseract4Android and SwiftyTesseract.

Getting Started

You must add trained data and trained data config file to your assets directory. You can find additional language trained data files here Trained language files

add tessdata folder under assets folder, add tessdata_config.json file under assets folder:

{
  "files": [
    "eng.traineddata",
    "<other_language>.traineddata"
  ]
}

Plugin assumes you have tessdata folder in your assets directory and defined in your pubspec.yaml

Check the contents of example/assets folder and example/pubspec.yaml

Usage

Using is very simple:

String text = await TesseractOcr.extractText('/path/to/image', language: 'eng');

You can leave language empty, it will default to 'eng'.

About

Tesseract OCR for flutter

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Dart 35.9%Language:Ruby 27.4%Language:Java 18.6%Language:Swift 15.7%Language:Objective-C 2.5%