Segmentation as Maximum-Weight Independent Set