Reputation: 742
I am using tesseract for recognizing character in one of my iOS project. It is now reading all characters including alpha numeric character. But I want to read only character a-z and numbers 0-9. I followed Limit characters tesseract is looking for, but can't figure out how can I implement this in my iOS app.
Can anyone suggest me how can I implement this in my iOS project.
Upvotes: 0
Views: 6041
Reputation: 529
Try this:
[tesseract setVariableValue:@"abcdefghijklmnopqrstuvwxyz012345789" forKey:@"tessedit_char_whitelist"];
also you can try variable "tessedit_char_blacklist"
Upvotes: 1
Reputation: 1201
You can specify the white list (allowed characters) using TessBaseAPI.SetVariable prior to extraction
tesseract->SetVariable("tessedit_char_whitelist", "abcdefghijklmnopqrstuvwxyz012345789");
Upvotes: 7