Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: ocr in image processing

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Location
    delhi
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ocr in image processing

    class mmm
    {
    public static void main(String[] args) {
    OcrEngine ocr = new OcrEngine();
    ocr.setImage(ImageStream.fromFile("pp.tif"));
    // ocr.setImage((IImageStream) new File("pp.tif"));
    ocr.getLanguages().addLanguage(Language.load("engl ish"));
    // ocr.setResource(new FolderStream(resourceFileName, FileMode.Open)));
    {
    if (ocr.process())
    {
    System.out.println(ocr.getText());
    }
    }
    }
    }

    in above code giving error .
    Exception in thread "main" com.aspose.ms.System.IO.FileNotFoundException: Can't find file: pp.tiff.
    please tell me where i am wrong. i am trying to pass all formt(.png,.gif,.jpg) images.i am giving proper path


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: ocr in image processing

    The exception is pretty explicit that the file cannot be found, so make sure the image is where the method ImageStream.fromFile expects it to be, which for many (but not all, and the ImageStream class is not a part of J2SE so we can only speculate) IO a file name without a specified path refers to the directory the program resides.

  3. #3
    Junior Member
    Join Date
    Mar 2014
    Location
    Hong Kong
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Re: ocr in image processing

    I've met the similar OCR image processing issue and wonder whether it is solved now?
    I had searched through the web and although there been posted similar issue for doing image OCR. But I can't have the result as it proposed.

Similar Threads

  1. Image Processing
    By sachinshahi_2010 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 25th, 2013, 12:45 PM
  2. Image Processing
    By vigneshwaran in forum AWT / Java Swing
    Replies: 1
    Last Post: November 27th, 2012, 07:33 AM
  3. Re: Image Processing
    By rajkula in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: August 3rd, 2012, 10:41 AM
  4. Need help in image processing
    By ath in forum Object Oriented Programming
    Replies: 3
    Last Post: March 8th, 2012, 11:18 AM
  5. Image Processing
    By subash in forum File I/O & Other I/O Streams
    Replies: 4
    Last Post: June 8th, 2011, 08:40 AM

Tags for this Thread