Reputation: 48946
I have came about a MATLAB
code like the following:
xyz = imfilter(A,B);
xyz_subsample = xyz(1:2:size(xyz, 1), 1:2:size(xyz, 2));
The code is related to subsampling
. But, what does the second line mean?
Thanks.
Upvotes: 1
Views: 252
Reputation: 112749
The second line is taking every second sample in each spatial dimension. So it's downsampling by a factor of 2 in each dimension.
Downsampling should be preceded by lowpass filter in order to avoid aliasing effects. The filter in the first line probably does that. Is B
a lowpass mask?
Upvotes: 4