Git Product home page Git Product logo

ocrdroid's Introduction

ocrdroid

A Titanium Module for Android that provides TessTwo (Tesseract) OCR support

(this is still a work in progress)

This project depends on tess-two which in turn depends on tesseract and leptonica.

Inspect .classpath and build.properties and edit the paths to match your environment.

Clone or copy tess-two, then you must decide between two options to proceed: (both methods require the Android NDK)

  • Build tess-two and manually copy the native libraries into ocrdroid
  • merge the java and c source into ocrdroid then let Titanium to perform the JNI compilation

Titanium JNI compilation

Copy tess-two's jni into ocrdroid and merge tess-two's src with ocrdroid's existing src folder.

Uncomment and edit the ndk variables in build.properties to point to your ndk installation.

Build binaries separately

Build Tesseract binaries using tess-two, follow the directions there.

Then copy the binary folders (armeabi, armeabi-v7a, etc) to libs.import (targets defined in build.xml will copy them into the module during packaging)

Add the tess-two.jar to ocrdroid's classpath (I actually can't get the build to work adding the jar this way. It always fails in "cannot find symbol" on TessBaseAPI even though Titanium Studio shows no problems. My workaround is to copy the tess-two java source into ocrdroid and let Titanium compile it as part of ocrdroid )

Common Setup

Next create an assets folder and include a zip file named "tess.zip" (this is hardcoded in OcrdroidModule.unpackTessData) containing the trained data files inside of a tessdata folder as outlined in tess-two's readme

ocrdroid's People

Contributors

juancgarcia avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.