Sign up now! · Forgot password?
RSS/Atom feed Twitter

Separating objects from the background

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.

5 of 6 messages available
Toggle history

Please log in to manage your subscriptions.

Separating objects from the background Nikolai Vladychevski 10 Apr 18:15
Separating objects from the background Hago Ziegler 10 Apr 21:38
Separating objects from the background Walker, Sam 10 Apr 23:03
  Separating objects from the background Jacob Meuser 10 Apr 23:20
E7F20B466062D511973800508B6... 07 Oct 20:15
  Separating objects from the background Nikolai Vladychevski 10 Apr 19:30
Nikolai Vladychevski
2002-04-10 18:15:05 UTC (over 19 years ago)

Separating objects from the background

Hello,

I will have to redesign a site (shopping site) with white background color and since the actual site uses photos of the product with the some backgrounds (black, gray ... all monotone colors) I will have to remove it and I don't know how to do this properly.

Lets say I have an example like this, an yellow oval shape over purple background:

http://www.isl.net.mx/paso1.gif

This object has an antialiased border to integrate smootely with the background.

If I remove the background using selection tools in Gimp I will get a result like this:

http://www.isl.net.mx/paso2.gif

Wich is the result of antialiasing effect, and if I remove the purple color, there is no way to remove it completely, some of it will stay:

http://www.isl.net.mx/paso3.gif

I investigated and found that antialising effect changes Alpha values of the pixels, so if I place any background backward, the object will adapt to the background smoothely. Unfortunately, I already have background on my photos and the object together in the image and I need to do the reverse, I have to separate the object from the background, so I need to do something with the alpha values of the border pixels, right now they are equal to 255:

http://www.isl.net.mx/paso4.gif

How can I do with gimp to remove the purple color fully and convert the borders where the object is merging with the background into pixels that has Alpha values over yellow color instead of plain orange color ?

Thanks in advance. Nikolai

Nikolai Vladychevski
2002-04-10 19:30:48 UTC (over 19 years ago)

Separating objects from the background

Cruz, John J writes:

Have you tried installing a border around the object of a color of your choosing and making certain that the border is up-front?

jjc

but the problem is I have not object yet to produce its border. The oval was just an example, I have a lot of photos of products here and all have background that I want to remove cleanly and fast, without doing pixel-by-pixel art ...

-----Original Message-----
From: Nikolai Vladychevski [mailto:niko@isl.net.mx] Sent: Wednesday, April 10, 2002 12:15 PM To: gimp-user@lists.xcf.berkeley.edu Subject: [Gimp-user] Separating objects from the background

Hello,

I will have to redesign a site (shopping site) with white background color and since the actual site uses photos of the product with the some backgrounds (black, gray ... all monotone colors) I will have to remove it and I don't know how to do this properly.

Lets say I have an example like this, an yellow oval shape over purple background:

http://www.isl.net.mx/paso1.gif

This object has an antialiased border to integrate smootely with the background.

If I remove the background using selection tools in Gimp I will get a result

like this:

http://www.isl.net.mx/paso2.gif

Wich is the result of antialiasing effect, and if I remove the purple color,

there is no way to remove it completely, some of it will stay:

http://www.isl.net.mx/paso3.gif

I investigated and found that antialising effect changes Alpha values of the

pixels, so if I place any background backward, the object will adapt to the background smoothely. Unfortunately, I already have background on my photos and the object together in the image and I need to do the reverse, I have to

separate the object from the background, so I need to do something with the alpha values of the border pixels, right now they are equal to 255:

http://www.isl.net.mx/paso4.gif

How can I do with gimp to remove the purple color fully and convert the borders where the object is merging with the background into pixels that has

Alpha values over yellow color instead of plain orange color ?

Thanks in advance. Nikolai

Hago Ziegler
2002-04-10 21:38:48 UTC (over 19 years ago)

Separating objects from the background

Nikolai Vladychevski wrote:

....if I remove the purple
color, there is no way to remove it completely, some of it will stay...

This simple purple-orange is easy to divide. You can use /filters/colors/color to transparence.

Regards Hago

Walker, Sam
2002-04-10 23:03:45 UTC (over 19 years ago)

Separating objects from the background

This is a tough task that sounds simple.

I would use Fuzzy Select tool on the background, playing with the threshold until the selection looked good. Then invert the selection, and use /Select/Shrink to unselect any extra background artifacts around the edges.
You can try the feather and antialias options with the select to blur the edges of your selection.

You might try the edge detect filters. Then using the Image/Colors/Levels tools to isolate the strong edges. Then use the resulting image with the Fuzzy Select or as a mask/channel.

Either way some hand editting is involved. I doubt there is a quick and easy technique. If there is, I'd sure be interested to know how.

Regards, Sam

-----Original Message----- From: Nikolai Vladychevski [mailto:niko@isl.net.mx] Sent: Wednesday, April 10, 2002 12:31 PM To: Cruz, John J
Cc: gimp-user@lists.xcf.berkeley.edu Subject: [Gimp-user] Re: Separating objects from the background

Cruz, John J writes:

Have you tried installing a border around the object of a color of your choosing and making certain that the border is up-front?

jjc

but the problem is I have not object yet to produce its border. The oval was

just an example, I have a lot of photos of products here and all have background that I want to remove cleanly and fast, without doing pixel-by-pixel art ...

-----Original Message-----
From: Nikolai Vladychevski [mailto:niko@isl.net.mx] Sent: Wednesday, April 10, 2002 12:15 PM To: gimp-user@lists.xcf.berkeley.edu Subject: [Gimp-user] Separating objects from the background

Hello,

I will have to redesign a site (shopping site) with white background color

and since the actual site uses photos of the product with the some backgrounds (black, gray ... all monotone colors) I will have to remove it

and I don't know how to do this properly.

Lets say I have an example like this, an yellow oval shape over purple background:

http://www.isl.net.mx/paso1.gif

This object has an antialiased border to integrate smootely with the background.

If I remove the background using selection tools in Gimp I will get a

result

like this:

http://www.isl.net.mx/paso2.gif

Wich is the result of antialiasing effect, and if I remove the purple

color,

there is no way to remove it completely, some of it will stay:

http://www.isl.net.mx/paso3.gif

I investigated and found that antialising effect changes Alpha values of

the

pixels, so if I place any background backward, the object will adapt to

the

background smoothely. Unfortunately, I already have background on my

photos

and the object together in the image and I need to do the reverse, I have

to

separate the object from the background, so I need to do something with

the

alpha values of the border pixels, right now they are equal to 255:

http://www.isl.net.mx/paso4.gif

How can I do with gimp to remove the purple color fully and convert the borders where the object is merging with the background into pixels that

has

Alpha values over yellow color instead of plain orange color ?

Thanks in advance. Nikolai

Jacob Meuser
2002-04-10 23:20:59 UTC (over 19 years ago)

Separating objects from the background

On Wed, Apr 10, 2002 at 04:03:45PM -0500, Walker, Sam wrote:

This is a tough task that sounds simple.

I would use Fuzzy Select tool on the background, playing with the threshold until the selection looked good. Then invert the selection, and use /Select/Shrink to unselect any extra background artifacts around the edges.
You can try the feather and antialias options with the select to blur the edges of your selection.

You might try the edge detect filters. Then using the Image/Colors/Levels tools to isolate the strong edges. Then use the resulting image with the Fuzzy Select or as a mask/channel.

Either way some hand editting is involved. I doubt there is a quick and easy technique. If there is, I'd sure be interested to know how.

As would I. We deal with pictures of glass art. We make the background black. The clear glass on the outside of curves is hard to preserve while completely eliminating the background. Maybe I haven't played with the edge detect filters enough ...

--