1
0
mirror of https://github.com/2martens/uni.git synced 2026-05-07 03:46:25 +02:00
Files
uni/bv/uebung4.m
2016-11-16 13:56:25 +01:00

18 lines
488 B
Matlab

% 2.
fingerprint = imread('fingerprint.png');
rec = strel('rectangle', [2 2]);
lin = strel('line', 4, 0);
opened = imopen(fingerprint, rec);
opened2 = imopen(opened, lin);
figure (1), imshow(fingerprint);
figure (2), imshow(opened);
figure (3), imshow(opened2);
% 3.
img = logical([1 0 0 0 1 1 1 0 1 1]);
se = strel('line', 3, 0);
dilated_img = imdilate(img, se);
eroded_img = imerode(img, se);
%figure (4), imshow(img);
%figure (5), imshow(dilated_img);
%figure (6), imshow(eroded_img);