Click here to Skip to main content
15,791,675 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
lass ttt
    static String str;
    static BufferedImage image;
    public static void main(String[] args) throws IOException, TesseractException {
        File imageFile = new File("1.png");
        Tesseract instance = Tesseract.getInstance();
        instance.setDatapath("C:/Program Files (x86)/Java");
        String result = instance.doOCR(imageFile);
        System.out.println("string is"+result);

i have doen this task but problem is that in in result variable text is not present .i do not know what i wrong please tell me when i wrong.
please give me any suggestion i want to program for text extraction from image and give me any other api or give me any sample code example in java.
thanks in advance
Updated 5-Oct-13 22:11pm
Richard MacCutchan 6-Oct-13 3:19am    
Assuming you are not the same person who posted this question, I suggest you spend some time reading the documentation for the Java OCR library to ensure you are doing things correctly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900