The mathematics of transforming images in Adobe Premiere - Part 1

  • #1
guyburns
33
7
There will be a Part 2 about a related mathematical problem.

I use Premiere to generate updated versions of old-fashioned slide shows. Not much video is involved, mostly stills that I transform to bring them alive – pans, zooms, rotations.

The Mathematics
In Premiere, an image appears in what I'll call the Window. Six parameters define the appearance: Position X, Position Y, Scale, Rotation, Anchor X, Anchor Y.

For my shows, the Window is set to 1920 x 1080 pixels. Let's say the image is 3000 x 1500 pixels. When the image is imported, the centre of the image appears in the centre of the Window. Here's what the parameters control, and here are the values automatically set for such an image when imported:

Position X = 960 This is where the horizontal centre of the image will be placed in the Window.
Position Y = 540 Ditto for the vertical centre of the image.
Scale = 100 Scaling (centred on the Anchor points)
Rotation = 0 Rotation (centred on the Anchor Points)
Anchor X = 1500 The point of the image which appears stationary under scaling and rotation.
Anchor Y = 750 Ditto

Shorten the above to PX, PY, S, R, AX, AY.
For a 3000 x 1500 image, only the central 1920x1080 part of it will appear in the Window. It can then be moved, scaled and rotated.

Question
Given an image anchored at a particular place with these parameters (PX1, PY1, S, R, AX1, AY1), and then I change the Anchor Point to (AX2, AY2), how do I calculate PX2 and PY2 so the image appears unchanged on screen?

When I change the Anchor Point, the image will abruptly move, but I want to bring it back to where it was by adjusting PX2 and PY2. I can do it by eye, but it takes time and is never exact.

Is there a general formula for PX2 and PY2 in terms of PX1, PY1, AX1, AY1, AX2, AY2?
Assume S and R are constant.

PX2 = ?
PY2 = ?
 

Similar threads

Replies
14
Views
5K
Replies
6
Views
3K
Replies
2
Views
2K
Replies
2
Views
3K
Back
Top