1. A method comprising using at least one hardware processor to: determine a plurality of superpixels in a digital image; for each of the plurality of superpixels, identify any superpixels located within a search radius from the superpixel, and, for each unique local combination between the superpixel and any identified superpixels located within the search radius from the superpixel, determine a local score for the local combination; and identify one of a plurality of global sets of local combinations with an optimum global score based on the determined local scores.