Interface BoundingBox

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    Landmark, Mask, Rectangle

    public interface BoundingBox
    extends java.io.Serializable
    An interface representing a bounding box around an object inside an image.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Rectangle getBounds()
      Returns the bounding Rectangle of this BoundingBox.
      double getIoU​(BoundingBox box)
      Returns the Intersection over Union (IoU) value between bounding boxes.
      java.lang.Iterable<Point> getPath()
      Returns an iterator object that iterates along the BoundingBox boundary and provides access to the geometry of the BoundingBox outline.
      Point getPoint()
      Returns the top left point of the bounding box.
    • Method Detail

      • getBounds

        Rectangle getBounds()
        Returns the bounding Rectangle of this BoundingBox.
        Returns:
        a new Rectangle for this BoundingBox
      • getPath

        java.lang.Iterable<Point> getPath()
        Returns an iterator object that iterates along the BoundingBox boundary and provides access to the geometry of the BoundingBox outline.
        Returns:
        a Iterable object, which independently traverses the geometry of the BoundingBox
      • getPoint

        Point getPoint()
        Returns the top left point of the bounding box.
        Returns:
        the Point of 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