Stitching Photos in Photoshop

This tutorial will illustrate a flexible method with which to stitch together overlapping photos into a seamless panorama.

image 1 image 2 image 3 image 4 image 5

To download images, right click on the thumbnail and select, Save image as...

Save them all into a new folder called 'photostitch'.

CS Photomerge

image 6

To compile these images with Photomerge, download them to your computer, and then select: File > Automate > Photomerge...

Select all the files from the 'photostitch' folder and then press OK.

As this function is quite sophisticated has been designed very simple to use, it is largely self-explanitory. Drag the images from the top bar into the big white box and align them and closely as possible- Photoshop will snap them together and do the rest.

image 7

Though if you look closely at a Photomerged panorama, you will notice that the quality of stitching is clumsy, and it has difficulty integrating images with different perspectives.

Thus Photomerge is a great feature for acheiving the gross effect of the panorama, though it fails to transcend an art of stitching, which this tutorial will demonstrate.

Import & Align

a) Open all of the images to stitch together in Photoshop.

b) Select the center most image, in this case pan_03.jpg, and double click on the Background layer in the Layers palette, and rename it pan_03.

Renaming the Background layer is key to enable alpha blending with that layer.

image 8

c) Now increase the canvas size into hugeness.

Since there are five images being merged together horizontally, increase the document width by at least 500% to give some room to play with.

image 9

Image > Canvas Size...

Width: 600 percent

Height: 150 percent

Now select: Window > Arrange > Tile Horizontally

d) Select the Move tool by pressing V, then drag each of the images into the pan_03.jpg document, and align them in the right order.

image 11

e) Rename the layers in the Layers palette to coorospond to their image names. To rename a layer, double click on it's name.

Order the layers so that the center most layer, pan_03, is on the bottom.

image 12

Overlap & Rescale

a) Select the layer pan_04 (second from the right), by holding down Ctrl ( ), and clicking on it.

b) Set the pan_04 layer opacity to 50% (press 5), and move it into place so that it overlaps the pan_03 layer.

Look for a sharp point near the edge of where the images overlap, and align them perfectly. If the alignment is close, a pattern may emerge spiralling from the center point, illustrating the difference in the their rotation.

image 14

c) The pattern of alignment projecting from the center indicates a difference in scale, so to increase the size:

Zoom out [ Ctrl ( ) + ] on the document so that it's height is fully visible.

d) Press Ctrl ( ) + T to free transform the layer, and drag the reference point ( ) onto the point where the two images perfectly align.

image 19

Holding the Shift key maintains the aspect ratio while scaling with free transform, and holding down Alt uses the reference point as the central axis.

e) So holding down Alt + Shift, drag one of the corner handles rescaling the layer to about 105%

image 21

  If the the two photos being stitched together are uneven as a result of a camera tilt while taking the photos, now is the time to rotate the image with the reference point set to their perfect point of alignment.

f) Rotate it about   -1.5

Press ENTER to render the free transformation.

Mask & Paint

Now it is key to decide what part of each image will be used. These two images have a significant amount of overlap, and some major variations, such as the angle of the stairs, because the camera taking these pictures was rotated.

In this case, the center image (pan_03) shows the full width of the staircase, so it is better to use this one for that portion of the image.

The object to watch for here is the post at the base of the banister- it is the largest perceptable object that the two images share, and will be the point of their transition.

image 24

a) Grab the polygonal lasso tool (Shift + L), and draw a selection around the part of pan_04 to keep.

b) Press the Add Layer Mask button on the layers palette to create a mask that reveals only that selection.

c) Set the pan_04 layer opacity to 100% (press 0)

image 27

Now if you look at the upper part of the image, the images still do not perfectly align as this camera distorts the incoming light depending on the angle it enters the lens. In the case of most situations this is unavoidable.

There is obvious tiling happening, and a sharp line is visible where the two images border.

The sharp line could have been avoided by feathering ( Ctrl + Alt + D ) the selection before adding a layer mask, but then the tiling would just be a blur.

image 28

d) To minimize this tiling effect, select the Brush Tool (B), and in the Brushes palette: set the Diameter to about 50px, and the Hardness to 0%

Ensure that brush Opacity and Flow are both set to 100%

image 30

e) Select the layer mask by pressing ( Ctrl ( ) + ) or by clicking on the layer's mask thumbnail in the Layers palette.

image 32

f) Press D to select White as the foreground color, and Black as the background color, and then press X to swap them so Black is foreground.

image 33

g) Now painting Black on the layer mask hides pixels, and painting White reveals them. So pressing X to alternate between colors, go all the way down the seem, painting on the layer mask to hide and reveal the image, until they merge without apparent seems.

To reveal any inconsistencies, toggle the layer's visibility

image 34

To toggle seeing the layer mask overlay, press ( Alt + ).

Now repeat Steps 2 and 3 until the whole piece is stitched!

image 35

Stitching Photos in Photoshop Tutorial: Final Result (Click to enlarge)
Click to enlarge

Click to enlarge
Click to enlarge

Click to enlarge
Click to enlarge

Close    To Top
  • Prev Article-Photoshop:
  • Next Article-Photoshop:
  • Now: Tutorial for Web and Software Design > Photoshop > Photoshop Basic > Photoshop Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction