mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 14:06:55 +08:00
Merge pull request #937 from sciunto/doc
Fix typo in SimilarityTransform docstring
This commit is contained in:
@@ -489,11 +489,11 @@ class PiecewiseAffineTransform(GeometricTransform):
|
||||
class SimilarityTransform(ProjectiveTransform):
|
||||
"""2D similarity transformation of the form::
|
||||
|
||||
X = a0*x - b0*y + a1 =
|
||||
= m*x*cos(rotation) + m*y*sin(rotation) + a1
|
||||
X = a0 * x - b0 * y + a1 =
|
||||
= m * x * cos(rotation) - m * y * sin(rotation) + a1
|
||||
|
||||
Y = b0*x + a0*y + b1 =
|
||||
= m*x*sin(rotation) + m*y*cos(rotation) + b1
|
||||
Y = b0 * x + a0 * y + b1 =
|
||||
= m * x * sin(rotation) + m * y * cos(rotation) + b1
|
||||
|
||||
where ``m`` is a zoom factor and the homogeneous transformation matrix is::
|
||||
|
||||
@@ -560,13 +560,13 @@ class SimilarityTransform(ProjectiveTransform):
|
||||
|
||||
The transformation is defined as::
|
||||
|
||||
X = a0*x - b0*y + a1
|
||||
Y = b0*x + a0*y + b1
|
||||
X = a0 * x - b0 * y + a1
|
||||
Y = b0 * x + a0 * y + b1
|
||||
|
||||
These equations can be transformed to the following form::
|
||||
|
||||
0 = a0*x - b0*y + a1 - X
|
||||
0 = b0*x + a0*y + b1 - Y
|
||||
0 = a0 * x - b0 * y + a1 - X
|
||||
0 = b0 * x + a0 * y + b1 - Y
|
||||
|
||||
which exist for each set of corresponding points, so we have a set of
|
||||
N * 2 equations. The coefficients appear linearly so we can write
|
||||
@@ -615,8 +615,8 @@ class SimilarityTransform(ProjectiveTransform):
|
||||
a0, a1, b0, b1 = - V[-1, :-1] / V[-1, -1]
|
||||
|
||||
self.params = np.array([[a0, -b0, a1],
|
||||
[b0, a0, b1],
|
||||
[ 0, 0, 1]])
|
||||
[b0, a0, b1],
|
||||
[ 0, 0, 1]])
|
||||
|
||||
@property
|
||||
def scale(self):
|
||||
|
||||
Reference in New Issue
Block a user