Image Segmentation
Date: October 17, 2024
Lecture Duration: 2.5 hours
Topic Overview: This lecture introduces image segmentation, the process of partitioning an image into multiple meaningful regions or objects. We move beyond simple edge detection to group pixels based on similarities in color, intensity, and texture using classic computer vision algorithms.
1. Region Merging (Agglomerative Clustering)
We started with a bottom-up approach to segmentation: region merging.
- Agglomerative Clustering: We treated each pixel as an individual cluster and successively merged neighboring clusters based on color or intensity similarity.
2. Watershed Algorithm
We explored a topographical approach to segmentation.
- Catchment Basins: The algorithm treats image intensity as elevation and simulates flooding from local minima to find boundaries where different regions meet. This is particularly useful for separating touching or overlapping objects.
3. Graph-Based Segmentation
We formulated the segmentation problem as a graph partitioning problem, where pixels are nodes and edge weights represent pixel similarity.
- SLIC Superpixels: To make graph algorithms computationally feasible, we first grouped pixels into spatially contiguous and color-consistent superpixels.
- Normalized Cuts: Instead of simply finding the minimum cut, we used the Normalized Cut algorithm to balance total dissimilarity between groups against total similarity within groups.
- Mean Shift: We also touched upon density-based clustering to find modes in feature space.
Interactive Demonstration
Below is the complete Jupyter Notebook used in class. It contains Python implementations for Region Merging, Watershed Algorithm, and Graph-Based Segmentation (including SLIC, Mean Shift, and Normalized Cuts).