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!