Hi,
I saw on the web a CS course paper by a Prof Chuck Stewart of RPI, about a simple mechanism for achieving projective transforms.
http://www.cs.rpi.edu/~stewart/math_vision/lec9.pdf
Basically you take 4 corners of a rectangle (like the corners of a selection marquee), a, b, c, d. Move one or more of the points to a', b', c', d'. Calculate the transform of the points (and the rectangle they describe) to the new points. Apply this to the selected object(s).
Once this generalized projective transform is working, it can be specialized to its various subclasses, such as perspective, affine, shear, skew, etc. An easy way to achieve this, IMHO, would be to constrain their movement via the keyboard.
Does this appear to be a valid new feature that we might want?
Bob
Here is a textified snippet of the paper:
Projective Transformations ==========================
The study of transformations and their properties (especially their invariants) is fundamental to geometry.
o A projective transformation is an invertible mapping that preserves colinearity.
o Projective transformations are also known as homographies, projectivities and colineations.
o Projective transformations may be represented by a 3x3 invertible matrix: x' = Hx Note that H is determined up to an arbitrary scale factor so it has 8 degrees of freedom.
o The perspective projection of a planar surface in the world reduces to a plane homography. The composition of two homographies is also a homography. Thus, two different images of a planar surface are related by a homography. --- These facts explain our practical interest in homographies.
o Even though the matrix is 3x3, this is still a transformation of two-dimensional objects.
Example: Computing Projective Transformations =============================================
Suppose we have an image of the face of a building that has severe perspective distortions. If we know, for example, the dimensions of a window or door that appears in the image, we can compute a transformation that removes these distortions.
o Suppose the width of the door is w and the height is h. Let the ratio be r = h/w.
o Find the four corners in the image. Call the locations x1 through x4.
o Designate four locations for these to map to: (0, 0, 1)T, (1, 0, 1)T, (0, r, 1)T, and (1, r, 1)T Note that we are creating an arbitrary Euclidean coordinate in the image.
o These four "correspondences" allow us to compute a unique transformation, H.
o We apply this transformation to the entire image. It undoes the effects of the projective distortion.
Projective Transformations of Lines and Conics ==============================================
o Using the basic result x' = Hx we can calculate the perspective transformations of lines and conics.
o Lines transform as l' = H(-T)l where H(-T) is the inverse of the transpose of H.
o Conics transform as C' = H(-T)CH(-1).
o Dual conics transform as C*' = HC*H.