evermeer / PassportScanner

Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer.
BSD 3-Clause "New" or "Revised" License
457 stars 101 forks source link

Camera freeze in white screen #21

Closed punto2018 closed 5 years ago

punto2018 commented 5 years ago

The issue can be reproduced as follow:

Tested on iPhone 6S and iOS 12.

img_0061trim

evermeer commented 5 years ago

There is an auto brightness adjustment. I thought this had an upper and lower limit. It looks like ik goes to infinite. Do you have the same result when you start scan and the camera is already pointed to a document?

punto2018 commented 5 years ago

Yes, same result. I've digged in this issue and it seem that the exposure goes to the upper limit (+2) and when this limit is reached it can't re-evaluate the value because the lighting don't change. I've modified the behaviour: when the upper or lower limit is reached the exposure is resetted to a default value 0.

From my tests (for sure not exhaustive) it works fine. Let me know what do you think.

evermeer commented 5 years ago

Good to hear that you found what really causes this. Wouldn't it be better to set it to something like 1.7 so that it does not change too much? When viewing the screen with the filters you will get a light puslsating behavior instead of a hard reset from light to dark.

evermeer commented 5 years ago

Now fixe after PR merge and publish as version 4.0.0