Image segmentation refers to the partitioning of an image into distinct regions or categories, with each region containing pixels with similar attributes and each pixel in an image being allocated to one of these categories.
Image segmentation is usually done to simplify the representation of an image into segments that are more meaningful and easier to analyze. If segmentation is done well, then all other stages in image analysis are made simpler, which means that the quality and reliability of segmentation dictates whether the analysis of an image will be successful. But to partition an image into correct segments is often a very challenging problem.
In this chapter, we will look at the following recipes:
- Thresholding with Otsu and Riddler–Calvard
- Image segmentation with self-organizing maps
- RandomWalk segmentation with scikit-image
- Skin color segmentation...