what is mean of label1,label2,.......
1 view (last 30 days)
Show older comments
clear all
close all
clc
i=imread('5.jpg');
i1=rgb2gray(i);
figure(1);imshow(i)
imdata=reshape(i1,[],1);%covert into arry
imdata=double(imdata); % convert unit into double
[IDX nn]=kmeans(imdata,4); %perform Kmeans
imIDX=reshape(IDX,size(i1)); %matrix of index
figure;
subplot(2,3,1); imshow(i); title('original image');
subplot(2,3,2); imshow(imIDX,[]); title('segmented image');
subplot(2,3,3); imshow(imIDX==1,[]); title('label 1');
subplot(2,3,4); imshow(imIDX==2,[]); title('label 2');
subplot(2,3,5); imshow(imIDX==3,[]); title('label 3');
subplot(2,3,6); imshow(imIDX==4,[]); title('label 4');
0 Comments
Answers (0)
See Also
Categories
Find more on 3-D Volumetric Image Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!