Sub topic 12
Refining Edges with Select and Mask
This chapter assumes you can make a selection with the Quick Selection or Lasso tools, add a layer mask from a selection, and find the Properties panel. Select and Mask is a dedicated workspace for improving a rough selection before it becomes a mask. It matters most for hard edges such as hair, fur, grass and soft fabric, where a plain selection leaves halos or a cut-out look.
What Select and Mask does
Select and Mask is a separate workspace. It opens over your document and gives you a toolbar, a Properties panel with edge controls, and several view modes. You do not paint on the layer here. You shape the selection edge, then choose how Photoshop hands the result back.
You can open it in three ways:
- Choose Select > Select and Mask.
- Press Ctrl+Alt+R (Windows) or Cmd+Option+R (macOS).
- Click Select and Mask in the Options bar while a selection tool is active.
If a layer mask is active, the Properties panel also offers Select and Mask. This lets you refine an existing mask, not only a new selection.
Start with a rough selection. A good start saves time because the refinement tools adjust an edge. They do not find the subject for you.
View modes
The View Mode menu in the Properties panel changes how the selection looks while you work. Choose the mode that shows the problem you are trying to fix.
| View mode | What it shows | Best used for |
|---|---|---|
| Onion Skin | The selection as a partly transparent layer | Checking how the result sits over the original |
| Marching Ants | The standard selection outline | Checking the shape of the selection |
| Overlay | A colored tint over the unselected area, like Quick Mask | Spotting missed areas |
| On Black | The selection over black | Finding light halos |
| On White | The selection over white | Finding dark halos |
| Black and White | The selection as a mask, with white selected | Checking that the interior is solid |
| On Layers | The selection over the layers below | Judging the real composite |
Switch modes often. A halo that hides on white may show clearly on black. Press F to cycle through the modes and X to toggle the original image on or off. Select Show Original and Show Edge to see the original and the refinement radius area.
The tools in the toolbar
The left toolbar has these tools:
- Quick Selection and Object Selection add or subtract larger areas.
- Refine Edge Brush paints over a boundary so Photoshop works out which pixels belong to the subject. It is the main tool for hair.
- Brush adds to or subtracts from the selection directly. Hold Alt (Windows) or Option (macOS) to switch between add and subtract.
- Lasso and Polygonal Lasso fix large mistakes quickly.
- Hand and Zoom move and zoom the view.
Use the Refine Edge Brush only on the transition zone, the strip where subject and background mix. Painting across solid interior areas can soften parts of the subject that should stay fully opaque. If that happens, switch to the Brush in subtract or add mode and repair the area.
Object Subject and Select Subject
Select Subject in the Options bar makes a first-pass selection of the main subject. It is a quick way to start, but check its edges. It often smooths over fine detail, which is the reason to continue into the refinement controls.
Global Refinements
These sliders in the Properties panel act on the whole selection edge. Change one at a time so you can see what each does.
| Control | What it does | Typical use |
|---|---|---|
| Smooth | Removes jagged points from the outline | Low values (0 to 10) on hard-edged objects |
| Feather | Blurs the edge evenly | Small values to blend a cut-out into a new background |
| Contrast | Sharpens a soft edge and removes noise | Cleans a rough edge after Radius |
| Shift Edge | Moves the boundary in (negative) or out (positive) | Removing a thin fringe of old background |
Shift Edge is often the quickest cure for a halo. A value of -10% to -30% pulls the edge inward and hides background pixels clinging to the subject.
Feather here is the same idea as the Feather control in the Properties panel for a mask, covered earlier in the tutorial, but it acts on the selection before it becomes a mask. Be careful with large values. A heavy feather softens everything, including areas that should stay crisp.
Edge Detection
Edge Detection has a Radius slider and a Smart Radius checkbox. The radius sets how wide a strip Photoshop analyzes around the selection edge.
- A small radius suits hard edges, such as a product or building.
- A larger radius suits hair and fur, where the transition is wide.
- Smart Radius varies the width of the strip along the edge, so a smooth shoulder and a wispy hairline can each get what they need. Turn it on for subjects with both kinds of edge.
If the radius is too large, the background enters the selection and the edge looks soft. Find the smallest value that captures the fine detail, then use the Refine Edge Brush for the remaining trouble spots.
Output Settings
At the bottom of the Properties panel, two settings decide what you get back.
Decontaminate Colors replaces colored fringe pixels with colors from nearby subject pixels. Use it when the old background colors bleed onto the edge, for example green from grass on a subject's hair. The Amount slider controls how strongly this happens. Decontaminate Colors changes pixel colors, so it cannot write to the original layer. When it is on, the Output To menu offers only the options that create a new layer or document.
Output To has these choices:
| Output option | Result | Destructive? |
|---|---|---|
| Selection | Returns a refined selection | No |
| Layer Mask | Adds a mask to the current layer | No |
| New Layer | Copies the selected pixels to a new layer | No, the original stays |
| New Layer with Layer Mask | Copies the layer and adds a mask | No |
| New Document | Opens the result in a new file | No |
| New Document with Layer Mask | Same, with a mask | No |
For a non-destructive result, choose Layer Mask with Decontaminate Colors off. If you need color decontamination, choose New Layer with Layer Mask. The original layer stays untouched below it, and the mask can still be edited.
A worked example: cutting out a subject with hair
This sequence works for a portrait you want to place on a new background.
- Open the photo and select the layer.
- Choose Select > Subject to make a rough selection.
- Choose Select > Select and Mask.
- Set the view mode to On Black, and look for light halos.
- Select the Refine Edge Brush and paint along the hair boundary, keeping inside the transition zone.
- Turn on Smart Radius and set Radius to about 5 px. Raise it only if the hair still looks cut off.
- Set Smooth to a low value, Feather to about 0.5 px, and Shift Edge to about -10%.
- Switch to On White. If dark fringes appear, use a slightly more negative Shift Edge value.
- Turn on Decontaminate Colors and set Amount around 50%.
- Set Output To to New Layer with Layer Mask and click OK.
After the workspace closes, the Layers panel shows a new layer with a mask. Place a new background layer below it and view the composite at 100% zoom.
Refining an existing mask
You can return to Select and Mask for a mask that already exists. Click the mask thumbnail, then click Select and Mask in the Properties panel. The workspace opens with the mask as the starting point, and you can use the same tools. Because the result replaces the mask, duplicate the layer or the mask first if you want to compare versions. Alt-dragging (Windows) or Option-dragging (macOS) the mask thumbnail to another layer copies it.
Common problems
- A white or dark halo remains. Check On Black and On White. Reduce Shift Edge, or turn on Decontaminate Colors and output to a new layer.
- Hair looks like a solid cut-out. The radius is too small, or the Refine Edge Brush did not cover the hair. Paint over it again.
- Solid areas became see-through. The Refine Edge Brush or a large Feather affected the interior. View in Black and White and paint the interior white with the Brush.
- The edge looks soft all around. Radius or Feather is too high. Lower them and apply Contrast.
- The result cannot be written to the original layer. Decontaminate Colors is on. Output to a new layer.
Exercise
You refined a selection of a person with Decontaminate Colors on, and the Output To menu no longer lists Layer Mask. Why, and what should you choose to stay non-destructive?
Show answer
Decontaminate Colors rewrites pixel colors, so it cannot be applied to the original layer through a mask alone. Choose New Layer with Layer Mask. The original layer stays unchanged underneath, and the new layer's mask remains editable.
Exercise
A subject looks clean on white, but on black you see a bright outline around the edge. Name two controls that can reduce it.
Show answer
Shift Edge with a negative value pulls the boundary inward past the bright fringe. Decontaminate Colors replaces the fringe pixel colors with nearby subject colors. Lowering Radius can also help if the radius admits too much background.