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

Add ability to choose character set for recognition #126

Closed
skelet2394 opened this issue Feb 12, 2018 · 1 comment
Closed

Add ability to choose character set for recognition #126

skelet2394 opened this issue Feb 12, 2018 · 1 comment

Comments

@skelet2394
Copy link

I dont really know how this magic works, but as i understand, there is a possibility array for each symbol it found. I often get "B" instead of "3".
So i propose to make an ability to choose between character sets, so when it thinks that its 95% "B" and 90% "3" its gonna choose "3" instead of "B"
Maybe you will add this in TODO list

@siobhandougall
Copy link

siobhandougall commented Feb 13, 2018

If you're only limiting the character set, you can use the characterBlackList and characterWhiteList properties, which work as advertised. For example:

        let ocr = SwiftOCR()
        ocr.characterWhiteList = "1234567890"
        ocr.recognize(ocrImage) { string in
            print(string)
        }

If you want to add characters to the list (e.g. lowercase letters, as in #122, or punctuation, as in my case), then it seems you have to train a new network. That part doesn't seem to be working as well for me.

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

No branches or pull requests

2 participants