Coder Social home page Coder Social logo

xxsong5 / digits-recognition Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 5.93 MB

numerical recognition in image. This is the code for number(0-9) recognition in image by using SVM Classifier and HOG descripter. And the main algorithm was packed as classes in imgDistis.cpp

CMake 11.83% C++ 88.17%

digits-recognition's Introduction

digits-recognition

This is the code for number(0-9) recognition in image by using SVM Classifier and HOG descripter. And the main algorithm was packed as classes in imgDistis.cpp

how to combile

mkdir build
cd build
cmake ..
make

how to use example

there need three steps for running this code.

  1. save number image to a directory and Format("img%05d_d.png") should be used as image name, the second 'd' in the format must be (0-9) asscociated with number's image or 11 for noise image. for example: ./saveNUMImgs .../images-path Note. the zero should be named (0-9 ,11) asscociated with the image for training. ("img00001_0.png-> img00001_(0-9,11).png")

  2. using the number-images to train number's-model.xml for example: ./train .../number-images-path

  3. using the trained number's-model.xml to detect new image for example: ./detectNUMs .../new-image (.../number's-model.xml, can be ignored, because there is one in trainData directory)

exmaple

  1. ./saveNUMImgs ./character_0_1_2_3/
    note. Press 's' key for saving numbers' images to (./trainData/) directory.

  2. ./train ./trainData/
    note. Before run this commond, make sure you have changed The Zero in image name to associated number.

  3. ./detectNUMs ./new-image ./trainData/number_model.xml
    note. The second param can be ignored if there is a number_model.xml file in trainData directory. For sample use: ./detectNUMs ./new-image

currently

there is a partial trained images model. For test, one can just run the third step (./detectNUMs ./new-image).

Notation

By the way, this project just fit our purpose, One must rewrite the segment(..) function for your own project to generate segmented numbered images for trainnig.

digits-recognition's People

Contributors

xxsong5 avatar

Stargazers

 avatar  avatar  avatar DarkT avatar  avatar

Watchers

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