components.interp.gaussianfilter
- class GaussianFilter(config={}, **kwds)[source]
Bases:
Component
Gaussian filter generator component.
Create a Gaussian filter for use with the
Resize
component.Connecting a
GaussianFilter
component’soutput
to aResize
component’sfilter
input allows the filter to be updated (while the components are running) by changing theGaussianFilter
config: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
Resize
component then it’s simpler to use aGaussianFilterCore
to create a fixed filter.2-dimensional filters can be produced by setting both
xsigma
andysigma
, but it is usually more efficient to use twoResize
components to process the two dimensions independently.Config:
xsigma
float
Horizontal standard deviation parameter.
ysigma
float
Vertical standard deviation parameter.
- classmethod core(x_sigma=0.0, y_sigma=0.0)[source]
Gaussian filter generator core.
Alternative to the
GaussianFilter
component 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.