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

php - Admin SDK -- get information about the group -

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

Python Error - TypeError: input expected at most 1 arguments, got 3 -