John Strait
January 2007
This multi-step procedure can be used for multi-row, partial panorama (less than full circle) stitching of hand held photos when there are vertical lines visible in each row of the panorama. Please be aware that this function was not specifically designed into The Panorama Factory V4. It is a pleasant surprise that it can be done at all and that it works so well.
Please note that this procedure requires V4.2 or newer.
This is a fairly lengthy process. As with all hand held stitching, it requires a certain amount of patience and attention to detail.
I have personally tested this procedure for 2 row panoramas. I do not believe that it generalizes to more rows.
In this step, you stitch the first row of images into a horizontal panorama. This first row is used as the starting point for the full panorama. It establishes the focal length and the horizontal axis of the panorama. I recommend you start with the row that is closest to having tilt angle zero because it is the reference for all other rows.
Start a new project and immediately Cancel the Wizard.
Use the Import images... command (File menu) to import images for all rows into the project file and make sure they are arranged left to right in each row, one row after the other.
Select the thumbnails in the first row (I recommend you start with the row closest to tilt angle zero) and choose the Stitch with the Wizard command (New image menu).
Choose Manual photo stitching on Wizard 2/9.
Select Automatically detect focal length and Correct barrel distortion on Wizard 3/9.
I recommend not selecting any checkboxes on Wizard 4/9.
You should disable automatic fine tuning of the image alignment because stitching is a lengthy process and may require some back-and-forth in the program. Fine tuning in the Wizard will slow things down. You can apply the Fine tune command (Image menu) after stitching is finished, so it’s often best to postpone this step until everything else is just right.
If you have used your camera in manual exposure mode, exposure matching and exposure correction should be unnecessary. If you decide later you want to try these options after you're done stitching, you can use the Blending properties dialog box (Tools menu) to change the settings.
Sharpening is best applied to the final image, not to each stitched row individually. so we disable it for the individual rows.
Select Partial panorama and Spherical projection on Wizard 5/9.
Place stitching points on Wizard 6/9 to stitch the first row of the panorama. I recommend this procedure for placing stitching points:
Place stitching points on one image pair. I recommend using distant points and/or points all in the same plane.
After placing 5 points, you should get a dot in the Images list.
Once you have the image dot, go back to each stitching point in turn and examine them at large zoom scale (400% or 500%). Adjust the stitching points so that they match well on the two images.
Repeat this procedure for all image pairs. It's important to get a dot in the images list for each pair of images.
The images may become cockeyed as a result of the manual stitching. This is caused by variations in camera tilt (pitch axis) and rotate (roll axis) from one image to the next. This is normal. We will correct it with the warping grid in the next step.
Advance to Wizard 7/9. In this step, you'll use the warping grid to correct the manual stitch to be level and square. For more information about the warping grid, refer to the section "Wizard step 7/9 – Preview at low resolution" in Chapter 1 of the online help.
When you first enter this Wizard step, it will show you the results of the manual stitch before applying the warping grid.
Use the "vertical line method" as described in the section "Wizard step 7/9 – Preview at low resolution" in Chapter 1 of the online help to straighten the image. It can be helpful to increase the Preview resolution to make it easier to see how the warping grid relates to the vertical line. Increasing the preview resolution also slows down the program, so it is best to keep it at 50% or lower.
Place a pair of handles (red dots) on vertical lines at the left and right ends of the image. After placing the handles, click Apply warp.
Examine the preview image. After applying the warp, all vertical lines should be perfectly straight and plumb. If not, adjust the warping grid until you are satisfied. There is no loss of image quality if you apply the warping grid multiple times because the image is recomputed from the original image data each time you rewarp.
Advance to Wizard 8/9 and select Prepare for internet display and Maximum size.
Advance to Wizard 9/9 to complete the stitch and click Done to exit the Wizard.
At this point, you should see a stitched and cropped thumbnail in the upper pane and the cropped image in the lower pane.
Choose the Properties command (Image menu). Write down the W value from Image size (pixels) in the Image properties dialog box. We'll need this value in a later step. We'll refer to it as StepA_W. Click Cancel to close the Image properties dialog box.
Choose the Panoramic properties command (Image menu). Write down the HFOV value from Horizontal field of view (degrees) in the Panoramic image properties dialog box. We'll need this value in a later step. We'll refer to it as StepA_HFOV.
FOR THE BOTTOM ROW ONLY: If you are starting with the bottom row, also write down the Below value from Vertical field of view (degrees) in the Panoramic image properties dialog box. We'll need this value in a later step. We'll refer to it as StepAB_Below.
Click Cancel to close the Panoramic image properties dialog box.
In this step, you stitch the remaining rows of images into horizontal panoramas that are parallel to the first row. If all goes well, these rows will match the spherical coordinate system of the first row. Repeat these steps for all of the rows.
Choose the Show imported images command (View menu) to display the imported thumbnails in the lower pane.
Select the thumbnails for the row and choose the Stitch with the Wizard command (New image menu).
This time, remove the checkmark from Automatically detect focal length and then choose I am certain of the focal length on Wizard 3/9. This guarantees all rows are stitched with the same focal length setting (the first stitch sets the Wizard value to the detected focal length).
Advance to Wizard 6/9 and place stitching points on one image pair as you did for the first row. As before, I recommend this procedure for placing stitching points:
Place stitching points on one image pair. I recommend using distant points and/or points all in the same plane.
After placing 5 points, you should get a dot in the Images list.
Once you have the image dot, go back to each stitching point in turn and examine them at large zoom scale (400% or 500%). Adjust the stitching points so that they match well on the two images.
Repeat this procedure for all image pairs. It's important to get a dot in the images list for each pair of images.
Advance to Wizard 7/9. As in the first row, you'll use the warping grid to correct the manual stitch to be level and square. For more information about the warping grid, refer to the section "Wizard step 7/9 – Preview at low resolution" in Chapter 1 of the online help.
When you first enter this Wizard step, it will show you the results of the manual stitch before applying the warping grid.
Find the horizontal line you used as a reference in row 1. Use the "horizon method" as described in the section "Wizard step 7/9 – Preview at low resolution" in Chapter 1 of the online help to place three handles (red dots) on the horizontal line.
I Place a pair of handles (red dots) on vertical lines at the left and right ends of the image. You do not need to use the same vertical lines that you used for row 1. Any vertical lines will do. After placing the handles, click Apply warp.
Examine the preview image. After applying the warp, all vertical lines should be perfectly straight and plumb. If not, adjust the warping grid until you are satisfied. There is no loss of image quality if you apply the warping grid multiple times because the image is recomputed from the original image data each time you rewarp.
Advance to Wizard 9/9 to complete the stitch and click Done to exit the Wizard. At this point, you should have a stitched thumbnail and a cropped thumbnail for each row in the upper pane. The most recent cropped image should appear in the lower pane.
FOR THE BOTTOM ROW ONLY: When you stitch the bottom row (if it was not the first row you stitched), choose the Panoramic properties command (Image menu). Write down the Below value from Vertical field of view (degrees) in the Panoramic image properties dialog box. We'll need this value in a later step. We'll refer to it as StepAB_Below.
Click Cancel to close the Panoramic image properties dialog box.
In this step, we rotate the cropped images 90 degrees to prepare them for row-to-row stitching.
Select all cropped thumbnails at once. Click the first cropped thumbnail to select it and then hold the CTRL key while you click each of the other cropped thumbnails. After these clicks, you should be able to see that the cropped thumbnails are selected and the stitched thumbnails are not selected.
Choose the Rotate command (New image menu). Answer Yes if you are asked whether you want to apply the command to the group of thumbnail images.
Under Image rotation, enter 90 degrees and select Clockwise.
Select Fit rotated image.
Click OK. This adds the rotated thumbnails to the upper pane.
In this step, we stitch the rows together.
Note that the rows may in the wrong order. They need to be in order from lower row to upper row for stitching. To move a thumbnail, first single-click it so that only one thumbnail is selected. Then click and drag the thumbnail to its new position.
Select all the rotated thumbnails at once. Click the first rotated thumbnail to select it and then hold the CTRL key while you click each of the other rotated thumbnails. After these clicks, you should be able to see that the rotated thumbnails are selected and all other thumbnails are not selected.
Choose the Stitch with the Wizard command (New image menu).
Choose Manual document stitching on Wizard 2/9. This stitching method joins the images without warping. It is unnecessary to do any additional warping because the rows have already been converted to the spherical coordinate system. This stitching method also permits the images to be different sizes.
Advance to Wizard 4/7. Surprisingly, you may not need to place any stitching points here! Simply click the Next button and confirm that you want to advance to the next Wizard step. You'll be prompted with a message box asking whether you want to advance with incomplete stitching points. Click Yes.
It is OK to advance without placing any stitching points. This forces The Panorama Factory to perform automatic alignment on the images and usually produces the best results. Placing stitching points carries the risk that the images may be rotated slightly during the alignment. This is usually the right thing when actually stitching document scans, because it corrects for rotations of the document when placed on the document scanner. However, in this multi-row procedure, we usually want to avoid any new rotation after the initial row stitches.
Advance to Wizard 5/7. Examine the preview image to be sure the stitch is accurate. You may need to adjust the preview resolution. The default setting for preview resolution assumes you are stitching a normal panorama and it sometimes makes a poor choice here. But in any case, do not set the preview resolution too large or this step will be very slow!
If the stitch is not accurate, you should return to Wizard 4/7 and add stitching points. We recommend that you only add one stitching point pair to each image pair. A single stitching point pair defines the image-to-image alignment without introducing image rotation.
Advance to Wizard 7/7 to complete the stitch and click Done to exit the Wizard. You should see a new stitched thumbnail and a cropped thumbnail in the upper pane. The cropped image is shown in the lower pane.
In this step, we rotate the fully stitched image back to its correct orientation.
NOTE: It is probably best to make manual adjustments to the stitched row images and the fully stitched image before starting this step. If you see ghosts (faint double images), you can often correct them using the Fine tune command (Image menu) and/or with manual fine tuning. For more information, refer to the section "Fine tuning the image alignment" in Chapter 6 of the online help, "Correcting stitching problems". Sometimes ghost images cannot be eliminated with fine tuning, for example if an object (e.g. person or car) moved between the times you made two photographs. You can sometimes remove these ghosts by adjusting the boundaries of the blending region. For more information, refer to the section "Adjust blending region boundaries" in Chapter 4 of the online help, "Using the Classic interface, step by step".
Double-click thumbnail of the fully stitched image to make it the current image shown in the lower pane.
NOTE: You'll also see a cropped thumbnail in the upper pane, but we don't want to use this image. The Wizard always crops the stitched image, but sometimes the cropping can introduce a small amount of image rotation. This is usually the right thing in normal stitching (and, in fact, for the initial row stitches) because it corrects for small rotations that are left over after stitching. However, in this multi-row procedure, we want to avoid any new rotation after the initial row stitches.
So we double-click the stitched thumbnail. The stitched image will display in the lower pane, with outlines superimposed on the image to indicate the image overlap regions.
Choose the Rotate command (New image menu).
Under Image rotation, enter 90 degrees and select Counter clockwise.
Select Fit rotated image.
Click OK. This adds the rotated thumbnail to the upper pane and shows it in the lower pane.
This step completes the stitched image by marking it as a panorama. We have to be very careful here to compute and enter the correct values because this defines the panoramic coordinate system of the final image. If the values are incorrect, subsequent perspective cropping and/or conversion to VR formats (QTVR, PTViewer, IVR) may produce less satisfactory results.
Double-click the thumbnail of the final rotated image to make it the current image. Actually, if you have not clicked anything on The Panorama Factory’s window, the final rotated image should already be the current image.
Choose the Properties command (Image menu). Write down the W and H values from Image size (pixels) in the Image properties dialog box. We'll refer to these values as StepF_W and StepF_H. Click Cancel to close the Image properties dialog box.
Choose the Panoramic properties command (Image menu).
Select This is a panoramic image under Panoramic image.
Compute the horizontal field of view:
HFOV = StepF_W * StepA_HFOV / StepA_W
Enter this value as HFOV under Horizontal field of view (degrees).
Hit the Tab key on your keyboard to complete the HFOV value. This will cause The Panorama Factory to calculate the total vertical field of view and display it as VFOV under Vertical field of view (degrees). Write this value down. We'll refer to it as StepF_VFOV.
The Panorama Factory assumes that the panorama is symmetric above and below the horizon, which is not usually true for this type of panorama. So we have to correct the vertical field of view to be asymmetric. Remove the checkmark from Vertically symmetric under Vertical field of view (degrees). This will let us enter individual values values for the field of view above and below the horizon.
Enter the StepAB_Below value as Below under Vertical field of view (degrees).
Compute the field of view above the horizon:
Above = StepF_VFOV - StepAB_Below
Enter this value as Above under Vertical field of view (degrees).
Hit the Tab key on your keyboard to complete the Above and Below values. This will cause The Panorama Factory to recalculate the total horizontal and vertical fields of view from Above and Below. These should be very close to the StepA_HFOV and StepF_VFOV values. If they're very much different, recheck all of your calculations.
Click OK.
In this step, we crop the rotated image to remove extraneous white space. If we want to, we can simultaneously flatten the perspective.
Choose the Crop command (New image menu).
Set cropping parameters as you wish, or keep the defaults. If you have gotten everything right, the Perspective correction option should create a conventional image that preserves straight lines. You should not use perspective correction if you plan to display the image in a VR viewer.
Drag the boundaries of the cropping region to enclose the part of the image you want to keep.
Click Approve.
This is the time to sharpen the image if you wish.
Choose the Sharpen command (New image menu).
Set sharpening parameters as you wish, or keep the defaults.
Click Approve.
Finally, save or print the image. You can save as JPG, TIF, PNG or BMP if you just want to show it as a simple image or you can export to PTViewer or IVR format if you want to display the image in a VR viewer. I recommend exporting in PTViewer format. You can also use IVR, but it’s hard to find the IVR viewer these days. You cannot use QTVR because this example uses spherical projection and QTVR does not support spherical projection.
Revised: January 10, 2007
© 2007 Smoky City Design, LLC and John Strait