Image Segmentation: Mean Shift & Normalized Cut
Presentation of two image segmentation techniques

Mean Shift
The Mean Shift algorithm is a non-parametric technique whose aim is to find local maxima in a high-dimensional data distribution without computing the latter. Therefore, the main issue is how to efficiently estimate a density function given a set of samples.
The simpliest way is to smooth the data. A common technique to smooth data is to compute a kernel density estimation
where
However,

It has been proven that this algorithm converges if the kernel
In image segmentation, mean shift algorithm is generally used taking into account spatial coordinates and color of pixels, as with the bilateral filter, through a kernel of the form:
where
Normalized Cut
The Normalized Cut algorithm is an efficient way to segment an image. This algorithm is based on a graph representation of the image: pixels are vertices and weights (edges) depend on the image (brightness, intensity, distance or whatever can be useful to segment the image). The vertices could be just a subset of pixels like points of interest.
Once the graph is computed, the problem is to cut vertices into two disjoint subsets
where
It has been proven in reference 1 that the normalized cut is equivalent to find the eigenvector with the second smallest eigenvalue for:
where, if
Our results:
We decided to test this algorithm. Firstly, we worked on a set of points in
- How can we make efficiently (in Python) the graph from the image?
- How can we speed up the algorithm (because the complexity is
where , for a image)?
To solve the first issue, we decided to make a graph only based on colors, i.e.
![]() |
![]() |
![]() |
References
-
Shi, J., & Malik, J. (2000). Normalized cuts and image segmentation. IEEE Transactions on pattern analysis and machine intelligence, 22(8), 888-905.
-
Szeliski, R. (2010). Computer vision: algorithms and applications. Springer Science & Business Media.