Code Monkey home page Code Monkey logo

Comments (4)

deppen8 avatar deppen8 commented on September 10, 2024 3

@uschille , a couple notes:

  1. I went to try to make a fix here, but I couldn't find any examples where we weren't handling the error. Am I missing it somewhere?
  2. The behavior/bug that leads to read-only images is changed in imageio as of v2.28.1 imageio/imageio#976. The latest is v2.31.1, so if the learner creates an environment themselves, they will likely get a version of imageio that doesn't have the bug.
  3. The version of imageio that ships with the base Anaconda distribution is different for Windows and MacOS 😱. https://docs.anaconda.com/free/anaconda/reference/packages/pkg-docs/. Anaconda on Windows still has imageio v2.26.0 (weird read behavior), but Mac and Linux users get imageio v2.31.1 (consistent read behavior).

I suppose, in light of point 3, we need to keep the np.array(img) work-around for now, but I put in a request to have Anaconda bump the version for Windows to match Mac+Linux (ContinuumIO/anaconda-issues#13242). I have no idea what the constraints might be to doing that, so we shall see.

from image-processing.

uschille avatar uschille commented on September 10, 2024

Thanks for pointing this out @shaw2thefloor! The error can be avoided by adding maize = np.array(maize) after the line with iio.imread. It seems that I missed a few instances when implementing #247 - I will fix it as soon as I can. If you could point me to any other instances you found that would be a great help. Thank you!

from image-processing.

mkcor avatar mkcor commented on September 10, 2024

@deppen8 thanks for taking care of this!

@shaw2thefloor the latest version of the lesson reads:
"""

# read input image
maize_roots = iio.imread(uri="data/maize-root-cluster.jpg")
maize_roots = np.array(maize_roots)

# display original image
fig, ax = plt.subplots()
plt.imshow(maize_roots)

Now we can threshold the image and display the result.
PYTHON

# keep only high-intensity pixels
maize_roots[maize_roots < 128] = 0

"""
Does it run properly for you?

from image-processing.

tobyhodges avatar tobyhodges commented on September 10, 2024

I am going to close this since we believe the issue had been resolved now. @shaw2thefloor please post back here if you think there is still an issue here, and we'll be happy to re-open.

from image-processing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.