getbouncer / cardscan-ios

A library for scanning credit and debit cards
MIT License
207 stars 66 forks source link

Adjust scale before running recognition model #91

Closed kingst closed 5 years ago

kingst commented 5 years ago

This PR uses the bounding box around the card number detection model to adjust the scale for recognition boxes. The underlying assumption is that clusters of 4 digits maintain the same aspect ratio, thus you can get more consistent digit sizes when we do recognition.

This scaling technique only applies to horizontal cards.