Large Scale Dense 3D Reconstruction via Sparse Representations