The stitching of the 360x180° spherical panorama using PTGui Pro
The photos now must be stitched into one single image – the equirectangular projection of the spherical panorama. The source images loadingIn this lesson we’ll stitch the spherical panorama from 7 photographs, shot using the fullframe fisheye lens – six frames around and the zenith frame. We won’t use the nadir frame in our work for now.
So, we begin our work with the image uploading to PTGui, which will be used in the panorama stitching process. One can do it by pressing the corresponding button (2) or just by moving the necessary files into the program’s windows. PTGui accepts the images in the JPG, BMP, PNG, TIFF formats and also in HDR files .exr and .hdr. (the last two only in the PTGui Pro). I want to remind you, that the image orientation must be the same, otherwise the panorama may stitch incorrectly. Automatic image alignAfter pressing the Align images…(4) button, PTGui will analyze all the images and will generate the control points in the overlapping areas of adjacent frames. After that PTGui will align the images and optimize the panorama. When the process will be finished, the new window will appear – Panorama Editor with the preliminary result of the panorama stitch. As we can see, everything’s fine with our panorama, all the images fell into their places.
The placement of the missing control pointsSometimes it happens so, that the automatic generator can’t create the enough number of the control points for the certain photograph. In this case we have to set the control points manually. I will show how to stitch the zenith frame with the adjacent frames. Firstly, we enter the control point editor (8) and choose the pair of overlapping images we are going to work with (9). Zoom (10) and look for the objects, which are present in both frames. Next we choose the fitting point and firstly click on it in one of the frames only (11), and then in the corresponding place in the second one (12). The control point is now set. So, following this scheme we set the maximum amount of the control points, trying where possible to set them throughout all the overlapping frame area and not in the same place. It’s very important to place the control points with a maximum accuracy, use the keyboard arrows and mouse with the pressed Ctrl+Alt buttons. Don’t ever place the control points on the moving objects (people, clouds, moving branches, etc.).
The zenith frame is linked together with the other photos using the same technique. When there’s enough control points on our panorama (the minimum of 3 for every pair of photos) we can move on to the next step.
OptimizationFor the perfect panorama stitching (which means the stitching without the visible joints), the distance between the pairs of control points must be minimal. In the process of optimization it is calculated how the separate images of the panorama should transform and align to minimize the distance between the control points.
Switch on to the Optimizer (13) bookmark. From the list of the lens distortion correction choose the “Heavy + lens shift“(14) option. Choose the Panorama Tools (15) algorithm optimization; it is capable of getting the better results than the default PTGui optimizer. Launch the process of optimization (16), and after the window with the results, where you’ll be able to see the average, minimal and maximal control points distance would appear (17). Our goal is to lower the average control points distance to minimum. Because of the fact, that the data is in pixels, the results of optimization will differ dependant on the size of the original images. That’s why to say the accurate numbers, which it’s preferred for us to get, is really difficult. I’m trying to reach the average distance of ~0.8 pixels and less. As a result of optimization together with the numbers we see the grades of the process – "very bad", "bad", "not so bad", "not so good", "good", "very good" or "too good to be true". But there’s no use to depend on this grades, because they don’t count the size of the original images.
We’ve got the average distance of 1.09pix in our example and we’ll try to lower it. We’ll confirm the results of optimization (18) and we’ll switch to (Ctrl+B) the control points tab (19). There we’ll make sure that the control points are ordered by distance (20). We see that several control points at the top of the tab have a strong deviation from the average distance, so these points should be removed. After that we launch the process of optimization one more time and the result’s much better now (21). If the optimizer shows us the bad results even now, we delete the some more control points with the worst distance value and do the optimization several times until the result will suit us. But while doing this don’t forget to leave the sufficient number of the control points needed for the successful panorama stitching.
Create panoramaAfter the process of optimization’s complete, we next go to the Create Panorama (22) bookmark. Here we can choose the required panorama size (23), the panorama image format (24), the name of the file and the path to save it. PTGui Pro makes it possible to save the panorama as separate layers (25), where every layer corresponds to every original panorama frame. This option is especially useful if one needs to retouch the repeating moving objects on panorama. Use the Smartblend (26) plugin for blending; all the other settings should be set to default.
Finally, we launch the process of panorama stitching (27) and wait. Dependant on your computer’s configuration, the quantity and size of the original frames, size of the resulting panorama and the blending program, the process may take from few seconds to few hours.
Here’s the result of our work – the equirectangular projection of the spherical panorama.
Even now we can already watch the panorama in QTVR format; in order to do this, we should enter the Preview (28) bookmark and create a preview.
Because of the fact, that we didn’t upload the nadir frame to PTGui, there’s only a black circle in the place where it’s supposed to be at the bottom of the image (the black band on the equirectangular projection). The shadow from the tripod is also visible at the picture. I’ll show the way to remove it in the next article. |








