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.
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.
Ellipse¶
When Ellipse is selected as the Target Shape, the 2D shape before and after processing is shown below.
Circumcircle¶
When Circumcircle is selected as the Target Shape, the 2D shape before and after processing is shown below.
Incircle¶
When Incircle is selected as the Target Shape, the 2D shape before and after processing is shown below.
BoundingBox¶
When BoundingBox is selected as the Target Shape, the 2D shape before and after processing is shown below.
CircumscribedRectangle¶
When CircumscribedRectangle is selected as the Target Shape, the 2D shape before and after processing is shown below.
InscribedRectangle¶
When InscribedRectangle is selected as the Target Shape, the 2D shape before and after processing is shown below.
InnerCenter¶
When InnerCenter is selected as the Target Shape, the 2D shape before and after processing is shown below.