Preserving the important elements with Content-Aware Scaling

show more Preserving the important elements with Content-Aware Scaling provides you with in-depth training on Design. Taught by Michael Ninness as part of the Photoshop CS5 Essential Training show less
please wait ...

Preserving the important elements with Content-Aware Scaling

So every once in a while, you're going to run into a composition where you want to make a certain edit or correction where your standard tools aren't going to really do the job for you. So, things like free transform for scaling and rotating and perspective transformations and whatnot aren't really going to be appropriate to fix the problem that you're trying to address. So, in this particular example, I don't like the fact that there's this big gap between this group of people and this person here. This girl is actually a part of this group, but she looks too far away and isolated there. So we want to try to address that if we can. In this other example over here, in this layer, I'm going to go ahead and turn the second layer on and turn the first layer off by clicking on the Eye there.

In this particular example, what I want is a 4x4 inch crop of this image. Now, I've created some guides in this file already, so I'm going to turn them on under the View menu. I'm going to go ahead and say Show > Guides. You can see that if I were to try to crop this 4-inch rectangle between these two blue guys, I'm going to be chopping him off on the right hand side there. So that's not going to work. So I need to address that. So, we'll come back to that image in just a minute. Let's go ahead and turn the Guides back off, View > Show > Guides, and then let's turn the second layer off and the first layer back on and we're going to target that first layer by clicking on the word Without Help.

It's the name of that layer there. Okay, so before this feature Content- Aware Scale that I'm going to show you, in the old days, what would you do to try to fix this problem, well, if I make my selection by switching to the Marquee tool by pressing the letter M and just simply select this side of the image here by pressing and dragging and then switching to the Move tool by pressing the letter V on my keyword and then just start clicking-and-dragging to move these pixels over, I'm holding the Shift key down so that it doesn't shift vertically as I move it horizontally. So there, I'm going to just move that over and let's see what kind of a job that did.

We'll go ahead and deselect by pressing Command+D or Ctrl+D. You can say yeah, that's not so good, because we now have this visible vertical seam and we're going to have to go do a lot of retouching to get rid of that seam. So obviously, that's not what we wanted. I'm going to go back over here to my History panel by clicking on the History panel icon. That will open it up. This is a visual way to do multiple undo. I'm going to click on the word Open just to take us back to where we started from. Okay, so just a simple moving the pixels over wasn't going to cut it. Obviously, a scale is probably not going to do it either. Just run that through real quick, we'll make a selection.

Press M for Marquee Selection tool. We'll go ahead and drag out a selection. If I do Command+T or Ctrl+T to bring up the Free Transform mode, you see I get a bounding box around my selection. As I scale that, you can see that just causes another problem, where it's actually transforming and distorting those pixels and making her just slimmer. So, now what we're trying to address there. Let's go ahead and undo that by hitting the Escape key to cancel that Free Transform. I'll go ahead and deselect, Command+D. So, what to do? Well, that's where Content-Aware Scale comes in handy.

So we're going to go to the Edit menu and choose Content-Aware Scale. Now, at first glance, it looks exactly like Free Transform in terms of putting a bounding box around the pixels on this layer, but watch what happens when I start dragging the middle handle here towards the left. You can see that it is shifting pixels over and attempting to preserve the important content. Now you need to pay attention as you do, as it does a phenomenal job just out of the gate, but you need to look for things going haywire. Pay attention to her hand right here on the left hand side.

You can see if I take the resize handle too far to the left, her hand starts to get dismembered there a little bit. So I want to back off there a little bit. It's okay to use Content-Aware Scale in multiple passes. Do it once, fix it a little bit, apply it, and then maybe work it from the other side to see if you can get some better result. So, that's what I'm going to do here. I'm going to stop right about there and hit Enter to apply that. Then I'm going to go to Edit > Content-Aware Scale again and this time do it from the left-hand side and bring her closer to the group that way.

Again, you just want to make sure you're not chopping off hand. So, one thing you might take a look for is to see if there are some tools to help you out here, and this is what I'm going to do. I'm going to hit Escape. It's okay to give Content-Aware Scale a little guidance. If I don't have a selection started before I actually use Content-Aware Scale, then it's working on the whole layer. But if I make a selection and just say Hey! I want you to focus on this region here as I'm using Content-Aware Scale. That's perfectly legal to do.

So I'm going to make my selection. I'm going to go back to Edit > Content-Aware Scale. These marching ants might get in the way. They're kind of distracting, so you can hide them under the View menu, you can say Show > Selection Edges and turn that off. It's currently checked, so I'm going to turn that off. It's still selected, but we just don't get the distraction of those marching ants. That's a Command+H keyboard shortcut as well, Command+H, Command+H to toggle that on and off. In that case, it actually hid the Free Transform bounding box or the Content-Aware Scale bounding box as well. All right! So before I do this, there's a little button up here in the top that says Protect skin tones, and this is just some smart logic to help tell Photoshop that Hey! When you see what looks like a person identified by skin tones, try to do a better job of preserving that person's integrity there.

So watch the hand here. I'm going to turn that option on and I'm going to drag that to the right now and you can see her hand isn't getting twisted off from her wrist there. So, here, it's doing a much better job by giving it a little bit of guidance just by clicking a single button. When I'm done, I'm going to press Enter. You can see I've done a much better job of fixing the composition of this portrait, of these people walking down the beach, so they look like they're all part of the same group now. Just to kind of compare the before and after, we'll go back to our History panel, here's what it looked like before by clicking on the word Open.

There is where we started and here is by using two passes of Content-Aware Scale and taking advantage of that Protect skin tones button. So you get some pretty decent result with just a few clicks and drags. All right! Let's move on to the second scenario. So let's turn off that top layer. We'll turn on the second layer, the With Help there and click on that to select it. I said we had some Guides here, so let's go turn those Guides back on, Command+Semicolon will turn those on, or you can go back to View > Show > Guides in the menu command there. So, let's go use Content-Aware Scale and see if that will fix the problem for us.

Under Edit > Content Aware Scale, I'm going to go ahead and click on that right hand handle and start dragging it to left. You can see right away it is not doing what we were hoping it was going to do. It's making them look very strange and cartoonish. So, I'm going to hit the Escape key on my keyboard to cancel that. It turns out that sometimes Content-Aware Scale just needs a little bit more guidance, a little bit more help on what is important in the image. It does a pretty good job a lot of time of guessing, but every once in while, you need to give it a little nudge. To do that, we're going to make a selection of the areas that we think are really important.

There is a great selection tool that does a quick work of that. It's called the Quick Selection tool, good name. I'm going to press the letter W on my keyboard to switch to that tool. It's the fourth one from the top here. I'm just going to very quickly drag through the areas of the image that I think are important. I don't have to be all that precise, just a very Quick Selection tool and you get some extra area that you don't care about. I'm going to hold down the Option key or the Alt key and just drag out those outside areas there. To subtract them from that selection, I'm going to go let go the modifier key now. Let's click through her face and her shirt here.

It does a good job there. We'll add her hair. I don't have to hold any modifier keys down as I drag into a new area. It automatically is going to add to my current selection. So very quick tool here, if I accidentally dragged too far, no worries, I can fix that. Now hold down the Option key to subtract the area between those two. Great! We'll subtract a little bit off to the left of his head here. Okay, that's a good enough selection for what we're trying to accomplish. The trick here is we need to save this selection so that we can call upon it during the Content-Aware Scale operation.

So to do that, we'll go to the Select menu, pull down to Save Selection. We'll give it a name. I want to call it Scale for the lack of a better name here. All right, we'll go ahead and click OK and we're going to use that selection elsewhere, so I'm going to go ahead and deselect it here and invoke the Content-Aware Scale command again on that layer. Now before we start dragging the handle, as we saw before, it wasn't going to give us what we wanted, so I'm going to take advantage of this Protect feature. I'm going to go ahead and make sure this skin tones button is turned off, because we don't need it for this particular image, because we've already saved the people.

So under the Protect menu where it says None, I'm going to hold down and choose Scale. That's that selection that we saved earlier. Now when I drag the handle and start dragging it to the left, you'll see it does a much better job of preserving that content and just squeezing the space in between. So that's looking pretty good. He is within the guide on the right-hand side. It's still kind of a Free Transform of sort, so I can just click in the middle to reposition it within those guides. If I want to squeeze him a little bit over from the left hand side, I'll go ahead and drag that handle until I get the result I'm looking for.

So, that's pretty good. I might have some retouching cleanup to do on some edges here, but that's a quick, easy job with something like the Healing Brush or the Clone Stamp tool. All in all though, this was a pretty quick job. I'm going to go ahead and hit the Enter key and we'll see the final results. I'll press the C key for the Crop tool and drag out our crop between those guides that I had created earlier, the 4x4 crop, hit Enter. And you can see there is my final composition without a lot of fuss or muss and it just was pretty cool.

Content-Aware Scale, it's your friend, just remember, sometimes, you might need to give it a little guidance.

Preserving the important elements with Content-Aware Scaling
Video duration: 9m 32s 11h 15m Beginner


Preserving the important elements with Content-Aware Scaling provides you with in-depth training on Design. Taught by Michael Ninness as part of the Photoshop CS5 Essential Training

Design Photography
please wait ...