Skip to content

Commit 8d50e90

Browse files
committed
color->colour
1 parent 28a5dde commit 8d50e90

9 files changed

+182
-182
lines changed

_extras/edge-detection.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ that the edge between the black and white areas of the image is not a clear-cut
6161

6262
![Black and white edge pixels](../fig/black-and-white-edge-pixels.jpg)
6363

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.
6565
Imagine a short line segment,
6666
halfway down the image and straddling the edge between the black and white paper.
6767
This plot shows the pixel values
@@ -72,7 +72,7 @@ for forty pixels spanning the transition from black to white.
7272

7373
It is obvious that the "edge" here is not so sudden!
7474
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.
7676

7777
## Canny edge detection
7878

@@ -98,7 +98,7 @@ The skimage `skimage.feature.canny()` function performs the following steps:
9898
This is called *non-maximum suppression*, and
9999
the result is edge lines that are thinner than those produced by other methods.
100100
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
102102
are eliminated.
103103
If a pixel's gradient value - based on the Sobel differential -
104104
is above the high threshold value,
@@ -125,10 +125,10 @@ We will execute the program on the `data/junk-01.jpg` image,
125125
which we used before in
126126
[the _Thresholding_ episode]({{ page.root }}{% link _episodes/07-thresholding.md %}):
127127

128-
![Colored shapes](../data/shapes-01.jpg)
128+
![coloured shapes](../data/shapes-01.jpg)
129129

130130
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.
132132
Our strategy will be to read the image as grayscale,
133133
and then apply Canny edge detection.
134134
Note that when reading the image with `skimage.io.imread(..., as_gray=True)`
@@ -203,7 +203,7 @@ skimage.io.imshow(edges)
203203
~~~
204204
{: .language-python}
205205

206-
Here is the result, for the colored shape image above,
206+
Here is the result, for the coloured shape image above,
207207
with sigma value 2.0, low threshold value 0.1 and high threshold value 0.3:
208208

209209
![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.
366366
> ## Applying Canny edge detection to another image (5 min)
367367
>
368368
> 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,
370370
> `data/junk-01.jpg`.
371371
> Use a sigma of 1.0 and adjust low and high threshold sliders
372372
> to produce an edge image that looks like this:
373373
>
374-
> ![Colored shape edges](../fig/junk-01-canny-track-edges.png)
374+
> ![coloured shape edges](../fig/junk-01-canny-track-edges.png)
375375
>
376376
> What values for the low and high threshold values did you use to
377377
> produce an image similar to the one above?
378378
>
379379
> > ## Solution
380380
> >
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
382382
> > value of 0.05 and a high threshold value of 0.07.
383383
> > You may be able to achieve similar results with other threshold values.
384384
> {: .solution}

0 commit comments

Comments
 (0)