card.io-dmz
card.io-dmz copied to clipboard
How to understand the number_grad_sum_pattern in scan/n_hseg.cpp?
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?
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.
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.