Examples of doOCR()


Examples of net.sourceforge.tess4j.Tesseract.doOCR()

     */
    protected String performOcr(BufferedImage image, int iteration) throws OcrException {
        try {
            Tesseract instance = Tesseract.getInstance();
            instance.setPageSegMode(getTesseractPageSegMode(iteration));
            String output = instance.doOCR(image);
            return output.trim();
        } catch (Exception e) {
            throw new OcrException("Error performing OCR", e);
        }
    }
View Full Code Here

Examples of net.sourceforge.tess4j.Tesseract.doOCR()

   */
  public boolean takeImage(File image) {
    Tesseract instance = Tesseract.getInstance();

    try {
      String result = instance.doOCR(image);
      processOCR(result);
      return true;
    }
    catch (TesseractException e) {
      System.err.println(e.getMessage());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.