This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes ocr in image processing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "ocr in image processing" Watch "ocr in image processing" New topic
Author

ocr in image processing

ram mane
Greenhorn

Joined: Sep 12, 2013
Posts: 27
public class aspire {
public static void main(String[] args) throws IOException {
BufferedImage image = ImageIO.read(new File("Test22.jpg"));
String s = new OCR().recognizeEverything(image);
System.out.println("RESULTS: \n"+ s);
}
}
in above code"Exception in thread "main" javax.imageio.IIOException: Can't read input file!
at javax.imageio.ImageIO.read(Unknown Source)
at aspire.main(aspire.java:14)
"
i am trying to pass all type of image(.png,.jpg) but error is getting please tell me where i am wrong
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I expect that means that the ImageIO code can't find that file. That's most likely because the Test22.jpg file isn't in your current working directory. Try providing the full path to the file.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ocr in image processing
 
Similar Threads
Reading dir
ImageIcon not working
Problem while creating jpg image
Reading tiff file content
Reading text from Image file using OCR