Signal Processing Filters
Signal processing filters applied to a stream objects.
- morphocut.filters.BinomialFilter(value: T | Variable[T], size: int, centered=True)[source]
Apply a binomial kernel (e.g. [1,2,1]) to the specified window.
- .note:
Only supports centered filters.
- morphocut.filters.ExponentialSmoothingFilter(value: T | Variable[T], alpha: float)[source]
Smooth value over a stream of objects with exponential decay.
- Parameters:
value (RawOrVariable) – Values to smooth.
alpha (float) – Decaying factor,
0 <= alpha <= 1.
- Returns:
Variable – Smoothed
value.
Formula:
out = alpha * value + (1 - alpha) * last_value
- morphocut.filters.MaxFilter(value: T | Variable[T], size: int = 5, centered=True)[source]
Calculate the maximum inside the specified window.
- morphocut.filters.MeanFilter(value: T | Variable[T], size: int = 5, centered=True)[source]
Calculate the mean inside the specified window.