Image Processing Toolbox    
tformfwd

Apply forward spatial transformation

Syntax

Description

X = tformfwd(U,T) applies the forward transformation defined in T to each row of U, if U is a matrix. T is a TFORM struct created with maketform, fliptform, or cp2tform. The argument U is an M-by-T.ndims_in matrix. Each row of U represents a point in T's input space. The argument X is an M-by-T.ndims_out matrix. Each row of X represents a point in T's output space, and is the forward transformation of the corresponding row of U.

If U is an (N+1)-dimensional array (including an implicit trailing singleton dimension if T.ndims_in is 1), tformfwd applies the transformation to each point U(P1,P2,...,PN,:). The value size(U,N+1) must equal T.ndims_in. The returned array, X, is an (N+1)-dimensional array containing the results of each transformation in X(P1,P2,...PN,:). The value size(X,I) equals size(U,I) for I=1,...,N and size(X,N+1) equals T.ndims_out.

Example

Create an affine transformation that maps the triangle with vertices (0,0), (6,3), (-2,5) to the triangle with vertices (-1,-1), (0,-10), (-2,5).

Validate the mapping by applying tformfwd to u.

See Also

cp2tform, fliptform, maketform, tforminv


  tformarray tforminv