zhangchicheng / Credit_Card_OCR

Apply OCR to recognize the sixteen digits on the credit card.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Credit_Card_OCR

Apply OCR to recognize the sixteen digits on the credit card.

Usage

dependencies

  • OpenCV = 3.2.0
g++ -o main main.cpp `pkg-config --cflags --libs opencv`
./main "sample.jpg"

The output should be

>> Account Number: 4000-1234-5678-9123

Details

Building credit card OCR can be accomplished in the following steps:

  • Detect and use the edges in the image to find the contour representing the card. Then apply a perspective transform to obtain the top-down view of the card.

  • Localize the four groupings of four digits on a credit card by applying a series of operations.

  • Extract each of these four groupings followed by segmenting each of the sixteen numbers individually. Recognize each of the sixteen credit card digits by using template matching.

About

Apply OCR to recognize the sixteen digits on the credit card.


Languages

Language:C++ 100.0%