Git Product home page Git Product logo

tesseract-ocr-ios's Introduction

Tesseract OCR iOS 1.5 (iOS7 ready)

Tesseract OCR iOS is a Framework for iOS5+.

It will help you to use OCR in a iOS project. Easy and fast.


Template Framework Project ================= You can use the "**Template Framework Project**". It's a starting point for use the Tesseract Framework. It's iOS7 ready!

Alternatively you can create a New Project like explained below.

New Framework Project

Add the framework "TesseractOCR.framework" (you can drag&drop it) from the Products folder in this repo, to your XCode Project under the frameworks folder.

If you are masochist :) you can generate your TesseractOCR.framework building the TesseractOCRAggregate target.

  • If you are using iOS7 or greater, link libstdc++.6.0.9.dylib library (Your target => General => Linked Frameworks and Libraries => + => libstdc++.6.0.9)

  • Go to your project, click on the project and in the Build Settings tab add -lstdc++ to all the "Other Linker Flags" keys.

  • Go to your project settings, and ensure that C++ Standard Library => Compiler Default. (thanks to https://github.com/trein)

  • Import the tessdata folder under the root of your project. It contains the "tessdata" files. You can add more tessdata files copyng them here.

  • Import the header in your classes writing #import <TesseractOCR/TesseractOCR.h>

Now you can use Tesseract class like explained here: https://github.com/ldiqual/ tesseract-ios


How to use =================

ex. from https://github.com/ldiqual/tesseract-ios but using the "TesseractOCR.framework"

#import <TesseractOCR/TesseractOCR.h>

Tesseract* tesseract = [[Tesseract alloc] initWithDataPath:@"tessdata" language:@"eng"];
//language are used for recognition. Ex: eng. Tesseract will search for a eng.traineddata file in the dataPath directory. 
//eng.traineddata is in your "tessdata" folder.

[tesseract setVariableValue:@"0123456789" forKey:@"tessedit_char_whitelist"]; //limit search
[tesseract setImage:[UIImage imageNamed:@"image_sample.jpg"]]; //image to check
[tesseract recognize];

NSLog(@"%@", [tesseract recognizedText]);

Set Tesseract variable key to value. See http://www.sk-spell.sk.cx/tesseract-ocr-en-variables for a complete (but not up-to-date) list.

For instance, use tessedit_char_whitelist to restrict characters to a specific set.


Updates in this version ================= - Framework updated
  • Bugs fixed. Thanks to Simon Strangbaard

  • iOS7 libstdc++ issue solved (using libstdc++.6.0.9).

  • Template Framework Project added. It's the start point for use the Tesseract Framework. It's iOS7 ready!

  • 11 october 2013, tesseract is up to date with last https://github.com/ldiqual/tesseract-ios version available.

  • Clear method updated:

    [tesseract clear]; //call Clear() end End() functions

  • XCode 5 ready!

  • Framework builded with the new Xcode 5.


Dependencies =================

Tesseract OCR iOS use UIKit, Foundation and CoreFoundation. They are already included in standard iOS Projects.

License

Tesseract OCR iOS and TesseractOCR.framework are under MIT License.

Tesseract-ios, powered by ldiqual https://github.com/ldiqual/tesseract-ios, is under MIT License.

Tesseract, powered by Google http://code.google.com/p/tesseract-ocr/, is under Apache License.

Thanks

Thanks to ldiqual for the good wrapper for Tesseract.

Author Infos

Daniele Galiotto www.g8production.com

tesseract-ocr-ios's People

Contributors

neoneye 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.