Sub topic 14
Fixing halos, lost strands, and rough edges
This chapter assumes you can open Select and Mask, switch view modes, and output a selection to a layer mask. It covers the three problems that show up most often after a hair cutout, how to tell them apart, and how to fix each one without starting over. The chapter is about diagnosis first. A fix applied to the wrong problem usually makes the cutout worse.
Start with a test composite
Problems in a cutout stay hidden against the original background. Put the cutout over a few test backgrounds before you decide anything is wrong. Use a flat light layer, a flat dark layer, and one saturated color such as bright green or red. Each one exposes a different fault.
| What you see | Where it shows | Most likely cause |
|---|---|---|
| Light outline around hair | Dark and colored backgrounds | Bright background pixels kept in the edge |
| Dark outline around hair | Light backgrounds | Dark background pixels kept in the edge |
| Tint of the old background color | Colored backgrounds | Color contamination in semi-transparent pixels |
| Missing wisps, blunt hair ends | Any background | Edge Detection too narrow or strands never selected |
| Stray patches of old background between strands | Any background | Radius too wide, or mask left gray in the gaps |
| Jagged, stair-stepped outline | Any background, at 100% zoom | Selection is hard-edged or the edge is not smoothed |
Fixing halos
A halo is a rim of the old background color around the subject. It comes from edge pixels that are partly hair and partly background. When Photoshop keeps those pixels at full opacity, their background color stays in the image.
Work through these steps in order, and stop when the halo is gone.
- Reopen Select and Mask from the layer mask. Choose the layer, then Select > Select and Mask, or press Ctrl+Alt+R on Windows or Cmd+Option+R on macOS. Your earlier settings may reset, so check them.
- Turn on Decontaminate Colors in the Output Settings. It replaces the color of edge pixels with colors taken from nearby subject pixels.
- Set Amount to a moderate value first, such as 50%, and raise it only while the halo shrinks. At 100% it can shift hair color noticeably, which is easy to see on light hair against a dark scene.
- Move Shift Edge to a small negative value, for example −5% to −15%. This pulls the mask boundary inward and removes the outermost ring of contaminated pixels.
- Set Output To to New Layer with Layer Mask.
Shift Edge has a cost. Pushing it too far eats into real hair and makes the head look shrunken. If a −15% shift removes the halo but also thins the hair, back off and rely on Decontaminate Colors with a lower shift instead.
Halos that survive decontamination
If a faint outline remains, the cause is often the mask rather than the color. Check the mask directly. Hold Alt (Option on macOS) and click the mask thumbnail to view it. Gray fringe pixels around the head mean the mask is semi-opaque where it should be fully transparent.
Fix this by selecting the mask and applying a Levels adjustment with Ctrl+L (Cmd+L). Drag the black input slider to the right a small amount. Values below the slider become fully black, so faint gray fringe turns to full transparency. Move it a few points at a time and watch the hair, because strong changes clip thin strands.
Fixing lost strands
Lost strands are fine hairs that were never selected, or that the mask later removed. Edge Detection decides how far Photoshop looks beyond the base selection, so most missing hair traces back to it.
- In Select and Mask, view the cutout on a contrasting background, such as On Black or On White. The wisps you want should be visible in the original photo.
- Raise Radius until the search band covers the longest strands. Turn on Smart Radius if the subject has both hair and a hard edge, like a shoulder or collar. Smart Radius lets Photoshop use a narrow band on hard edges and a wide band on hair.
- Choose the Refine Edge Brush (shortcut R). Paint along the outer edge of the hair where strands are missing. The brush re-runs edge detection under the stroke, so it picks up hair that the global Radius misses.
- Use Refine Hair for a quick first pass. Then use the brush for spots it missed.
- If a stroke picks up too much background, undo and use the Brush tool with the minus option, or hold Alt (Option) to subtract. The Brush tool paints the mask directly instead of redetecting edges, so it gives you precise control.
A common mistake is raising the global Radius far above what the hair needs. A wide Radius pulls in the gaps between strands as partial subject. The result is a gray veil of old background around the head. Keep the global Radius modest, and use the Refine Edge Brush only in the places that need more.
When the hair is lost against a similar background
If hair and background have almost the same brightness and color, edge detection has nothing to latch onto. Brush tweaks help only so much. In that case, the channel-based method in the later chapter is a better fallback, because it builds the mask from the channel with the strongest contrast.
Fixing rough edges
Rough edges appear in two forms: jagged stair-steps and a blotchy, uneven boundary along the head.
- Smooth removes small bumps from the selection outline. Keep it low, between 1 and 5. High values round off curls and make hair look like a helmet.
- Feather blurs the edge by a set number of pixels. For hair cutouts a value from 0.2 to 1 px is usually enough. Heavy feathering softens the whole outline and removes the sharp texture that makes hair look real.
- Contrast sharpens the transition between selected and unselected pixels. Use it to clean a soft, fuzzy boundary, but note that it works against Radius. High contrast can snap thin strands to fully on or off.
- Shift Edge moves the boundary in or out. Small values help a boundary that sits slightly too wide.
Combine these in small doses. A typical pass on a head with fine hair might use Smooth 2, Feather 0.5 px, Contrast 10%, and Shift Edge −5%. Treat these as a starting point and check the result at 100% zoom on both a light and a dark background.
Apply the global sliders to the hair edge only where possible. If the body outline is jagged but the hair is fine, finish the hair first, output the layer mask, then clean the body edge by painting the mask with a hard black or white brush.
Using the mask for final repairs
After you output to a layer mask, you can fix small leftovers without reopening Select and Mask. Select the mask thumbnail, then paint.
- Paint with black to hide leftover background.
- Paint with white to reveal missing hair.
- Paint with a low-opacity soft brush, around 10% to 20%, for hair edges. A full-opacity brush leaves a visible line.
- Press X to swap black and white as you work.
Because the edit lives on a mask, a mistake costs nothing. Paint the opposite color to undo it.
Common errors and what they mean
| Symptom | Likely mistake | Correction |
|---|---|---|
| Hair color changed after Decontaminate Colors | Amount set to 100% | Lower the Amount |
| Halo returned after reopening Select and Mask | Settings reset or output went to a Selection | Reapply Decontaminate Colors and output to a new layer with layer mask |
| Hair looks like a solid block | Smooth too high, or Contrast too high | Reduce both, then repaint edges with the Refine Edge Brush |
| Gray cloud around the head | Radius too wide | Lower Radius and paint only missing areas |
| Cutout looks fine on white but outlined on black | Light fringe left in mask or color | Add Shift Edge inward, enable Decontaminate Colors, check the mask in Levels |
Exercise
You place a hair cutout on a dark green background and see a thin bright outline around the head. Hair strands themselves are intact. Name two settings you would change in Select and Mask and the direction of each change.
Show answer
Turn on Decontaminate Colors so the edge pixels take their color from nearby hair instead of the old bright background, and move Shift Edge to a small negative value so the mask pulls inward and drops the outer ring of contaminated pixels. Set Output To a new layer with a layer mask, because Decontaminate Colors cannot write to the existing layer's mask.
Exercise
After raising Radius to 40 px to catch a few long wisps, the area around the head looks like a gray cloud. What is the cause, and how do you keep the wisps without the cloud?
Show answer
A wide Radius treats the gaps between strands as partly selected, so old background shows through as semi-transparent gray. Lower the global Radius to a modest value, then use the Refine Edge Brush only along the specific places where wisps are missing. You can also paint those gray areas out of the mask with a black brush.