java - Forcing Tesseract to recognize only digits -


i developing ocr application android. @ point have observed needed recognize digits, trying ocr recognize digits , hyphens, , not letters or other type of character.

i have done this:

tessbaseapi.init(path, "eng");         tessbaseapi.setvariable(tessbaseapi.var_char_whitelist, "1234156787901299-"); 

but not getting accurate result. suggestions appreciated.

editted: complete code:

tessapi.setpagesegmode(tessbaseapi.oem_tesseract_cube_combined);       tessapi.setvariable(tessbaseapi.var_char_whitelist, "0123456789");       tessapi.setvariable(tessbaseapi.var_char_blacklist,"abcdefghijklmnopqrstuvwxyzabcdefghijklmopqrstuvwxyz"); 


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -