Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1.  
  2. [fname,pname]=uigetfile('*.*','Nacitanie obrazku');
  3. filename=strcat(pname,fname);
  4. [X,map]=imread(filename);
  5. KX=size(X);
  6. Kmap=size(map);
  7.  
  8. %Vytvorenie Gaussovského šumu
  9. for i=1:KX(1,1)
  10. for j=1:KX(1,2)
  11. pixel=X(i,j);
  12. Y(i,j)=round(pixel+(pixel*(rand-0.5)));
  13. end
  14. end
  15. figure, imshow(Y);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement