PerspectiveTransformTool

The PerspectiveTransformTool appends a non-linear transformation to the CogCoordinateSpaceTree of a CogImage8Grey.

../../../_images/PerspectiveTransformTool.png
  1. Columns/Rows: Default values within the transformation matrix

  2. decimal places: Number of decimal places displayed in the matrix

  3. Coordinate space name: Name of the new perspective image space

  4. Set SelectedSpaceName: Specifies whether to set the SelectedSpaceName of the output image to names of the coordinate space.

  5. Unwrap the image: Image is rectified in perspective

../../../_images/PerspectiveTransformTool_MatrixFromN2N.png
  1. Enabled: Enables the calculation of the transformation matrix via an N-to-N point mapping

  2. NumPoints: Number of N to N points

  3. Unfixed X/Y: Unfixed points, or starting points, for example in pixel coorinate space.

  4. Rax Fixtured X/Y: Fixed points, or target points, for example in world coordinates.

The matrix is a planar transformation, followed by a radial transformation, followed by a linear transformation without a rotation matrix:

../../../_images/perspective_matrix.png

With this matrix, a point P is transformed into the point P’ as follows:

../../../_images/perspective_transform.png
Note PDX
Controls the perspective transformation in the untransformed X direction.
0 = no perspective transformation in X
> 0 = Tilting of the plane backwards with increasing X
< 0 = Tilting of the plane backwards with decreasing X
Note PDY
Controls the perspective transformation in the non-transformed Y direction.
0 = no perspective transformation in Y
> 0 = Tilting of the plane backwards with increasing Y
< 0 = Tilting of the plane backwards with decreasing Y)

Hint

  • The perspective transformation cannot be used directly by Cognex VisionPro Tools. It is only intended for the “Unwarp” case or further use in subsequent scripts.

  • Color images (CogImage24PlanarColor) are not allowed!