Class BoundingBox


  • public final class BoundingBox
    extends Object
    Represents a rectangular area inside an image.
    • Constructor Detail

      • BoundingBox

        public BoundingBox​(int x,
                           int y,
                           int w,
                           int h)
        Instantiates a new BoundingBox.
        Parameters:
        x - the X-coordinate of the top left point of the area, in pixels
        y - the Y-coordinate of the top left point of the area, in pixels
        w - the width of the area, in pixels
        h - the height of the area, in pixels
    • Method Detail

      • getX

        public final int getX()
        Get the X-coordinate of the top left point of the area, in pixels.
        Returns:
        The X-coordinate of the top left point of the area, in pixels.
      • getY

        public final int getY()
        Get the Y-coordinate of the top left point of the area, in pixels.
        Returns:
        The Y-coordinate of the top left point of the area, in pixels.
      • getH

        public final int getH()
        Get the height of the area, in pixels.
        Returns:
        The height of the area, in pixels.
      • getW

        public final int getW()
        Get the width of the area, in pixels.
        Returns:
        The width of the area, in pixels.
      • toString

        public String toString()
        String representation of the object
        Overrides:
        toString in class Object
        Returns:
        The string representation of the object.