GithubHelp home page GithubHelp logo

afomic / easy-ocr-scanner-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from priyankvex/easy-ocr-scanner-android

0.0 2.0 0.0 39.23 MB

Easiest and simplest OCR scanner library for Android built using Tesseract and Leptonica.

Java 1.01% Makefile 1.39% C++ 34.64% C 56.40% Shell 3.41% M4 0.07% PostScript 0.02% HTML 1.28% Python 0.01% Roff 1.42% TeX 0.01% CMake 0.06% Assembly 0.04% DIGITAL Command Language 0.05% Batchfile 0.02% Awk 0.19% Module Management System 0.01%

easy-ocr-scanner-android's Introduction

Easy-Ocr-Scanner-Android

Easiest and simplest OCR scanner library for Android built using Tesseract and Leptonica.

About

Easy OCR Library is made by having only one goal in mind: Making OCR as easy as possible. (Don't you just love when things actually mean what they show).

Easy OCR uses a fork of tesseract, Tess Two. But deals with all the pain of setting up and building the library using NDK.

Usage

Using EasyOcrLibrary is as simple as it can get.

Step 0

Copy your trained data file into the assets/tessdata folder. You can download the required .traineddata file from here.

Step 1

NOTE : "eng" is the name of the traineddata file as here we are using eng.traineddata .

 // initialize EasyOcrScanner instance.
mEasyOcrScanner = new EasyOcrScanner(MainActivity.this, "EasyOcrScanner",
        Config.REQUEST_CODE_CAPTURE_IMAGE, "eng");

Step 2

Implement java EasyOcrScannerListener.

implements EasyOcrScannerListener

Then define the callbacks.

Step 3

Start the scan!

mEasyOcrScanner.takePicture();

Step 4

Call java onImageTaken() in java onActivityResult()

@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        // Call onImageTaken() in onActivityResult.
        if (resultCode == RESULT_OK && requestCode == Config.REQUEST_CODE_CAPTURE_IMAGE){
            mEasyOcrScanner.onImageTaken();
        }
    }

And you are done!

Get the scaned text in the callback java onOcrScanFinished().

For more info check the sample app in the app module.

easy-ocr-scanner-android's People

Watchers

James Cloos avatar Afolabi michael 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.