cheminfo / mrz Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
We have XXX, XXA and XXB nationalities. XXC seems to be missing. Can we add support for XXC?
XXC is REFUGEE OTHERS.
On German Residence permits (Aufenthaltstitel)
https://en.wikipedia.org/wiki/German_residence_permit
The code XXK is used for Kosovo nationality in the card MRZ
The code is technically temporary, but it is printed in those cards at least.
I couldn't find further documentation. Let me know if it is needed.
I noticed that the PIN code appears in the details but does not appear in the fields. Any ideas why?
The specifications is described in this pdf:
https://www.icao.int/publications/Documents/9303_p7_cons_en.pdf
The following example seems wrong
mrz/src/parse/__tests__/td1.test.ts
Lines 96 to 100 in 7e817e3
While 1240 is correct and the 0
is the check digit, characters after the '<' (in this case XYZ) are not expected to be there.
We should add an example that fails (the current one) and a new one with the following MRZ
'I<UTOD23145890<1240<<<<<<<<<<<',
'7408122F1204159UTO<<<<<<<<<<<8',
'ERIKSSON<<ANNA<MARIA<<<<<<<<<<',
We are using this awesome library to validate a few legit Chinese e-passports (TD3). I used the library's tests suite to verify many other countries but these Chinese ones all fail on the `personal number check digit´. Also notice on this example the document type is PO not just P.
I'm afraid I can't share any example as it's PII, so is there any way I can provide you more infomation without disclosing the individual?
In some nationalities, it is valid for the last name to be blank. A bug in the parser results in an error.
Do you think this is something that could be fixed?
Some symbols are difficult to differentiate in the MRZ like the '0' or 'O'.
This PR https://github.com/cheminfo/mrz/pull/21/files#diff-f76f9fb30ec34fcebf47111d3562b71aa630be9dff89cd28fbc4d812ac2b61cbR39-R41 proposes to fix some mistakes as described specifically here:
For us it is however important that this 'autoCorrection' is optional (second arguments in the methods, options={}) and that the end-user can be aware that it has been changed in the result.details
.
This 'autoCorrection' should also work all the time it can. Meaning in TD1, TD2 and TD3 as well as from letters to numbers or from numbers to letters if a field can only contain one of the 2.
Hi all.
I just updated mrz to the latest version and my typescript compiler now complains about the following error:
Namespace '"[...]/node_modules/mrz/lib/index"' has no exported member 'Result'.
my package.json contains the following entries:
"dependencies": {
"mrz": "^3.3.0",
[...]
},
"devDependencies": {
"@types/mrz": "^3.1.1",
"typescript": "~4.9.5",
[...]
}
and the faulting code is this one:
import * as mrz from 'mrz';
@Injectable({
providedIn: 'root'
})
export class MrzReaderService {
parse(mrzString: string): mrz.Result & { error?: string } {
[...]
}
[...]
}
Is there a solution to this problem other than using 'any' instead of 'mrz.Result' in the method parse( )?
Thanks a lot.
The parse result can have an additional property which are the lines of the MRZ as an array of string.
If array is provided as input, same value as input. If string is provided, split into lines.
Hi Guys,
I went over the resources you published and I was able to find a lot of solutions for some of the issues we are having with MRZ extraction.
I am contacting you to see if maybe you have find some good solutions for pre-processing an ID picture before the MRZ can be read. I have found that many users struggle to take a good enough picture of their IDs.
I am looking for somebody to help us setup a demo for a project.
In a Nutshell, We are setting up a demo for a project to ensure that only people above a certain age can register to an event and purchase tickets (for example: to a concert, to a festival etc.).
Our idea is to ask the user during the registration process to upload its ID containing an MRZ and that we check if the person is over 16, 18 etc.
Our requirements:
• The picture of the ID needs to be processed by our system and cannot be sent to an external system for security reasons (for example: not to https://www.ocrsdk.com).
• Our biggest constraint is that we cannot use a mobile APP (no Android APP, no IOS APP). At the moment our environment is spring with NGINX (Angular6, material design)
• The solution needs to work as a step in a normal registration website.
• We need to guarantee that the date of birth used for the check:
○ It is ok to stop the registration because the quality is not good enough
○ However it would be an automatic failure for our project if the extracted date of birth is wrong and we allow a 14 years old to register an over 18 event.
Our issues so far:
• There are plenty of solutions that work great with mobile APPs (ios, android). These solutions allow detecting that an image resolution is decent, that it is not blurry etc. However, we cannot ask a user to install an app for our project and are stuck with the Web approach.
• I am struggling to pre-process the picture so that it can be decent enough for the OCR (un-skew, rotate, resize)
Our demo would be:
1. User goes to our public website (does not exist yet)
2. User is requested to take or upload a picture in its web browser
a. ALT: If possible, he gets an hint if the picture is decent enough straight away (not to skewed, not to blurry, not too close, not too far etc.). He is asked to retry if the picture quality if not sufficient
3. The MRZ is processed (locally if possible or by our server).
4. The MRZ data is sent to our backend
5. The fields are pre-populated with the extracted information .
6. The front end blocks the registration if the user does not meet the minimum age requirement.
In a nutshell, we are looking for somebody who could help us with the part of consistent image processing and extraction of the MRZ. I was hoping that you could give us some pointers or even help us build this element of the demo for a fee. Alternatively if you could recommend us to somebody else that would be also great.
Cheers,
Miguel
Hi. Did this module can detect ID cards from DOM-TOM and Corse (from France)?
https://github.com/cheminfo/mrz/blob/master/builder/states.txt contains list of codes, but for Germany there is invalid country code D
. I can create PR to fix it, but I'd like to know if you still maintain the lib or not.
My passport has the following MRZ text on it:
P<CANEISENBERG<CANDREW DAVID<<<<<<<<<<<<<<<<
AC773749<3CAN7612220M2710257<<<<<<<<<<<<<<00
Notice the space between ANDREW
and DAVID
. The regex you are using to parse the name field looks like this:
/^[A-Z<]+<*$/
It does not accept spaces and therefore fails to parse the MRZ of the passport above. Things seem to work if I add a space to the regex, like so:
/^[A-Z< ]+<*$/
Want me to make a PR?
hello!! I'm looking potentially at using this library for a project with homeland security over the next few months. I'd love to support a public repo and was wondering if you guys needed any help as well as if there are any known issues outside of what's already publically identified.
also, there might be a chance that I use this library to make a react native vision camera plugin that parses an MRZ. if I do I'll be sure to credit this library :)
I have the passport below (fake passport) with X gender. This X gender is not appearing as a valid passport.
P<GBRSTOKES<<CASSANDRE<<<<<<<<<<<<<<<<<<<<<<
2347894037GBR7901232X2301011<<<<<<<<<<<<<<06
I noticed we use <
for unspecified gender. Do you know if X
is also a valid gender or is the example above an error?
Hi,
Is there any plans to support es5 syntax? Right now Webpack Uglify throws an error as const is being used.
I am happy to put in a pr if you're happy with it.
The name is available on npm
ERROR in 8.223393375e8f60301275.js from Terser
Unexpected token: punc ()) [./node_modules/mrz/src/parsers/swissDrivingLicense/checkSeparator.js:7,0][8.223393375e8f60301275.js:52,4]
This happens due to the trailing comma in function parameters, mostly (``throw new Error(text
,)`), when target build is prior to es8.
Is there any reason to limit the usage of mrz to es8 builds and above?
I have personally fixed this with npx patch-package
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.