I'm have a sequence of 2-dimensional MxN frames. I have concatenated these frames to form a 3-dimensional MxNxT matrix. Now i want to filter this 3D volume by 2 types of filters (a 2D log-Gabor in xy-direction, and a 1D gaussian in z-direction).
Here is my MATLAB implementation:
[yGrid,xGrid] = ndgrid(1:size(D,1),1:size(D,2)); sigmaXY = 0.5; sigmaT = 1; numFilts = length(Scales); w = sqrt(yGrid.^2 + xGrid.^2); bpFilt = zeros(size(D,1),size(D,2),size(D,3),numFilts); for sc = 1:numFilts for t = 1:size(D,3) w0 = 1.0/Scales(sc); bpFilt(:,:,t,sc) = exp((-(log(w/w0)).^2) / (2 * log(sigmaXY)^2)) * ... exp(-t.^2) / (2 * sigmaT^2); end end DF = fftn(D); DFfilt = bsxfun(@times, DF, bpFilt);
D is my 3D data.
DFfilt is fft inverted and plotted then. But all frames look the same in the output!
Where am I mistaken?
Is there any better suggestion to implement the filtering?