首页 > 解决方案 > 如何在 java 中处理 tessrac 的图像?

问题描述

我正在尝试使用 Tesseract 从下面的图像中读取字符:
33ng

这是我用于读取图像的编码。

Tesseract tesseract = new Tesseract();
        try {           

            String text = tesseract.doOCR(new File(path)); 

            // path of your image file 
            System.out.println(text); 
        } catch (TesseractException e) { 
            e.printStackTrace(); 
        }

我未能从图像中获得准确的文本。那么如何在阅读之前处理图像?

标签: javaimage-processingimagemagicktesseract

解决方案


tesseract 不适合验证码破解。


推荐阅读