Stitching Panoramic Photos – Photoshop

Author Happyshopper - Last updated: 14.12.2012

So you have a series of images that you want to stitch together but Photoshop keeps giving you a load of weird results? Sounds about right to me. Here I’ll be showing you how to do it, and also what all the options do, in Photoshop CS5.

This tutorial is all about processing, but if you haven’t yet taken any panoramas this is my advice:

1. Get plenty of overlap on each image. I’d aim for at least a 50% overlap of each so that the edge of image 1 is the center of image 2 and so on.
2. Try to rotate only on a single axis, moving the camera up and down as well as side to side means that you’ll have to crop out a lot of the images because of significant gaps. If you scroll to the bottom at look at the Reposition result for the waterfall pano you’ll see what I mean in the top right and bottom left.

I’ll do a couple of runs through as well so you can see a 3 shot vertical pano inside Chapel Rose, and a 5 shot horizontal pano landscape of Godafoss, Iceland.

First of all you’ll want to prepare your images, so do any HDRing, balancing and so on. Try to get the results looking as similar as possible so that when you stitch them it won’t look odd that half the picture is exposed higher that the rest. However be careful not to do any cropping before you try to stitch the images together.

This is what I’m starting with:




These images were shot at 11mm, so pretty wide. I then panned straight down with the eventual aim of having an image that had some ceiling and the top of the windows whilst also keeping the windows parallel to the sides of the frame, and which also contained the first row of chairs at the bottom.

Then in Photoshop go to File / Automate / Photomerge to get the various option which look like this:


Hit Browse to select your files – you can work with Raw files, Tifs, Jpgs or Psds depending on what you fancy. Mine are Psds after processing the HDR images through Photoshop.

Now I generally avoid the Auto option because it can be unpredictable, I’d rather have a vague idea what I’m going to get. I’ll show you the others.

Before choosing think about how you’ve taken the photo: A wide lens has extremely exaggerated leading lines into the image because of the width, which when you try to overlay onto each other will cause issues. However a relatively close up lens such as my 50mm on my cropped sensor (~75mm) should be fine to just lay the images over the top of each other and line them up without worrying about warping and bending the images to fit together.

That will influence what process you will select. I’m concentrating on wide angle pano’s since that’s what the average indoor photographer will be using, including this example shot, so for a wide angle I’d be looking at a Perspective photo merge as the potential best result. On the 50mm I’d probably just select Reposition and let Photoshop sort out lining the images up without any twisting and bending.

Anyway, here are the results at 1200px wide so you can have a good look:



Nice results which give the parallel windows I was after and keeps all the details relatively in tact.



This has obviously used the second frame as the basis rather than choosing the straight first frame, then ballooned everything around into a pretty unusable amorphous blob.



Using the first image as a basis which was sensible and gives the straight lines we want, but doing that weird blob thing with the bottom frames to line them up.



This has obviously failed, as I outlined that it would with a wide angle. Simply moving things around has not worked, just look at the right hand window for a perfect example of why.



A surprisingly good result, but still not right with some wonky wooden paneling under the windows.

For the record, the Auto result came out as per the Perspective result, which restored a little faith on my part that not all automatic options are shoddy all the time. And in the defense of the Cylindrical / Spherical results, they’d be more useful in a horizontal landscape panoramic.

Now that you’ve seen the different options I hope you agree that the Perspective merge gave the best results, but for the purposes of moving on I’ll assume that you agree with me because I’m awesome.

So what did Photoshop actually do to create this merge and how can you play with it from here? Well here is a 200% zoom on my layers panel with large thumbnails:


  • As you can see Photoshop has put each photo on a separate layer.
  • It then Transformed (with you can do by hand by pressing Ctrl+T by the way – more on that later) each photo so that the perspective was the same on each.
  • Then it lined up each photo, and finally it added a layer mask and picked which part of each photo to show to create the whole image.

As I’ve mentioned in other tutorials, layer masks are for hiding parts of the content of a layer whilst showing others. White areas are shown, black areas are hidden, and shades of gray are given different opacities depending on their darkness, so a 70% grey mask would show the contents of the layer at 30% opacity.

Now a handy tip is that you can select the contents of a layer by holding Ctrl and clicking that layer preview in the layers panel. You can also do this on Layer Masks by Ctrl clicking those. And this is why this is useful:

Ctrl click the layer mask on the first layer and you instantly have an indication of where the two layers have merged. Then zoom in to 200% on the left hand edge of the image and follow the dotted line looking for any inconsistencies, such as this:


I know it’s only tiny but you want to spot this stuff before you print out your 1 meter wide image where it will show up! Also some results can be pretty obviously wrong in places, although this one is pretty good all round.

Haven’t spotted it yet? The step on the right doesn’t line up. It’s more noticeable because it’s a light step down to a darker step and the tonal difference means it’s easier to spot.

To fix this you should hit Ctrl D (to deselect) then choose one of two options:

Because each layers is present in it’s entirety and then masked to hide parts you can paint, using the paintbrush in white, onto the mask of the layer above to show the whole line of the step from a single photo. Do this on the uppermost layer of the two that are overlapping or you won’t see a change.

Alternatively you can create a new layer on top of the others and use the clone stamp tool to hide the blemish.

Once you have all the images lining up perfectly it’s time to merge everything together. Select all the layers in the layer panel and hit Ctrl G to put them all in a group together. Click and drag this group down to the New Layer icon at the bottom of the panel (the white sheet with the corner folded) and drop it onto the icon to duplicate the group. Now you have a back-up hide the bottom group as you would a normal layer, then select the top group and hit Ctrl E – this will merge the contents of the group onto a single layer. My layers panel now looks like this:


Now you need to make sure your rulers are showing on Photoshop. Do this by going to View / Rulers or hitting Ctrl R. Once visible you can select whichever measurement you like by right clicking on them, although that’s not relevant here. The other thing you can do though is for adding Guides. These are straight lines, horizontal or vertical, which you can pull across the image and then use to, well, guide your work.

If you double click on your rulers you will get a load of options, but there is a tab for Guides which will allow you to change their colour. In this case I’m using blue since it shows up nicely to my colourblind eyes on this background.

Drag some guides across from the left ruler to the edges of the windows to and down from the top for some horizontal comparisons, so that you have something that looks like this:


Now you can zoom in to check how straight the image lines up to those lines. Finally you can transform the image to get as close to those as you want, which is why you merged all those layers together.

Hit Ctrl T to get the transform box up, and the Alt click each corner you want to move.

Alt click instead of clicking allows you to move the corners absolutely freely of each other instead of being limited to transforming the whole box. You can then move the corners around until you have the image as straight as possible.

Another trick is to hold Shift whilst moving the corners which locks the movement to either horizontal or vertical axis. This means you can sort out lining up one side and then sort the other out afterwards.

For example, Alt click the top left corner, then hold shift and move it horizontally to align the left hand edge. Once you let go you can Alt click it again, hold shift and move it vertically this time, which allows you to line up the top edge without losing the alignment you have already made of the left edge.

Once your image is straight hit enter to apply the transformation. Then select the crop tool and you can finally crop out all the excess garbage. You can, of course, do this earlier but you may regret it when you realise you’ve cropped off something that you then need back when you come to straighten the image.

If the guide lines are getting in the way you can hide them with Ctrl H, and show them again with the same command.

The final image, in this case, is below, and now can be processed as per any other image.


That’s the tutorial outlined in detail. I’ll give another example below of a horizontal panoramic, but only pause on the parts that are important. Again, these were shot on a wide angle, this time of an Icelandic waterfall – Godafoss. Here are the photos I used (yes, the weather was shite, but how often do you get the chance to shoot this kind of place?):






Why am I showing you this again? Well with a wide angle shot the distortion because of the angle is most obvious at the edges furthest from the center of the photo.

For example look at frames 3 and 5, on the right hand side there’s the small water chute. On frame 3 when it’s just coming into the edge the angle of the water falling is rather exaggerated compared to frame 5 when it’s more vertical because it’s towards the center of the frame.

In the Chapel Rose pano the wide parts of the photos all lined up vertically so there were few problems later on where Photoshop failed to align the image – which is why I resorted to such a tiny alignment example of a couple of pixels on that step. This second example will have more issues.

Again, by the way, this was shot at 11mm on a cropped sensor camera.

And here are the various hilarious results:



The horizon is straight but Photoshop goes a little crazy otherwise.



Another straight horizon but the ballooning at the bottom makes this unusable unless you want to crop a lot of the good stuff out.



This is actually the second best result. Everything is curvy, but all the features are in the right place relative to each other if you excuse that. You can use Puppet Warp to bend this straight if you fancy it.



Shoddy. I mean really, look at the cloud sky mountain thing in the middle? What??



Despite the wide angles Photoshop has done an excellent job aligning these photos and selecting which parts from each frame to make visible.

Ok, so I mentioned Puppet Warp. What is Puppet Warp? Well it’s a tool that allows you to disfigure your images in a controlled fashion.

Now using the Spherical result as an example, do the Add all images to a group, duplicate group, merge to a single layer thing to get the whole pano on a single layer while keeping a back up of the original result. Add a guide line along where you think the horizon should be.

Then go to Edit / Puppet Warp and you’ll see a buttload of triangles appear on the image that won’t mean anything to you. I’m no expert, but this is what I do know: Click on the part that’s on your horizon guide line to add a "pin" to the image. Then a couple of inches along add a second pin by clicking again on a part of the image that you want to move to the horizon. Now click on your second pin again and drag to the horizon line. You can add as many pins as you like, dragging them up to the horizon so that your image is looking a bit better and a bit less bendy.

This was my hasty result before I hit enter to confirm the transformation warp results:


That was a rushed and shoddy example because, as I’m sure you noticed, the Reposition result was perfectly acceptable and so you don’t actually need to do that.

Reposition has, on my example, shown up another flaw though. It’s a rendering issue in Photoshop that looks like this:


This is where the two masks don’t overlap and when you zoom out Photoshop shows a faint line where the two masks meet.

This can show up after resizing the image for use on the web, so I would advise you to finish any work you need to do on the full resolution panoramic, then mush all those layers together before resizing down. Again, that’s the group layers, duplicate, then hit Ctrl E procedure.

Right. Reposition has actually done a better job in this case than it did the first time around, so I’ll use my final image as an example:


Waterfall Of The Gods by jamescharlick, on Flickr

Look in the bottom right. The water spout has two white bubbles where it meets the water instead of one. This is because Photoshop masked out the wrong area from each photo, showing the same part of the scene from two separate photos. I didn’t notice at the time and have never gone back to correct it.

Shame on me.

But that’s a good example of where Photoshop can get confused, so always check that the different frames meet up as you expect them to!

That’s basically it. Experiment and see what happens. Try to guess which type of merge will suite you well and you’ll only have to run through one or two settings before hitting a sensible result.

The Mrs just phoned to summon me to some menial task so I’ll leave it there, any questions or mistakes please let me know!

Incidentally on this second example the Auto option gave me the Cylindrical result. Shoddy.


#1g haskewMarch 1, 2013, 11:44 pm

Thanks, this was a real help, did my first photo stitch on the famous Sevs corridors

#2GigiAugust 16, 2013, 11:24 pm

Mate you are appreciated, these tutorials really are great! Thanks x

Add your comment


Other articlesgo to homepage

DIY Panning Timelapse Device Build Tutorial + Test Video

DIY Panning Timelapse Device Build Tutorial + Test Video(0)

This is a video I made using my homemade panning time-lapse device from a mechanical water timer. I got the idea from something I stumbled upon online, but can’t for the life of me find the article or video. Credit goes out to whomever posted the idea …

Light Painting & Image Stacking Tutorial – Photoshop

Light Painting & Image Stacking Tutorial – Photoshop(4)

With the nights getting longer I though it would be a good time to write up a light painting tutorial, which can produce results such as this:Wolseley 4/44 Graveyard Light Painting by jamescharlick, on FlickrThis tutorial will cover both the mechanics …

Light painting and the inverse square law

Light painting and the inverse square law(4)

I tried a new technique for lighting a very dark space recently and thought it would make a good tutorial for those who wanted to try something like it.When lighting gloomy or black environments I use a powerful LED light source with a very wide spread…

Black and White Tutorial – Adobe Lightroom

Black and White Tutorial – Adobe Lightroom(0)

Okay guys, this is my first ever tutorial My plan is to make some short useful tutorials sharing some of the many little "tricks" that I use while processing my urbex photos… This one is about how you can quickly make an outstanding B/W p…

[Photoshop] Curves Tutorial Part Two

[Photoshop] Curves Tutorial Part Two(0)

So, this is the follow on tutorial from Part One.This tutorial mainly focuses on the three other curves that we can adjust. In the first tutorial we manipulated the black line (RGB Curve), in part two I will show you how working with the individual Red…

read more

Contacts and information

Talk Urbex is a community of photographers and urban explorers. We are documenting abandoned, historically important locations across the world. Talk Urbex is not responsible for any legal issues arising from either locations or digital/film imaging.

Social networks

Most popular categories

© 2012 - All rights reserved.
Privacy Policy | Google+