Breaks an image into regions of contiguous pixels.