tess4j 设置只识别数字和字母

tess4j Set only to identify numbers and letters

我想设置tess4j只识别数字和字母

Tesseract instance = new Tesseract();
instance.setDatapath("C:\Users\qyw\Desktop\tessdata");
String s = instance.doOCR(img);
System.out.println(s);
instance.setTessVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz");

参见doc