Process 2D Shapes

Function

This Step processes the shapes in the input binary images by the specified method.

Usage Scenario

This Step is usually used to process object contours to facilitate various calculations in measurement scenarios.

Input and Output

For example, when Ellipse is selected, the input and output of this Step are shown as below.

../../../../_images/input_and_output20.png

Parameter Description

Target Shape
Description: This parameter specifies the method to process the 2D image.
Value list: Convex, Ellipse, Circumcircle, Incircle, BoundingBox, CircumscribedRectangle, InscribedRectangle, InnerCenter
  • Convex: generates a convex hull of the original shape.

  • Ellipse: generates an ellipse with the same first-order moment and second-order moment as the original shape.

  • Circumcircle: generates a minimum circumscribed circle of the original shape.

  • Incircle: generates a maximum inscribed circle of the original shape.

  • BoundingBox: generates a minimum bounding box with edges parallel to the image borders.

  • CircumscribedRectangle: generates a minimal circumscribed rectangle of the original shape.

  • InscribedRectangle: generates a maximum inscribed rectangle with edges parallel to the image borders.

  • InnerCenter: generates a point that is closest to the center of gravity on the original shape’s skeleton.

Tuning recommendation: Please select a method according to the actual requirement.

Tuning Examples

Convex

When Convex is selected as the Target Shape, the 2D shape before and after processing is shown below.

../../../../_images/convex.png

Ellipse

When Ellipse is selected as the Target Shape, the 2D shape before and after processing is shown below.

../../../../_images/ellipse.png

Circumcircle

When Circumcircle is selected as the Target Shape, the 2D shape before and after processing is shown below.

../../../../_images/circumcircle.png

Incircle

When Incircle is selected as the Target Shape, the 2D shape before and after processing is shown below.

../../../../_images/incircle.png

BoundingBox

When BoundingBox is selected as the Target Shape, the 2D shape before and after processing is shown below.

../../../../_images/bounding_box.png

CircumscribedRectangle

When CircumscribedRectangle is selected as the Target Shape, the 2D shape before and after processing is shown below.

../../../../_images/circumscribed_rectangle.png

InscribedRectangle

When InscribedRectangle is selected as the Target Shape, the 2D shape before and after processing is shown below.

../../../../_images/inscribed_rectangle.png

InnerCenter

When InnerCenter is selected as the Target Shape, the 2D shape before and after processing is shown below.

../../../../_images/inner_center.png