Advertisement

affine warp formulas for rotated images?

Started by August 22, 2002 10:40 AM
0 comments, last by razilon 22 years, 6 months ago
Hi, I''ve been trying to figure this out for several days and I can''t find any information to help me. Here''s the problem: I have an image, and I want to generate a warped version of the image according to a 3D rotation of that image plane. In general, the observed effects of these rotations are as follows: 1) changing the yaw angle of the image plane results in a reduced image width (scaled down) 2) changing the pitch angle results in a reduced image height 3) changing the roll angle results in rotating the image plane 4) a combination of yaw change and pitch change results in a shearing of the image plane I haven''t been able to find a consistent formula that will take the yaw, pitch, and roll rotations and define a warping for the image plane. Please, please, please help me! Thanks
The classic book "Computer Graphics: Principles and Practice" by Foley et al discusses information transformation. It''ll cover the rotation of images in the plane in detail, if not using the word "roll" specifically.

As for yaw and pitch, by your definitions:

if yaw = 0 is when viewing the image face on, then when you apply a yaw != 0, the width will be equal to width*cos(yaw). You can check to see that this works. When yaw = 0, cos(yaw) = 1 and the width is the full image width. When yaw is 90 degrees, cos(yaw) = 0 and the width is 0---you''re viewing the image on edge.

Similarly, if pitch = 0 when viewing the image face on, then the height of the image is equal to height*cos(pitch).

Those formulas don''t really work when you apply yaw, pitch and roll at the same time. You should look at what happens to a geometric face when applying 3D transformations. The effect on the image is the same as the face. You could, for example, apply your yaw, pitch, roll to the 4 corners of the image, and let those 4 transformed points define the mapping between the image space (viewing the image face on) and warped space (with the rotations applied).

Hope this helps!

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement