[Image-SIG] PIL QUAD transform
Chris Jone
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
2005-02-16:-
"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
pixel."
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
>> does
>> 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.
>
> </F>
>
> _______________________________________________
> Image-SIG maillist - Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
>
--
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
mailing list