what is mean of label1,label2,.......
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!