7.3. Stage 3

7.3.1. Preparing the script

The script is a text document created in BBEdit that will automate the transformations you'll apply to the pictures. You can name it whatever you like; in this case, I called it scriptphare.txt. (Don't delete the .txt suffix, even when working on a Mac.)

p w3600

i w1800 h1800 f2 r0 p0 y60 v185 a0 b0.1 c0
i w1800 h1800 f2 r0 p0 y180 v=0 a=0 b=0 c=0
i w1800 h1800 f2 r0 p0 y300 v=0 a=0 b=0 c=0

v v0 b0  r1 y1 p1  r2 y2 p2

This script must be edited to include the size of the source pictures. On the first line, which corresponds to the output width of the panorama in pixels, enter the diameter of the circle, times two (1780 × 2 = 3560). In the next three lines—there is one for each picture—enter the measured diameter (1780) after each w and h. Don't change any of the rest of the code, and leave the last line as it is.

p w3560
i w1780 h1780 f2 r0 p0 y60 v185 a0 b0.1 c0
i w1780 h1780 f2 r0 p0 y180 v=0 a=0 b=0 c=0
i w1780 h1780 f2 r0 p0 y300 v=0 a=0 b=0 c=0
v v0 b0  r1 y1 p1  r2 y2 p2

To measure the reference points I use an HTML page composed of frames and JavaScript code that lets medirectly choose pairs of points. You can also get the coordinates of each point in Photoshop. If they are selected correctly, four pairs of points are enough for any two images.

This produces the following reference point coordinates:

Between a and b

 c n0 N1 x1293 y1490 X505 Y1510 c n0 N1 x1385 y1169 X273 Y1215 c n0 N1 x1380 y983 X191 Y1018 c n0 N1 x1294 y937 X104 ...

Get Assembling Panoramic Photos: A Designer's Notebook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.