I want to set tess4j
to only identify numbers and letters
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");
See doc.