how do i use kmeans clustering??

im loading a pic onion.png and using function kmeans(x,k) i assigned k=5. now problem is that i cant find what 'x' is and how to use it? never used matlab so dont know how to use the functions

댓글 수: 8

Walter Roberson
Walter Roberson 2012년 11월 21일
Please show your code and describe more specifically "still having problem"
Laila Hayat
Laila Hayat 2012년 11월 22일
im loading a pic onion.png and using function kmeans(x,k) i assigned k=5. now problem is that i cant find what 'x' is and how to use it? never used matlab so dont know how to use the function
Walter Roberson
Walter Roberson 2012년 11월 22일
What aspect of the picture do you wish to cluster on ?
Laila Hayat
Laila Hayat 2012년 11월 26일
1. You need to load the image ‘onion.png’ 2. Select K=5 and use Matalb function kmeans to find 5 clusters in the given image (on the basis of color). 3. Assign the colors Red, Green, Blue, Yellow and Black to each of the 5 generated classes. 4. Your result may not necessarily correspond to the actual desirable segmentation of the given image. above is the task that i have to perform
Laila Hayat
Laila Hayat 2012년 11월 26일
onion.png is a coloured image
Daniel Shub
Daniel Shub 2012년 11월 26일
Please show your work so far.
Laila Hayat
Laila Hayat 2012년 11월 26일
a=imread('onion.png'); imshow(a); ab=double(a); cluster=kmeans(ab, 5); finalImage=reshape(cluster ,5); figure, imagesc(finalImage)
Laila Hayat
Laila Hayat 2012년 11월 26일
code i wrote till now

답변 (0개)

이 질문은 마감되었습니다.

태그

질문:

2012년 11월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by