[HN Gopher] Spectral Imaging Made Easy: A Powerful Python Library
       ___________________________________________________________________
        
       Spectral Imaging Made Easy: A Powerful Python Library
        
       Author : janezla
       Score  : 55 points
       Date   : 2024-12-23 11:39 UTC (2 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | janezla wrote:
       | I've created a Python library for working with spectral images.
       | It started as a mix of work and personal interest. Since I work
       | in research, I brought together a lot of useful code to make
       | handling spectral images easier and packaged it into this
       | library. I hope others find it helpful too! :blush:
       | 
       | Link to docs: https://siapy.github.io/siapy-lib/
        
         | fooblaster wrote:
         | what exactly does one do with hyperspectral images? Or what do
         | you do with your library?
        
           | boccaff wrote:
           | There is a multitude of applications leveraging parts of the
           | spectra different than the visible. I come from an
           | agricultural background, and you can see examples from
           | improving classification of land use, detection and
           | classification of diseases, nutritional status assessment,
           | indirect measurements of properties of plants and soil... it
           | is endless, and every time any part of the tool stack gets
           | cheaper, you have more and more potential applications. This
           | comment [1] have a nice description for the library.
           | 
           | [1] https://news.ycombinator.com/item?id=42507805
        
       | __mharrison__ wrote:
       | Hint. If your library is for creating images... Put an example
       | image in the Readme.
        
         | tweakimp wrote:
         | I tried to understand what this library does, but without image
         | examples its impossible for me. The docs almost seem to be
         | unhelpful on purpose. Look at the use case description: "The
         | functionality of the SiaPy library has been implemented in
         | various use cases, demonstrating its capabilities and potential
         | applications. The library's functionality is not limited to
         | these examples and can be extended to other applications as
         | well."
         | 
         | Are we living in the dead Internet already where everything is
         | meaningless AI garbage?
        
           | Davidbrcz wrote:
           | Spectral images are images where there are several sensors
           | into one image (think visible and infrared/thermal for
           | instance). A good example would be Altum Pt camera
           | (https://ageagle.com/drone-sensors/altum-pt-camera)
           | 
           | Then, this library can be used for instance (their word) -
           | Display images from two cameras. - Co-register cameras and
           | compute the transformation from one camera's space to
           | another. - Select regions in images for training machine
           | learning (ML) models. - Perform image segmentation using a
           | pre-trained ML model. - Convert radiance images to
           | reflectance by utilizing a reference panel. - Display
           | spectral signatures for in-depth analysis.
        
           | toxik wrote:
           | It is a by-product of a research project, its main connection
           | is "these things were useful to the author while working on
           | spectral images".
        
       | ulrischa wrote:
       | I made spectral image analysis at university. And there weren't
       | good software Tools available
        
       | hoomanmo wrote:
       | is it compatible with Python 3.13?
        
         | KeplerBoy wrote:
         | Isn't pretty much everything compatible with 3.13?
         | 
         | The packages, which were affected by breaking changes (numpy,
         | cython, scipy and so on) were patched months ago.
        
       | mturmon wrote:
       | Related: A python package for atmospheric correction of imaging
       | spectroscopy ("hyperspectral") radiance data:
       | https://github.com/isofit/isofit
       | 
       | And a superset package, for the EMIT imaging spectroscopy
       | investigation: https://github.com/emit-sds
        
       | tomtom1337 wrote:
       | If you're looking to analyse your hyperspectral images (spectrum-
       | images, image-images or n-dimensional- n-dimensional datasets), I
       | can highly recommend hyperspy [1].
       | 
       | One of the brilliant ideas hyperspy incorporates is that we
       | consider datasets to have a navigation dimension and a signal
       | dimension (think, you measure a spectrum at each point on an
       | image), and you can easily transpose between them. This means
       | that you can <<move around>> on the image and see what the
       | spectrum looks like, or transpose and see what the image looks
       | like as a function of the spectrum.
       | 
       | In particular I think the model building, where you can fit
       | components to your dataset, is really useful.
       | 
       | It works best with the Jedi LSP - pyright doesn't support the way
       | we added lazy loading / extensions to the base hyperspy package.
       | 
       | [1] https://hyperspy.org/
        
         | ptero wrote:
         | Hyperspy is great and the ability to "move around"
         | n-dimensiobal datasets is a very powerful tool for the data
         | visualization!
         | 
         | When I used it I missed two things compared to a similar
         | superpower tool I used when I was working with multidimensional
         | field test data in Matlab.
         | 
         | 1. Ability to use "text dimensions", or non-uniformly spaced
         | grid points.
         | 
         | 2. Ability to select and filter on arbitrary expressions
         | instead of by slice only.
         | 
         | The need for (2) is harder to grok (what's that going to do for
         | a grid dataset???), but being able to apply a few arbitrary
         | selection expressions is a superpower when analyzing messy 10+
         | dimensional data.
         | 
         | That, and the ability to add, on the fly, virtual dimensions
         | for arbitrary expressions.
         | 
         | Someday, when I am ready to retire, I will take half a year to
         | build this in python...
        
           | tomnicholas1 wrote:
           | Interesting - I'm curious whether you feel that Xarray covers
           | these use cases already?
           | 
           | https://xarray.dev/
           | 
           | Especially as I've said before that Hyperspy shares so many
           | features in common with Xarray that Hyperspy should just use
           | Xarray under the hood.
           | 
           | https://github.com/hyperspy/hyperspy/discussions/3405
        
       | adammarples wrote:
       | All that work and you can't put a description of what it does, an
       | example, an image, something. 10'000 people click the link you
       | posted, see nothing at all, and leave again.
        
       | ipunchghosts wrote:
       | https://github.com/isaacgerg/matlabHyperspectralToolbox
        
       | BugsJustFindMe wrote:
       | I spent 20 minutes clicking through links and reading
       | descriptions and I still can't tell whether this is for pictures
       | of ghosts or something else.
        
       | momoschili wrote:
       | who out there actually has a consumer spectral imager these days?
       | Cheapest ones I can find are ~10k USD....
        
       ___________________________________________________________________
       (page generated 2024-12-25 23:01 UTC)