From b7695470bae6f418d2695f8782aab1c9054a657f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Fri, 15 Apr 2016 14:46:50 +0200 Subject: [PATCH] Document difference between Euclidean and similarity transformation --- skimage/transform/_geometric.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/skimage/transform/_geometric.py b/skimage/transform/_geometric.py index 2ecfefbe..72e1008f 100644 --- a/skimage/transform/_geometric.py +++ b/skimage/transform/_geometric.py @@ -657,6 +657,10 @@ class EuclideanTransform(ProjectiveTransform): [b0 a0 b1] [0 0 1]] + The Euclidean transformation is a rigid transformation with rotation and + translation parameters. The similarity transformation extends the Euclidean + transformation with a single scaling factor. + Parameters ---------- matrix : (3, 3) array, optional @@ -739,17 +743,21 @@ class SimilarityTransform(EuclideanTransform): """2D similarity transformation of the form: X = a0 * x - b0 * y + a1 = - = m * x * cos(rotation) - m * y * sin(rotation) + a1 + = s * x * cos(rotation) - s * y * sin(rotation) + a1 Y = b0 * x + a0 * y + b1 = - = m * x * sin(rotation) + m * y * cos(rotation) + b1 + = s * x * sin(rotation) + s * y * cos(rotation) + b1 - where ``m`` is a scale factor and the homogeneous transformation matrix is:: + where ``s`` is a scale factor and the homogeneous transformation matrix is:: [[a0 b0 a1] [b0 a0 b1] [0 0 1]] + The similarity transformation extends the Euclidean transformation with a + single scaling factor in addition to the rotation and translation + parameters. + Parameters ---------- matrix : (3, 3) array, optional