1/21
Image Processing & Pattern Recognition Image Segmentation and Clustering Part 2: Clustering
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
clustering
grouping together similar points and representing them with a single token
uses and application for clustering
uses: for tasks like segmentation in image processing (grouping pixels based on intensity, color, texture)
applications: object detection, image segmentation and compression
criteria for forming clusters
intensity (grouping pixels w similar brightness or grayscale values)
color ( grouping pixels w similar color values )
texture (grouping pixels based on patterns or surface characteristics)
goal for k-means clustering
partition data into k clusters by finding k representative centers.
k-means clustering steps
initialize k clusters at random
assign data point to nearest cluster center
update each cluster center w the mean of the points assigned to it
repeat 2nd and 3rd steps till cluster centers stabilize
goal of clustering in image segmentation
group pixels into clusters based on similarity in intensity, color, texture, or other features
how does k-means clustering segment an image
by grouping pixels into k-clusters where each pixel is assigned to the nearest cluster center based on intensity or other features
impact of choosing k in k-means clustering
a large k produces more detailed segmentation, while a smaller k creates coarser segmentation
feature space for clustering based on intensity
1-dimensional space where each pixel is represented by its intensity value
what is the feature space for clustering based on color similarity
a 3-dimensional space representing RGB (or other color channels) where each pixel’s coordinates are its color values
how does clustering based on texture similarity work?
it uses filter responses to represent each pixel in a high-dimensional feature space
why might intensity alone not be sufficient for segmentation
pixels w the same intensity but different locations (e.g. two black areas) may belong to different segments.
how does combining intensity and position improve segmentation
by adding x, y coordinates to the feature space, clusters can be formed based on spatial proximity as well as intensity
pros of k means clustering
simple and fast
easy to implement
converges to local minimum of within cluster squared error
cons of k means clustering
specifying k
sensitive to initial centers
sensitive to outliers
detects spherical clusters only
mean shift clustering
clustering technique that improves upon K means by:
not requiring k in advance
handling arbitrary cluster shapes
being robust to initialization
what are the main limitations of K means that mean shift addresses
k means requires the number of clusters(k) in advance
k means is sensitive to initialization
k means cannot handle non-spherical clusters effectively
key steps in the mean shift clustering algorithm
center a window on a data point
identify all points within the window and compute their mean
shift the window to the mean location
repeat steps 2-3 until convergence
what happens after convergence in mean shift clustering
each centroid represents a cluster
assign all data points to the nearest centroid to finalize the clusters
merge centroids that converge very close to each other (optionally)
how does mean shift define cluster shape and size
by the window size(h):
a larger window results in fewer cluster
a smaller window captures finer details and more clusters
key strength of mean shift
versatile and can handle clusters of arbitrary shapes and sizes without needing to specify the number of clusters(k)
mean shift strengths and weaknesses