[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image transformations

From: Richard Copley
Subject: Re: Image transformations
Date: Fri, 14 Jun 2019 11:55:49 +0100

On Fri, 14 Jun 2019 at 11:45, Alp Aker <address@hidden> wrote:
On Thu, Jun 13, 2019 at 3:01 PM Richard Copley <address@hidden> wrote:

>     Yes, but our transformation includes translation, rotation, and
>     another translation.  Not just one translation.  IOW, it isn't the
>     transformation matrix that is given; it's the operation on the image.
There's a miscommunication here.  I was speaking to Alan's question about how
to geometrically interpret the components of a transformation matrix.

If the question is what translations to use in order to generate a rotation
around an arbitrary point p, then there's no question: the sequence of
operations is translation by -p, then rotation, then translation by p.  

> The origin is at the top left so a pure rotation clockwise about the origin
> through angle a goes like this:
> [cos(a)  -sin(a)  0] [X]   [cos(a) * X - sin(a) * Y]
> [sin(a)   cos(a)  0] [Y] = [sin(a) * X + cos(a) * Y]
> [     0        0  1] [1]   [                      1]

That is a counter-clockwise rotation.

Are you sure?
This matrix takes (1, 0) to (cos(a), sin(a)), which is roughly (1, a) for small a.
I think that's clockwise, if a is positive. (Remember the y axis points down.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]