I'm struggling with the OSD function of Tesseract 3.02.
I tried the standalone version via command line and the Tess4J version too, but I always obtain an error with different input types.
and I copied it properly in the TESSDATA folder
Below my experiments:
COMMAND LINE
tesseract input_image output_text -l eng -psm 0
response: Error during processing.
With psm = 1 it read text with very bad quality, with psm = 2 or 3 it give my empty output.
As far as I know only 0 and 1 values perform OSD! From the reference:
0 = Orientation and script detection (OSD) only.
1 = Automatic page segmentation with OSD.
TESS4J
Tesseract instance = Tesseract.getInstance();
instance.setLanguage("ita");
instance.setPageSegMode(TessPageSegMode.PSM_AUTO_OSD);
String result = instance.doOCR(myImage);
result always is empty at the end
To know the input orientation it's critical for my project but at now I'm not able to find a way to accomplish this.
I hope somebody can help me! Thanks in advance