Giter Site home page Giter Site logo

Comments (7)

ArjunPutcha avatar ArjunPutcha commented on June 5, 2024 1

Most image data from sensors I typecast as uint 16 (in firmware) - I'm pretty sure some national instruments tools I use also do the same; generally I want to assess the raw data first to see if analog filtration is going well, not do any digital signal processing, so I'd just read in the data and visualize directly (no need for any additional typecasting).

from fastplotlib.

kushalkolar avatar kushalkolar commented on June 5, 2024

I propose always casting to float32 for the ImageDataFeature buffer, even simple things like Gaussian filters on uint8 or uint16 images result in overflow and meaningless results.

without casting:
image

with casting:
image

I do not think we should expect users to worry about the limitations of the dtype of their raw image data if they are using ImageWidget with frame_apply functions etc. to interactively play with different types of processing 😄 So we should make casting to float32 automatic, unless there are downsides I cannot think of?

from fastplotlib.

clewis7 avatar clewis7 commented on June 5, 2024

Sounds good to me...I think float32 gives enough flexibility

from fastplotlib.

ArjunPutcha avatar ArjunPutcha commented on June 5, 2024

Agreed. Might still be useful to allow users to pass in dtype if necessary with default float 32. Some image data I acquire with sensor is uint16 or uint8 by default.

from fastplotlib.

kushalkolar avatar kushalkolar commented on June 5, 2024

from fastplotlib.

kushalkolar avatar kushalkolar commented on June 5, 2024

ah ok, so in this case you would still want to use an isolated buffer but of the same type so it's 1-1 copying into the buffer.

from fastplotlib.

ArjunPutcha avatar ArjunPutcha commented on June 5, 2024

Exactly. But I haven't benchmarked how long it takes; I think if you go from uint16 to int32, there's two conversion - uint16 to in16, and int16 to int32. I'd imagine you'd need to do the same to float32, but I'm not sure if the time required to do so is ridiculously long. I can benchmark this coming week.
Also, if I were just visualizing analog data, I'd make a bunch of sensors testing different analog settings and visualize en masse

from fastplotlib.

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.