Module: filters

skfuzzy.filters : Subpackage for filtering data, e.g. with Fuzzy Inference by
Else-action (FIRE) filters to denoise 1d or 2d data.
skfuzzy.filters.fire1d(x[, l1, l2]) 1-D filtering using Fuzzy Inference Ruled by Else-action (FIRE) [1].
skfuzzy.filters.fire2d(im[, l1, l2, ...]) 2-D filtering using Fuzzy Inference Ruled by Else-action (FIRE) [1].

fire1d

skfuzzy.filters.fire1d(x, l1=0, l2=1)[source]

1-D filtering using Fuzzy Inference Ruled by Else-action (FIRE) [1].

FIRE filtering is nonlinear, and is specifically designed to remove impulse (salt and pepper) noise.

Parameters:

x : 1d array or iterable

Input sequence, filtered range limited by l1 and l2.

l1 : float

Lower input range limit for x.

l2 : float

Upper input range limit for x.

Returns:

y : 1d array

FIRE filtered sequence.

Notes

Filtering occurs for l1 < |x| < l2; for |x| < l1 there is no effect.

References

[R29]Fabrizio Russo, Fuzzy Filtering of Noisy Sensor Data, IEEE Instrumentation and Measurement Technology Conference, Brussels, Belgium, June 4 - 6, 1996, pp 1281 - 1285.

fire2d

skfuzzy.filters.fire2d(im, l1=0, l2=255, fuzzyresolution=1)[source]

2-D filtering using Fuzzy Inference Ruled by Else-action (FIRE) [1].

FIRE filtering is nonlinear, and is specifically designed to remove impulse (salt and pepper) noise.

Parameters:

I : 2d array

Input image.

l1 : float

Lower limit of filtering range.

l2 : float

Upper limit of filtering range.

fuzzyresolution : float, default = 1

Resolution of fuzzy input sequence, or spacing between [-l2+1, l2-1]. The default assumes an integer input; for floating point images a decimal value should be used approximately equal to the bit depth.

Returns:

J : 2d array

FIRE filtered image.

Notes

Filtering occurs for l1 < |x| < l2; outside this range the data is unaffected.

References

[R30]Fabrizio Russo, Fuzzy Filtering of Noisy Sensor Data, IEEE Instrumentation and Measurement Technology Conference, Brussels, Belgium, June 4 - 6, 1996, pp 1281 - 1285.