I do it with luminosity masks (PS), sometimes multiple ones are needed, sometimes one is good enough, but generally the results are perfect. Duplicate your background layer. Switch to the channels palette. If overall brightness provides good separation, the overall image can be used as a mask, otherwise look for a color channel that has good separation overall or in one area. If RGB doesn't have a good one, switch to CMYK to have a looksee, you might get lucky. Drag this channel into the open circle to select the pixels based on the brightness, there is a greyscale of the image as the selection. White allows the layer through, black eliminates the effect, grey is proportional to the brightness (these are great for a number of things, they are 100% self feathering, kiss the shadows/highlight tool goodbye as a crude tool). With your new layer selected click on the open circle to add the selection as a layer mask. Now alt-click on the mask to activate it. Adjust the contrast and brightness of the mask to perfectly outline borders in black and white (areas other than the borders can be painted black or white easily). Click on image icon on the layer now to activate the image. Paint white along the border to separate from the background, if it isn't perfect, go back to the mask and make adjustments. If all areas weren't covered, flatten the image, and redo the entire process using a different channel or different rendering of the mask. There should always be adequate separation on at least one color channel for everywhere in an image for this to work, it seems meticulous, but once you get used to it, it goes quick, I've not needed more than 2 ever, but I could see applications where it has to be done over and over. If you own PS and do not know how to use luminosity masks, google it, it is a somewhat hidden feature of the program but probably the most powerful thing that it can do. The use of these masks is not possible with elements, the full PS (any version really) is needed.