piecewiseaffinetransform

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.

doc_scikit_image
2017-01-12 17:22:43
Comments
Leave a Comment

Please login to continue.