Efficiently segmenting images with dominant sets