Background removal is the process of taking an image with an opaque background and making it fully or partially transparent. Some common situations include:

  • You have an image — often a logo, icon or other abstract drawing — that used to have a transparent background but was merged with a solid background color, and you want to reconstruct the transparency as close to exactly as possible.

  • You have a photo taken against a white or other neutral background, e.g. in a lightbox, and want to make the background transparent. Often there are also features that should be made semi-transparent, such as shadows, reflections or fuzzy outlines.

  • You have a picture scanned from a paper copy (or e.g. from an old photographic plate), and you want to remove the paper texture while preserving as much detail in the picture as possible. Sometimes, the paper or plate may be stained, scratched, discolored or otherwise uneven — such cases may overlap with image restoration.

  • You have a picture of an object in front of a complex background, and you want to trace the outline of the foreground object so that it can be cut out of the background.

Depending on the situation, there are several techniques that might be applicable. For instance:

  • If you have two versions of the exact same original image on two different solid backgrounds (ideally black and white), you can use e.g. the technique from this answer to reconstruct the original alpha channel exactly, or almost so.

  • In some cases, tools such as GIMP's Color to Alpha can solve this task very easily for images with a clean solid background. In other cases, they may need to be combined with manual masking or with other manual tweaks to avoid an excessively translucent result.

  • For scanned images with a non-uniform background, it may be possible to first use interpolation, content-aware fill or other inpainting techniques to reconstruct the background texture without the image, and then to subtract the reconstructed background from the scan to eliminate the texture.

  • Removing complex backgrounds often requires manually tracing the foreground object's outline, and possibly the local application of other techniques to handle semi-transparent areas. Getting good results in very complex cases (such as wispy hair in front of a detailed background) may require a lot of detail work and artistic license if it's possible at all.

history | show excerpt | excerpt history