The purpose of this topic is to discuss, posts updates about and build together i.hyper.
The purpose of i.hyper is to provide a complete toolset for hyperspectral data processing in GRASS. It enables importing, preprocessing, visualization and exporting of hyperspectral datasets (raster_3d).
We (@ychemin and @tomazz Tomaž Žagar) are planning to push this Addon and this post is meant to update you with the latest work we do on this addon and to invite new contributors.
Modules in the i.hyper suite operate together to handle hyperspectral workflows. They include tools for data import, spectral preprocessing, visualization, and export, fully integrated with the GRASS 3D raster environment.
POSSIBLE ROAD MAP
Smarter metadata handling (top priority)
Hyperspectral should be a submenu of the imagery, loaded by default by i.spectral and any i.hyper addon installed
Wavelenght units should be integrated in the default 3D raster map metadata (nm, micrometers, unitless radiance, cm-1, etc.)
Atmospheric correction from radiance to reflectance (this is already started as i.hyper.smac by @ychemin )
Standardized export formats (Zarr, HDF5) (metadata in headers or separate files)
Refactoring Python components to native GRASS where possible
Integration of field spectrometry data
Support for regression and classification tasks (integrating hypnagogic)
Improved read and write performance (including faster 3D garray access)
3D hyperspectral cube visualization
Importers for additional data (OCI, HySIS, EMIT, DESIS, Hyperion)
currently only Tanager Basic Scene products are supported - orthorectified files store the data in different h5 folder (GRIDS instead of SWATHS) - therefore the importer cannot find the datasets, and even if it would be able to find the datasets it would fail as with basic product we are using HYP/Geolocation_Fields which are not present (nor needed) in orthorectified product … will try to add support also for orthorectified files ASAP …
so there is no metadata transferred from basic_radiance pertaining to atmospheric correction requirements:
1 - Sun Zenith Angle
2 - Sun Azimuth Angle
3 - Satellite Zenith Angle
4 - Satellite Azimuth Angle
Could you look into making them available as metadata, so atmospheric correction Algorithms can work? Number 3 might be an array 1D or 2D, or just an average, to check.
Yes, without this we cannot continue and we go back to the fact, that a smarter metadata handling is top priority.
@annakrat what would you suggest? beside wavelength and other band wise metadata we must add additional one to make processing possible. For now all the metadata has a dummy scheme, as it is simply written in comments and then parsed. We should update this somehow in a better way, then refactor all the i.hyper tools to follow it, then build other tools based on that. That metadata scheme should also be extendable. Any hints?
I am a bit stuck with the atmospheric addon, too many work arounds….
1 - r3.mask should have -r for removing
2 - i.spectral should have a max loading band > 5000, and display inside a window of the main GUI using matplotlib library, it should be able to load rast3d directly
3 - I should get a full grasp at how natively inside rast3d dataset and process a single layer.
Is it possible to degrade it to a generic r3.spectral or r3…, or something. Well, GRASS should have a generic option for raster, raster3d, imagery and temporal. Maybe based on i.hyper.explore and it should be available in the main GUI somehow.
I agree with that, but for now it is probably better to add new i.hyper functionalities and at one point, if/when such modules are added to GRASS, adapt the tools.
I am not confident in building core GRASS components (that’s why i started with the addon)- probably the best we can do in this context is to recognize such things, add issues/enhancement request to Github and continue with what we have.
There are not many r3 modules in general and by accounting the roadmap (integration into data science pipelines roadmap) I suppose they should/could be there at some point.