Skip to content

zhangchicheng/Credit_Card_OCR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages