medianfilter: Median filter

silx.math.medianfilter.medfilt(data, kernel_size=3, bool conditional=False)

Function computing the median filter of the given input. Behavior at boundaries: the algorithm is reducing the size of the window/kernel for pixels at boundaries (there is no mirroring).

Parameters:
  • data (numpy.ndarray) – the array for which we want to apply the median filter. Should be 1d or 2d.
  • kernel_size (For 1D should be an int for 2D should be a tuple or a list of (kernel_height, kernel_width)) – the dimension of the kernel.
  • conditional (bool) – True if we want to apply a conditional median filtering.
Returns:

the array with the median value for each pixel.

silx.math.medianfilter.medfilt1d(data, kernel_size=3, bool conditional=False)

Function computing the median filter of the given input. Behavior at boundaries: the algorithm is reducing the size of the window/kernel for pixels at boundaries (there is no mirroring).

Parameters:
  • data (numpy.ndarray) – the array for which we want to apply the median filter. Should be 1d.
  • kernel_size (int) – the dimension of the kernel.
  • conditional (bool) – True if we want to apply a conditional median filtering.
Returns:

the array with the median value for each pixel.

silx.math.medianfilter.medfilt2d(image, kernel_size=3, bool conditional=False)

Function computing the median filter of the given input. Behavior at boundaries: the algorithm is reducing the size of the window/kernel for pixels at boundaries (there is no mirroring).

Parameters:
  • data (numpy.ndarray) – the array for which we want to apply the median filter. Should be 2d.
  • kernel_size (For 1D should be an int for 2D should be a tuple or a list of (kernel_height, kernel_width)) – the dimension of the kernel.
  • conditional (bool) – True if we want to apply a conditional median filtering.
Returns:

the array with the median value for each pixel.

Previous topic

histogram: Multidimensional histograms

Next topic

silx.math.combo: Statistics combo functions

This Page