Calc Center Points of Non-Zero Regions

You are currently viewing the documentation for the latest version (2.2.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Function

This Step is used to calculate the center points of non-zero pixel regions in a 2D mask image and output the corresponding 2D poses.

Usage Scenario

This Step is suitable for obtaining the target center position based on the mask image. It is a general 2D pose calculation Step.

Input and Output

Input

Input port Data type Description

Mask Images

Image []

Centers of masks input to this port will be calculated.

Output

Output port Data type Description

Center Poses

Pose2D []

Calculated 2D poses of mask center points

Parameter Description

Parameter Description

Center Type

Description: This parameter is used to set the method to calculate the center point of the non-zero pixel regions in the mask image.

Value list: MassCenter, BoundingBoxCenter

  • MassCenter: Calculate the geometric center of a region based on the positions of all non-zero pixels in the mask.

  • BoundingBoxCenter: Calculate the center of the minimum bounding rectangle of non-zero pixel regions in the mask by the bounding rectangle center method.

Default value: MassCenter

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.