As I promised I'm posting tutorial about compositing my glasses image.
First when I read topic subject I told myself that anything I post won't be valuable until I solve shadows issue. First I came out with typical 3 light setup. I chosed coloured lights behind because I think that coloured light give impression of natural lighting, and impression of realism. If you have textured or bumpmapped object coloured light greatly reveals its structure, so it's worth to use. Statement two - all shadows have to be soft (like in real world is) no matter how long it will take to render it. Three - avoid use of saturated colours, especially with pure diffuse shader.
As you can see I rendered image four times:
1. normal render (lenses, rims, shadow)
2. rims with shadow
4. render of lenses and rims without shadows
I created two masks that will be useful in making shadows transparent:
5. 1 + 2 with difference merging mode
explaination: brighter parts indicates places where image 1 differs from image 2 (parts where lenses with their shadows are)
6. 2 + 3 with difference merging mode
explaination: brighter parts indicates places where image 2 differs from image 3 (place where rims and rims' shadows are)
How can 5 and 6 be helpful?
7. 1 + (4 with 5 as alpha channel)
explaination: in places where 5 has brighter parts 4 will cover 1 (we're replacing parts where shadows, refracted shadows and reflected shadows are with image which does not have shadows in those places)
8. 1 + (4 with INVERTED 6 as alpha channel)
explaination: in places where 6 has darker parts 4 will cover 1 (we're replacing everything except rims, rims' shadows and reflections of shadows in rims)
I noticed lack of reflections so I had to add additional layer with reflections (in additive blending mode)
9. Layer contains reflections only, so set all your non reflective and non refractive (diffuse) objects to pure black (no diffuse, no ambient). Throw out all of your lights from the scene. Add objects that became reflected (material set to white diffuse > 1, emitter > 1). Put on background some colour (grayscale can be too) or image in PANORAMA mode (preferably stretched). Hit render.
10. I don't know which method (7 or 8 ) is more physically correct, so I mixed both images (7 and 8 ) in normal blending mode to achieve appealing effect. I put 9 - reflection over it with blending mode set to additive.
11. I overlayed (horizontally or diagonally) some colour and greyscale gradients (with different blending modes and rather low opacity) as well as texture (real photos are never that soft as renders).
12. I faked depth of field. To do it create duplicate of your image, blur it with one of available in your app blur or smoothing filters, if you don't wan't to make another rendering (of scene depth) you can use as a mask for your layer simple gradient. Then I added a little amount of noise (actually texture could be added at this point not in 11). Last step was contrast and colour correction (I used levels, but any tool seems to work here).
I have to explain more things here. I didn't tell at which point I merged layers, changed contrast and colours, what exact blending modes I used in some steps. I think this part requires a lot of experimentation, so I leave it to you
EDIT: Some mistakes fixed