*/
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);
}
}