Skip to content

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

@michaelgfeldman

Description

@michaelgfeldman

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions