Package ai.djl.modality.cv.output
Interface BoundingBox
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RectanglegetBounds()Returns the boundingRectangleof thisBoundingBox.doublegetIoU(BoundingBox box)Returns the Intersection over Union (IoU) value between bounding boxes.java.lang.Iterable<Point>getPath()Returns an iterator object that iterates along theBoundingBoxboundary and provides access to the geometry of theBoundingBoxoutline.PointgetPoint()Returns the top left point of the bounding box.
-
-
-
Method Detail
-
getBounds
Rectangle getBounds()
Returns the boundingRectangleof thisBoundingBox.- Returns:
- a new
Rectanglefor thisBoundingBox
-
getPath
java.lang.Iterable<Point> getPath()
Returns an iterator object that iterates along theBoundingBoxboundary and provides access to the geometry of theBoundingBoxoutline.- Returns:
- a
Iterableobject, which independently traverses the geometry of theBoundingBox
-
getPoint
Point getPoint()
Returns the top left point of the bounding box.- Returns:
- the
Pointof the top left corner
-
getIoU
double getIoU(BoundingBox box)
Returns the Intersection over Union (IoU) value between bounding boxes.Also known as Jaccard index
- Parameters:
box- the bounding box to calculate- Returns:
- the IoU value
-
-