Skip to content

MinAreaRect

markmaker edited this page Jul 3, 2022 · 1 revision

MinAreaRect Pipeline Stage

The MinAreaRect stage finds the smallest rotated rectangle that encloses a subject. It considers pixels that fall within a given brightness range. Input should be a grayscale image.

The stage can also detect only selected edges of a rectangular outline.

MinAreaRect partial edges

  • thresholdMin: the minimum brightness to include the pixel.
  • thresholdMax: the maximum brightness to include the pixel.
  • expectedAngle: the angle at which the rectangular outline is expected. This will usually be controlled by the pipeline caller. In bottom vision, it will supply the (pre-rotate) angle of the part to be detected. For use cases other than bottom vision, and conventional all-edges detection, the angle remains irrelevant.
  • leftEdge, rightEdge, topEdge, bottomEdge: the four edges of the rectangle to be detected. If a switch is off, the edge is not considered in fitting the rectangle, i.e. the subject can be non-rectangular on this side. This is typically the case when the camera can only get a partial view of a large subject. The sense of "left", "right", "top" and "bottom" is at neutral rotation, i.e. when the expectedAngle is at zero degrees, e.g., when the part to be detected in bottom vision is upright. This sense will be rotated correctly for other expectedAngles.
  • diagnostics: this can be used to display the edge pixels that are considered for the convex hull of the subject.
    hull pixels
  • propertyName: determines the pipeline property name under which this stage is controlled by the vision operation. If set, these will override some of the properties configured here. Use "MinAreaRect" for default control.
Clone this wiki locally