g_down.m 145 Bytes
Newer Older
Daniel Bourgault's avatar
Daniel Bourgault committed
1
2
3
4
5
6
function[ f ] = g_down( f, L );
blur = [1 2 1]/4;
for k = 1 : L
f = conv2( conv2( f, blur, 'same' ), blur', 'same' );
f = f(1:2:end,1:2:end);
end