Hi Piyush, Thanks for the immediate response.
can you please send me the sample Java code to rotate the image example. That will really help me, i try to found but not able to get it . Please send me the Java sample code for pre-processing the images. Thanks, Piyush On Thursday, May 28, 2020 at 11:52:16 AM UTC+5:30, Piyush Chandra wrote: > > 1. You need to work on pre processing the images. > > 2. The first image I tried, 180 rotation was required. > > tesseract Sample1_3.png sam1 -l osd --psm 0 > > Result: Page number: 0 > Orientation in degrees: 0 > Rotate: 0 > Orientation confidence: 0.96 > Script: Latin > Script confidence: 11.67 > > 3. After rotation, tried OCR with --psm 6: (more about psm : > https://github.com/tesseract-ocr/tesseract/issues/434#issuecomment-561010796 > ) > tesseract Sample1_3.png sam1 -l eng --psm 6 > > Result : We are Jorwarding the mesons and syllabus Sor P.G.Diplome in > Yoga (E & T.M). The Subjects that You have to Study ang the number of > lessons/units i each Subject are Mentioneg in the SYllabus Please > Compare the lessons / Units with Syllabus. In case You fing any > discrepancy Please tYorm the Directoy by name â„¢Mediately, > W'Sh You all succes > DIRECTOR > > **Try to fine-tune tesseract for the font you using. > https://tesseract-ocr.github.io/tessdoc/TrainingTesseract-4.00 > > On Thursday, 28 May 2020 11:20:14 UTC+5:30, YOGESH KUMBHARE wrote: >> >> Hi Team, >> >> I am planning to used tesseract OCR engine to rendering the image >> extraction data library ... >> but some image not able to extract the data in proper formate, what is >> the solution for that. >> how to resolve that? >> Please, guys, anyone can help me with those images what should I have to >> do, any config is needed for that in tesseract OCR library. >> >> Please let me know as soon as possible. >> >> sample code ... >> >> public class Test { >> >> public static void main(String[] args) { >> >> try { >> File imageFile = new File("Sample1_3.png"); >> >> ITesseract instance = new Tesseract(); // JNA Interface Mapping >> System.out.print(imageFile.canRead()); >> >> instance.setDatapath("tessdata"); >> instance.setTessVariable("user_defined_dpi", "300"); >> instance.setLanguage("eng"); >> //instance.setDatapath(tessDataFolder.getPath());; >> String text = instance.doOCR(imageFile); >> // path of your image file >> >> } catch (TesseractException e) { >> e.printStackTrace(); >> >> } >> } >> } >> >> >> -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/297f9f9c-c422-49e6-bc3c-63f7d0630cdc%40googlegroups.com.