D
D
dollar2019-08-20 11:43:05
Design
dollar, 2019-08-20 11:43:05

How to remove the background without losing information?

Let's say there is a picture on a simple background, but not on a single color. The background smoothly flows with a gradient, and in general there may even be some kind of borders of colors. And the depicted object has slightly sharper borders and is clearly different from the background.
You need to make the background transparent. And where the subject goes into the background - translucent, so that you can substitute any background, both dark and light. But you can not lose a single pixel. Therefore, the usual stroke methods are not suitable. The Magic Wand is also not very smart in such situations.

Example 1
5d5bb1578264a461945358.png
Example 1 (enlarged)
5d5bb15f8c88b165844757.png
Example 2 (no picture): red ball on the grass.
From the example, it seems to be obvious where which pixels are and how much to make transparent, if you do it manually, pixel by pixel. Is there a popular software solution?
The difficulty is that the width of the transition of the subject to the background (blur width) can be more than one pixel. But the tool must somehow guess that very small impurities are already the beginning of the boundary with the object.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2019-08-20
@dollar

The task is quite common, so there are many solutions and approaches to it. And specialized tools in editors and plugins. One of the difficult tasks is to separate the hair/fur from the complex background. And also resolved.
We need to make a good mask - a grayscale image, where the lighter the pixel, the more visible the original one will be. Where the pixels are black - full transparency.
I will offer one of the solutions, based on the standard tools of almost any editor.
Consider each of the channels, R, G and B - where is the difference between the object and the background most contrasting?
In this case, it is in the red channel, R. Let's take it as the basis for the future mask.
Copy it and Levels up the contrast while looking at the histogram so that black to white are pixels. Then invert the mask and apply to the layer with the original image.

result
5d5bb9c49e101149369921.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question