# fitgeotform2d

Fit 2-D geometric transformation to control point pairs

## Syntax

## Description

fits a linear geometric transformation of type `tform`

= fitgeotform2d(`movingPoints`

,`fixedPoints`

,`tformType`

)`tformType`

to the control
point pairs `movingPoints`

and `fixedPoints`

.

fits a polynomial transformation of degree `tform`

= fitgeotform2d(`movingPoints`

,`fixedPoints`

,"polynomial",`degree`

)`degree`

to the control point
pairs `movingPoints`

and `fixedPoints`

. Specify the
degree of the polynomial transformation `degree`

, which can be 2, 3, or
4.

fits a piecewise linear transformation to the control point pairs
`tform`

= fitgeotform2d(`movingPoints`

,`fixedPoints`

,"pwl")`movingPoints`

and `fixedPoints`

. This
transformation creates a Delaunay
triangulation of the fixed control points, and maps moving control points to the
corresponding fixed control points. A different affine transformation maps control points in
each local region. The mapping is continuous across the control points, but is not
continuously differentiable.

fits a local weighted mean transformation to the control point pairs
`tform`

= fitgeotform2d(`movingPoints`

,`fixedPoints`

,"lwm",`n`

)`movingPoints`

and `fixedPoints`

. The local weighted
mean transformation creates a mapping by inferring a polynomial at each control point using
neighboring control points. The mapping at any location depends on a weighted average of
these polynomials. The function uses the `n`

closest points to infer a
second degree polynomial transformation for each control point pair.

## Examples

## Input Arguments

## Output Arguments

## More About

## References

[1] Goshtasby, Ardeshir. “Piecewise Linear Mapping Functions for Image Registration.” Pattern Recognition 19, no. 6 (January 1986): 459–66. https://doi.org/10.1016/0031-3203(86)90044-0.

[2] Goshtasby, Ardeshir. “Image Registration by Local Approximation Methods.” Image and Vision Computing 6, no. 4 (November 1988): 255–61. https://doi.org/10.1016/0262-8856(88)90016-9.

## Extended Capabilities

## Version History

**Introduced in R2022b**