Digits recognition with OpenCV and python

I wrote a python script using the OpenCV framework to detect digits on a credit or insurance card.

How does it work?

The code works simply as two parts. The aim of the first part is to train the script with possible images. Once the training is done, you can test your scanned image (i.e. credit card or insurance card).

Sample recognition output

Here you can see the output of a successful digits recognition:

Frameworks to be installed

Python-2.7.x.
numpy
opencv

The code to train the script

You can get access to the entire source code via Github:

Demo training part

Simply tap on the keyboard key that is displayed in a red rectangle

How to train?

Open a terminal, go to the folder and run the following command:

python digit_recognizer_training.py

How to test?

Open a terminal, go to the folder and run the following command:

python digit_recognizer_testing.py