Spatial transformations: Affine
To explore spatial transformations of images, we need a simple, nontrivial, and useful transformation. The affine transformation fits the bill.
Here's the basic affine equation:
or:
Already we've encountered another common notational confusion. Sometimes a user will contact us and say "imtransform shrank my image in the horizontal direction, when it should have shrunk it in the vertical direction. Is this a bug in imtransform?" No, it's not a bug. The cause is that the user tried an A matrix from a source that defines the affine equation this way:
The A matrices in these two formulas are not the same; one is the transpose of the other.
Several common spatial transformations applied to images can be expressed in terms of an affine equation, including scaling:
Rotation:
And translation:
OK, enough background notation and equations. Next time we'll jump into MATLAB, construct some affine transformations, and apply them to points.
评论
要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。