Analiza i przetwarzanie obrazów
W. 6
I.)Projekt 1
L1=imread('circuit.tif')
figure; imshow(L1)
[M,N]=size(L1)
figure; mesh(L1)
figure; mesh(double(L1));
II.)Projekt 2
L1=imread('circuit.tif')
figure; imshow(L1)
L2=L1>90;
L3=bwlabel(L2);
figure; mesh(double(L3))
for i=1:max(L3(:))
L4=(L3==i);
Imshow(L4);
title(mat2str(i));
pause;
end
III.)Projekt 3
L1= imread('circuit.tif')
figure; imshow(L1)
L2=L1>90;
%[M,N]=size(L1)
%figure; mesh(double(L2))
figure;imshow(L2)
L3=bwlabel(L2);
figure; mesh(double(L3))
figure; imshow(L3,[]);
[x,y]=ginput(L2);
L4=(L3==L3(round(y),round(x)));
imshow(L4);
title(['indeks=',mat2str(in),'Pole=',mat])
p=sum(L4(:));
IV.)Projekt 4
L1= imread('circuit.tif')
figure; imshow(L1)
figure;plot(L1(:,20))
xlabel('x')
ylabel('y')
V.)Projekt 5
L1= imread('circuit.tif')
figure; imshow(L1)
[M,N]=size(L1)
t=0:(1/(N-1)):1
y=round(40*sin(t*2*pi)+41);
for i=1:N
L1(y(i):end,i)=L1(1:(end - y(i) + 1),i);
end
figure; imshow(L1)
VI.)Projekt 6
L1= imread('circuit.tif')
figure; imshow(L1)
[M,N]=size(L1)
t=0:(1/(N-1)):1
y=round(40*sin(t*2*pi)+41);
for i=1:10
L2=L1;
for i=1:N
L1(y(i):end,i)=L2(1:(end - y(i) + 1),i);
end
end
y=y(2:end),y(1);
imshow(L2);
pause(0.1)