Package ai.djl.modality.cv.output
Interface BoundingBox
- All Superinterfaces:
Serializable
An interface representing a bounding box around an object inside an image.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the boundingRectangleof thisBoundingBox.doublegetIoU(BoundingBox box) Returns the Intersection over Union (IoU) value between bounding boxes.getPath()Returns an iterator object that iterates along theBoundingBoxboundary and provides access to the geometry of theBoundingBoxoutline.getPoint()Returns the top left point of the bounding box.
-
Method Details
-
getBounds
Rectangle getBounds()Returns the boundingRectangleof thisBoundingBox.- Returns:
- a new
Rectanglefor thisBoundingBox
-
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
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
-