Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# transformPointsInverse

Class: projective2d

Apply inverse 2-D geometric transformation to points

## Syntax

[u,v] = transformPointsInverse(tform,x,y)
U = transformPointsInverse(tform,X)

## Description

[u,v] = transformPointsInverse(tform,x,y) applies the inverse transformation of tform to the input 2-D point arrays x and y and outputs the point arrays u and v. The input point arrays x and y must be of the same size.

U = transformPointsInverse(tform,X) applies the inverse transformation of tform to the input n-by-2 point matrix X and outputs the n-by-2 point matrix U. transformPointsFoward maps the point X(k,:) to the point U(k,:).

## Input Arguments

 tform Geometric transformation, specified as an projective2d geometric transformation object. x Coordinates in X dimension of points to be transformed, specified as a array. y Coordinates in Y dimension of points to be transformed, specified as a array. X X and Y coordinates of points to be transformed, specified as an n-by-2 matrix

## Output Arguments

 u Transformed coordinates in X dimension, returned as an array. v Transformed coordinates in Y dimension, returned as an array. U Transformed X and Y coordinates, returned as an n-by-2 matrix

## Examples

expand all

### Apply Inverse Geometric Transformation

Create an projective2d object that defines the transformation.

```theta = 10;
tform = projective2d([cosd(theta) -sind(theta) 0.001; sind(theta) cosd(theta) 0.01; 0 0 1])
```
```tform =

projective2d with properties:

T: [3x3 double]
Dimensionality: 2```

Apply forward geometric transformation to an input point.

`[X,Y] = transformPointsForward(tform,5,10)`
```X =

6.0276

Y =

8.1265```

Apply inverse geometric transformation to output point from the previous step to recover the original coordinates.

`[U,V] = transformPointsInverse(tform,X,Y)`
```U =

5.0000

V =

10```