Gimp-Forum.net

Full Version: Removing Background
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
What would be the best way to separate the subject from the background of this image?
Best way or quickest way ?

For that I would make a black/white mask and you can do that in different ways from a straight paint inthe layer mask to making via various routes, the threshold filter might be a starting point or via conversion to an indexed image (just for a mask) ...and this only took a couple of minutes

[attachment=8488]

or there is the FG / select tool. Invariably needs a bit of touching up.

For that image, I think I would spend a bit more time and care, trace the outline with the path tool, then path to selection.
(08-12-2022, 07:08 AM)rich2005 Wrote: [ -> ]Best way or quickest way ?

For that I would make a black/white mask and you can do that in different ways from a straight paint inthe layer mask to making via various routes, the threshold filter might be a starting point or via conversion to an indexed image (just for a mask) ...and this only took a couple of minutes



or there is the FG / select tool. Invariably needs a bit of touching up.

For that image, I think I would spend a bit more time and care, trace the outline with the path tool, then path to selection.

It's been quite a while since I did anything like this...and I'm not getting the sharpness in the areas where the object and the background are both dark. I'm not doing the correct steps...I'm missing something.
(08-12-2022, 07:33 AM)jediguitar101@yahoo.com Wrote: [ -> ]It's been quite a while since I did anything like this...and I'm not getting the sharpness in the areas where the object and the background are both dark. I'm not doing the correct steps...I'm missing something.

Yes, it all comes with practice, 20 minutes to make this outline path. It might take you an hour but it is your masterpiece Wink  

While you can keep and modify selections as a channel, a path can be more easily modified for those well defined areas. Save as a Gimp .xcf and re-visit your work at a later date.

[attachment=8490]

Rather than waste that path, the svg is attached. Load it by right click in the paths dialogue and 'import path' Path to Selection, Invert Selection, Edit -> Cut.
...but I do expect you to make your own.
Using curves can help you to easy select :
[attachment=8491]
You could try the gmic Gimp plugin http://www.gmic.eu

This has an Extract Foreground (Interactive) filter. Not a lot of expertise required, just a lot of mouse clicking.

left-click for green and keep / right-click for red and delete. Various settings in the filter, try the options but a single layer updateable is a good starter.

You get a floating window to click in. Hit the space bar for updates. When finished close the window and it gets transferred back into Gimp. The background is still there if required, use the eraser tool in anti-erase (alt) mode

This example, was about 3 minutes, cut down to a minute for imgur https://i.imgur.com/aBSk3yK.mp4
Playing around with removing the background from this image, I discovered another way to proceed. (at least new to me)

After increasing the image contrast (Threshold is a good option for this), highlighting the subject from the background, I use the Fuzzy Select Tool to select the subject of interest, I create a mask from that selection.

I make adjustments to this layer mask and then after applying the mask I make alpha to selection and Select To Path.

➤➤➤ The idea here is to save with the trace of the path from the beginning of the edition, in the case of images in which the tracing is laborious, (not needing to do the entire contour manually).

Now just make small adjustments to the created path, and voilà!
[Image: bDI3CqN.png]
Is there a way to restore to the original color settings after leaving the command and doing something else such as tracing?
I'm comfortable with the "tracing method" and it wouldn't take all that long on this rather simple image, however, I remember approaching stuff like this (a long time ago) much like Krikor suggested. I know this is should be a super easy task...lol
(08-12-2022, 10:10 PM)zeuspaul Wrote: [ -> ]Is there a way to restore to the original color settings after leaving the command and doing something else such as tracing?

The selection you obtain isn't linked to a specific layer, but applies to all layers in the image, so what you can always do is to duplicate the layer, edit the colors to make the clipping easier, and use the obtained selection to clip the original layer.
Pages: 1 2