I want to blend this image dynamically over a background. So, I want to extract it as a PNG with transparency.

I photographed the ship-in-a-bottle on a surface that is roughly the colour of the background I want to blend onto, so it doesn't need to be absolutely perfect (the transparency would be very difficult, but I'm not going to worry about that!

The part I'm interested in is the shadow. Does anyone have any good ideas of how to extract it as a flat-ish colour with all the detail in the alpha channel? So that the shadow should work over basically any other surface? It would be nice to retain detail in the shadow, but not too much of the detail from the grain off the stone that it was photographed on.

My best bet right now:

• Roughly cut it out of the background
• Desaturate, ramp up brightness/contrast to create a black/white image that can be used as a mask
• Use this mask on the original image again to retain the colouring of the shadow
• Play with the colouring until it looks correct over various textures.

Problem is, I'm not sure this will retain the quality from the original image. It would also be nice to retain some of the bright refracted light as well as the shadow!

I'm using Photoshop CS3.

• +1 for just photographing something you want the image of instead of agonizing over how to create it properly. – Lauren Ipsum May 27 '12 at 13:10
• Can you photograph it again? Shooting it on an odd color background, like a piece of fluorescent construction paper (pink or green) would make extraction 10000 times easier because you could use the color as a key. Basically, like a green screen extraction. – Scott May 27 '12 at 17:02
• That's a good idea. Never tried green-screening before. I photographed it on that surface because it's close to the colour of sand, which I'm compositing onto (dynamically). But using a colour key could work nicely... – Joseph Humfrey May 27 '12 at 17:45
• But what kind of ship name is "Etagerf" ? – Joonas May 28 '12 at 11:24

The tool you need is Select > Color Range, which is like the Paint.Net "Color to Alpha" Drakel refers to, only on steroids and with a great deal more flexibility. Even with the super-compressed image posted here, I was able to get this far in a couple of minutes using Select > Color Range with Range restricted and Localized Color Clusters turned on, followed by a little bit of clean-up on the outer parts of the mask with a black brush. On the high resolution original this would be a lot easier.