[Image-SIG] PIL QUAD transform
short.jones.cipher at gmail.com
Sat Oct 28 01:46:59 CEST 2006
I found the matrix data in Jeff Breidenbach's original posting here on
"Data is a 8-tuple (a, b, c, d, e, f, g, h) which contains the coefficients
for a perspective transform. For each pixel (x, y) in the output image, the
new value is taken from a position (a x + b y + c)/(g x + h y + 1),
(d x + e y + f)/(g x + h y + 1) in the input image, rounded to nearest
It works fine in 1.1.5.
The question remains: what transform does QUAD apply? I would have expected
it to use a perspective transform like the one in the Java Advanced Imaging
method getQuadToQuad, which creates a PerspectiveTransform that maps an
arbitrary quadrilateral onto another arbitrary quadrilateral.
Fredrik Lundh wrote:
> Christopher Jones wrote:
>> I have just discovered that the QUAD transform is not perspective: it
>> not preserve straight lines in the original image. Any way of doing a
>> perspective transformation?
> in 1.1.5 and later, transform can take a PERSPECTIVE transform matrix,
> but I cannot seem to find any documentation on how the matrix data
> should look.
> checking the mailing list archives or the source is your best bet.
> Image-SIG maillist - Image-SIG at python.org
View this message in context: http://www.nabble.com/PIL-QUAD-transform-tf2517519.html#a7040656
Sent from the Python - image-sig mailing list archive at Nabble.com.
More information about the Image-SIG