How does Photoshop’s Free Transform work??

C
Posted By
ChristianBarnett2
Apr 20, 2004
Views
1761
Replies
6
Status
Closed
The "Free Transform" feature in Photoshop allows you to not only scale, rotate and skew an image (which are all linear
transformations), but also apply some sort of perspective projection. What I mean is it allows you to move the 4 corners all independently (by dragging them with CTRL pressed). I don’t fully understand the transformation it applies. Can anybody explain what would be the algorithm behind this Free Transform?

It doesn’t seem to apply a linear projection, since a pixel halfway one of the 4 original edges does NOT always end up halfway the edge in the destination! Draw a rectangle with a spot in the bottom middle, and transform it in PS to see what I mean.

In other words my question is: if I have 4 arbitrary coordinates A, B, C and D which represent the new positions for the 4 corner points of the original image, how exactly do I put the image into the new shape? (or rather, how do I correctly obtain the source position in the original image for any point within the new shape)

I understand that certain layouts for the new corner positions A,B,C,D would be impossible or meaningless, so for the sake of simplicity let’s assume the 4 points are positioned "reasonably".

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

H
hoffmann
Apr 20, 2004
(Chris Barnett) wrote in message news:…
The "Free Transform" feature in Photoshop allows you to not only scale, rotate and skew an image (which are all linear
transformations), but also apply some sort of perspective projection. What I mean is it allows you to move the 4 corners all independently (by dragging them with CTRL pressed). I don’t fully understand the transformation it applies. Can anybody explain what would be the algorithm behind this Free Transform?
….

Christian,

the mathematics for a general 2D–2D perspective mapping are here (page 3, 200kB, not related to PhS):
http://www.fho-emden.de/~hoffmann/ellipse08032004.pdf

Best regards –Gernot Hoffmann
RP
Roland Perko
Apr 20, 2004
Chris Barnett wrote:
The "Free Transform" feature in Photoshop allows you to not only scale, rotate and skew an image (which are all linear
transformations), but also apply some sort of perspective projection.
also a perspective transformation is a linear transform.

with the simple equation

x’ = (a*x+b*y+e)/(g*x+h*y+1);
y’ = (c*x+d*y+f)/(g*x+h*y+1);

if g and h are set to zero, than you get an affine transformation. You need (at least) 4 points to calculate the 8 parameters (a,b,c,d,e,f,g,h) which is shown in the Link given by Gernot.

Regards, Roli
MP
Marc Pawliger
Apr 24, 2004
Free transform in Photoshop is detailed in US patent 5,808,623, available for viewing at
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sec t2=HITOFF&d=PALL &p=1&u=/netahtml/srchnum.htm&r=1&f=G&l=5 0&s1=5,808,623.WKU.&OS=PN/5,808,
623&RS=PN/5,808,623

–marc
H
hoffmann
Apr 24, 2004
Marc Pawliger …
Free transform in Photoshop is detailed in US patent 5,808,623, available for viewing at
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sec t2=HITOFF&d=PALL &p=1&u=/netahtml/srchnum.htm&r=1&f=G&l=5 0&s1=5,808,623.WKU.&OS=PN/5,808,
623&RS=PN/5,808,623

–marc

Marc,

I hope you don´t want to say that we are violating a patent if we apply the appropriate mathematics.

As you can see – THE ANSWERS are not related to PhS.
My method is essentially based on my mathematics text book in school, first print 1954. There it´s called "Collinear Mapping".

Best regards –Gernot Hoffmann
MP
Marc Pawliger
Apr 24, 2004
In article , Gernot
Hoffmann wrote:

Marc Pawliger wrote in message
news:<240420040150436094%>…
Free transform in Photoshop is detailed in US patent 5,808,623, available for viewing at
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sec t2=HITOFF&d=PALL &p=1&u=/netahtml/srchnum.htm&r=1&f=G&l=5 0&s1=5,808,623.WKU.&OS=PN/5,808,
623&RS=PN/5,808,623

I hope you don´t want to say that we are violating a patent if we apply the appropriate mathematics.

The patent covers a technique as well as some cases not previously covered in the literature.

As you can see – THE ANSWERS are not related to PhS.
My method is essentially based on my mathematics text book in school, first print 1954. There it´s called "Collinear Mapping".

–marc
RP
Roland Perko
Apr 26, 2004
Marc Pawliger wrote:
I hope you don´t want to say that we are violating a patent if we apply the appropriate mathematics.
The patent covers a technique as well as some cases not previously covered in the literature.
I’m confused by this because, multi-pass algorithms are not new and were published quite often. interesting

roli

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections