SaafKit

How to cut out hair and fur without leaving a halo

The SaafKit team 4 minute read

Every background remover handles a product on a plain backdrop well. Hair is where they separate. Flyaway strands against a busy background remain the genuinely hard problem in this category, and the tool that claims otherwise has not been tested on a windy day.

The good news is that most bad hair cutouts fail in the same predictable way, and the fix takes about ten seconds once you know what you are looking at.

Why hair breaks the usual approach

A cutout is a mask: for every pixel, how much of it belongs to the subject. For the middle of a face that is easy, the answer is all of it. For the edge of a shoulder it is a clean line.

A single strand of hair is thinner than one pixel. The pixel it lands in is therefore part hair and part whatever was behind it, mixed together before the camera ever recorded it. That mixing already happened, so no amount of cleverness can fully unmix it. The best any tool can do is estimate how much of each is in there, which is why hair comes back as a soft, partly transparent edge rather than a crisp one.

And because the pixel contains some of the old background, the old background comes along with it. Cut a brunette out of a bright green park and the strands carry a faint green tint into whatever you place her on. That tint is the halo.

Killing the halo

Three controls, used in this order.

Pull the edge in. This is the one that matters. Shrinking the mask by one or two pixels discards the outermost ring, which is exactly the ring holding the contaminated pixels. You lose a tiny amount of real hair and remove nearly all of the colour fringe. One pixel is usually enough. Two if the old background was bright or saturated.

Then feather, a little. Having pulled the edge in, a small amount of blur on the mask softens the boundary so the strands read as strands rather than a cut shape. One or two pixels. Any more and the whole subject starts to look like it is behind frosted glass.

Then look at it on the actual background. This is the step people skip. A cutout that looks perfect on the transparency checkerboard can show an obvious outline the moment it goes on a dark background, because the checkerboard is mid grey and hides a grey halo completely. Place it on the colour it will actually sit on and judge it there.

Quick test

Put your cutout on pure black, then on pure white. Problems hide on one and show on the other. If it survives both, it will survive anything.

Try it on your own photo

The cutout runs on your device, at full resolution, with no account and no counter. Nothing is uploaded.

Open the background remover

Fix it before you press the shutter

Every minute spent on the shoot saves ten on the cutout. In rough order of how much difference they make:

  • Separate your subject from the background by distance. Two metres of gap, shot at a wide aperture, throws the background out of focus. A blurred background has less detail to confuse the model and produces a dramatically cleaner edge.
  • Contrast the hair against what is behind it. Dark hair on a light background, light hair on a mid tone. Dark hair against dark wood panelling is the hardest case you can hand a cutout tool, and it is entirely avoidable.
  • Add a rim light. A light behind and to the side of the subject puts a bright line along the edge of the hair. That line is pure separation and it is the single most useful thing in a cutout photographer's toolkit.
  • Avoid a saturated backdrop. A strong green or blue wall contaminates every soft edge. Mid grey is the friendliest colour to cut out of.
  • Tie it back if the shot allows. Not always possible, but a tidy hairline cuts out perfectly and a loose one never does.

When to stop fiddling and go manual

If the subject matters a lot, which usually means a face a client is paying for, finish it by hand. Make the cutout, then paint back the ten or twenty pixels the model lost in the one area that shows: usually a temple or the top of the head.

For a catalogue of two hundred product shots, do not. Get the automatic result good enough, be consistent across the set, and spend the time you saved somewhere it shows more. Consistency across a grid of thumbnails reads better than one perfect image among a hundred mediocre ones.

Sheer fabric, glass and the thing nobody solves

Worth saying plainly: a cutout of a glass bottle or a sheer curtain will come back with the right outline and the wrong transparency. The tool returns a solid shape where the original was see through. This is true of every background remover available right now, paid or free, and it is not a bug in any one of them. The mask says how much of the pixel is subject, and for glass the honest answer is complicated in a way a single number cannot carry.

If you shoot a lot of glassware, light it on white at the shoot. It is a lighting problem, not an editing one.

The SaafKit teamWe build SaafKit, a background remover that runs on your own device instead of on a server. We write these guides because we keep answering the same questions in email.

Keep reading