Operators

# projective_trans_point_2d (Operator)

## Name

projective_trans_point_2d — Project a homogeneous 2D point using a projective transformation matrix.

## Signature

projective_trans_point_2d( : : HomMat2D, Px, Py, Pw : Qx, Qy, Qw)

## Description

projective_trans_point_2d applies the homogeneous projective transformation matrix HomMat2D to all homogeneous input points (Px,Py,Pw) and returns an array of homogeneous output points (Qx,Qy,Qw). The transformation is described by the homogeneous transformation matrix given in HomMat2D. This corresponds to the following equation (input and output points as homogeneous vectors):

```  / Qx \              / Px \
| Qy | = HomMat2D * | Py |
\ Qw /              \ Pw /
```

To transform the homogeneous coordinates to Euclidean coordinates, they have to be divided by Qw:

```(Ex,Ey) = (Qx/Qw,Qy/Qw)
```

If the points to transform are specified in standard image coordinates, their row coordinates must be passed in Px and their column coordinates in Py. This is necessary to obtain a right-handed coordinate system for the image. In particular, this assures that rotations are performed in the correct direction. Note that the (x,y) order of the matrices quite naturally corresponds to the usual (row,column) order for coordinates in the image.

## Parallelization

• Multithreading type: reentrant (runs in parallel with non-exclusive operators).
• Multithreading scope: global (may be called from any thread).
• Processed without parallelization.

## Parameters

HomMat2D (input_control)  hom_mat2d (real)

Homogeneous projective transformation matrix.

Px (input_control)  number(-array) (real / integer)

Input point (x coordinate).

Py (input_control)  number(-array) (real / integer)

Input point (y coordinate).

Pw (input_control)  number(-array) (real / integer)

Input point (w coordinate).

Qx (output_control)  number(-array) (real)

Output point (x coordinate).

Qy (output_control)  number(-array) (real)

Output point (y coordinate).

Qw (output_control)  number(-array) (real)

Output point (w coordinate).

## Module

Foundation

 Operators