|Function||Spatial 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 );
procedure MF_filter( MY, MX, MFlt:fMatrix; ht, len:UIntSize );
|Description||A 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 handling||If 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.|
MatrixLib Table of Contents OptiVec home