GithubHelp home page GithubHelp logo

simple-ocr-opencv's Introduction

A simple pythonic OCR engine using opencv and numpy.

Originally inspired by http://stackoverflow.com/questions/9413216/simple-digit-recognition-ocr-in-opencv-python

Essential Concepts

Segmentation

In order for OCR to be performed on a image, several steps must be performed on the source image. Segmentation is the process of identifying the regions of the image that represent characters.

This project uses rectangles to model segments.

Supervised learning with a classification problem

The classification problem consists in identifying to which class a observation belongs to (i.e.: which particular character is contained in a segment).

Supervised learning is a way of "teaching" a machine. Basically, an algorithm is trained through examples (i.e.: this particular segment contains the character f). After training, the machine should be able to apply its aquired knowledge to new data.

The k-NN algorithm, used in this project, is one of the simplest
classification algorithm.

Grounding

Creating a example image with already classified characters, for training purposes. See ground truth.

How to understand this project

Unfortunately, documentation is a bit sparse at the moment (I gladly accept contributions). The project is well-structured, and most classes and functions have docstrings, so that's probably a good way to start.

If you need any help, don't hesitate to contact me. You can find my email on my github profile.

How to use

Please check example.py for basic usage with the existing pre-grounded images.

You can use your own images, by placing them on the data directory. Grounding images interactively can be accomplished by using grouding.UserGrounder. For more details see Issue 2

simple-ocr-opencv's People

Watchers

郭威 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.