Image filters#
[1]:
import seaborn_image as isns
isns.set_context("notebook")
isns.set_image(cmap="inferno") # set default colormap to inferno
[2]:
pol = isns.load_image("polymer")
[3]:
ax = isns.filterplot(pol, filt="gaussian", sigma=2.5)
/home/docs/checkouts/readthedocs.org/user_builds/seaborn-image/envs/latest/lib/python3.8/site-packages/traitlets/traitlets.py:3437: FutureWarning: --rc={'figure.dpi': 96} for dict-traits is deprecated in traitlets 5.0. You can pass --rc <key=value> ... multiple times to add items to a dict.
warn(
[4]:
ax = isns.filterplot(pol, filt="median", size=5)
[5]:
isns.implemented_filters.keys()
[5]:
dict_keys(['sobel', 'gaussian', 'median', 'max', 'diff_of_gaussians', 'gaussian_gradient_magnitude', 'gaussian_laplace', 'laplace', 'min', 'percentile', 'prewitt', 'rank', 'uniform'])
User-defined filters or any callable filter function#
[6]:
from skimage.filters import scharr
ax = isns.filterplot(pol, filt=scharr)
Fast-Fourier Transform#
[7]:
ax = isns.fftplot(pol)
[8]:
ax = isns.fftplot(pol, window_type="hann")
[9]:
ax = isns.fftplot(pol, shift=False)
[ ]: