Image filters

[1]:
import seaborn_image as isns

isns.set_context("notebook")
isns.set_image(cmap="inferno") # set default colormap to inferno
/home/docs/checkouts/readthedocs.org/user_builds/seaborn-image/envs/latest/lib/python3.8/site-packages/traitlets/traitlets.py:3044: 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(
[2]:
pol = isns.load_image("polymer")
[3]:
ax = isns.filterplot(pol, filt="gaussian", sigma=2.5)
../_images/Tutorial_Image_Filters_3_0.svg
[4]:
ax = isns.filterplot(pol, filt="median", size=5)
../_images/Tutorial_Image_Filters_4_0.svg
[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)
../_images/Tutorial_Image_Filters_7_0.svg

Fast-Fourier Transform

[7]:
ax = isns.fftplot(pol)
../_images/Tutorial_Image_Filters_9_0.svg
[8]:
ax = isns.fftplot(pol, window_type="hann")
../_images/Tutorial_Image_Filters_10_0.svg
[9]:
ax = isns.fftplot(pol, shift=False)
../_images/Tutorial_Image_Filters_11_0.svg
[ ]: