Hi Yogesh,

Same is the case with me. I'm a python developer. What Piyush saying is 
right. For your reference:

https://www.tutorialspoint.com/opencv/opencv_rotation.htm

This is the guide to rotate the image. You can explore OpenCV for java on 
google. You can find a solution for everything which we have mentioned 
earlier. OpenCV is the major library that is used to modify the images.

Regards
Lakshay Saini

On Thursday, May 28, 2020 at 12:24:20 PM UTC+5:30, Piyush Chandra wrote:
>
> Hi Yogesh,
>
> I am not a Java developer, but you can use OpenCv for pre processing the 
> image. As mentioned by Lakshya (#3) you can achieve using OpenCv and is 
> available for Java.
>
> Rotating the image can also be achieved using OpenCv. There are loads of 
> examples available online (Google it!)
>
> On Thursday, 28 May 2020 12:07:53 UTC+5:30, YOGESH KUMBHARE wrote:
>>
>>
>> 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/7cf2abe1-b8b3-46ca-bf17-2e5e376b2925%40googlegroups.com.

Reply via email to