PiecewiseAffineTransform
-
class skimage.transform.PiecewiseAffineTransform
[source] -
Bases:
skimage.transform._geometric.GeometricTransform
2D piecewise affine transformation.
Control points are used to define the mapping. The transform is based on a Delaunay triangulation of the points to form a mesh. Each triangle is used to find a local affine transform.
Attributes
affines (list of AffineTransform objects) Affine transformations for each triangle in the mesh. inverse_affines (list of AffineTransform objects) Inverse affine transformations for each triangle in the mesh. -
__init__()
[source]
-
estimate(src, dst)
[source] -
Set the control points with which to perform the piecewise mapping.
Number of source and destination coordinates must match.
Parameters: src : (N, 2) array
Source coordinates.
dst : (N, 2) array
Destination coordinates.
Returns: success : bool
True, if model estimation succeeds.
-
inverse(coords)
[source] -
Apply inverse transformation.
Coordinates outside of the mesh will be set to
- 1
.Parameters: coords : (N, 2) array
Source coordinates.
Returns: coords : (N, 2) array
Transformed coordinates.
-
Please login to continue.