mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 00:33:03 +08:00
[Android] fix JNI OCRResult allocate errors (#588)
* [FlyCV] Add global SetProcLibCpuNumThreads method * [Android] Support segmentation and facedet in Android * [Android] add JNI instance check to j_runtime_option_obj * [Model] fixed ppseg flycv resize error * [FlyCV] fix FlyCV resize flags * [cmake] remove un-need lite compile option * [Android] add PaddleSegModel JNI and fix some bugs * [Android] bind PaddleSegModel via JNI * [Android] bind VisSegmentation via JNI * [Android] bind YOLOv5Face and SCRFD via JNI * [Android] fix NewJavaFaceDetectionResultFromCxx error * [Android] remove un-need option in Java RuntimeOption * [Android] fixed OcrMainActivity setting errors * [Android] Update Android SDK usage docs * [Android] Update Android SDK usage docs * [Android] fix JNI OCRResult allocate errors
This commit is contained in:
@@ -209,9 +209,6 @@ public class DetectionMainActivity extends Activity implements View.OnClickListe
|
||||
|
||||
@Override
|
||||
public boolean onTextureChanged(Bitmap ARGB8888ImageBitmap) {
|
||||
Log.d(TAG, "onTextureChanged: bitmap height: "
|
||||
+ ARGB8888ImageBitmap.getHeight() + " width: "
|
||||
+ ARGB8888ImageBitmap.getWidth());
|
||||
String savedImagePath = "";
|
||||
synchronized (this) {
|
||||
savedImagePath = Utils.getDCIMDirectory() + File.separator + "result.jpg";
|
||||
@@ -224,10 +221,12 @@ public class DetectionMainActivity extends Activity implements View.OnClickListe
|
||||
shutterBitmap = ARGB8888ImageBitmap;
|
||||
originShutterBitmap = ARGB8888ImageBitmap;
|
||||
}
|
||||
|
||||
boolean modified = false;
|
||||
DetectionResult result = predictor.predict(
|
||||
ARGB8888ImageBitmap, true, DetectionSettingsActivity.scoreThreshold);
|
||||
modified = result.initialized();
|
||||
|
||||
if (!savedImagePath.isEmpty()) {
|
||||
synchronized (this) {
|
||||
DetectionMainActivity.this.savedImagePath = "result.jpg";
|
||||
|
Reference in New Issue
Block a user