Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checksum differs between 'raw_text' and 'check_composite' #66

Open
michaelgfeldman opened this issue Jul 20, 2022 · 0 comments
Open

checksum differs between 'raw_text' and 'check_composite' #66

michaelgfeldman opened this issue Jul 20, 2022 · 0 comments

Comments

@michaelgfeldman
Copy link

Hello!
First of all, thank you for the awesome library! It really helps me a lot at work :)
Now to the issue itself.

I read mrz from an image and print the second line of it like that

image_file = 'my_file.png'
mrz = read_mrz(image_file, save_roi=True, extra_cmdline_params='--oem 0')
mrz_dict = dict(mrz.to_dict())
mrz_dict['raw_text'].split('\n')[1] 

the output is '0104023F3110061UKR<<<<<<<<<<<D'.
We can clearly see that the check_composite equals to D, which is obviously wrong.

But somehow mrz_dict['check_composite'] gives me 0 (which is the right answer),
because of that mrz_dict['valid_composite'] == True and mrz_dict['valid_score'] == 100

How is that possible? Am I missing something?

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

No branches or pull requests

1 participant