0

I am using 'tess4j' api to get the text from a .jpg image. The 'TessData' folder is packaged in the jar files. I want to include custom fonts and create my own 'TessData' folder, is there a way we can give 'TessData' location during run time.

I used the below method and it didn't pick up the TessData from custom location.

TessAPI1.TessBaseAPIInit3(handle, "C:\1. tesseract folder\bodoni mt\TrainData", lang);

Please let me know if we can do so.

Suvidh
  • 103
  • 1
  • 2
  • 10

1 Answers1

1

That does not look like a valid string. Anyway, if tessdata is inside a JAR file, you'll need to extract it and specify the location in the Init method.

nguyenq
  • 8,212
  • 1
  • 16
  • 16
  • I have lots of Issue with respect to text recognition. I am trying to use Tesseract to read the text from application for validation purpose(automation testing). It always gives me incorrect result if the font size is small 8 to 12. After I re-scaled the image to 400height and 300width for image with font size 12 i'll get 90% accurate results. Our applications have font size of 6 and 9 here we wont get accurate results. Can you provide me a systematic approach on how to use 'tesseract tool' for automation validation. – Suvidh Sep 27 '14 at 13:29