7

I am having hard time removing background from this image. I tried using Magic Eraser and also Background eraser tool. Both of these do not work perfectly.

The reason could be the fact that lower portion of this bottle is of glass and it "blends" with the surrounding.

Is there an easier way to remove background in such cases?

enter image description here

  • 2
    Did you take the photo? – e100 Nov 21 '11 at 15:50
  • The reason I ask is that a 'greenscreen' technique - taking the photo against a coloured background - should make extraction more straightforward. – e100 Nov 22 '11 at 14:28
  • av.adobe.com/russellbrown/iStockGlassMask_SM.mov Adobe tut..it would help you really. :) cheers – arundesign Apr 16 '13 at 4:58
10

The way I deal with glass is to cut out the glass section using the polygonal select tool and remove it to its own layer. From there I drop the opacity in layers panel to 20% and bump up the exposure buy a little, drop the offset by quite a lot and increase gamma correction quite a bit too. This give a nice transparent effect which isn't perfect but is usually good enough.

Example, original on left, altered on right:

enter image description here

  • 5
    In a case like this, changing the blend mode of the glass to Overlay works very well. Adjust it first using Levels until the grey background is exactly RGB 128,128,128 and the grey will disappear completely. – Alan Gilbertson Nov 21 '11 at 21:57
6

use Scott Brown's enhanced method: instead of dropping opacity of "glass" layer, play with its blend modes and levels. hard light seems to work well

enter image description here

1

There's no easy way to do this. At best, you could carefully erase the entire background from the edges of the images via various tools, but as you state, since it's glass, you'll still see the background color behind the glass, which will likely look funny if you then place this image on any other background.

1

Copy the image to a new layer. I find it easier to turn off the original layer, also, while I work.

With the new layer picked, go to IMAGE/ADJUSTMENTS/LEVELS. Adjust the sliders to get the most contrast you can get in the image. I could get every edge except some of the right lower edge of the bottle to have pretty defined edges.

Using the magic wand, select and remove everything you can without running into the bottle. After that, zoom in and clean up with the eraser. Once you are satisfied, select the white area you created, maybe put a very small feather on the edge, turn on and select your original layer, and hit DEL.

Voila.

1

Most usual methods have the following drawbacks:

  • The glass seems milky or smoky
  • Forgotten totally that glass affects to the background like a bizarre lens

Check the following and go on reading, if interested:

Bottle on the background

This method covers milkiness, smokiness and effect to the background.

The starting point is same: A photo of the bottle taken against homogenous greyish background and adjusted for good and realistic contrast & colour.

First steps also are same: Remove the background outside the bottle by using available tools. Separate the transparent parts (=glass) and opague parts (=the cap) to two different layers, the cap to the foreground. Actually there is no need to delete the cap from the glass layer, because it will be hidden.

Background removal can be a challenge, because there is little contrast on many places at the border of the glass. If you feel comfort with clipping paths or lasso tools, then there's no problem. Making a high contrast copy of the glass layer to the foreground helps.

After removing the background outside the bottle and separating the layers, desaturate the glass layer. If the glass is coloured, desaturate it anyway. You can recolorize it later.

Make a copy of the glass layer. Rename it as "Patterns".

Make to the background a new, flat mid-grey layer. This will be the reference. PhotoShop's chessboard is no good for reliable adjustments. Rename it as "Reference"

Now you should have the following sandwich of layers:

  • Cap
  • Patterns (=a copy of Glass)
  • Glass (= glass parts, desaturated)
  • Reference

Select layer Patterns and take the Curves tool. Deform the luminosity curve until you have created a high, exaggerated contrast. The darkest parts should be black or nearly black and the gloss should be full white. Between then there are several shades of grey.

Select all glossy white areas by using magic wand or "select by colour". Copy the glossy areas into the clipboard and paste them as a new layer just under the layer Cap. Use paste special/paste in place to avoid any shift.

Now your layers are:

  • Cap
  • Gloss
  • Patterns
  • Glass
  • Reference

Make layers "Patterns" and "Glass" transparent by decreasing their opacity. Proper opacity values to start are about 10 %. Adjust the precense of the glass by adjusting the opacity of Patterns. Adjust the general transparency of the glass by adjusting the opacity of Glass.

If the glass should be milky or smokey, then increase the opacity . Or, should it be clear, then decrease the opacity even to 0%. Adjust the brightness of layer Glass to reach the wanted shade of milkiness or smokiness. If the glass material is colored, then you must colorize layer Glass.

The opacity of layer Gloss must be decreased, if the bottle is not wanted to look out as staying in bright light.

If you have the final new background, then insert it as a new layer under Glass. Proper opacity values can be can be found more accurately.

Some dark areas in Patterns may look out too offensive, but the opacity cannot be smaller because the general precense suffers. In that case use Eraser in 30 % mode to thin the offending areas.

Remove layer Reference when it's not needed . The next step is to generate the lens effect of the glass. It can be done only to the final new background.

Inset the new background, go to layer Glass and select all glass parts of the bottle. With that selection you can modify the background.

Go to the background layer. If you are a genius, you can create the lens effect by tastefully using tools Smudge and Warp. Less talented geezers, like me, must stick with heavy faking. Believe, some preset distortion effect in PhotoShop, for example "Spherize" is often enough. Apply it to the selected area of the background and you're done! The full mathematical falsity does not prevent the right illusion.

Need a shadow? Try a slightly blurred drop shadow, if needed. Erase a great part of it to prevent the glass seem smoky.

0

In previous versions of Photoshop there was an extract tool. Now you can use the 'Quick Selection' tool and 'Refine Edge'. Because your image is close to the background you can only do so much with the quick selection tool. So select the 'Refine Edge' option and first change the 'View Mode' to show on black. Then check the 'Smart Radius' and adjust the value, all time view your image to check if you're improving or not really having an effect! You can then use the 'Refine Radius' tool to paint over the edges you wish to subtract. Again in this image I think you might need to use the Pen tool and improve the lines.

HTH.

0

If you are using Photoshop, then hope to get a better solution here. You could try Color Range function. He used to take the Color Range to earn it https://www.quora.com/How-can-I-remove-a-background-from-a-transparent-object-in-Photoshop

Note: That was my mistake that I wrongly gave another link. But here the full use of the "color range" is shown that I was mentioned before (unfortunately post has been deleted) From where we can get a better solution.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.