Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

How to understand the number_grad_sum_pattern in scan/n_hseg.cpp? #47

Open
draculaw opened this issue Dec 21, 2017 · 2 comments
Open

How to understand the number_grad_sum_pattern in scan/n_hseg.cpp? #47

draculaw opened this issue Dec 21, 2017 · 2 comments

Comments

@draculaw
Copy link

I am reading the code.
I found some magic number in number_grad_sum_pattern.
I am wondering how to set this number.
Is there any reference or tips for tuning this data?

@josharian
Copy link
Member

Sadly, most of the magic numbers are generated from large numbers of credit card photos, which have not been made public (for obvious reasons). The scripts could probably have been made public, but were not. If I recall correctly--and I might not, it has been a very long time now, number_grad_sum_pattern was generated by just averaging the observed values for correctly aligned digits across many, many, many digits. It was also, IIRC, very stable; I doubt that there's much value in tweaking these numbers. Hope that helps.

@draculaw
Copy link
Author

Thanks a lot for your reply.

Actually, I am from China.
Some of UP China's cards are 18 digits or 19 digits.
Even more, some debit cards' digits are flat print instead of bulged.
In that case, those numbers are not worked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants