Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 22
Registered: ‎11-09-2011
My Device: 9780Bold
My Carrier: DOCOMO

OCR library for Blackberry

Does anybody now some tool or SDK  that can help me to recognize numeric values from photos in Java-based Blackberry application?

means OCR blackberry sdk plese provide me link

 

plese help me

 

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: OCR library for Blackberry

I have never seen such an API on the BlackBerry. 

 

One option you could consider is looking for a Web based solution.  You would have to send the photo to the Server and get a response back.  I'd guess (though I have not looked) that there are packages that you could integrate into a Web solution or, alternatively, there may even been some web based APIs available now.   Just a thought. 

Contributor
Posts: 22
Registered: ‎11-09-2011
My Device: 9780Bold
My Carrier: DOCOMO

Re: OCR library for Blackberry

thank you for ur reply
could you please send me any related links
New Member
Posts: 2
Registered: ‎12-14-2011
My Device: Basic
My Carrier: AOL

Re: OCR library for Blackberry

Have a look at ABBYY Cloud OCR SDK, it's a cloud-based OCR SDK recently launched by ABBYY. It's in beta, so for now it's totally free to use.You may also find useful its codesamples at github: https://github.com/abbyysdk/ocrsdk.com

Contributor
Posts: 22
Registered: ‎11-09-2011
My Device: 9780Bold
My Carrier: DOCOMO

Re: OCR library for Blackberry

Blackberry option is not in that ocr.sdk list .which i need to use?

 

New Member
Posts: 2
Registered: ‎12-14-2011
My Device: Basic
My Carrier: AOL

Re: OCR library for Blackberry

Why don't you try Java sample?

Highlighted
New Contributor
Posts: 7
Registered: ‎09-21-2011
My Device: Torch 9800
My Carrier: Software Developer

Re: OCR library for Blackberry

Have you got anything related to this topic??
Please share with us....I am struggling from last 5 days.
My status is: I am worknig with this code:

 

public String serverUrl = "http://cloud.ocrsdk.com";
static final String BOUNDARY = "----------V2ymHFg03ehbqgZCaKO6jy";

public byte[] send() throws Exception
	{
		HttpConnection hc = null;

		InputStream is = null;

		ByteArrayOutputStream bos = new ByteArrayOutputStream();

		byte[] res = null;

		try
		{
			hc = (HttpConnection) Connector.open(serverUrl+"/processImage/"+"language=English&exportFormat=txt");

			hc.setRequestProperty("Content-Type", "multipart/image-JPG; boundary=" + BOUNDARY);
			/*hc = (HttpConnection) Connector.open(SERVICE_URL);
			hc.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
			hc.setRequestProperty(PARAM_IMAGE, "");
			hc.setRequestProperty(PARAM_LANGUAGE, lang);
			hc.setRequestProperty(PARAM_APIKEY, key);*/

			hc.setRequestMethod(HttpConnection.POST);

			OutputStream dout = hc.openOutputStream();

			dout.write(raw);

			dout.close();

			int ch;
			StringBuffer sb= new StringBuffer();
			is = hc.openInputStream();

			while ((ch = is.read()) != -1)
			{
				bos.write(ch);
				sb.append(ch);
			}
			System.out.println(sb);
			res = bos.toByteArray();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		finally
		{
			try
			{
				if(bos != null)
					bos.close();

				if(is != null)
					is.close();

				if(hc != null)
					hc.close();
			}
			catch(Exception e2)
			{
				e2.printStackTrace();
			}
		}
		return res;
	}
But on hitting the server of ABBYY i am getting Error page response in form of bytes to which i just convert in XML. Please suggest me something so that i can proceed.