Piecewise Planar Segmentation for Automatic Scene Modeling