Skip to content

Instantly share code, notes, and snippets.

@hndr91
Created March 18, 2017 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hndr91/11ba03d05c1ef2371194c76bdeea83f8 to your computer and use it in GitHub Desktop.
Save hndr91/11ba03d05c1ef2371194c76bdeea83f8 to your computer and use it in GitHub Desktop.
mean blur 3x3 kernel
function result = meanBlur(input)
%im = imread('cameraman.tif');
[x,y] = size(input);
result = zeros(x,y);
for i=1:x-2
for j=1:y-2
window = [input(i:i+2,j:j+2)];
result(i+1,j+1) = mean2(window);
end
end
%image(result)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment