diff --git a/android/core/src/main/java/ai/djl/android/core/BitmapImageFactory.java b/android/core/src/main/java/ai/djl/android/core/BitmapImageFactory.java index c3b8b752e98..8142edfa5af 100644 --- a/android/core/src/main/java/ai/djl/android/core/BitmapImageFactory.java +++ b/android/core/src/main/java/ai/djl/android/core/BitmapImageFactory.java @@ -25,6 +25,7 @@ import ai.djl.modality.cv.output.DetectedObjects; import ai.djl.modality.cv.output.Joints; import ai.djl.modality.cv.output.Mask; +import ai.djl.modality.cv.output.Point; import ai.djl.modality.cv.output.Rectangle; import ai.djl.modality.cv.util.NDImageUtils; import ai.djl.ndarray.NDArray; @@ -241,7 +242,7 @@ public List findBoundingBoxes() { /** {@inheritDoc} */ @Override - public void drawBoundingBoxes(DetectedObjects detections) { + public void drawBoundingBoxes(DetectedObjects detections, float opacity) { Bitmap mutableBitmap = bitmap.copy(Bitmap.Config.ARGB_8888, true); Canvas canvas = new Canvas(mutableBitmap); // set the paint configure @@ -421,7 +422,7 @@ private void drawMask(Bitmap image, Mask mask) { private void drawPolygon(Canvas canvas, Paint paint, int[][] polygon) { android.graphics.Path polygonPath = new android.graphics.Path(); - polygonPath.moveTo(polygon[0][0], polygonPath[1][0]); + polygonPath.moveTo(polygon[0][0], polygon[1][0]); for (int i = 1; i < polygon[0].length; i++) { polygonPath.lineTo(polygon[0][i], polygon[1][i]); }