Skip to content

Commit e2588e9

Browse files
committed
imageio library name formatting
1 parent e171df5 commit e2588e9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

episodes/02-image-basics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ With that taken care of,
166166
let's load our image data from disk using
167167
the `imread` function from the `imageio.v3` module and display it using
168168
the `imshow` function from the `matplotlib.pyplot` module.
169-
`imageio` is a Python library for reading and writing image data.
170-
`imageio.v3` is specifying that we want to use version 3 of `imageio`. This
169+
Imageio is a Python library for reading and writing image data.
170+
`imageio.v3` is specifying that we want to use version 3 of imageio. This
171171
version has the benefit of supporting nD (multidimensional) image data
172172
natively (think of volumes, movies).
173173

@@ -179,9 +179,9 @@ The scikit-image library has its own function to read an image,
179179
so you might be asking why we don't use it here.
180180
Actually, `skimage.io.imread()` uses `iio.imread()` internally when loading an image into Python.
181181
It is certainly something you may use as you see fit in your own code.
182-
In this lesson, we use the `imageio` library to read or write (save) images,
182+
In this lesson, we use the imageio library to read or write (save) images,
183183
while `skimage` is dedicated to performing operations on the images.
184-
Using `imageio` gives us more flexibility, especially when it comes to
184+
Using imageio gives us more flexibility, especially when it comes to
185185
handling metadata.
186186

187187
::::::::::::::::::::::::::::::::::::::::::::::::::

episodes/03-skimage-images.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ We will start by reading the image and displaying it.
256256

257257
::::::::::::::::::::::::::::::::::::::::: callout
258258

259-
## Loading images with `imageio`: Read-only arrays
259+
## Loading images with imageio: Read-only arrays
260260

261-
When loading an image with `imageio`, in certain situations the image is stored in a read-only array. If you attempt to manipulate the pixels in a read-only array, you will receive an error message `ValueError: assignment destination is read-only`. In order to make the image array writeable, we can create a copy with `image = np.array(image)` before manipulating the pixel values.
261+
When loading an image with imageio, in certain situations the image is stored in a read-only array. If you attempt to manipulate the pixels in a read-only array, you will receive an error message `ValueError: assignment destination is read-only`. In order to make the image array writeable, we can create a copy with `image = np.array(image)` before manipulating the pixel values.
262262

263263
::::::::::::::::::::::::::::::::::::::::::::::::::
264264

@@ -359,7 +359,7 @@ pass `plugin="pillow"`. If the backend is not specified explicitly, `iio.imread(
359359

360360
::::::::::::::::::::::::::::::::::::::::: callout
361361

362-
## Loading images with `imageio`: Pixel type and depth
362+
## Loading images with imageio: Pixel type and depth
363363

364364
When loading an image with `mode="L"`, the pixel values are stored as 8-bit integer numbers that can take values in the range 0-255. However, pixel values may also be stored with other types and ranges. For example, some scikit-image functions return the pixel values as floating point numbers in the range 0-1. The type and range of the pixel values are important for the colorscale when plotting, and for masking and thresholding images as we will see later in the lesson. If you are unsure about the type of the pixel values, you can inspect it with `print(image.dtype)`. For the example above, you should find that it is `dtype('uint8')` indicating 8-bit integer numbers.
365365

@@ -393,7 +393,7 @@ range 0-255 of an 8-bit pixel). The results should look like this:
393393

394394
## Solution
395395

396-
First, load the image file `data/sudoku.png` as a grayscale image. Remember that we use `image = np.array(image)` to create a copy of the image array because `imageio` returns a non-writeable image.
396+
First, load the image file `data/sudoku.png` as a grayscale image. Remember that we use `image = np.array(image)` to create a copy of the image array because `imageio.imread` returns a non-writeable image.
397397

398398
```python
399399

0 commit comments

Comments
 (0)