imfilter is deprecated!
imfilter is deprecated in SciPy 1.0.0, and will be removed in 1.2.0.
Use Pillow filtering functionality directly.

Simple filtering of an image.

This function is only available if Python Imaging Library (PIL) is installed.

Warning

This function uses bytescale under the hood to rescale images to use
the full (0, 255) range if mode is one of None,'L','P','l'.
It will also cast data for 2-D images to uint32 for mode=None
(which is the default).