drawObject

fun Canvas.drawObject(detectedObject: DetectedObject, paint: Paint, labelPaint: TextPaint, bounds: PreviewImageBounds = bounds())

Draw given detectedObject on the Canvas using paint for the bounding box and labelPaint for the label.

If the preview image coordinates do not match the Canvas coordinates, bounds of the image preview should be provided.

See also