show ouput clustering images
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello
I = imread('flowers','jpg');
I = im2double(I);
HSV = rgb2hsv(I);
H = HSV(:,:,1); H = H(:);
S = HSV(:,:,2); S = S(:);
V = HSV(:,:,3); V = V(:);
HH=[H S V];
idx = kmeans(HH, 4);
how i show output ?
Thanks.
댓글 수: 0
답변 (1개)
Image Analyst
2014년 3월 17일
rgb2ind() will do cluster analysis of rgb images.
댓글 수: 2
Image Analyst
2016년 7월 16일
rgb2ind() does the clustering itself using a variety of methods. You don't need to use kmeans afterwards, though you can use kmeans instead if you want to do it in HSV color space instead of rgb space.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!