Join Deke McClelland for an in-depth discussion in this video 297 Correcting a distorted panorama, part of Deke's Techniques.
- View Offline
Hey gang, this is Deke McClelland. Welcome to Deke's Techniques. This week, we're going to create a panorama, this large scale pano. That I printed, by the way, at 400 pixels per inch, so it could be larger still. It's based on a total of 19 images that have been stitched together of the Guggenheim museum in Bilbao, Spain. And then we're going to turn around and remove the distortions from this panorama using a filter known as adaptive wide angle. Here, let me show you exactly how it works.
All right. I'm guessing that most of you already know how to stitch together images using the Photo Merge command inside of Photoshop. But just in case, I'll quickly review the process. I'm currently working inside Adobe Bridge, which ships along with Photoshop. If you're a member of the creative cloud, you have to download it independently, but it is available to you. And I'm looking at a total of 19 images, just so you can see what they look like, I'll go ahead and click on one to select it and I'll press the space bar to enter the full screen preview mode, and we can see, right off the bat here, this spider statue that's outside the Guggenheim in Bilbao.
Now, I'll press the right arrow key, in order to advance to the next image. You can see that I'm rotating from right to left. Doesn't matter which direction you go, by the way. But you do want to have at least 40% overlap between one image and the next, and I have considerably more. It's more like half to 2 3rds. And I manage to rotate all the way around until I'm seeing the spider once again. I'll go ahead and press the Esc key in order to escape out of the full screen mode. You want to make sure, by the way, this is very important if you're working with RAW images, these have been processed, by the way, they're now JPEGs, but they started off as RAW files.
What you want to do inside Camera Raw to each and every image, you want to correct it of course, make it look its best, but you also, I'll go ahead and right-click on one of these images and choose Open in Camera Raw. You also want to make sure that you switch over to this lens corrections panel and you want to turn on enable lens profile corrections, it's not going to do anything in this case because I've already done it in advance. And then you want to switch over to color and you want to turn on remove chromatic aberration. So, both of those check boxes up there at the top.
Important to turn them on before you go stitching your photographs together. I've already done it. So I'm going to go ahead and cancel out. And then, I'm going to press Ctrl+A or Cmd+A on the Mac, in order to select all the images. And now I'll go up to the Tools menu, choose Photoshop and choose photo merge. And that's going to switch you over to Photoshop, as you see here. And it's going to open the Photomerge dialogue box. Now, if you're working along with me, you should see a list of every single image that you selected in Bridge. You want to make sure this first check box is on. Blend images together. The other two should be off.
Because, if you are following my instructions, you already performed those steps inside Camera Raw. Where this image is concerned, I went ahead and left layouts set to Auto, and then I clicked the OK button. Now, after clicking OK, you're going to want to walk away from your computer, I swear, because it's a very time consuming process. It takes several excruciating minutes, and you probably don't want to just be staring at the screen with nothing better to do, which is why I've done it in advance, so I'm just going to cancel out of this dialogue box. And this is the result I came up with right here.
Which, based on my experience, is one of several results you may encounter. If you were to use my same images, your panorama might actually look different. I've seen the spider end up in the center, instead of toward the outside. And you can see, where this panorama is concerned, we've got some repeated elements, starting with this blue building, and including part of this spider that appear not only on the left side of the image, but over here on the right hand side as well. Which is why we'll be cropping them out later, but for now, we need to address the considerable amount of distortion inside this image.
Now, there's a variety of ways to approach distortion. You can go up to the Edit menu, you can choose Transform and then you can choose the Warp command. And you can have your way with that. But the easiest way to work is to go to the Filter menu and choose this command right here, Adaptive Wide Angle. But before I do that, I'm going to bring back my layers panel, which is currently hidden, by pressing Shift+Tab and notice that I've got a ton of layers with layer masks, actually a total of 19 layers, one for each of the images.
There's not really any practical reason to keep all those layers because it's not going to do you any good to play with the layer mask to try to get better results. Because all of the images have been corrected inside of the masked area and not outside that area. So they only line up properly if the masks are intact, which means that we might as well fuse all the layers together by going up to the Layer menu and choosing Merge Visible. And that will go ahead and merge those 19 layers into a single gargantuan layer that no longer has a layer mask, as you can see.
Now, what you want to do is go up to the Filter menu and choose Adaptive Wide Angle. This command does work as a smart filter. But again, I don't really see any reason, any practical up-shot to working with a smart object at this point. It's just going to make for a massive file. So, I'm going to apply the filter as a static command, just by choosing it here from the list and that will bring up this big adaptive wide angle dialog box. Now, even though it may not seem like anything's happened, Photoshop has already made an attempt to correct the image and you can see what its done by turning off the preview check box.
Now you'll notice there's a bunch more spider over here in the right hand side and some additional detail over here in the left hand side. When you turn the preview check box back on, lot of that stuff bows out, as you can see right here. Which is all very well and good I suppose, but it is something that we have to accept because our only other options are to switch correction away from panorama. And to something else, which isn't going to do us any good. So, I'll go ahead and leave correction set to panorama. I will scale out just a little bit by clicking inside that scale value and pressing Shift+Down Arrow to take it down to 90%.
That's too far out, so I'll just go ahead and nudge that value up to about 94%, is going to work for our purposes. Now, you're going to to want to customize what the adaptive wide angle command is doing. Because, there's some bending details over here on the right-hand side of the image and we've got some bend in the middle and over here on the left-hand side as well. And you do that, by the way, by using this default tool, which is the Constraint tool, which you can see is selected in the upper left corner of the window. And so I'm going to zoom in a little bit.
I'll click right about there on the edge of the image and I'll click over at this location next to the big bowing part of the museum. Works out pretty well. That will go ahead and try to straighten out that region, as you can see. And you can go ahead and drag these points around, these endpoints, that is to say. And, you can see this little preview, over here on the right-hand side, at the same time, as well as the preview under your cursor. So, you can get a better sense of what you're actually doing inside this image because we are zoomed way the heck out to 12.5% in my case.
Now we want to make this line exactly horizontal by right-clicking on it and choosing the Horizontal command and that will go ahead and constrain the line, we can tell it's a horizontal line because it turns yellow. And yellow is the sign for horizontal inside of this dialogue box. Alright. I'm going to space bar drag over a little bit to the museum, and I'm going to click right.there at the top of this ledge and click over here. Actually, all the way into the stairway. Like so, as far as I can go without that line not lining up with that edge.
And then I'll go ahead and click in order to set a point. And I'll once again right-click inside the image window and choose Horizontal in order to make that line exactly horizontal. And let's go ahead and take care of this region as well, I'll click right about there on that persons' head. And then, draw a line out like so. Now, if you ever see the red dotted line, that means it's no good. The Adaptive Wide Angle command doesn't like this line. Now, it's generally because the line is too long, or it goes outside the image. As is the case for me.
So I'll just move it back in until it turns cyan again and I'll click at this location. And it may not be precisely what I'm looking for, but dragging these guys around doesn't really do what we want it to, it's just going to change the angle of the line to something absurd, in this case. What we want to do is right click on that line, like usual. And choose Horizontal, in order to make it a horizontal line, like that. And incidentally, just in case you have this problem. If you do one of these numbers, where you accidentally create a line that you don't want. Then all you need to do, is click on it to select it, and press the Backspace key, or the Delete key on a Mac, to get rid of it.
Alright. I want this part of the bridge right here to be nice and upright, so I'll click at the top, right at this location between the sort of silvery part and red part. And then I'll click down here at the base of this port as well. And of course, I want this to be vertical, so I'll right click, and choose the Vertical command, and that will make the line purple, which is adaptive wide angle's way of representing a vertical line. Now, you may think that this thing needs to be vertical, but that's the way it's looks, this is a wacky building.
It has all sorts of interesting characteristics to it. I do need however, to go ahead and scroll over to the right hand side of the image, and straighten out this blue building, by clicking at the top of it, clicking down here at the bottom, and then right clicking on that line and choosing Vertical. And that will help to straighten out the other buildings a little bit as well. You could spend all day trying to straighten out all these other details inside the image. I don't recommend you do, however. And after all, the remaining distortion in the scene, I think, works really well for the final photograph.
So I'll go ahead and click OK in order to accept that result. And after waiting out the progress bar, we will see the less distorted image here on screen. Now we need to crop the image and bring back a little bit of sky. And I'm going to show you why I'm cropping out certain details here. Notice that we have a problem at this location on the bridge and that's because these images weren't really meant to go together, this was the last image I shot being merged together with the first image I shot, and we're also missing this little bit of the spider's leg, and so forth.
There's quite a few problems actually, you can see that this railing above the pigeon doesn't align particularly well. So, that stuff's coming out, and I'm going to get rid of it using the Standard Crop tool. So, I'll press Ctrl+0 or Cmd+0 on the Mac to zoom out from my image, and then I'll go ahead and select the Crop tool, which you can get by pressing the C key. And now I'll drag this corner down to about there, I would say, and I'll drag the down right corner up to this location. I am going to go ahead and crop out the transparent pixels along the bottom of the image.
However, I'm going to leave some of this transparency at the top, because I want to be able to rebuild some of that sky. And now, I'll go ahead and drag this left edge over until we get rid of that unwanted bit of bridge over there. And I'm going to scroll in on the right hand side of the image. And make sure that I'm cropping out the blue building, but I'll leave the brown building entirely intact, like so. Alright, that looks good to me. Very important that you make sure that Delete Cropped Pixels is turned off.
Leave it off, because we are, after all, working on an independent layer. And then press the Enter key, or the Return key on the Mac, in order to apply that change. All right, now we want to built in some additional sky. And the simplest way to do that is to take advantage of Content-Aware Fill. So, I'm going to zoom in on this right hand portion here, and I'll select the Lasso tool, and then I'll press the Alt key or the Opt key on the Mac, keep that key down and that will allow you to create a straight sided polygonal selection outline like this one here.
Notice that I'm going well up into the paste board, this dark gray region up here at the top. And once you've selected this area, make sure to give yourself some generous edge right there, but don't get too close to the top of the museum. Then, go on to the Edit menu and choose the Fill command. Or you press it's keyboard shortcut, Shift+Backspace or Shift+Delete on a Mac. Set use to content aware and then make the blending options are set to their default, mode should be normal, opacity 100%, preserve transparency definitely needs to be turned off.
And then, go ahead and click OK. And this is another fairly time consuming operation, by the way. Because Photoshop, after all, is trying to invent detail that it's finding elsewhere inside the image, often times it's going to repeat the detail it finds as well. You can't expect it to get it exactly right. In fact, you can pretty well guarantee that it's not going to get it exactly right, although in my case, it came as close to doing so as I've ever seen. But you may have some weird details toward the top of your image, I'll come back to that in just a moment.
Let's see how it performs over here on the left hand side. Go ahead and click inside the image to deselect it, and now I'll press and hold the Alt key or the Opt key on the Mac, and draw a polygonal selection outline around this region, and then I'll press Shift+Backspace or Shift+Delete on the Mac, to bring up the field dialog box. Use should still be set to Content Aware. Go ahead and click OK in order to fill in the left side of this image. And again, Photoshop is looking all over the image actually, at everything that's not selected, essentially.
And culling details that it is then healing into this region, the selected region. And we end up with this effect here, and things are just working out brilliantly for me, but let's say you've got some problems. Like for example, I do have something of a problem here. I don't have a big bunch of duplicated pieces of museum like I've seen in the past, but I do have some repeated details up toward the top, and if you want to get rid of those, the sanest way to do is to go ahead and switch from the Spot Healing brush tool right here to the Patch tool.
Which you can select from this fly out menu. And then just go ahead and select the region you want to patch. Now, what I'm going to do is select down from the top of the image, you don't want to select right against the top of the image if you can avoid it. So, give yourself a little bit of wiggle room right here. And then I'm going to drag that patch, which is essentially nothing more than a free-form lasso. I'm going to drag it down into this kind of nebulous area of clouds. Because that way I'm not copying obvious details. And I'll end up, in my case, with this effect here, if that's not quite what I'm looking for then of course I would just do it again and this cloud, by the way, tends to work pretty well in my experience for filling in these details like so.
And I might also get rid of this guy, he looks like kind of a repeat to me and I'll just, you know, select it in whatever fashion. And go ahead and drag down in order to source this region once again, and I end up with this effect. And, you know, I'm still unhappy with what I've come up with. So, I'm going to try something out. I'll go ahead and select this region of the image this time, going up into the top, like so. And, now I'll change the patch option, up here in the Options bar to content aware. And, see if I get a different result if I try sampling from, let's say, this region of light cloud action.
And now, if I press Ctrl+D or Cmd+D on the Mac, in order to deselect the image, I come up with something that I find to be much more acceptable. All right, now I'll got ahead and press the f key a couple of times in order to switch to the full screen mode and I'll go ahead and zoom on in to a detail inside of my panorama as well. And that is how you correct the distortion in a stitched together panorama using the adaptive wide angle filter. As well as how you rebuild details, such as a cloudy sky, using content aware fill here inside Photoshop.
Alright, fun stuff but everything is not perfect. In fact, Photoshop has done a pretty bad job of stitching together the tiles in the lower corners of the panorama. This is a detail from the lower right corner and you can see all those areas that I've circled in orange don't work out. Notice the area inside the big orange circle, we're missing all kinds of details. However, we can and will fix the problems, as you see right here. We'll make everything picture perfect. And I'll show those of you who are members of the lynda.com online training library exactly how that works in a special follow-up movie.
If you're waiting for next week's free movie, I will show you how to enhance the drama of the scene using nondestructive dodge and burn. Deke's Techniques each and every week! Keep watching.