Wednesday 3 October 2018

post processing - How do I make a bottle image transparent?


I've taken some stock photography of lots of clear bottles, and now want to remove the background (which is white-ish, because at a pinch I could leave it...) so that the bottle becomes transparent with highlighting.


My bottles are clear with different colored liquids with multiple refraction and reflection surfaces. I am looking for a background color subtraction effect that will allow me to get to transparent (hopefully with some sort of effect/opacity slider).



Ideas that I can't pull off yet:



  • Combine layer with a color fill layer (keyed off the "transparent color") in some manner to produce some output that could be used as the starting point of a layer mask

  • Same layer combination as above, but somehow translating "pure white" to transparency.


Notes for what doesn't work (Photoshop terminology):



  • "Color Range" and delete (fuzzy select, but not graded/alpha) - results in harsh lines and only leaves the pure white and dark highlights and shadow refractions/reflections

  • Magic wand selections for the same reason

  • "Background Eraser" because although it is able to only subtract a certain color and leave "the rest", it (like all tolerance based tools) eventually hits a colour slightly outside of the range that it just won't touch.



I'll add more if I can remember what I've found



Answer



Gimp has a really nice 'Color to Alpha' feature that sounds like it does exactly what you want. It doesn't just erase one color, but tries to make things that are almost white into almost transparent. It's not perfect, but comes pretty close. Here's an example from the docs: http://docs.gimp.org/en/plug-in-colortoalpha.html


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...