A Multi-Layer Representation for Surface Segmentation Through Energy Minimization