"In this tutorial, we’re going to look at creating a 3D depth matte from Real footage. We’ll matchmove the footage with The Foundry’s plug-in CameraTracker, and create 3D layers that match the Footage to get a '3D model' of the scene. Then you will learn what you can do with this depth matte after you create it; create realistic fog, fake DOF and a rotoscoped matte."
Related techniques can be found in After Effects Rack Focus: tutorial and preset and with the Digieffects Depth Cue plug-ins and tutorials noted in Sharpen Depth of Field with One Click (there's many more at Digieffects). Here's a preview Jorrit's work: