Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Grokking The Gimp
Previous Page Home Next Page
Subsections

          
7.5 Project 5: Panoramas

By piecing together a series of normal photographs, panoramic and wide angle views can be created in the GIMP. The approach of piecing together a group of images to create a panorama instead of using special purpose camera lenses gives rise to a number of photo inconsistencies among the individual pieces of the image. Nevertheless, the GIMP is perfectly capable of correcting these problems and creating a well integrated whole. This chapter describes the problems involved in creating panoramas from collections of individual images and how to overcome them in the GIMP.

To create a panorama from a collection of photos, the steps are well defined. First, the photos have to be grouped together into a single image, each placed into a separate layer. The procedure for this has been explained many times already in this book. In particular, Section  2.4 describes the copying and pasting of images into layers, and Section  2.6.1 explains how to position layers within an image.

Figure  7.35(a)

  
Figure 7.35: Collection of Positioned Images
Figure 7.35

illustrates a set of images, each taken with about 50% overlap, using a digital camera. They were stored in JPEG file format and then individually loaded into the GIMP. Each was then copied and pasted into a separate layer in a single image. Each layer was then positioned using the Move  tool. The Opacity slider in the Layers dialog was used to facilitate the positioning of each layer.

Figure  7.35(a) shows the result after positioning the layers as well as possible, and Figure  7.35(b) shows the organization of the layers in the Layers dialog. The layers are named with the letters of the alphabet, A through E, where A corresponds to the rightmost layer and E to the leftmost.

Figure  7.35 illustrates the primary problems that must be overcome to achieve a consistent looking panorama. As shown, these problems are geometric distortion, color matching, and brightness matching. Each of these is addressed in the following sections.

       
7.5.1 Correcting Geometric Distortions

The first step after the initial positioning of the individual layers is to remove, as much as possible, the geometric distortions. Figure  7.35(a) has distortions that can be seen in several places. The two most flagrant problems are the molding around the ceiling of the room and the alignment of the grain in the hardwood floor, especially on the left side of the image. However, there are also many other small details in the image that are slightly off kilter. Also, there are several places where elements of the images do not line up properly.

The first step is to correct for the misalignment problems. Using the Scale option of the Transform tool, some of the layers are squeezed in an effort to make them more consistent with the others. A very important guideline, however, is that there are limits to what can be done without introducing other serious mismatches. The goal is to adjust, but with a light hand.

Referring again to Figure  7.35(a), perhaps the biggest inconsistency is that the vertical scale of the image in layer C seems to be larger than the others. This explains the lack of registration of the ceiling molding and the fireplace mantle for this layer. The remaining details might be acceptable defects. This will be reevaluated after the most important corrections are made.

Before you begin, it is worthwhile to point out that, of all the Transform tool options, Scaling introduces the fewest artifacts. This is especially true when care is taken to maintain the aspect ratio between the horizontal and vertical dimensions. The Scaling option of the Transform tool can be constrained to preserve aspect ratio by pressing the Control and Alt keys together while scaling.

Figure  7.36(a)

  
Figure 7.36: Initial Geometric Distortion Corrections
Figure 7.36

illustrates the result of using the Transform tool to adjust layer C. As shown in Figure  7.36(b), the tool is used with the Scaling option. The upper-right corner of layer C was adjusted until both the X and Y Scale Ratios shown in the Scaling Information dialog became 0.95.

How was the value 0.95 determined? The answer depends on whether you are challenged by ratios. If not, the swiftest way is to use the Measure  tool to determine that the height of the molding at the left edge of layer C is 271 pixels from layer C's bottom edge, and that the height of the molding in layer D at layer C's left edge is 258 pixels. This makes the ratio 258/271 = 0.95. If you don't like ratios, a simple trial-and-error approach does not take much more time. Just choose a scaling factor and use C-z to perform an undo if the scale isn't correct. The result of the scaling operation aligns the molding on the ceiling between layers C and D.

As already noted, the upper right corner of layer C was used to perform the scale. Thus, layer C has shrunk horizontally by 5%, shifting its right edge to the left. This means that to properly register with layer C, layers A and B must now be repositioned to the left.

Grokking The Gimp
Previous Page Home Next Page


 
 
  Published under the terms of the Open Publication License Design by Interspire