Six pic tutorial
Often you only need to stitch a few images together to create a larger, high resolution image that does not go full circle. In this tutorial, we will stitch six images in cylindrical and rectilinear (normal) formats.
The photos for this tutorial are courtesy publick visual communication. You can download the photos and the PTMac project file for this tutorial here (1.2 MB).
For this tutorial, we start with six portrait mode photos. Portrait photos are created by rotating the camera 90 degrees so that the longer side of the image is vertical and the short side is horizontal. Making a panorama from portrait photos requires more photos to cover the same horizontal view but gives a larger vertical field of view. The camera, a Canon D60 digital SLR with a 20mm lens, was rotated 30 degrees between photos. Since the camera's image sensor is smaller than the image in a film camera, the field of view of the lens is less than specified by the lens manufacturer. For a Canon D60 the adjustment factor is 1.6 and the 20mm lens is equivalent to 1.6 x 20 = 32mm film lens.
Before starting PTMac, we need to calculate the horizontal field of view of our panorama. The easiest way to do this is from information on how the panorama was photographed - six images taken 30º apart. This gives a panorama field of view of 6 x 30º = 180º. However, we need to factor in the extra viewing area at the ends of the panorama. For this example, we add 10º to each end of the panorama for a panorama field of view of 200º.
PTMac steps you through the panorama creation process via a series of tabs. The tab-by-tab description of the process for this example is:
Tab 1.Source Images: Import your images using the Add button on the Source Images tab. Alternatively, you can drag and drop them on the work area of the Source Images tab. This puts the images in the order they were photographed. This will facilitate picking control points later on.
Tab 2. Lens Settings: For this sample, set the lens type as normal, horizontal field of view as 41 degrees in portrait 2:3 orientation. Since this was a high quality normal lens (not a fisheye or extreme wide angle), we set lens parameters a, b, and c to zero.
Tab 3. Panorama Settings: Set the panorama width as desired. Enter the panorama field of view of 200º we estimated above from step in the Field of View input field here. The Projection is Cylindrical (Rectilinear images must be less than 180º).
In the cylindrical format, panoramas are curved as if set against the inside of a cylinder. Straight lines are sometimes curved so you can view around an entire circle if needed.
In rectilinear or normal format, the image is projected on a flat surface. Straight lines will be seen as straight in the panorama and look the most normal when viewed as a static image. Rectilinear images are limited to 180 degrees field of view (wide or tall) wide or tall but in practice because of distortion and file size, the practical limit is a field of view of 120 degrees or less. Cylindrical images can be 360º wide but have a practical limit of 120º tall.
After creating the cylindrical panorama, we will make a rectilinear image from a subset of the images.
Tab 4. Crop: Cropping is useful for circular fisheye and scanned images and was skipped for this project as none of the images needed to be cropped.
Tab 5. Image Parameters: In this tab you will tell PTMac how you pointed your camera when taking the each photograph (up, down, landscape, portrait, etc.). PTMac uses this information as a starting point and will determine the exact orientation of your camera for each photograph in the optimization step. The three variables are used to define how an image is oriented are yaw, pitch and roll.
Yaw, pitch and roll can be confusing but can be thought of as follows:
Imagine your head as a camera. Yaw is how far you are turn your head with looking straight forward as a yaw of 0 degrees and straight back as 180 degrees. Pitch is how you are tilting your head forward and back. Looking straight down is a -90 degree pitch, level is 0 degrees, and looking straight up is 90 degrees. Finally, roll is how you tilt your head from shoulder to shoulder. Tilting your head over your left shoulder is -90 degrees roll (if you can go that far without breaking your neck), holding your head in it's normal position is zero degrees, and tilting your head over the right shoulder is 90 degrees.
This sample uses six images spaced 30? from the next. If there were seven images, we would set the middle image as 0º and each one to the left at -30, -60, etc. and those to the right of the middle at 30, 60, 90, etc. degrees. The center of the panorama is 0º. Since we have 6 images, we set Image No. 2 as -15º and those to the left as -45, etc. Image No. 3 is set at 15º and to the right 45º, etc. To change a yaw, pitch or roll, double click on the number you want to change and enter a new number.
Roll for this set of images is 0º as the photos are already in the upright position. If your images have the tops of the image on the right side, the roll entered in this tab would be -90º. Pitch is zero degrees as the photos were taken with the camera level with the horizon.
Tab 6. Control Points: In the previous tab, you told PTMac approximately how the images fit together. You will now set control points which are used to calculate the optimal settings to merge the images. Control points are matching points in the overlapping areas of the photos.
Setting control points in PTMac is easy. Simply move to a pair of overlapping images. Click on a distinctive point on one image then click on the matching point on the second image. If you make a mistake you can delete the control point by clicking in its indicator circle and pressing the delete key. You should select three or four matching points for each pair of overlapping images. Try to spread the control points over as much of the overlap areas as possible. To move to the next set of images, click on the right arrow next to the "Image0" or "Image1" pop-up. For 360 degree panoramas, you should set control points connecting the first and last images. This is not necessary, or possible, for this example.
Click to enlarge
Tab 7. Optimizer: For panoramas less than 360º wide, it is best to set the anchor image as the center image (or one of the two center images if there is an even number of input images). An anchor image is set by leaving the anchor image's yaw, pitch, and roll untagged in the yaw, pitch and roll boxes in the Optimizer tab.

Run the optimizer by clicking the 'Run Optimizer' button at the bottom of the Optimizer tab. After the optimizer is done, click OK a couple of times to get to the 'Control point distance' box. PTMac reports average, minimum and maximum control point distance the optimizer calculated to best fit the images. It does not tell you if your match is good. There are no firm rules to indicate if a match will be good based on the number of pixels. Depending on the scene, a mismatch of a pixel can be visible on some panoramas but not others. With proper feathering (gradual merging of the image seams), a mismatch of a few pixels may not be visible However, with practice and careful selection of control points, mismatches averaging less than a pixel between images can be routinely achieved. Such results will generally produce panoramas with no visible seams.

In addition to checking the average control point distance the maximum control point distance should also be checked to see if is an order of magnitude larger than the average control point distance. If it is, you may have chosen a control point pair that are not actually the same point on the two images.
You can easily find and replace or remove errant control points as follows:
- Go back to the control point tab after running the optimizer.
- Bring up the table showing all the control points and control point distance by clicking on the Table button.
- Sort control the control points by clicking on the Distance column header
- Click the up/down arrow to the left of the column header to change the sort direction.
- Click on the errant control point by clicking on it.
- Click the GoTo button to go to the control point pair. Is the point correct? If not, press the delete key to remove the control point pair. Place a new control point pair if needed and run the optimizer again to see if you get a better fit.
Tab 8. Preview: You can check your result by looking at a preview of the panorama. Cylindrical and equirectangular panoramas can be viewed interactively. Rectilinear (normal) panoramas are not designed for interactive viewing so the 'View interactively' is greyed-out for this option.
Tab 9. Create Panorama: Make the panorama using by clicking the Create Panorama button on the Create panorama tab. The result is shown below. The ends of the panorama are black because the panorama did not cover a full 200º and can be cropped in Photoshop or can be eliminated by decreasing the field of view of the panorama.
Click to enlarge
Rectilinear panorama
To make a rectilinear panorama from the images, change the panorama type to rectilinear and reduce the panorama field of view appropriately. Create the new panorama by clicking on the create button on the Create Panorama tab. There is no need to select new control points, etc.
Note the difference in the view especially in the ceiling. The lines in the ceiling in the rectilinear panorama are straight while in the cylindrical panorama, they are often curved. This is a function of type of the panorama and is not an error.
Click to enlarge
|