error in kmeans
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Wayne King
2012 年 2 月 25 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!