Convert Lengths Pixel-Wise to Physical

You are viewing an old version of the documentation. You can switch to the documentation of the latest version by clicking the top-right corner of the page.

Function

This Step is used to calculate the actual length of a specified line segment in 2D images. A calibration board is needed when using this Step, and it should be placed in the plane where the line segment to be measured is located.

Usage Scenario

This Step applies to scenarios where 2D images are used for measuring the dimensions of objects with relatively planar surfaces.

Since a line segment to be measured should be input, this Step usually follows Steps in the Measuring category with the LineSegmentList output port, such as Measure Distances Segments to Segments, Measure Distances Points to Circles, and Measure Distances Circles to Segments.

Input and Output

convert lengths pixel wise to physical input and output

Parameter Description

Conversion Method

Description: This parameter specifies the conversion method to convert the length from pixel-wise to physical.

Options: Scale and Homography.

  • Scale: The actual length of the line segment is equal to the product of the length in pixels multiplied by the scale.

  • Homography: The actual length of the line segment will be calculated from the projection of the image plane onto the actual plane.

Default value: Scale.

Scale

When the conversion method is Scale, the actual length of the line segment is equal to the product of the length in pixels multiplied by the scale.

Scale

Description: The conversion ratio of pixel distance to actual distance.

Default value: 1.0000

Homography

When the conversion method is Homography, the Step will project the line segment in the image plane onto the actual plane to calculate the actual length of the line segment.

There are two ways to calculate the projection of the image plane onto the actual plane:

  • Calculate without Calibration: Directly calculate the projection from the Calibration Circle Center Distance, Number of Circle Rows, and Number of Circle Columns, and then the actual length of the segment line can be obtained. The calculation with this method takes less time.

  • Calculate by Calibration: Obtain the camera’s extrinsic and intrinsic parameters according to the Calibration Circle Center Distance, Number of Circle Rows, and Number of Circle Columns of the calibration board, and then calculate the projection of the image plane onto the actual plane. Lastly, Calibration Board Plane Height and Measured Plane Height will be used for the calculation of the actual length of the line segment. The calculation result using this method is more accurate.

The parameters of the Homography conversion method are as follows:

Calibration Circle Center Distance

Default value: 1.0000

Instruction: This parameter specifies the actual distance between two circle centers on the calibration board. Please set the value according to the actual situation. The distances between centers of adjacent circles in a row or a column on the calibration board should be the same.

Number of Circle Rows

Default value: 7

Instruction: This parameter specifies the number of rows of circles on the calibration board. Please set the value according to the actual situation.

Number of Circle Columns

Default value: 7

Instruction: This parameter specifies the number of columns of circles on the calibration board. Please set the value according to the actual situation.

Calculate by Calibration

Default Value: Unselected.

Instruction: This parameter determines whether to calculate the actual length by calibration. If this option is selected, the Step will calculate the projection of the image plane onto the actual plane by calibration and then calculate the actual length of the line segment.

Image No.

Description: When there are multiple input images, you can specify the image in which the line segment will be measured.

Default value: 1

Instruction: Once the image No. is selected, you can check the visualized output of the corresponding image in the Debug Output window.

Calibration Board Plane Height

Description: This parameter specifies the distance between the plane of the calibration board and the base plane.

Default value: 0.0000

Instruction: If the calibration board is placed on a table, and the thickness of the calibration board is about 2 cm, the Calibration Board Plane Height should be set to 2 cm.

Measured Plane Height

Description: This parameter specifies the distance between the base plane and the plane where the line segment to be measured is located.

Default value: 0.0000

Instruction: If the object to be measured is placed on a table, and the plane of the object to be measured is 2 cm away from the plane of the table, the Measured Plane Height should be set to 2 cm.

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.