OCR タスクを実行する必要があるブラックベリーのコア アプリケーションに取り組んでいます。
今まで検索したところ、画像を読み取ってテキストファイルを返すことができるABBYのようなオンラインAPIはほとんどないことがわかりましたが、無料ではありません。いくつかのトレイルの後、料金がかかります。
サーバー実装で完全にデバイス側で光学式文字認識を実行できますか? この仕事を提案してください。
EDITED:私は次のコードで作業しています
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=en&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;
    }
しかし、このコードでも機能しません。HTTP リクエストを行った後、レスポンス コードとして 200 を取得しています。しかし、テキストが期待するほど完全な応答が得られません。応答として、ABBYY の ERROR PAGE が表示されます。 http://cloud.ocrsdk.com/GenericError.htm?aspxerrorpath=/processImage/language=English&exportFormat=txt;connectionhandler=httpc
私に提案してください:(