DIP Assignment 6
DIP Assignment 6
Assignment 6
Submitted by:
Student Name: Syed Saad Ali Shah
Code:
img = getimage(handles.axes1);
s = str2double(get(handles.meank,'string'));
axes(handles.axes1); imshow(img);
title('Original');
axes(handles.axes2); imshow(label2rgb(means3));
title([num2str(s),' - Mean'])
Output:
Region Growing Clustering
Code:
imgg = getimage(handles.axes1);
th = str2double(get(handles.threshold,'string'));
sp = str2double(get(handles.seedpoints,'string'));
img = rgb2gray(imgg);
smoothed = medfilt2(img);
pp = medfilt2(g);
axes(handles.axes2); imshow(smoothed);
%title("Smooth");
axes(handles.axes3); imshow(g);
f = double(f);
if numel(S) == 1
SI = f == S;
S1 = S;
else
J = find(SI);
S1 = f(J);
end
TI = false(size(f));
for K = 1:length(S1)
seedvalue = S1(K);
TI = TI | S;
end
Output: