how to use k means
Show older comments
I have detected features of image using
I = imread('cameraman.tif');
points = detectSURFFeatures(I);
now i have to apply k means to cluster the points,plz ell how i can use k means
1 Comment
Have you tried reading the documentation? It is a good idea to start there.
doc kmeans
Answers (1)
Wayne King
on 16 May 2013
Jose-Luis has a very good suggestion.
You can use kmeans() as follows:
I = imread('cameraman.tif');
points = detectSURFFeatures(I);
% I'll assume 3 clusters
idx = kmeans(points.Location,3);
1 Comment
nkumar
on 16 May 2013
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!