Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the preprocessImage to add different types of filters for bet… #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Wilsonilo
Copy link

I found better results using this filters.
I found the previous approach was causing some of the letters to disappear, after this adjustments 3 lines and 2 lines passports / ids started to work.
Screenshot 2024-03-26 at 11 31 12 a m
Screenshot 2024-03-26 at 11 24 29 a m

@Mattijah
Copy link
Owner

Mattijah commented Mar 28, 2024

Do you happen to have an equally taken images to showcase the difference? Also, it seem the traineddata has been changed too? It's been a while since I did this, but the current solution was able to adjust the image dynamically based on its luminance (if taken in a darker environment) and also it was optimised well since it was running on iOS 11+ devices, but that shouldn't be an issue anymore, I guess.

@Wilsonilo
Copy link
Author

Wilsonilo commented Mar 28, 2024

Screenshot 2024-03-28 at 5 42 47 p m This is an example. I'm not sure how the traineddata changed, I think I only used cocoapods, installed and unlocked to overwrite that specific method. Currently using iPhone XS on 17.4.1, without the adjustment i was getting really hard luminance contrast before the tesseract.performOCR. Is ok if you test it and still works fine. Maybe just leaving my input just in case someone else find this problem on their end? Also let me know if this pull request method of forking, update, etc is correct, trying to really follow good practices on pull request / helping on open source. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants