Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.46 KB | None | 0 0
  1. clc
  2. clear all
  3. close all
  4. A=imread('first.jpg');
  5. IG=rgb2gray(A);
  6. %Primera
  7. B=strel('disk',10);
  8. C=imclose(IG,B);
  9. E=imopen(C,B);
  10. %Segunda
  11. B2=strel('disk',50);
  12. C2=imclose(IG,B2);
  13. E2=imopen(C2,B2);
  14. %Tercera
  15. B3=strel('disk',100);
  16. C3=imclose(IG,B3);
  17. E3=imopen(C3,B3);
  18. %Plot
  19. subplot(2,2,1)
  20. imshow(IG)
  21. title('Original')
  22. subplot(2,2,2)
  23. imshow(E)
  24. title('Primera')
  25. subplot(2,2,3)
  26. imshow(E2)
  27. title('Segunda')
  28. subplot(2,2,4)
  29. imshow(E3)
  30. title('Tercera')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement