Image to be transformed, specified as a nonsparse, real-valued
array of any numeric class or logical.

2-D or 3-D geometric transformation to perform, specified as
a geometric transformation object.

If `tform`

is 2-D and ```
ndims(A)
> 2
```

, such as for an RGB image, `imwarp`

applies
the same 2-D transformation to all 2-D planes along the higher dimensions.

If `tform`

is 3-D, `A`

must
be a 3-D image volume.

Displacement field, specified as nonsparse numeric matrix. When `A`

is
2-D, `D`

is an *m*-by-*n*-by-2
numeric array. When `A`

is 3-D, `D`

is
an *m*-by-*n*-by-*p*-by-3
numeric array. The first plane of the displacement field, `D(:,:,1)`

describes
the `X`

component of additive displacement that is
added to column and row locations in `D`

to produce
remapped locations in `A`

. Similarly, `D(:,:,2)`

describes
the `Y`

component of additive displacement values.
In the 3-D case, `D(:,:,3)`

describes the `Z`

component
of additive displacement. The unit of displacement values in `D`

is
pixels. When `A`

is *m*-by-*n*-by-*p* and `D`

is *m*-by-*n*-by-2, `imwarp`

applies
the displacement field to one plane at a time. `imwarp`

assumes
that `D`

is referenced to the default intrinsic
coordinate system.

Spatial referencing information associated with the image to
be transformed, specified as a spatial referencing object.

If `tform`

is a 2-D geometric
transformation, `RA`

must be a 2-D spatial referencing
object (`imref2d`

).

If `tform`

is a 3-D geometric
transformation, `RA`

must be a 3-D spatial referencing
object (`imref3d`

).

Form of interpolation used, specified as one of the following
character strings:

Interpolation Method | Description |

`'linear'` | Linear interpolation |

`'nearest'` | Nearest-neighbor interpolation—the output pixel is assigned
the value of the pixel that the point falls within. No other pixels
are considered. |

`'cubic'` | Cubic interpolation |

**Data Types: **`char`

Specify optional comma-separated pairs of `Name,Value`

arguments.
`Name`

is the argument
name and `Value`

is the corresponding
value. `Name`

must appear
inside single quotes (`' '`

).
You can specify several name and value pair
arguments in any order as `Name1,Value1,...,NameN,ValueN`

.

**Example: **`J = imwarp(I,tform,'FillValues',255)`

uses
white pixels as fill values.
Size and location of output image in world coordinate system,
specified as the comma-separated pair consisting of `'OutputView'`

and
a `imref2d`

or `imref3d`

spatial
referencing object. The `ImageSize`

, `XWorldLimits`

,
and `YWorldLimits`

properties of the specified spatial
referencing object define the size of the output image and the location
of the output image in the world coordinate system.

Value used for output pixels outside the input image boundaries,
specified as the comma-separated pair consisting of `'FillValues'`

and
a numeric array. Fill values are used for output pixels when the corresponding
inverse transformed location in the input image is completely outside
the input image boundaries.

If the input image is 2-D, `FillValues`

must
be a scalar.

If the input image is 3-D and the geometric transformation
is 3-D, `FillValues`

must be a scalar.

If the input image is N-D and the geometric transformation
is 2-D, `FillValues`

may be either scalar or an array
whose size matches dimensions 3 to N of the input image.

For example, if the input image is a `uint8`

RGB
image that is 200-by-200-by-3, `FillValues`

can be
a scalar or a 3-by-1 array. In this RGB image example, possibilities
for `FillValues`

include:

FillValue | Effect |

`0` | Fill with black |

`[0;0;0]` | Fill with black |

`255` | Fill with white |

`[255;255;255]` | Fill with white |

`[0;0;255]` | Fill with blue |

`[255;255;0]` | Fill with yellow |

If the input image is 4-D with size 200-by-200-by-3-by-10, `FillValues`

can
be a scalar or a 3-by-10 array.