# transformPointsInverse

Class: affine2d

Apply inverse geometric transformation

## Syntax

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

## Description

`[u,v] = transformPointsInverse(tform,x,y)` applies the inverse geometric 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 geometric transformation of `tform` to the input n-by-2 point matrix `X` and outputs the n-by-2 point matrix `U`. `transformPointsInverse` maps the point `X(k,:)` to the point`U(k,:)`.

## Input Arguments

 `tform` Geometric transformation, specified as an `affine2d` 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 `affine2d` object that defines the transformation.

```theta = 10; tform = affine2d([cosd(theta) -sind(theta) 0; sind(theta) cosd(theta) 0; 0 0 1])```
```tform = affine2d with properties: T: [3x3 double] Dimensionality: 2```

Apply forward geometric transformation to an input point.

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

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 ```