estimate_transform(ttype, src, dst, **kwargs)
You can determine the over-, well- and under-determined parameters with the total least-squares method.
Number of source and destination coordinates must match.
Type of transform.
Function parameters (src, dst, n, angle):
NAME / TTYPE FUNCTION PARAMETERS 'euclidean' `src, `dst` 'similarity' `src, `dst` 'affine' `src, `dst` 'piecewise-affine' `src, `dst` 'projective' `src, `dst` 'polynomial' `src, `dst`, `order` (polynomial order, default order is 2)
Also see examples below.
Transform object containing the transformation parameters and providing access to forward and inverse transformation functions.
Estimate 2D geometric transformation parameters.
>>> import numpy as npThis example is valid syntax, but we were not able to check execution
... from skimage import transform
>>> # estimate transformation parametersThis example is valid syntax, but we were not able to check execution
... src = np.array([0, 0, 10, 10]).reshape((2, 2))
... dst = np.array([12, 14, 1, -20]).reshape((2, 2))
>>> tform = transform.estimate_transform('similarity', src, dst)This example is valid syntax, but we were not able to check execution
>>> np.allclose(tform.inverse(tform(src)), src) TrueThis example is valid syntax, but we were not able to check execution
>>> # warp image using the estimated transformationThis example is valid syntax, but we were not able to check execution
... from skimage import data
... image = data.camera()
>>> warp(image, inverse_map=tform.inverse) # doctest: +SKIPThis example is valid syntax, but we were not able to check execution
>>> # create transformation with explicit parametersThis example is valid syntax, but we were not able to check execution
... tform2 = transform.SimilarityTransform(scale=1.1, rotation=1,
... translation=(10, 20))
>>> # unite transformations, applied in order from left to rightSee :
... tform3 = tform + tform2
... np.allclose(tform3(src), tform2(tform(src))) True
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.transform._geometric.estimate_transform
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them