RSS/Atom feed Twitter
Site is read-only, email is disabled

How to remove background of shadowed and/or low-resolution and/or more complex images

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

Sophoklis Goumas
2011-05-24 19:58:49 UTC (over 13 years ago)

How to remove background of shadowed and/or low-resolution and/or more complex images

Hello everyone and especially to the gimp-user mailing list regulars.

I am trying to create a network infrastructure diagram for where I work with Dia. (In fact it will actually help me much more than anyone else, but that's not the subject.)

For this I am putting into the diagram, images of: servers, switches, racks and so on. What I wish for those images is to have transparent background. So far, I've been able to find decent resolution images which it's because I've started with the latest hardware. Here's an example, let's say for our Dell PowerEdge 6850 servers if found this: http://www.shopricom.com/items/www.shopricom.com/photos/Image78N743uMRZ_full.jpg

which by fuzzy selecting the white background, with a threshold of 15.0 and some selection subtractions I've been able to turn to: http://i.imgur.com/xyCYn.png
which is nice for what I wish to use it for.

Now, I've been able to handle some easy likewise situations but now I've reached the vintage hardware and got bad results. Let me show an example image:
http://www.superwarehouse.com/images/products/HP_Proliant_ml370.jpg

This is more difficult to make it look as I wish since it's resolution it's not decent and it also has a shadow effect which hardens a precise initial selection which can then be worked out to a better result.

After some efforts I either end up with a pixelized image or with a severely chopped image.

So, my question is how could I achieve the desired result for this and such images?
How would do you work out similar or even more advanced cases?

Thanks in advance for your time and attention, Sophoklis

Stefan Maerz
2011-05-24 20:06:37 UTC (over 13 years ago)

How to remove background of shadowed and/or low-resolution and/or more complex images

So, my question is how could I achieve the desired result for this and such images?
How would do you work out similar or even more advanced cases?

Hi Sophoklis,

There are a few good methods to use.

For cutting out a logo, sometimes using Colors>Color to Alpha with the background color selected does the job well.

For this I would recommend using the Eraser tool, and tracing the outline of the server. Square objects are pretty simple to do - use the shift button to drag your Eraser tool from point A to point B.

-Stefan Maerz

peter kostov
2011-05-24 20:23:39 UTC (over 13 years ago)

How to remove background of shadowed and/or low-resolution and/or more complex images

On 05/24/2011 11:06 PM, Stefan Maerz wrote:

So, my question is how could I achieve the desired result for this and such images?
How would do you work out similar or even more advanced cases?

Hi Sophoklis,

There are a few good methods to use.

For cutting out a logo, sometimes using Colors>Color to Alpha with the background color selected does the job well.

For this I would recommend using the Eraser tool, and tracing the outline of the server. Square objects are pretty simple to do - use the shift button to drag your Eraser tool from point A to point B.

-Stefan Maerz

Another option is painting on a layer mask - it is like the eraser tool, but much more convenient to rework and correct. But it is almost impossible to achieve crisp edges this way. For hard and crisp edges it may be better to use the pen tool and trace the contour of the object with it creating a path, that you can edit and later turn into selection. Have in mind that "color to alpha" removes the selected color from the whole image (except if you already have a selection).

Greetings, Peter

Stefan Maerz
2011-05-24 20:31:15 UTC (over 13 years ago)

How to remove background of shadowed and/or low-resolution and/or more complex images

Another option is painting on a layer mask - it is like the eraser tool, but much more convenient to rework and correct.

Good suggestion. Though I just found out about a new eraser tool feature by accident, so I thought I'd share.

If you erase (with the eraser tool) an area and want it back, you can press Alt while "Erasing" to restore the original pixels.

-Stefan Maerz

Mikel Garai
2011-05-24 21:27:51 UTC (over 13 years ago)

How to remove background of shadowed and/or low-resolution and/or more complex images

Hi!

In this situations what I do is:

- select by either free tool or the scissors (depending on the case is easier with one or the other)
- create a layer mask from the selection - adjust the little things than were not perfect

after that and optionally to simulate the antialias and avoid the hard edges:
- apply a gaussian blur to the mask (probably very little, 2-3px or so) - to avoid the white aura around the object use the levels tool with that layer moving the left handler to the right until you are happy with the result

It's easier than it sound.

hope this helps and good luck!

- mIKEL

El 24/05/11 21:58, Sophoklis Goumas escribió:

So, my question is how could I achieve the desired result for this and such images?
How would do you work out similar or even more advanced cases?

Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Ofnuts
2011-05-24 23:40:14 UTC (over 13 years ago)

How to remove background of shadowed and/or low-resolution and/or more complex images

On 05/24/2011 10:23 PM, peter kostov wrote:

Another option is painting on a layer mask - it is like the eraser tool, but much more convenient to rework and correct. But it is almost impossible to achieve crisp edges this way. For hard and crisp edges it may be better to use the pen tool and trace the contour of the object with it creating a path, that you can edit and later turn into selection. Have in mind that "color to alpha" removes the selected color from the whole image (except if you already have a selection).

What I do usually is restriuct color to alpha to a thin border around the object edges;

1) magic wand to select background, if the background is not uniform (JPEG artifacts, for instance) and there are unselected spots, shift-click them to include them in the selection

2) save that selection

3) shrink the selection 3 pixels

4) erase, this takes care of most of the backgound

5) restore saved selection

6) extend it two pixels so that is extends slightly inside the object.

7) apply color-to-alpha

Done.

Elwin Estle
2011-05-25 00:15:20 UTC (over 13 years ago)

How to remove background of shadowed and/or low-resolution and/or more complex images

When painting on a layer mask, if you use a dynamic brush created in the brush editor, you can set up in your preferences to allow you to resize and change the brush hardness "on the fly" while you are painting. I have mine set up so that pressing shift while scrolling the mousewheel increases/decreases the brush size, and ctrl with mousewheel increases/decreases hardness. This way you can paint hard edges on parts of the mask that need hard edges, and soft edges where you need those. You can "render" against the intended background and see what it will look like as you go.

Further, for straight edges, it is a simple matter to use the shift key to let you draw nice straight lines when you are painting on the mask.

There is a tutorial on Gimptalk about doing renders with layer masks...tho some of the images got removed when GT shut down imageox, their image server.

--- On Tue, 5/24/11, peter kostov wrote:

From: peter kostov
Subject: Re: [Gimp-user] How to remove background of shadowed and/or low-resolution and/or more complex images To: gimp-user@lists.XCF.Berkeley.EDU Date: Tuesday, May 24, 2011, 4:23 PM On 05/24/2011 11:06 PM, Stefan Maerz wrote:

So, my question is how could I achieve the desired

result for this and

such images?
How would do you work out similar or even more

advanced cases?

Hi Sophoklis,

There are a few good methods to use.

For cutting out a logo, sometimes using

Colors>Color to Alpha with the

background color selected does the job well.

For this I would recommend using the Eraser tool, and

tracing the

outline of the server. Square objects are pretty

simple to do - use the

shift button to drag your Eraser tool from point A to

point B.

-Stefan Maerz

Another option is painting on a layer mask - it is like the eraser tool,
but much more convenient to rework and correct. But it is almost
impossible to achieve crisp edges this way. For hard and crisp edges it
may be better to use the pen tool and trace the contour of the object
with it creating a path, that you can edit and later turn into selection.
Have in mind that "color to alpha" removes the selected color from the
whole image (except if you already have a selection).

Greetings, Peter
_______________________________________________ Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user