• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ocr in image processing

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic