components.interp.gaussianfilter
- class GaussianFilter(config={}, **kwds)[source]
Bases:
ComponentGaussian filter generator component.
Create a Gaussian filter for use with the
Resizecomponent.Connecting a
GaussianFiltercomponent’soutputto aResizecomponent’sfilterinput allows the filter to be updated (while the components are running) by changing theGaussianFilterconfig:filgen = GaussianFilter(xsigma=1.5) resize = Resize() filgen.connect('output', resize.filter) ... start(..., filgen, resize, ...) ... filgen.set_config({'xsigma': 1.8}) ...
If you don’t need to change the configuration after creating the
Resizecomponent then it’s simpler to use aGaussianFilterCoreto create a fixed filter.2-dimensional filters can be produced by setting both
xsigmaandysigma, but it is usually more efficient to use twoResizecomponents to process the two dimensions independently.Config:
xsigmafloat
Horizontal standard deviation parameter.
ysigmafloat
Vertical standard deviation parameter.
- classmethod core(x_sigma=0.0, y_sigma=0.0)[source]
Gaussian filter generator core.
Alternative to the
GaussianFiltercomponent that can be used to make a non-reconfigurable filter:resize = Resize() resize.filter(GaussianFilter.core(x_sigma=1.5)) ... start(..., resize, ...) ...
Comments or questions? Please email jim@jim-easterbrook.me.uk.