Merge pull request #966 from tink2123/fix_android_demo

fix android demo
This commit is contained in:
xiaoting 2020-10-20 15:44:20 +08:00 committed by GitHub
commit 112bf885a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -35,12 +35,6 @@ public class OCRPredictorNative {
}
public void release() {
if (nativePointer != 0) {
nativePointer = 0;
// destory(nativePointer);
}
}
public ArrayList<OcrResultModel> runImage(float[] inputData, int width, int height, int channels, Bitmap originalImage) {
Log.i("OCRPredictorNative", "begin to run image " + inputData.length + " " + width + " " + height);
@ -63,7 +57,7 @@ public class OCRPredictorNative {
protected native float[] forward(long pointer, float[] buf, float[] ddims, Bitmap originalImage);
protected native void release(long pointer);
public native void release(long pointer);
private ArrayList<OcrResultModel> postprocess(float[] raw) {
ArrayList<OcrResultModel> results = new ArrayList<OcrResultModel>();