1 function [lo, hi] = afb2D_A(x, af, d)
3 % 2D Analysis Filter Bank
4 % (along one dimension only)
6 % [lo, hi] = afb2D_A(x, af, d);
8 % x - NxM matrix, where min(N,M) > 2*length(filter)
10 % af - analysis filter for the columns
11 % af(:, 1) - lowpass filter
12 % af(:, 2) - highpass filter
13 % d - dimension of filtering (d = 1 or 2)
15 % lo, hi - lowpass, highpass subbands
20 % [lo, hi] = afb2D_A(x, af, 1);
21 % y = sfb2D_A(lo, hi, sf, 1);
25 lpf = af(:, 1); % lowpass filter
26 hpf = af(:, 2); % highpass filter
36 lo = upfirdn(x, lpf, 1, 2);
37 lo(1:L, :) = lo(1:L, :) + lo([1:L]+N/2, :);
40 hi = upfirdn(x, hpf, 1, 2);
41 hi(1:L, :) = hi(1:L, :) + hi([1:L]+N/2, :);