Color Clustering for Object Detection

This code will perform Color Clustering on input image.
56 Downloads
Updated 21 Nov 2021

View License

% I = imread function to read an image from storage
% And using imshow function display the image on which
% color clustering and object detection is to be
% performed.
% For input k = [1 2 3 4 5 6] , K-means clustering is performed on input image
% For performing k = 6 iterations one for loop is
% used.
% To perform K means clustering based image
% segmentation imsegkmeans function is used to get
% the centers of each cluster and indexes of each
% cluster.
% To reshape the array from column to an M*N matrix, % reshape function is used.
% To show it as a color cluster image, labeloverlay
% function is used.
% For each k = ith value color clustering is being
% performed on the image and is being displayed using % imshow function for each ith iteration

Cite As

Samiran Deori (2024). Color Clustering for Object Detection (https://www.mathworks.com/matlabcentral/fileexchange/102449-color-clustering-for-object-detection), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.1

Updated the uploaded images

1.0.0