Browse Source

!10268 [MS][LITE]20201216 detection demo check some photos exits unexpectedly

From: @sishuikang
Reviewed-by: @zhanghaibo5,@zhang_xue_tong
Signed-off-by: @zhanghaibo5
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
a207deab73
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      model_zoo/official/lite/object_detection/app/src/main/java/com/mindspore/hiobject/objectdetect/PhotoActivity.java

+ 1
- 1
model_zoo/official/lite/object_detection/app/src/main/java/com/mindspore/hiobject/objectdetect/PhotoActivity.java View File

@@ -80,7 +80,7 @@ public class PhotoActivity extends AppCompatActivity {
Pair<Integer, Integer> targetedSize = this.getTargetSize(); Pair<Integer, Integer> targetedSize = this.getTargetSize();
int targetWidth = targetedSize.first; int targetWidth = targetedSize.first;
int maxHeight = targetedSize.second; int maxHeight = targetedSize.second;
originBitmap = BitmapUtils.loadFromPath(this, imageUri, targetWidth, maxHeight);
originBitmap = BitmapUtils.loadFromPath(this, imageUri, targetWidth, maxHeight).copy(Bitmap.Config.ARGB_8888, true);
// Determine how much to scale down the image. // Determine how much to scale down the image.
Log.i(TAG, "resized image size width:" + originBitmap.getWidth() + ",height: " + originBitmap.getHeight()); Log.i(TAG, "resized image size width:" + originBitmap.getWidth() + ",height: " + originBitmap.getHeight());
if (originBitmap != null) { if (originBitmap != null) {


Loading…
Cancel
Save