Search code examples
matrixtransformationphotographyphotogrammetry

Determine transformation matrix


As a followup to my previous question about determining camera parameters I have formulated a new problem.

I have two pictures of the same rectangle:

The first is an image without any transformations and shows the rectangle as it is.

The second image shows the rectangle after some 3d transformation (XYZ-rotation, scaling, XY-translation) is applied. This has caused the rectangle to look a trapezoid.

I hope the following picture describes my problem:

alt text http://wilco.menge.nl/application.data/cms/upload/transformation%20matrix.png

How do determine what transformations (more specifically: what transformation matrix) have caused this tranformation?

I know the pixel locations of the corners in both images, hence i also know the distances between the corners.


Solution

  • I'm confused. Is this a 2d or a 3d problem?

    The way I understand it, you have a flat rectangle embedded in 3d space, and you're looking at two 2d "pictures" of it - one of the original version and one based on the transformed version. Is this correct?

    If this is correct, then there is not enough information to solve the problem. For example, suppose the two pictures look exactly the same. This could be because the translation is the identity, or it could be because the translation moves the rectangle twice as far away from the camera and doubles its size (thus making it look exactly the same).