Extracting 3D Layout from a Single Image Using Global Image Structures