display output clustering as image

조회 수: 1 (최근 30일)
Tomas
Tomas 2014년 3월 16일
답변: Image Analyst 2014년 3월 16일
Hello,
I want to show cluster save in cell.
binary image i show cluster
Z = cellfun(@(Z) Z', Z,'Un',0);
Z = cellfun(@(Z) cell2mat(Z), Z,'Un',0);
Z = cellfun(@(Z) sub2ind(size(I) , Z(:,1) , Z(:,2)), Z,'Un',0);
figure
cluster = zeros(size(I));
for ii = 1:length(Z)
cluster(Z{ii}) = ii;
end
imshow((cluster))
when I have a grayscale image, how i show cluster in image ?
Thanks

답변 (1개)

Image Analyst
Image Analyst 2014년 3월 16일
Try putting "hold on" and plotting the clusters
plot(x, y, 'r*', 'MarkerSize', 15);
which puts an asterisk at the location of every data point in the data set. If they're clustered, you'll see clusters of asterisks.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by