• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ocr in image processing

 
ram mane
Greenhorn
Posts: 27
  • 0
  • 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
Pie
Posts: 20171
24
MySQL Database
  • 0
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic