A graph-cut approach to image segmentation using an affinity graph based on ℓ0-sparse representation of features