Previously, previously, previously, previously, previously.
I know I've seen a similar demo wherein 3D objects were added to a photograph after 3D elements and lighting within the image were marked out, but damned if I can find it again.
Rendering Synthetic Objects into Legacy Photographs
That's the one! I checked the Previously links below the list before commenting, and didn't find it there (where it's now the first link; whether I overlooked it or it retconned in, I can't say. :)
Retcon. I'd forgotten about that.
There was a startup spawned out of Avid called Synapix (back around 1998 or so) that did this sort of thing. It wasn't a success but it gave good demo.