@@ -61,7 +61,7 @@ that the edge between the black and white areas of the image is not a clear-cut
61
61
62
62
![ Black and white edge pixels] ( ../fig/black-and-white-edge-pixels.jpg )
63
63
64
- We can learn more about the edge by examining the color values of some of the pixels.
64
+ We can learn more about the edge by examining the colour values of some of the pixels.
65
65
Imagine a short line segment,
66
66
halfway down the image and straddling the edge between the black and white paper.
67
67
This plot shows the pixel values
@@ -72,7 +72,7 @@ for forty pixels spanning the transition from black to white.
72
72
73
73
It is obvious that the "edge" here is not so sudden!
74
74
So, any skimage method to detect edges in an image must be able to
75
- decide where the edge is, and place appropriately-colored pixels in that location.
75
+ decide where the edge is, and place appropriately-coloured pixels in that location.
76
76
77
77
## Canny edge detection
78
78
@@ -98,7 +98,7 @@ The skimage `skimage.feature.canny()` function performs the following steps:
98
98
This is called * non-maximum suppression* , and
99
99
the result is edge lines that are thinner than those produced by other methods.
100
100
4 . A double threshold is applied to determine potential edges.
101
- Here extraneous pixels caused by noise or milder color variation than desired
101
+ Here extraneous pixels caused by noise or milder colour variation than desired
102
102
are eliminated.
103
103
If a pixel's gradient value - based on the Sobel differential -
104
104
is above the high threshold value,
@@ -125,10 +125,10 @@ We will execute the program on the `data/junk-01.jpg` image,
125
125
which we used before in
126
126
[ the _ Thresholding_ episode] ({{ page.root }}{% link _ episodes/07-thresholding.md %}):
127
127
128
- ![ Colored shapes] ( ../data/shapes-01.jpg )
128
+ ![ coloured shapes] ( ../data/shapes-01.jpg )
129
129
130
130
We are interested in finding the edges of the shapes in the image,
131
- and so the colors are not important.
131
+ and so the colours are not important.
132
132
Our strategy will be to read the image as grayscale,
133
133
and then apply Canny edge detection.
134
134
Note that when reading the image with ` skimage.io.imread(..., as_gray=True) `
@@ -203,7 +203,7 @@ skimage.io.imshow(edges)
203
203
~~~
204
204
{: .language-python}
205
205
206
- Here is the result, for the colored shape image above,
206
+ Here is the result, for the coloured shape image above,
207
207
with sigma value 2.0, low threshold value 0.1 and high threshold value 0.3:
208
208
209
209
![ Output file of Canny edge detection] ( ../fig/junk-01-canny-edges.png )
@@ -366,19 +366,19 @@ The image shows the edges in an output file.
366
366
> ## Applying Canny edge detection to another image (5 min)
367
367
>
368
368
> Now, navigate to the ` code/edge-detection/ ` directory,
369
- > and run the ` CannyTrack.py ` program on the image of colored shapes,
369
+ > and run the ` CannyTrack.py ` program on the image of coloured shapes,
370
370
> ` data/junk-01.jpg ` .
371
371
> Use a sigma of 1.0 and adjust low and high threshold sliders
372
372
> to produce an edge image that looks like this:
373
373
>
374
- > ![ Colored shape edges] ( ../fig/junk-01-canny-track-edges.png )
374
+ > ![ coloured shape edges] ( ../fig/junk-01-canny-track-edges.png )
375
375
>
376
376
> What values for the low and high threshold values did you use to
377
377
> produce an image similar to the one above?
378
378
>
379
379
> > ## Solution
380
380
> >
381
- > > The colored shape edge image above was produced with a low threshold
381
+ > > The coloured shape edge image above was produced with a low threshold
382
382
> > value of 0.05 and a high threshold value of 0.07.
383
383
> > You may be able to achieve similar results with other threshold values.
384
384
> {: .solution}
0 commit comments