tesseract.js
tesseract.js copied to clipboard
Language / Config for MRZ reading
Hi, I'm trying to read a MRZ and I get some unexpected results. I'm assuming I should pass some options for MRZ
Result: PLPRYDE<ASSIS<MOREIRA<SRONALDO<<<LLLLLLLLLLLQ568928<<4PRY8003214M2501073<<<<<<<<<<<<<<08**— —**
I've marked the incorrect characters.
Here's my code:
const imgBuffer = Buffer.from(this.croppedImage.split(',')[1], 'base64');
const tsResult = await Tesseract.recognize(imgBuffer, 'eng');
const parsedText = tsResult.data.text.replace(/(\r\n|\n|\r)/gm, '');
console.log(parsedText);
I'm using v2.0.0. Thanks!