我试图在我的项目中使用 Tess4J 从图像中提取文本。当我尝试运行 OCR 时出现以下错误:线程“主”java.lang.Error 中的异常:内存访问无效
try {
File imageFile = new File("example4.jpg");
Tesseract instance = Tesseract.getInstance(); // JNA Interface Mapping
//Tesseract1 instance = new Tesseract1();
String result = instance.doOCR(imageFile);
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
}