Simple filtering of an image.
This function is only available if Python Imaging Library (PIL) is installed.
This function uses
bytescaleunder the hood to rescale images to use the full (0, 255) range if
modeis one of
None, 'L', 'P', 'l'. It will also cast data for 2-D images to
mode=None(which is the default).
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’.
imfilter : ndarray
The array with filter applied.
Unknown filter type. If the filter you are trying to apply is unsupported.