Apply a spatial filter to a vector/scalar field.
FF = filterf(F,FSIZE) applies a spatial filtering of the vector/scalar
field(s) F by computing its 2D convolution with a Gaussian kernel of
width FSIZE (expressed in mesh units). If not specified, FSIZE=1 is
taken by default. This operation filters out structures of size
typically smaller than FSIZE (low-pass filter). The Gaussian kernel is
G(X,Y) = exp ( -(X^2+Y^2)/(2*FSIZE^2) )
The kernel is defined in a square domain of size 1+2*CEIL(3.5*FSIZE)
(i.e., for FSIZE=1, it is defined over a 9x9 matrix). The convolution
is performed using Matlab's CONV2 function.
FF = filterf(F,FSIZE,KERNEL) specifies the kernel G(X,Y):
'gauss': gaussian kernel (by default)
'flat': flat (or top-hat) kernel, G = ONES(FSIZE,FSIZE)
(FSIZE must be an even integer)
'igauss': derivative of the integrated gaussian (minimized
discretisation effects for small FSIZE).
The size of the filtered field is smaller than the original field, to
avoid boundary effects (the convolution is done by CONV2 with the
option 'valid'). If you prefer to keep the whole field, use
Note : If there are missing data in the field, it is better to first
interpolate the data. See interpf.
If FSIZE is an array, applies each element of FSIZE over each element
of F (one must have LENGTH(FSIZE)=LENGTH(F)).
If no output argument, the result is displayed by showf.
v = loadvec('*.vc7');
showf, medianf, bwfilterf, addnoisef, interpf,
GAUSSMAT, CONV2, tempfilterf.
Published output in the Help browser
2005-2017 PIVMat Toolbox 4.10