boxFilter
- xripl.filters.boxFilter(img, boxSize=2)[source]
Applies a symmetric box filter to blur the image. A box filter approaches a Gaussian filter for large number of filterings, but at smaller kernel sizes it causes less blur. Convolution is handled using scipy.ndimage.convolve, and edges condition is ‘reflect’.
- imgnumpy.ndarray
2D numpy array of the image to be filtered.
- boxSizeint
Length in pixels of the side of the box. The box is symmetric. Default size 2 pixels by 2 pixels.
- filteredImgnumpy.ndarray
Box filtered image returned as a 2D numpy array.