I am developing an android application that recharge phone with credit by taking picture of the card by phone's camera or from the gallery..I used tesseract library for this purpose to take only the digits using blacklist and whitelist.. it does not work as expected
the picture I used contains these two lines only:
PIN code
41722757649786
the result before starting the recharge activity was:
718 200
41722757649786
I want to recognize only the digits without letters and without using cropper..
public void initTess(){
if (mBaseApi != null)
mBaseApi.end();
mBaseApi = new TessBaseAPI();
mBaseApi.setDebug(false);
mBaseApi.setPageSegMode(TessBaseAPI.PageSegMode.PSM_OSD_ONLY);
mBaseApi.init(mDataDir + File.separator,"eng");
mBaseApi.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST,"0123456789");
mBaseApi.setVariable(TessBaseAPI.VAR_CHAR_BLACKLIST,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmopqrstuvwxyz");
}