Class RotatableBoundingBoxFactory

Object
RotatableBoundingBoxFactory

public class RotatableBoundingBoxFactory extends Object
Creates instances of RotatableBoundingBox.
Author:
Owen Feehan
  • Method Details

    • create

      public static RotatableBoundingBox create(IntToFloatFunction extractElement, Point2i anchorPoint)
      Builds a bounding-box from the 5-element floating-point vector returned from the EAST algorithm.

      The bounding-boxes are encoded in RBOX format, see the original EAST paper Zhou et al. 2017.

      A C++ example of calling EAST via OpenCV can be found on GitHub.

      The vector is ordered as follows:

      • Position 0: distance to top-boundary of box (y-min).
      • Position 1: distance to right-boundary of box (x-max).
      • Position 2: distance to bottom-boundary of box (y-max).
      • Position 3: distance to left-boundary of box (x-min).
      • Position 4: clockwise angle to rotate around the offset.
      Parameters:
      extractElement - extracts an element from the vector, corresponding to indices 0-5 inclusive.
      anchorPoint - the anchor point for the object, about which rotation occurs, and the corners of the bounding box are expressed relative to.
      Returns:
      a mark encapsulating a rotatable bounding-box.