SciPy

scipy.misc.imfilter

scipy.misc.imfilter(*args, **kwds)

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).

Parameters:
arr : ndarray

The array of Image in which the filter is to be applied.

ftype : str

The filter that has to be applied. Legal values are: ‘blur’, ‘contour’, ‘detail’, ‘edge_enhance’, ‘edge_enhance_more’, ‘emboss’, ‘find_edges’, ‘smooth’, ‘smooth_more’, ‘sharpen’.

Returns:
imfilter : ndarray

The array with filter applied.

Raises:
ValueError

Unknown filter type. If the filter you are trying to apply is unsupported.

Previous topic

scipy.misc.fromimage

Next topic

scipy.misc.imread