Ejemplo n.º 1
0
 /**
  * Performs OCR operation.
  *
  * @param bi a buffered image
  * @param rect the bounding rectangle defines the region of the image to be recognized. A
  *     rectangle of zero dimension or <code>null</code> indicates the whole image.
  * @return the recognized text
  * @throws TesseractException
  */
 public String doOCR(BufferedImage bi, Rectangle rect) throws TesseractException {
   try {
     return doOCR(ImageIOHelper.getIIOImageList(bi), rect);
   } catch (Exception e) {
     logger.log(Level.SEVERE, e.getMessage(), e);
     throw new TesseractException(e);
   }
 }