error in kmeans
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have 10 images i tried using
[IDX,C] = kmeans(I,10)
but i get error
Class of operand is not supported.
please help
for x = 1:length(dirlist)
I = (imread([pathname, dirlist(x).name]));
I=rgb2gray(I);
I =imresize(I ,[512 512]);
size(I);
[IDX,C] = kmeans(I,10)
0 Commenti
Risposte (1)
Wayne King
il 25 Feb 2012
What version of MATLAB are you using? Are you sure you are using a MathWorks' version of kmeans.m? If you enter:
>>which kmeans
what do you get returned? Is it something like:
toolbox\stats\stats\kmeans.m
At any rate, try:
[IDX,C] = kmeans(double(I),10);
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!