Here is an example of a clustering method used for image segmentation. Here the distance criterion used is the absolute value of the distance between the pixel values. Pixels and their neighbors are chosen from a four point neighborhood and then evaluated for their distances. By adjusting the threshold used to connect pixels, different levels of segmentation are achieved. Here are some results for this algorithm using a simple image.
- Original.png
Original Image
- Low.png
Low distance threshold: 27,654 connected sets, 36 shown
- Med.png
Medium distance threshold: 16,747 connected sets, 41 shown
- High.png
High distance threshold: 11,192 connected sets, 23 shown
Here we notice that as the threshold is increased, the criteria for merging regions becomes looser and the amount of regions starts to shrink.
The following link provides a precise definition for this algorithm. Image Segmentation Lab