mrz-detection
mrz-detection copied to clipboard
image rotation
Hi, I have a problem with an image: https://imgur.com/a/ZKgYrKq In this case the mrz-detecton software first rotate the image and second apply a resizing: the final result is an image with bad quality that loss all information in the source document, that compromise the final check of mrz detection. One question is: why the file is auto-rotated despite exif orientation is correct? I noticed that if the file was not rotated the information would be readable.
I think it is rotated because the height of the document is bigger than its width. The algo uses the document's width to height ratio to determine if the orientation is correct.
Sorry again. I am using your library with an application web. In the our case we use this with "live canvas". The user take pictures with webcam and then I send this pictures on server that launch mrz-detection. Many times mrz-detection go to error, for example:
"RangeError: crop: (x: 890, y:436, width:510, height:92) size is out of range
at Image.crop (/Users/sal/Documents/Sviluppo/source-tree-ws/---/---/mrz-detection/node_modules/image-js/lib/image/transform/crop.js:61:11)
at Image._Image2.default.(anonymous function) [as crop]
If i see the results in out/report.html, the mrz is identified correctly, but the crop doesn't work. The image is: https://imgur.com/a/DJwwtKs
Could you help me to fix this ? Is it very important, for me, using mrz-detection in "live mode". In the last, mrz-detection, in live mode, works often very well!
I hope in your response, tnx!
Same issue for me