Image Processing Toolbox | ![]() ![]() |
Advanced Spatial Transformation Techniques
The following functions, when used in combination, provide a vast array of options for defining and working with 2-D, N-D, and mixed-D spatial transformations:
The imtransform
, findbounds
, and tformarray
functions use the tformfwd
and tforminv
functions internally to encapsulate the forward transformations needed to determine the extent of an output image or array and/or to map the output pixels/array locations back to input locations. You can use tformfwd
and tforminv
to explore the geometric effects of a transformation by applying them to points and lines and plotting the results. They support a consistent handling of both image and pointwise data.
The previous example, Performing the Transformation, used the makeresampler
function with a standard interpolation method. You can also use it to obtain special effects or custom processing. For example, you could specify your own separable filtering/interpolation kernel, build a custom resampler around the MATLAB interp2
or interp3
functions, or even implement an advanced anti-aliasing technique.
And, as noted, you can use tformarray
to work with arbitrary-dimensional array transformations. The arrays do not even need to have the same dimensions. The output can either have a lower or higher number of dimensions than the input.
For example, if you are sampling 3-D data on a 2-D slice or manifold, the input array might have a lower dimensionality. The output dimensionality might be higher, for example, if you combine multiple 2-D transformations into a single 2-D to 3-D operation.
![]() | Performing General Spatial Transformations | Image Registration | ![]() |