-
-
Notifications
You must be signed in to change notification settings - Fork 125
changing away from image as variable name #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changing away from image as variable name #259
Conversation
|
This PR addresses #258. |
| > > | ||
| > > # load and display original image | ||
| > > image = iio.imread(uri="data/maize-root-cluster.jpg") | ||
| > > root = iio.imread(uri="data/maize-root-cluster.jpg") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe maize_root?
| > > import imageio.v3 | ||
| > > | ||
| > > image = iio.imread(uri="data/sudoku.jpg", mode="L") | ||
| > > sodoku = iio.imread(uri="data/sudoku.png") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was updated in PR #253 (hence the conflict). Would you mind merging gh-pages to sync up your branch? Thanks!
| eight_tiff = iio.imread(uri="data/eight.tif") | ||
| plt.imshow(eight_tiff) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| eight_tiff = iio.imread(uri="data/eight.tif") | |
| plt.imshow(eight_tiff) | |
| eight = iio.imread(uri="data/eight.tif") | |
| plt.imshow(eight) |
| print(eight_tiff.shape) | ||
| print(eight_tiff) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| print(eight_tiff.shape) | |
| print(eight_tiff) | |
| print(eight.shape) | |
| print(eight) |
| > > # display images | ||
| > > fig, ax = plt.subplots() | ||
| > > plt.imshow(image) | ||
| > > plt.imshow(chair_jpg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to use chair instead of chair_jpg.
| {: .language-python} | ||
| The NumPy command to ignore all low-intensity pixels is `image[image < 128] = 0`. | ||
| The NumPy command to ignore all low-intensity pixels is `roots[roots < 128] = 0`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest maize_roots instead of roots (roots could be confused with the mathematical sense, e.g., roots of an equation).
|
Closing this one in favour of #265, which has been merged. |
This PR changes places in episides 2 and 3 where the image variable name was image. Additionally, it corrects for refering to the sodoku image as a jpg although it is a png, and uses picture.copy() after creating certain images so they can be properly accessed (without this the accessing can create :ValueError: assignment destination is read-only)