KDOXG

criacao_mask

Nov 24th, 2020
636
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I = imread("lena_cinza.bmp");
  2.  
  3. white = ones(size(I));          #Cria templates totalmente brancos e pretos pra poder inserir as formas geometricas em cima
  4. black = zeros(size(I));
  5.  
  6. filtro1 = circle(black,1,columns(black)/2,rows(black)/2,150);       #Implementacao da funcao circle aqui: https://pastebin.com/LmykJrii
  7. imshow(filtro1);
  8. imwrite(filtro1,"filtro1.png");
  9.  
  10. filtro2 = circle(white,0,columns(white)/2,rows(white)/2,10);
  11. imshow(filtro2)
  12. imwrite(filtro2,"filtro2.png");
  13.  
  14. filtro3 = circle(white,0,columns(white)/2,rows(white)/2,150);
  15. filtro3 = circle(filtro3,1,columns(white)/2,rows(white)/2,75);
  16. imshow(filtro3);
  17. imwrite(filtro3,"filtro3.png");
  18.  
  19. filtro4 = circle(black,1,columns(black)/2,rows(black)/2,150);
  20. filtro4 = circle(filtro4,0,columns(black)/2,rows(black)/2,75);
  21. imshow(filtro4);
  22. imwrite(filtro4,"filtro4.png");
  23.  
  24. filtro5 = white;
  25. filtro5((256-15):(256+15),:) = 0;
  26. filtro5 = circle(filtro5,1,columns(filtro5)/2,rows(filtro5)/2,15);
  27. imshow(filtro5)
  28. imwrite(filtro5,"filtro5.png");
  29.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×