A superpixel can be defined as a group of pixels that share common characteristics (like pixel intensity ). Superpixels are becoming useful in many Computer Vision and Image processing algorithms like Image Segmentation, Semantic labeling, Object detection and tracking etc because of the following-
- They carry more information than pixels.
- Superpixels have a perceptual meaning since pixels belonging to a given superpixel share similar visual properties.
- They provide a convenient and compact representation of images that can be very useful for computationally demanding problems.
This project aims to generate superpixels from the MSRCv1 dataset. We implement superpixel clustering in the following ways :
- KMeans clustering algorithm in the three dimensional RGB space.
- KMeans clustering algorithm in the five dimensional RGB and XY space.
- Weighted KMeans algorithm with different weights for RGB and XY for each image.
a) Original Image b) RGBXY clustering : Pixelwise class plot c) RGBXY clustering : Superpixel plot
-
Implementing the SLIC algorithm for improved superpixel generation.
-
Enforcing connectivity by assigning small superpixels to its nearest cluster.
a) Original Image b) SLIC clustering with enforced connectivity: Pixelwise class plot c) SLIC clustering with enforced connectivity : Superpixel plot
Further details and the code can be found here.