站点介绍

Last week I cut a ceramic mug out of a catalog shot on pure white - 1600 by 1200 pixels, tolerance 16, feather 8. The handle kept a hair-thin bright edge until decontamination went on, then the rim vanished against a dark background. A second photo shot against a painted wall was a different story: two soft shadows stayed behind as gray ghosts. That gap is the whole tool in one sentence.
Every pixel is compared against the backdrop color channel by channel. The green channel carries the highest weight, and the red and blue weights shift slightly with overall brightness, which makes the score track human color perception better than a plain RGB difference does. Within tolerance a pixel goes fully transparent, past it the pixel stays untouched, and the band in between gets a smooth alpha ramp.
The tool never knows whether it is looking at a mug or a person. The purer the backdrop and the farther the subject sits from it, the cleaner the cut; the reverse is equally predictable.
Anti-aliased edge pixels are blends of subject and backdrop. Paste them onto a new background at full opacity and the mixed-in white or blue shows up as a rim. The fix is to un-mix: foreground = (pixel − (1 − alpha) × backdrop) / alpha, applied once the alpha is known.
Estimating that alpha is the delicate part. Besides the color distance, the code looks within three to five pixels of each edge pixel for a patch that is certainly foreground, uses its average color as a reference, and projects the pixel onto the line between backdrop and that reference. With a solid estimate in hand, the un-mixing leaves black hair on white looking black, and a white circle on blue looking white. The pass runs on edge pixels only, so a large photo does not pay for it everywhere.
Clean white or blue backdrops: tolerance 16 to 20, feather 6 to 10, decontamination on, then judge the result. A dirty ring around the subject means more edge pixels need to fall into the semi-transparent band, so drop tolerance toward 12. A subject with bites taken out of it means tolerance is too high, or the subject is simply too close in color to the backdrop - back both off.
I keep tolerance below 30 as a matter of habit: past that, sensor noise, soft shadows, and gradients start vanishing together with the backdrop, and the edge develops hard, chewed notches. Feather beyond 15 grays out the whole rim of the subject.
Flat backdrops, e-commerce whites, and ID-photo blues are the sweet spot. Gradient walls, textured fabric, clutter behind the subject, or a pale-gray shirt on a white wall will fail, and no slider setting will save them. That failure is the boundary of color-distance keying, not a defect to report; for those images use a cutout tool built on segmentation.
Before exporting, flip the preview to white and to magenta. Leftovers that hide on a checkerboard are obvious on both. Transparent PNG suits further layout work; WebP suits publishing as-is.
No, and the result falls apart fast. Every decision here is a color-distance test, so it only works on solid and near-solid backdrops; with gradients, clutter, or a subject colored close to the background you get leftover patches or erased details. That is an algorithm boundary, not a bug. For busy backgrounds use a dedicated cutout tool.
That rim is background color mixed into semi-transparent pixels. Keep decontamination on (it starts on), set feather around 6-10 and tolerance near 12-18, and the rim shrinks noticeably. Truly messy edges still need a few manual brush strokes; no color-based method is pixel-perfect on hair.
Nothing is uploaded. Images are decoded and computed in browser memory, never written to storage and never sent anywhere. What persists are the settings - background color, tolerance, feather, format, decontamination, keep-alpha - and they disappear when you switch devices or clear site data. Clear my data in the footer removes them.
JPG, PNG, and WebP go in; for PNG you can keep the original transparency. Images above 40 megapixels or any side over 12000 pixels are refused - past that, browsers often crash while reading pixels. Crop first.
中文版:https://www.9314.cn/tools/solid-bg-remover/
评论列表 (0条)