Sub topic 9
Using Refine Hair for a faster first pass
This chapter covers the Refine Hair button in the Select and Mask workspace. You will learn what it does, when it helps, when it hurts, and how to correct its result. It assumes you can open Select and Mask, switch view modes, and use the Refine Edge Brush from the earlier chapters. You should also know that a layer mask uses white to reveal and black to hide.
What Refine Hair does
Refine Hair is a single button in the Properties panel of Select and Mask. In current versions it sits near the top of the panel, next to the Select Subject button and the Edge Detection controls. One click analyzes the current selection edge and tries to find fine strands outside it. It then adds those strands to the selection as partially transparent pixels.
The button does automatically what you would otherwise do by hand. It estimates where hair lies near the border, widens the search area for that border, and keeps pixels that look like hair against the background. The result is a first pass. It is rarely a final result, but it often saves several minutes of brushing.
Refine Hair is not a separate mask type. Its output goes through the same pipeline as Radius, Smart Radius, and the Refine Edge Brush. Anything it produces can be repainted, smoothed, or undone with the tools you already know.
When Refine Hair works well
The button works best under these conditions:
- The base selection is already close to the subject outline. Refine Hair adjusts the edge. It does not repair large mistakes.
- The hair is distinct from the background in color or brightness, such as dark hair on a light wall.
- The background is fairly even, without strong texture or detail near the hair.
- The strands are fine and loose, such as flyaway hair, fur tips, or a fuzzy sweater edge.
It works poorly when the background is similar to the hair, when the background is busy (foliage, brick, a crowd), or when the base selection cuts through the hair instead of sitting at its outer edge.
Step-by-step workflow
- Create a base selection with Select Subject and check it, as covered earlier.
- Choose Select and Mask from the Select menu, or from the options bar.
- Set a view mode that shows the edge clearly. On Layers (or On Black and On White) the edge is easy to judge. Marching ants hide detail.
- Click Refine Hair in the Properties panel.
- Inspect the result at 100% zoom, then at 200%, along the whole hairline.
- Switch between a light and a dark view mode. Press F to cycle through modes. Press X to temporarily show the original image.
- Decide whether to keep the result, adjust it, or undo it with Ctrl+Z (Cmd+Z on Mac).
Inspecting on two backgrounds matters. A result that looks fine on white can show a dark rim on black, and the reverse.
Understanding what the button changed
After you click it, look at three things.
The Radius value. Refine Hair often changes the Radius setting and may switch Smart Radius on. You can see this in the Edge Detection group. This tells you the button works by widening the search band around the edge. If the radius has grown large, flat areas such as shoulders or clothing may now have a soft, uneven border.
The hair area. Strands should appear as thin, partly see-through lines. Wide, milky patches mean Refine Hair kept background pixels along with hair.
The hard edges. Check areas that should stay sharp, such as a collar, ear, or shoulder. A large radius softens or erodes them.
The next diagram shows where Refine Hair sits in the sequence of work.
Fixing what Refine Hair gets wrong
Because the button treats the whole edge the same way, you often need local fixes.
Soft or eroded hard edges
If the shoulders, clothing, or jaw became fuzzy, use the Refine Edge Brush in Subtract mode (hold Alt or Option) to paint those areas back to a hard edge. You can also lower Radius slightly and turn on Smart Radius so Photoshop uses a narrow band on smooth borders and a wide band on hair.
Background left inside the strands
When the background shows through between strands as a tinted haze, the Refine Edge Brush can remove it. Paint over the hair with the brush in Subtract mode. The brush is a refinement tool, so it recalculates the edge under the stroke and does not just erase pixels.
Missing strands
If a patch of hair was ignored, switch to the Refine Edge Brush in its default (add) mode. Paint along the hairline, over the area where the strands should be. Use a brush a little larger than the strand area and stroke once or twice. Repeated passes in the same spot can make the result worse, so undo and retry with a different size instead.
The result is worse than the base selection
Sometimes the button damages more than it adds. Press Ctrl+Z (Cmd+Z). Alternatively, press the Reset button for the workspace and handle the hair by manual brushing. Starting from the base selection with a moderate Radius and a few brush strokes can give a cleaner result than a failed automatic pass.
Refine Hair compared with the manual approach
| Approach | Speed | Control | Best for |
|---|---|---|---|
| Refine Hair only | Fast, one click | Low | Simple backgrounds, quick drafts |
| Radius and Smart Radius | Fast | Medium | Edges that mix hair with smooth outlines |
| Refine Edge Brush | Slower | High | Local problems and difficult backgrounds |
| Refine Hair plus brush | Medium | High | Most real photos |
The last row is the working recommendation. Use the button to remove the bulk of the work, then spend your time on the places where it failed.
Common errors
- Running it on a poor base selection. If the selection cuts through the head, the button cannot recover the missing hair. Fix the base selection first.
- Judging on one background. A good-looking result on white may leave dark fringes. Check on at least two backgrounds.
- Keeping a very large Radius. The extra width increases the amount of background pulled in, which later requires heavier Decontaminate Colors settings. Reduce the radius where you can.
- Clicking the button repeatedly. Each click works from the current state. It does not always improve the result. Click once, evaluate, then decide.
- Treating the button as a finish. Refine Hair does not remove color contamination. A strand can have the right opacity and still be tinted by the old background. That is the job of Decontaminate Colors, covered in a later chapter.
A worked example
Suppose you have a portrait of a woman with brown hair against a pale gray wall. Select Subject gives a base selection that follows the head closely but cuts off the flyaway hairs.
- Open Select and Mask and choose On White view.
- Click Refine Hair. Flyaway strands appear on both sides of the head. The Radius field now shows a larger value.
- Zoom to 200% on the left shoulder. The sweater edge looks soft. Hold Alt (Option) and paint along the sweater with the Refine Edge Brush to restore a crisp edge.
- Switch to On Black view. A light rim appears along the hair, which is the pale wall showing through. Note it, because you will handle it in the Decontaminate Colors step.
- At the top of the head, a few strands are still missing. Select the Refine Edge Brush in add mode and paint once along the hairline.
- Leave the result in Select and Mask for the next steps: global refinements, then Decontaminate Colors, then output.
At this point the selection is not finished, but about 80% of the hair work is done, and the remaining problems are known and local.
Summary of decisions
- Use Refine Hair after a sound base selection and before manual brushing.
- Click it once, then judge the result at 100% or higher on both light and dark views.
- Repair eroded hard edges and leftover haze with the Refine Edge Brush.
- Expect leftover color fringing and fix it with Decontaminate Colors later.
- If the button makes things worse, undo it and use Radius and the brush instead.
Exercise
You click Refine Hair on a portrait. The hair now looks good, but the subject's collar and shoulders have become soft and uneven. Name two ways to fix this without losing the hair.
Show answer
Paint over the collar and shoulders with the Refine Edge Brush in Subtract mode (hold Alt or Option) to restore a hard edge there. Alternatively, lower the Radius and turn on Smart Radius so Photoshop uses a narrow edge band on smooth outlines and a wide band only on hair.
Exercise
Your Refine Hair result looks clean on a white view but shows a pale rim along the hair on a black view. Is this a Refine Hair failure, and which later step addresses it?
Show answer
It is not a selection failure. The edge pixels still carry color from the old light background. Decontaminate Colors, which replaces edge colors with colors from nearby subject pixels, addresses it. Checking on both light and dark views is how you spot the problem.