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)
../_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
[ ]: