Skip to content

Commit

Permalink
change signature of drawBoundingBoxes
Browse files Browse the repository at this point in the history
  • Loading branch information
sindhuvahinis committed Sep 9, 2024
1 parent e083606 commit 07174e6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -241,7 +242,7 @@ public List<BoundingBox> 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
Expand Down Expand Up @@ -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]);
}
Expand Down

0 comments on commit 07174e6

Please sign in to comment.