A graph-based image segmentation algorithm