Skip to content

Commit

Permalink
sprawko
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.faderski committed Jun 5, 2016
1 parent df66334 commit 8d87c6e
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion close_reconstruction.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

dilated_image = dilate(image, se);

opened_image = erosion_recontruction(dilated_image, image, se, 3);
opened_image = erosion_reconstruction(dilated_image, image, se, 3);

end
Binary file modified images/Sprawozdanie.odt
Binary file not shown.
Binary file added images/otwarcie_rekonstrukcja_wynik.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/rekonstrukcja.jpg
Binary file not shown.
File renamed without changes
Binary file added images/rekonstrukcja_erozja_wynik.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/znacznik_shapes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions main.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,24 @@

reconstructed = dilation_recontruction(marker, mask, se, 30);
figure('Name', 'dilation reconstruction');
imwrite(reconstructed, 'rekonstrukcja_dylacja.png');
imwrite(reconstructed, 'rekonstrukcja_dylacja_wynik.png');

%rekonstrukcja przez erozję -- operacja trwa około 40 min !!!
mask = imread('images/shapes.jpg');
marker = imread('images/znacznik_shapes.png');

reconstructed = erosion_reconstruction(marker, mask, se, 35);
figure('Name', 'erosion reconstruction');
imwrite(reconstructed, 'rekonstrukcja_erozja.png');
imwrite(reconstructed, 'rekonstrukcja_erozja_wynik.png');

% otwarcie przez rekonstrukcję
opened_image = open_reconstruction(image, se);
figure('Name', 'open reconstruction');
imwrite(opened_image, 'open_reconstruction.png');
imwrite(opened_image, 'otwarcie_rekonstrukcja_wynik.png');

% zamknięcie przez rekonstrukcję
closed_image = close_reconstruction(image, se);
figure('Name', 'close reconstruction');
imwrite(opened_image, 'close_reconstruction.png');
imwrite(closed_image, 'zamkniecie_rekonstrukcja_wynik.png');


31 changes: 29 additions & 2 deletions main_hsv.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image = imread('images/kwiaty.png');
primage = imread('images/kwiaty.png');
image = rgb2hsv(image);

%se:
Expand Down Expand Up @@ -65,4 +65,31 @@
figure('Name', 'bottom hat');
bottom_hat_image = hsv2rgb(bottom_hat_image);
imshow(bottom_hat_image);
imwrite(bottom_hat_image, 'wynik_hsv_bottom_hat.png');
imwrite(bottom_hat_image, 'wynik_hsv_bottom_hat.png');


%rekonstrukcja przez dylację -- operacja trwa około 15 min !!!
mask = imread('images/paski.png');
marker = imread('images/znacznik.png');

reconstructed = dilation_recontruction(marker, mask, se, 30);
figure('Name', 'dilation reconstruction');
imwrite(reconstructed, 'rekonstrukcja_dylacja_wynik.png');

%rekonstrukcja przez erozję -- operacja trwa około 40 min !!!
mask = imread('images/shapes.jpg');
marker = imread('images/znacznik_shapes.png');

reconstructed = erosion_reconstruction(marker, mask, se, 35);
figure('Name', 'erosion reconstruction');
imwrite(reconstructed, 'rekonstrukcja_erozja_wynik.png');

% otwarcie przez rekonstrukcję
opened_image = open_reconstruction(image, se);
figure('Name', 'open reconstruction');
imwrite(opened_image, 'otwarcie_rekonstrukcja_wynik.png');

% zamknięcie przez rekonstrukcję
closed_image = close_reconstruction(image, se);
figure('Name', 'close reconstruction');
imwrite(opened_image, 'zamkniecie_rekonstrukcja_wynik.png');
Binary file added zamkniecie_rekonstrukcja_wynik.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8d87c6e

Please sign in to comment.