MF_filter MD_filter ME_filter
MCF_filter MCD_filter MCE_filter
FunctionSpatial frequency filtering
Syntax C/C++#include <MFstd.h>
void MF_filter( fMatrix Y, fMatrix X, fMatrix Flt, ui ht, ui len );
C++ MatObj#include <OptiVec.h>
void matrix<T>::filter( const matrix<T>& MX, const matrix<T>& MFlt );
Pascal/Delphiuses MFstd;
procedure MF_filter( MY, MX, MFlt:fMatrix; ht, len:UIntSize );
DescriptionA spatial frequency filter MFlt is applied to the matrix MX. Internally, this is done by performing a Fourier transform on MX, multiplying the transform with MFlt and transforming the product back into the space domain.

Complex versions: MX, MY and the filter MFlt are complex matrices.
Real versions: MX and MY are real. MFlt has to be in the packed complex format that is obtained by Fourier transforming a real matrix with MF_FFT (see that function for the description of the packed complex format) or by using MF_convolve.

If MX is non-periodic, the edges of the filtered function may be spoiled by wrap-around. See VF_convolve about how to avoid end-effects. As described there for vectors, embed the matrix MX in a larger matrix or remove a possible linear trends in both dimensions.
About special versions with the prefixes VFs_ and VFl_, consult chapter 4.8.

Error handlingIf either ht or len is not a power of 2, VF_FFT (on which MF_filter is based) complains "Size must be an integer power of 2" and the program is aborted.
See alsoMF_FFT,   MF_convolve,   chapter 12,   chapter 4.8 of

MatrixLib Table of Contents  OptiVec home