OK, so this is depth estimation from a single image, right? Like this classic paper.[1] Then that's used to turn the image into a set of layers. This is often done for video; that's how 2D movies are turned into 3D movies.
[1] http://www.cs.cornell.edu/~asaxena/learningdepth/ijcv_monocu...