|Function||Spatial frequency filtering|
|Syntax C/C++||#include <MFstd.h>|
void MF_filter( fMatrix MY, fMatrix MX, fMatrix MFlt, 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 );
|CUDA function C/C++||#include <cudaMFstd.h>
int cudaMF_filter( fMatrix d_MY, fMatrix d_MX, fMatrix d_MFlt, ui ht, ui len );
void MFcu_filter( fMatrix h_MY, fMatrix h_MX, fMatrix h_MFlt, ui ht, ui len );
|CUDA function Pascal/Delphi||uses MFstd;
function cudaMF_filter( d_MY, d_MX, d_MFlt:fMatrix; ht, len:UIntSize ): IntBool;
procedure MFcu_filter( h_MY, h_MX, h_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.|