Process 2D Shapes
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, and InnerCenter.
-
Convex: Generate a convex hull of the original shape.
-
Ellipse: Generate an ellipse with the same first-order moment and second-order moment as the original shape.
-
Circumcircle: Generate a minimum circumscribed circle of the original shape.
-
Incircle: Generate a maximum inscribed circle of the original shape.
-
BoundingBox: Generate a minimum bounding box with edges parallel to the image borders.
-
CircumscribedRectangle: Generate a minimal circumscribed rectangle of the original shape.
-
InscribedRectangle: Generate a maximum inscribed rectangle with edges parallel to the image borders.
-
InnerCenter: Generate 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.