Skip to content

Commit 5102ffc

Browse files
committed
markdown source builds
Auto-generated via {sandpaper} Source : 0048fe6 Branch : main Author : Toby Hodges <tobyhodges@carpentries.org> Time : 2023-12-08 14:46:42 +0000 Message : Merge pull request #309 from bear-rsg/minor-typos Minor typos and suggestions
1 parent ac06d6b commit 5102ffc

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

02-image-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ the images may be of sufficient quality for your work.
960960
It all depends on how much quality you need,
961961
and what restrictions you have on image storage space.
962962
Another consideration may be *where* the images are stored.
963-
For example,if your images are stored in the cloud and therefore
963+
For example, if your images are stored in the cloud and therefore
964964
must be downloaded to your system before you use them,
965965
you may wish to use a compressed image format to speed up file transfer time.
966966

03-skimage-images.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ chair = iio.imread(uri="data/chair.jpg")
5454

5555
We use the `iio.imread()` function to read a JPEG image entitled **chair.jpg**.
5656
Imageio reads the image, converts it from JPEG into a NumPy array,
57-
and returns the array; we save the array in a variable named `image`.
57+
and returns the array; we save the array in a variable named `chair`.
5858

5959
Next, we will do something with the image:
6060

@@ -459,9 +459,10 @@ red box that is drawn around the words.
459459

460460
![](data/board.jpg){alt='Whiteboard image'}
461461

462-
Using the same display technique we have used throughout this course,
462+
Using `matplotlib.pyplot.imshow`
463463
we can determine the coordinates of the corners of the area we wish to extract
464-
by hovering the mouse near the points of interest and noting the coordinates.
464+
by hovering the mouse near the points of interest and noting the coordinates
465+
(remember to run `%matplotlib widget` first if you haven't already).
465466
If we do that, we might settle on a rectangular
466467
area with an upper-left coordinate of *(135, 60)*
467468
and a lower-right coordinate of *(480, 150)*,
@@ -470,7 +471,7 @@ as shown in this version of the whiteboard picture:
470471
![](fig/board-coordinates.jpg){alt='Whiteboard coordinates'}
471472

472473
Note that the coordinates in the preceding image are specified in *(cx, ry)* order.
473-
Now if our entire whiteboard image is stored as an scikit-image image named `image`,
474+
Now if our entire whiteboard image is stored as a NumPy array named `image`,
474475
we can create a new image of the selected region with a statement like this:
475476

476477
`clip = image[60:151, 135:481, :]`
@@ -553,14 +554,13 @@ maize_roots = iio.imread(uri="data/maize-root-cluster.jpg")
553554
fig, ax = plt.subplots()
554555
plt.imshow(maize_roots)
555556

556-
# extract, display, and save sub-image
557-
# WRITE YOUR CODE TO SELECT THE SUBIMAGE NAME clip HERE:
557+
# extract and display sub-image
558558
clipped_maize = maize_roots[0:400, 275:550, :]
559559
fig, ax = plt.subplots()
560560
plt.imshow(clipped_maize)
561561

562562

563-
# WRITE YOUR CODE TO SAVE clip HERE
563+
# save sub-image
564564
iio.imwrite(uri="data/clipped_maize.jpg", image=clipped_maize)
565565
```
566566

@@ -571,11 +571,11 @@ iio.imwrite(uri="data/clipped_maize.jpg", image=clipped_maize)
571571
:::::::::::::::::::::::::::::::::::::::: keypoints
572572

573573
- Images are read from disk with the `iio.imread()` function.
574-
- We create a window that automatically scales the displayed image with Matplotlib and calling `show()` on the global figure object.
574+
- We create a window that automatically scales the displayed image with Matplotlib and calling `imshow()` on the global figure object.
575575
- Colour images can be transformed to grayscale using `ski.color.rgb2gray()` or, in many cases, be read as grayscale directly by passing the argument `mode="L"` to `iio.imread()`.
576576
- We can resize images with the `ski.transform.resize()` function.
577577
- NumPy array commands, such as `image[image < 128] = 0`, can be used to manipulate the pixels of an image.
578578
- Array slicing can be used to extract sub-images or modify areas of images, e.g., `clip = image[60:150, 135:480, :]`.
579-
- Metadata is not retained when images are loaded as scikit-image images.
579+
- Metadata is not retained when images are loaded as NumPy arrays using `iio.imread()`.
580580

581581
::::::::::::::::::::::::::::::::::::::::::::::::::

md5sum.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"config.yaml" "101b3ac4b679126bb1f437306eb1b836" "site/built/config.yaml" "2023-04-25"
55
"index.md" "6e80c662708984307918adfad711e15f" "site/built/index.md" "2023-07-26"
66
"episodes/01-introduction.md" "9755639c515fdbf752422e2e59128f63" "site/built/01-introduction.md" "2023-07-26"
7-
"episodes/02-image-basics.md" "37de5915c4fc80cc12af44d98c31321b" "site/built/02-image-basics.md" "2023-11-24"
8-
"episodes/03-skimage-images.md" "eb0da8ebdea3bf84510b22581b790e67" "site/built/03-skimage-images.md" "2023-10-13"
7+
"episodes/02-image-basics.md" "30630cc141643700495c2038f2cc9f68" "site/built/02-image-basics.md" "2023-12-08"
8+
"episodes/03-skimage-images.md" "063fa4bb5032702c0196b0d953d94474" "site/built/03-skimage-images.md" "2023-12-08"
99
"episodes/04-drawing.md" "9d78a765f5e9747ffc2aa43a4a5a414d" "site/built/04-drawing.md" "2023-09-05"
1010
"episodes/05-creating-histograms.md" "bdcf983127c242eb995605038598d09f" "site/built/05-creating-histograms.md" "2023-09-18"
1111
"episodes/06-blurring.md" "008ba23277efaed038691178e99c135b" "site/built/06-blurring.md" "2023-09-05"

0 commit comments

Comments
 (0)