You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorial/02_image_filtering.md
+32-38Lines changed: 32 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,16 @@ kernelspec:
18
18
%config InlineBackend.figure_format = 'retina'
19
19
```
20
20
21
+
```{code-cell} ipython3
22
+
---
23
+
slideshow:
24
+
slide_type: skip
25
+
---
26
+
import matplotlib.pyplot as plt
27
+
import numpy as np
28
+
import skimage as ski
29
+
```
30
+
21
31
+++ {"slideshow": {"slide_type": "slide"}}
22
32
23
33
# Part 2: Image filtering
@@ -30,15 +40,6 @@ Filtering is one of the most basic and common image operations in image processi
30
40
31
41
## Local filtering
32
42
33
-
```{code-cell} ipython3
34
-
---
35
-
slideshow:
36
-
slide_type: skip
37
-
---
38
-
import matplotlib.pyplot as plt
39
-
import numpy as np
40
-
```
41
-
42
43
+++ {"slideshow": {"slide_type": "notes"}}
43
44
44
45
The "local" in local filtering simply means that a pixel is adjusted by values in some surrounding neighborhood. These surrounding elements are identified or weighted based on a "footprint", "structuring element", or "kernel".
@@ -508,7 +509,6 @@ Here's a small demo of convolution in action.
@@ -610,10 +610,8 @@ Here we use a step of 10, giving us every tenth column and every tenth row of th
610
610
We are actually going to be using the pattern of plotting multiple images side by side quite often, so we are going to make the following helper function:
611
611
612
612
```{code-cell} ipython3
613
-
from skimage import img_as_float
614
-
615
613
def imshow_all(*images, titles=None):
616
-
images = [img_as_float(img) for img in images]
614
+
images = [ski.util.img_as_float(img) for img in images]
617
615
618
616
if titles is None:
619
617
titles = [''] * len(images)
@@ -672,11 +670,9 @@ slideshow:
672
670
slide_type: notes
673
671
---
674
672
# Rename module so we don't shadow the builtin function
0 commit comments