- 720p
- 540p
- 360p
- 0.50x
- 0.75x
- 1.00x
- 1.25x
- 1.50x
- 1.75x
- 2.00x
We hope you enjoyed this lesson.
Cool lesson, huh? Share it with your friends
About this lesson
Refine the edge of a selection so that fine strands of hair can be included with the person or animal in the photo.
Exercise files
There are no related exercise files for this lesson, or we cannot provide them due to copyright issues.
Quick reference
Topic: Refine Edge
Refine the edge of a selection so that fine strands of hair can be included with the person or animal in the photo.
When to use
If you ever want to change the background of a photo subject, then this is perfect tutorial. It shows you how one of the trickiest tasks in photo editing can be done simply and quickly. Also included is a selecting via a color range tutorial.
Instructions
Create a basic selection first via a ‘Color Range’
- Go to select dropdown and choose ‘Color Range’.
- With the color picker selector choose a background color.
- Then, while holding down the ‘shift’ key, drag the color picker around all relevant background colors.
- In the dialogue box you will see what has been selected (white = selected, and black = not selected).
- Check ‘invert’ in the dialogue box to select the desired object and press OK.
Getting a better extraction from the existing selection by using ‘Refine Edge’
- Go to back ‘select’ dropdown and this time choose ‘Refine Edge’.
- From the ‘view’ section of the dialogue box, dropdown to choose the selection style that will suit (example: ‘On Black’). Tip you can cycle through these with the ‘F’ key.
- Turn on the ‘Smart Radius’ option.
- Adjust the ‘Radius’ setting for initial refinement of extraction mask.
Refining that extraction even more by helping Photoshop know what you want
- In the ‘Refine Edge’ dialogue box you will also see a paint brush tool on the left.
- Select and use to paint around the photo subject.
- Switch on the ‘Decontaminate colors’ checkbox.
- If this is selected you will need to select one of the ‘Output To’ options.
- Adjust ‘Amount’ to suit.
- Toggle ‘P’ to compare the original mask with the refined version.
- Use the ‘Adjust edge’ sliders to further refine the edges of the selection
- In the example, the ‘Shift Edge’ in negative values improves the mask.
Tip: Refine edge will also work with uneven background as well. For the initial selection use the ‘select lasso’ to paint in a basic selection, then go to the select dropdown and the ‘Refine Edge’ options as above.
Login to download- 00:04 Today we're gonna be looking at a feature that can take your selections to
- 00:08 the next level, and that is refine edge.
- 00:10 If you've ever done work with subjects that contain hair or
- 00:13 fur, you know what kind of a chore it can be to extract them from your background.
- 00:18 Refine edge allows you to single out individual strands of hair or
- 00:22 fur, resulting in a much better extraction.
- 00:25 Let me show you how this works.
- 00:27 So, here I am in Adobe Photoshop where we're gonna take a look at
- 00:30 two examples on how refine edge can help you tremendously in your projects.
- 00:35 In this first photo here, which I grabbed from Shutterstock.com,
- 00:38 you can clearly see that this lady has a lot of hair going on in this photo.
- 00:42 There's hair everywhere.
- 00:44 And using the traditional selection methods in Photoshop,
- 00:47 you're gonna get a pretty ugly extraction.
- 00:50 So, the first thing that we need to do is make our initial selection.
- 00:53 Now, in this case, because the background is pretty much a solid color,
- 00:56 I'm actually gonna start by selecting the background itself.
- 01:00 And, of course, just like most things in Photoshop,
- 01:02 there are many ways of doing this.
- 01:04 But for this example, I'm gonna be using color range,
- 01:07 which can be found under the select menu.
- 01:09 Now, the way color range works, and I've covered this in the past, it allows you to
- 01:13 select individual colors in your photo and turn them into a selection.
- 01:17 You're gonna notice, as I select the blue at the right top corner,
- 01:20 a little bit has become a selection in our preview.
- 01:23 Now, if I hold down my shift key, I can add to that selection just like this.
- 01:27 I can actually drag my mouse over top of all the blues, and
- 01:30 those will be added to my selection.
- 01:32 And then if I move my window over to the right a little bit,
- 01:35 I can grab the blues in this area that were not selected.
- 01:38 Basically, what I'm looking for is white and black.
- 01:40 White will become my selection, and black will be left alone.
- 01:44 So, I'm gonna finish off by grabbing a little bit of the blue at the bottom
- 01:47 right-hand corner, and I'm now left with a pretty nice black and white result.
- 01:51 But, of course, for this example, as we want the model selected and
- 01:54 not the background, I'm gonna check invert right over here at the bottom right, and
- 01:58 then press okay, which is going to give me my selection of just the model.
- 02:03 Now, like I mentioned previously, using a traditional selection method like
- 02:07 this will give you pretty ugly extractions.
- 02:09 If I simply go and apply a layer mask,
- 02:12 you're going to notice that the edges of the model's hair look terrible.
- 02:16 So, let me undo, command or control+z.
- 02:18 And this time,
- 02:19 instead of applying a layer mask, we're simply deleting the background.
- 02:22 We want to use the refine edge feature, which can be found under the select menu,
- 02:27 as well.
- 02:28 Now, before we get into the good stuff,
- 02:30 there are a few ways you can view how your preview looks.
- 02:33 You can choose from marching ants, overlay, on-black, on-white, black and
- 02:38 white, on-layers, or reveal layer.
- 02:41 And you can also cycle through your views by pressing the f key or
- 02:44 disable them temporarily by pressing x.
- 02:47 Now, if you go to on-black, you can really see how traditional selection methods
- 02:51 are terrible at selecting hair or fur.
- 02:54 But luckily, refine edge is here to save the day.
- 02:57 Now, right down below, under your view options, you have edge detection, and
- 03:01 this is where the magic happens.
- 03:03 You're gonna wanna start by turning on smart radius,
- 03:05 which at first isn't going to do anything.
- 03:08 But as you start increasing the radius, Photoshop is
- 03:11 gonna start refining the area around your subject that contains hair or fur.
- 03:16 And depending on the size of the photo or how much hair or fur the model contains,
- 03:20 you may wanna increase the radius even more to get more refinement.
- 03:25 Now at this point, if I press the p key on my keyboard to see the original,
- 03:28 the refinement has certainly helped, but
- 03:30 there's still a lot of blue in the background that we need to deal with.
- 03:33 Once you get to this point,
- 03:34 there are a few things you can do to resolve this issue.
- 03:36 The first thing is the refine radius tool,
- 03:39 which can be found to the left-hand side of your refine edge window.
- 03:42 And this helps by expanding the detection area outside of your subject.
- 03:47 And it works just like a brush, so you can use your right and
- 03:50 left square bracket keys on your keyboard to make the brush bigger or smaller.
- 03:55 And then in most cases, all you have to do is simply brush right
- 03:58 around the outline of your model, just like I'm doing right here.
- 04:02 So, I'm gonna go right along the outline of the model, all the way around.
- 04:05 And this will tell Photoshop to really expand the area outside of the subject,
- 04:11 just like this.
- 04:12 And when I let go, you're gonna notice we now have a much more refined selection.
- 04:17 And that definitely helped a lot, but
- 04:19 we still have a little bit of blue around the subject.
- 04:21 So, the next feature you can use is decontaminate colors at
- 04:25 the bottom of the refine edge window.
- 04:27 And what this will do, this will tell Photoshop to look for
- 04:30 those colors that might be spilling in from the background onto the subject.
- 04:35 And in this case, the main color was blue.
- 04:37 So, when you turn decontaminate colors on,
- 04:39 it's gonna work to get rid of those colors that were spilling over.
- 04:42 And you can increase the amount if there's still a little bit of color left over.
- 04:46 Now, once again, taking a look at the original by pressing p on the keyboard,
- 04:50 and taking a look at what we have now, there's a huge improvement.
- 04:54 And even though we have a little ghosting left over, there's a good chance that
- 04:57 once you add an image behind your subject, you won't see that at all.
- 05:01 But if you do wanna refine it even more, we have the option to adjust the edge.
- 05:06 You can choose to smooth out any jagged edges that might be visible.
- 05:09 You can chose to feather the selection, which will soften it out a little bit.
- 05:12 You can increase the contrast, which will usually sharpen up the edges a little bit.
- 05:16 And you can shift the edge in or out, which sometimes helps a lot.
- 05:21 So, in this case, if you take a look right beside the book on the right side,
- 05:24 there's a little bit of blue left over.
- 05:26 And of course, we have a little bit of blue left over to the right of the hair.
- 05:30 This is a case where I'd want to shift the edge to the left,
- 05:33 which will pull it inwards a little bit.
- 05:35 And you'll notice when we start to shift the edge,
- 05:37 we now have an even better result.
- 05:39 The blue on the right side of the book is gone, and a lot of the ghosting that was
- 05:43 apparent on the right side of the hair is now gone, as well.
- 05:47 And like I mentioned, the area to the right of the hair,
- 05:49 that little bit of ghosting, there's a good chance that won't be seen when you
- 05:53 add another image in the background.
- 05:55 So, now that our refinement is just about complete,
- 05:57 we need to choose how we want to output it.
- 06:00 If you did not choose decontaminate colors,
- 06:02 you can choose to output it as a selection or just a layer mask.
- 06:06 But because that was checked on, we can choose to output it as a new layer, a new
- 06:10 layer with a layer mask, a new document or a new document with a layer mask.
- 06:14 For me, I always choose to output it as a new layer with a layer mask.
- 06:18 That will allow you to make further refinements later on if you need to.
- 06:21 And when you press okay, you're gonna be left with an extraction that
- 06:25 contains a layer mask as well as you can see in the layers panel.
- 06:28 Now, just to show you how well this extracted,
- 06:30 I'm gonna grab the other photo right here.
- 06:32 I'm gonna drag it onto this document, and
- 06:34 I'm gonna simply enlarge it just like this, and place it right behind the model.
- 06:39 And you can now really see that the individual strands of hair
- 06:42 look fantastic in our extraction.
- 06:45 Ending up with a result like this using a traditional selection method
- 06:48 without refine edge is nearly impossible.
- 06:51 Now, the nice thing about refine edge is that you can use it on pretty much
- 06:54 any selection.
- 06:55 It doesn't only have to be on a solid colored background.
- 06:59 So, in this photo here, which doesn't have a solid colored background, I can do
- 07:02 the same thing and use refine edge to grab a nice selection of this dog and its fur.
- 07:08 So, for this example, I'm gonna grab my quick selection tool,
- 07:11 which can be found on the tools bar in the left.
- 07:13 And once that's been selected,
- 07:14 I'm gonna simply brush over top of this dog to turn it into a selection.
- 07:18 Now, you're gonna notice that some areas outside of the dog have also been
- 07:21 selected, as well.
- 07:22 And in that case I can simply hold down my alt or
- 07:25 option key, option on the Mac, alt on Windows, to subtract from the selection.
- 07:30 And over here, I can just grab this area over here, and I'm not looking for
- 07:33 a perfect selection, but I do wanna select as much of the hair as possible.
- 07:37 So, I'm gonna decrease the brush size a little bit,
- 07:39 brush over top of this hair here, the hair over here, and
- 07:43 you'll notice that Photoshop just selected all of this area, as well.
- 07:46 Hold alt or option, and subtract just like that.
- 07:49 And finally, I'm gonna subtract from this section right over here, and
- 07:52 add this little strand of hair on the right.
- 07:55 So, now that we have our very basic selection, like I mentioned before,
- 07:59 if we were to simply add a layer mask, you get a very ugly cutout type of extraction.
- 08:04 So, let me undo that, command or control+z, and
- 08:06 once again, we're gonna hop into refine edge.
- 08:09 Now, because I have a selection method active, I can simply hit
- 08:11 refine edge on the options bar or again, I can find it under the select menu.
- 08:16 And just like we did before, I'm gonna turn on smart radius and then increase
- 08:20 the radius value until my selection starts looking really nice, right about there.
- 08:24 We can start to see the individual strands of hair.
- 08:27 And if I switch over to the black and
- 08:29 white view, you can really see how much Photoshop has refined this selection.
- 08:34 I'm gonna hop back over to the on-black view, and then with my refine radius tool,
- 08:38 I'm gonna start to brush around the outline of this dog
- 08:41 to expand the selection, which will give me a much nicer result.
- 08:46 So, I'm gonna brush up the left side of the dog, just like this around the fur.
- 08:50 And once I let go of my mouse, you're gonna notice we have a near
- 08:54 perfect selection of this dog, which contains fur, which like I mentioned,
- 08:58 with a traditional selection method, would be nearly impossible.
- 09:01 In this case, I'm not gonna need to turn on decontaminate colors.
- 09:04 So, I'm gonna output it as a new layer with a layer mask, press okay,
- 09:07 and there is my final result.
- 09:10 So, if I go back here, if I grab this photo once again,
- 09:13 drag this over here to this document, I'm gonna enlarge it,
- 09:17 place it behind the dog, and there is the final result.
- 09:21 And once again,
- 09:22 you have a layer mask available to you in case you need any further refinements.
- 09:27 As a quick example, you may notice at the bottom right-hand corner,
- 09:30 where the color is, there's a little bit of transparency.
- 09:33 So, I can press b on my keyboard to grab a brush,
- 09:36 make sure that the color is set to white, and then simply brush over top of
- 09:39 this area to bring back the original pixels, just like that.
- 09:44 And we're now left with two fantastic extractions of a dog that contained fur,
- 09:49 and a women that contained crazy hair.
- 09:52 And that is refine edge in Photoshop,
- 09:54 a tool that is not only gonna save you a ton of time and hassle, but
- 09:57 more importantly, you're gonna be left with fantastic looking extractions.
Lesson notes are only available for subscribers.