JB
This must be descibed completely somewhere on the web, but today I
cannot find a complete and correct treatment.
How do you distinguish 'rotation' from 'tilt'?
Maybe rotation is rotation about the origin? And if so the relationship
between the two coordinate systems can be expressed as
x' = A x, (1) where x = (x1, x2)^t, x' = (x1', x2')^t
and A = (matrix) a11 a12
a21 a22
If rotation, A =
cos b - sin b
sin b cos b
where b is the rotation angle.
or maybe it's the transpose of that.
For tilt (guessing what you mean by 'tilt', we have an affine
transformation, or a sort of affine transformation
x' = A x + b, (2) where b is a 2 x 1 vector.
Using control points you can gather a set of equations based on (2) and
then solve using a least square error criterion ... leads to
pseudo-inverse of a matrix.
On the other hand if you are rotating (tilting?) about a point that is
not the origin, then knowing the point and the angle allows you to
compute the six parameters in eqn. (2).
If the latter is the case, ask again and I'll attempt to derive the
parameters. The notes at
http://www.jgcampbell.com/bscgp1/grmaths.pdf
may get close to the solution.
Best regards,
Jon C.
--
Jonathan Campbell www.jgcampbell.com BT48, UK.
Imagine that you have a newspaper lying on a table. You are observing
this newspaper from above, and are vertical to it. This would mean
that your angle is 0 with the normal to the newspaper. The other
extreme case is when you are viewing the newspaper by looking across
the table , i.e eyes are level with the table edge, and looking across
over the table. Now when you move your eyes from the first to the
second position, the shape of the newspaper changes. This is further
complicated if you rotate you head as you move it down towards the
edge of the table.
So what happens to the newspaper. It's edges will taper using some for
of perspective, and if you rotate your head, the perspective will
change.
Imagine this a different way, if you have a camera, taking a picture
from vertically above, and then move the camera in a arc stopping
every 10 degrees, what happens to the picture it takes, and if I had a
picture taken at 30 degrees how could I correct that so it it looked
as if I had taken it from vertically above. On the flip side if I had
a picture of trhe newspaper taken whilst the camera was vertically
above, how could I alter the image, so that it looked as if it was
taken with the camera at 30 degrees, or perhaps even 90 degree, i.e
across the table. Would we need to blur the image, or simply just
transform using matrices as you mentioned in your reply.
Pj
I think you need to check out projective transformation.
Comp.graphics.algorithms may help; follow-up set.
[This post was sent November 24, 2009,
but only to comp.graphics.algorithm.]
Projective transforms seem overkill for this.
Assume your camera is tilted in the
Y-direction, such that the image is
transformed into a trapezium with the top
and bottom edges parallel. Assume the
camera is rotated down from the vertical
such that the bottom edge of the transformed
image is wider than the top edge.
The transformation linearly varies the width
of the image. The variation in width is
inversely proportional to the height in the
image. It is simple to derive the
mathematics for this case, the variables
being the distance of the pinhole of the
camera from the input image, and the angle
the camera makes with the input image
normal.
More complicated situations can be
accommodated by rotating the input image
before tilting.
--
Regards,
Martin Leese
E-mail: ple...@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/