Created
March 18, 2017 06:50
-
-
Save hndr91/11ba03d05c1ef2371194c76bdeea83f8 to your computer and use it in GitHub Desktop.
mean blur 3x3 kernel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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