Transform Surface

Description

Use this Step to transform the surface data to a new reference frame formed by input geometric features such as plane, line, and point.

Usage Scenario

This Step is commonly used in two scenarios: adjusting the inspection surface to the horizontal level and data alignment.

  • Adjust the inspection surface to the horizontal level

    • Function: The Step can adjust a tilted inspection surface to the horizontal level, i.e., making it parallel to the XOY plane.

    • Common scenario: During measurements, the depth values of data points are used for filtering.

    • Example transformation method: Plane.

      processing 1

      processing 2

      Tilted top surface

      Transformed data

  • Data alignment

    • Function: For different incoming objects, the Step can ensure the target object’s position is the same in all images.

    • Common scenario: The target object is expected to be in a specified position in the image, and the point, line, and plane features can be easily and stably obtained.

    • Example transformation method: Plane + line + point.

      processing 3

      processing 4

      Before

      After

Methods for Transforming Surface

The geometric features (point, line, plane) input into the Step determine the method for transforming the reference frame of the surface data.

The currently supported input combinations are as follows:

When no geometric features are input into the Step, the surface data will be transformed according to the settings in the Parameters section.

Plane

In the Input section, input a plane feature, and leave the line and point features empty.

The reference frame in which the transformed surface data resides is as follows:

  • XOY plane: the input plane.

  • X-axis: The new X-axis is parallel to the original X-axis.

  • Origin: The origin of the original reference frame is projected onto the input plane, and the projection becomes the origin of the new reference frame.

only plane demo

Line

In the Input section, input a line feature, and leave the plane and point features empty.

The reference frame in which the transformed surface data resides is as follows:

  • XOY plane: The cross product of the input line and the normal vector of the original XOY plane defines the Y-axis of the new reference. The new Y-axis and the input line form the XOY plane.

  • X-axis: the input line.

  • Origin: The origin of the original reference frame is projected onto the input line, and the projection becomes the origin of the new reference frame.

only line demo

Point

In the Input section, input a point feature, and leave the plane and line features empty.

The reference frame in which the transformed surface data resides is as follows:

  • XOY plane: The new XOY plane, passing through the input point, is parallel to the original XOY plane.

  • X-axis: The new X-axis is parallel to the original X-axis.

  • Origin: the input point.

only point demo

Plane + Line

In the Input section, input a plane and a line, and leave the point feature empty.

The reference frame in which the transformed surface data resides is as follows:

  • XOY plane: the input plane.

  • X-axis: the projection of the input line onto the input plane.

  • Origin: The projection of the original reference frame’s origin onto the projection of the input line, i.e., the new X-axis.

plane plus line demo

Plane + Point

In the Input section, input a plane and a point, and leave the line feature empty.

The reference frame in which the transformed surface data resides is as follows:

  • XOY plane: the input plane.

  • X-axis: The new X-axis is parallel to the original X-axis.

  • Origin: The input point is projected onto the input plane, and the projection becomes the origin of the new reference frame.

plane plus point demo

Line + Point

In the Input section, input a line and a point, and leave the plane feature empty.

The reference frame in which the transformed surface data resides is as follows:

  • XOY plane: The cross product of the input line and the normal vector of the original XOY plane defines the Y-axis of the new reference. The new Y-axis and the input line form the XOY plane.

  • X-axis: the input line.

  • Origin: The input point is projected onto the input line, and the projection becomes the origin of the new reference frame.

line plus point demo

Plane + Line + Point

In the Input section, input a plane, a line, and a point.

The reference frame in which the transformed surface data resides is as follows:

  • XOY plane: the input plane.

  • X-axis: the projection of the input line onto the input plane.

  • Origin: The input point is projected onto the input line, and the projection becomes the origin of the new reference frame.

plane plus line plus point demo

Usage Workflow

The process of configuring this Step is shown below.

transform surface process
  1. Configure the input. Connect the Step ports in the graphical programming workspace or select the input under Input in the parameter configuration panel.

  2. Determine whether to use a feature region. See Feature Region to learn about the settings.

  3. In the Parameters section, determine whether to add fixed transformations or not and set the resolution mode.

  4. Select the desired output items under Output. For an expandable output item, click ▶ and configure the Min and Max values to determine the acceptable range for the item.

  5. Run the Step and view output.

Parameter Description

Parameter Description

Use Feature Region

After selecting this parameter, you need to set the feature region to limit the surface data used by the Step. See Feature Region to learn about how to adjust a feature region.

When this parameter is unselected, the Step will use the entire surface data.

Add Fixed Transformations

Select this parameter to add fixed transformations. After the surface data is transformed according to the geometric features input into the Step, the added fixed transformations can be applied.

The fixed transformations that can be added are as follows:

  • X-Direction Translation: Moves the surface data along the X-axis by a certain distance.

  • Y-Direction Translation: Moves the surface data along the Y-axis by a certain distance.

  • Z-Direction Translation: Moves the surface data along the Z-axis by a certain distance.

  • Rotation Angle about X-axis: Rotates the surface data about the X-axis by a certain angle.

  • Rotation Angle about Y-axis: Rotates the surface data about the Y-axis by a certain angle.

  • Rotation Angle about Z-axis: Rotates the surface data about the Z-axis by a certain angle.

If a new reference frame has not been formed, the fixed transformations will be based on the original reference frame. Once a new reference frame is formed, the fixed transformations will be based on the new reference frame.

Resolution Mode

Use this parameter to determine whether to scale the X-axis and Y-axis resolution of the transformed surface in a 1:1 ratio.

You can select one of the following modes:

  • Average: The ratio of the X-axis resolution to the Y-axis resolution is 1:1, with the resolution set to the average of the two.

  • Higher value: The ratio of the X-axis resolution to the Y-axis resolution is 1:1, with the resolution set to the higher one of the two.

  • Lower value: The ratio of the X-axis resolution to the Y-axis resolution is 1:1, with the resolution set to the lower one of the two.

  • Original: Keep the original resolution.

Output Description

The output of this Step is transformed surface data that can be used as input into other Steps.

Troubleshooting

  • For common errors, see Error Code List.

  • If the error code is inconsistent with the error message, please contact Technical Support for help.

CV-W3601

Error: The input point is invalid.

Solution: Verify the input point is valid.

CV-W3602

Error: The input line is invalid.

Solution: Verify the input line is valid.

CV-W3603

Error: The input plane is invalid.

Solution: Verify the input plane is valid.

CV-W3604

Error: The set axial translation parameters are invalid.

Solution: Verify that the set values of the axial translation parameters are valid.

CV-W3605

The set rotation angle about the X/Y/Z axis is invalid.

Solution: Verify that the set rotation angles about the X/Y/Z axis are valid.

CV-W3606

Error: The set “Resolution Mode” is invalid.

Solution: Select a valid resolution mode from the drop-down list.

CV-W3607

Error: Failed to calculate the X-axis of the new reference frame.

Possible causes:

  • The input geometric features are a line and a plane, and the line is perpendicular to the plane.

  • The input geometric feature is a plane, and the plane is parallel to the original XOZ plane.

Solutions:

  • When the input geometric features are a line and a plane, ensure the line is not perpendicular to the plane.

  • When the input geometric feature is a plane, ensure the plane is not parallel to the original XOZ plane.

CV-W3608

Error: Failed to calculate the Y-axis of the new reference frame.

Possible cause: The line input into the Step is parallel to the original Z-axis.

Solution: Ensure that the line input into the Step is not parallel to the original Z-axis.

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.