Comments (6)
Ok, I believe this issue thread provides an explanation for the behaviour you're observing: imageio/imageio#877
I need to spend some time reading through it, and then I think it will need to be raised with the rest of the Maintainer team, and potentially the Curriculum Advisors, to figure out how we will handle this consistently throughout the lesson.
from image-processing.
Thanks for reporting this and the other issues, @gcapes - you are finding wrinkles that it is very helpful to iron out!
That said, I'm afraid I have not been able to reproduce this one.
Could you share the whole code block and output please, so we can try to figure out what is going on here?
from image-processing.
MWE:
import numpy as np
import matplotlib.pyplot as plt
import ipympl
import imageio.v3 as iio
import skimage
%matplotlib widget
"""
* Python script to ignore low intensity pixels in an image.
*
"""
import imageio.v3 as iio
# read input image
image = iio.imread(uri="data/maize-root-cluster.jpg")
# display original image
fig, ax = plt.subplots()
plt.imshow(image)
# keep only high-intensity pixels
image[image < 128] = 0
# display modified image
fig, ax = plt.subplots()
plt.imshow(image)
from image-processing.
Hmmm. Can confirm this works with no errors on my end. I will go looking for an explanation of why this might be happening to you elsewhere on the Internet...
from image-processing.
I can reproduce this. Will dig into it while addressing #252.
from image-processing.
Based on the discussions in imageio/imageio#877 and python-pillow/Pillow#6581, image = np.array(image)
may be a quick fix. A downside of this is the added cognitive load of thinking about writeable/non-writeable images. Maybe this is unavoidable in view of how the imageio
backend works.
@mkcor Do you have any better suggestions?
from image-processing.
Related Issues (20)
- Ep3: Wrong file name `data/sudoku.jpg` HOT 5
- Ep3: iio.imread is unreliable HOT 8
- Convert sudoku.png image to pure RGB (without alpha channel) HOT 9
- Release new version of image dataset on FigShare HOT 2
- Use `uint8` or `float64` for grayscale images? HOT 1
- Using image as a variable name HOT 7
- Carpentries Workbench Transition HOT 22
- Showcase image processing at AUNZ community call HOT 7
- Links need to be fixed in CONTRIBUTING.md
- latest version of lesson using "import imageio.v3 as iio" causes error HOT 4
- 'code' folder should be re-established/replaced HOT 5
- Code snippet docstring formatting HOT 4
- Transition to new import convention for sckit-image? HOT 4
- Contributing guide should be customised further
- Ep 5 - Using a Mask for a Histogram exercise error in solution HOT 3
- Link to image publication & analysis checklists HOT 2
- Mask in episode 4 has no shadow HOT 1
- Matplotlib is currently used in a hybrid way (explicit vs. implicit interfaces) HOT 4
- Add Exiftool in list of software that can help handle metadata
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image-processing.