g_down.m 155 Bytes
Newer Older
Daniel Bourgault's avatar
Daniel Bourgault committed
1
function[ f ] = g_down( f, L );
2

Daniel Bourgault's avatar
Daniel Bourgault committed
3
blur = [1 2 1]/4;
4

Daniel Bourgault's avatar
Daniel Bourgault committed
5
for k = 1 : L
6
7
    f = conv2( conv2( f, blur, 'same' ), blur', 'same' );
    f = f(1:2:end,1:2:end);
Daniel Bourgault's avatar
Daniel Bourgault committed
8
end