Join Deke McClelland for an in-depth discussion in this video Eliminating halos with the Minimum filter, part of Photoshop CC 2015 One-on-One: Mastery.
- [Instructor] In this movie, we'll introduce our overly enthusiastic tennis player into this composition here. Which, I want you to see is called More Cheerful Sky as opposed to more cheerful guy. Alright, so the first thing we want to do is switch over to the channels panel. If you're seeing that alpha channel, that's just fine. In any case, press the control key or the command key on the Mac, and click on this thumbnail to load it as the selection outline. Or, if you prefer, you have a keyboard shortcut strictly speaking, of Ctrl + Alt + 8, or Cmd + Opt + 8 on a Mac, by virtue of the order of the alpha channel in this list.
Now go ahead and switch back to the RGB image by clicking on RGB at the top of the channels panel, then return to the layers panel. And if you like, you can assign this selection as an alpha channel and convert the background to a floating layer in one operation just by clicking on the add layer mask icon at the bottom of the panel. That will convert the background into an unnamed layer, if you don't like that, just go ahead and rename it something like victory, let's say. And now, we want to duplicate the image into the other composition. And to make that happen, you'll need to switch back to the rectangular marquee tool, which you can get by pressing the M key.
Then, right click any old place inside the image window and choose duplicate layer. And now, change the document to More Cheerful Sky and click OK. Alright, now if we switch over to that document, you can see that the image is masked into place. Alright, now if you zoom in on this guy's head, you'll see that we have a little bit of white haloing, left over from the previous background. And the best way to get rid of that, is with the minimum filter. So let me show you how that works. Go ahead and select the layer mask thumbnail, by clicking on it here inside the layers panel.
Strictly speaking, this guy should be in front of the defeated guy, so I'm just going to drag him and drop him up the list. And then click on that layer mask thumbnail once again to make sure it's selected. And I'm even going to alt click or option click on the thumbnail so that we can see the layer mask independently of the image. Now what we want to do is collapse the mask, that is, move it inward, which means we need to make the white areas smaller and the black area larger. And Photoshop provides two very old school filters for this purpose. If you go up to the filter menu and drop down to the other command, you'll see two filters maximum and minimum.
Maximum is going to expand the size of the maximum luminance level, which is white, so it's going to expand the mask. Minimum will expand the area of the minimum luminance level, which is black, and that's going to collapse the mask. Now to really see what this looks like, I'll alt click or option click on the layer mask thumbnail once again so that we can see the layered composition. And then I'll return to the filter menu, choose other, and choose minimum. And now, just to make it very clear what's going on, I'll crank this radius value up to something like 10 pixels, and you can see that the masked area is moving inward.
And so, the higher I raise this value, the more I collapse that mask. Now, for the best results, you want to make sure preserve is set to roundness, not squareness because if it's set to squareness, you're going to get some chunky transitions that aren't going to look right at all. So go with roundness and then start with something like one pixel as opposed to 20, which is way too high. And keep an eye on this detail around this guy's eyebrow. Notice how it's still showing off a little bit of white haloing.
I'll go ahead and press the up arrow key, and thanks to the fact that preserve is set to roundness, as I do so, I'm increasing this radius value in increments of 1/10 pixel. And so, at about 1.5 pixel, we get some pretty decent results. Beware of going too high however, if I click over here on the intersection of his scalp and his ear, you can see this preview of the mask here inside the minimum dialogue box. And so, if I were to click and hold, in order to turn that preview off, notice we have a sharp corner, whereas when I release, the corner gets slightly rounded.
That's the kind of thing that's going to happen as you collapse a mask using minimum. But I'm going to deem this acceptable, and so I'll go ahead and click OK in order to accept that change. And now we need to wander around other portions of his body here and see if everything else looks to be in good shape, which it does until we get to the hair on his arm. At which point, notice that we have some pretty obvious haloing. To get rid of it, go ahead and grab the standard lasso tool, it's the best way to work.
And then just roughly select this area like so. And I'm just going to kind of roughly select it. And now, go ahead and make sure that your layer mask is still selected here inside the layers panel, and then go up to the filter menu and then press the Alt key, or the Option key on the Mac and choose minimum from the top of the filter menu. Or if you loaded D keys, you've got a shortcut of Ctrl + Alt + F or Cmd + Opt + F on the Mac. And that's going to bring up the minimum dialogue box so that you can modify the radius value. Keep an eye on those hair details and go ahead and crank that value up by pressing Shift Up Arrow this time, which is going to raise the value in whole pixel increments.
And you can see at about five pixels actually, I'll back it off a little bit, that we're getting some pretty darn good results, at which point, I'll click OK. Now you may look at it and say, well gosh, your definition of pretty darn good is a lot different than mine D, because when I press Ctrl + D or Cmd + D on the Mac, you can see that we have some terrible transitions. Fortunately, you can smooth those away using the history brush, which allows you to paint to a previous state in the history panel. So I'll go ahead and select that history brush tool and then, I'll go up to the window menu and choose the history command to bring up the history panel and then you just want to back off to the state right before minimum, which would be lasso.
And you do that by clicking before the state, which sets a source point for the history brush. So notice that the icons match each other, and now, you can go ahead and paint inside this region in order to smooth off that transition, and then paint down here to smooth off this one as well. And if it looks like you've gone too far, if you get a little bit of a halo there and you don't like it, then you can bring in the smudge tool, which is great for these kind of fine, small hair details. And so, I'll go ahead and select the smudge tool from the blur tool fly out menu.
And then I'll reduce the size of my cursor and I'll drag up ever so slightly like so. So I'm just moving this up a little bit and then I might increase the size of my cursor and scoot this stuff out, but not so far out that I create haloing. In fact, I'm just going to leave it alone by pressing Ctrl + Z or Cmd +Z on the Mac because when I start zooming out, everything appears to work out fine. Alright, now we've got one final problem around this guy's entire arm. And so I'm going to grab my lasso tool, once again I can get that by pressing the L key.
I'll just roughly select this stuff right here, and I'll select into the wrist, not too far into the hand however. And then, I'll press a keyboard shortcut, which I have because of D keys, of Ctrl + Alt + F or Cmd + Opt + F on the Mac and it appears to me that I need to take this value up even higher, so I'm going to take it up to seven pixels. Click OK, press Ctrl + D or Cmd + D on the Mac to deselect the image, now we've got some very brutal transitions here. And so, I'll switch back to my history brush, which by the way has a keyboard shortcut of Y, the last letter in the word history.
And now I'll increase the size of my brush a little bit and just paint like so, and I'm painting upward. And you may say, hey wait a sec, you didn't set a source state this time around. And that's because, if I were to bring back the history panel, this source state works just fine. So you don't necessarily have to constantly set the source state if you're using the history brush multiple times in a row. Alright so I'll just go ahead and hide that panel and I'll go ahead and drag over to here and I'll paint some more with the history brush. That's bringing back some of that haloing, I'll take care of that in a moment.
This I think is going to work out just fine. I could paint some of this stuff back in, actually that's looking pretty good. Alright now let's compensate a little, using the smudge tool. And so I'll grab that tool which, if you've loaded D keys, I've given the keyboard shortcut of N, which is just one of 'em that's left over. And then, I'll reduce the size of my cursor and paint up ever so slightly, like so. And now, let's check out the wrist over here to see if we have any problems with it. I'll increase the size of my cursor a little bit and then paint just slightly upward. And notice we have a kind of choppy transition over here next to the thumb, so I'm going to paint this guy out, like so, just so that things make a little more sense.
And then I'll paint this crevice back in. Alright, now I'll zoom out slightly so that we can take in the strings of the tennis racket and this alarms me, I would've sworn that we had way more detail than this. Turns out we did, and I'm going to show you how to retrieve that detail in the very next movie.
- Top-secret tricks for shortcut enthusiasts
- Assigning and converting color profiles
- Turning a cityscape into a tiny planet
- Hunting down seams with the Offset filter
- Distorting an image with the Glass filter
- Using the Libraries Panel
- Batch-processing an entire folder of images
- Adding motion to text, or any other layer
- Adding soundtracks and voiceovers
- Actions and batch processing