Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ocr in image processing

 
ram mane
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic