how to use k means

3 Ansichten (letzte 30 Tage)
nkumar
nkumar am 16 Mai 2013
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 Kommentar
José-Luis
José-Luis am 16 Mai 2013
Bearbeitet: José-Luis am 16 Mai 2013
Have you tried reading the documentation? It is a good idea to start there.
doc kmeans

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Wayne King
Wayne King am 16 Mai 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 Kommentar
nkumar
nkumar am 16 Mai 2013
ok wayne i have struck here
i have extracted entropyfilt feature for an image
idx = kmeans(flatImg,3);
imshow(ind2rgb(reshape(idx, size(I,1), size(I, 2)), [0 0 1; 0 .8 0;1 0 0]))
size is 256x256
can u plz tell how to apply same for idx values because i get only 182 values

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Cluster Analysis and Anomaly Detection finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by