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

class pp
{
public static void main(String[] args) throws IOException {


File newFile=new File("asdhjsadb.png");
byte[] fileData = new byte[ (int)newFile.length()];
InputStream inStream = new FileInputStream( newFile);
inStream.read(fileData);
inStream.close();
String tempFileData = new String(fileData);
String imageString=new BASE64Encoder().encode(fileData);


}
i am working on final year project please tell me which package or which jar i will include in that code .
in this above code error"BASE64Encoder cannot be resolved to a type" what i can i do for removing that
error please tell me thanks in advance
}
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
Here is a base-64 encoder/decoder you can use. Its API is a bit different from what you're using, but I'm sure you can figure it out. Alternatively, use the Apache Commons Codec library.


Ping & DNS - my free Android networking tools app
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172
    
    8

So you don't want to tell us about the cross posting here http://www.codeproject.com/Questions/664546/image-processing-in-java?
Please read BeForthrightWhenCrossPostingToOtherSites (<=link; click)

Out of curiosity, where did you get this code in the first place?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
Assuming that the goal is still to do OCR -as the subject of this topic suggest it is- I'm curious what you think this will achieve, though.

Also, this: "String tempFileData = new String(fileData)" is wrong. Image data is binary, you can't store it in a string unless you base-64 encode it first.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ocr in image processing
 
Similar Threads
.xlsx file not uploading properly
Getting Onle One File when getting reponse through ksoap2 web service.
checked exceptions
Signing PDF with SecurSign
How can I read a text from an image file ?