Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arthur-e/unmixing
Interactive tools for spectral mixture analysis of multispectral raster data in Python
https://github.com/arthur-e/unmixing
earth-observation lsma multispectral-images raster remote-sensing satellite-data satellite-imagery spectral-mixture-analysis
Last synced: 3 months ago
JSON representation
Interactive tools for spectral mixture analysis of multispectral raster data in Python
- Host: GitHub
- URL: https://github.com/arthur-e/unmixing
- Owner: arthur-e
- License: mit
- Created: 2017-03-17T16:43:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T22:42:24.000Z (almost 5 years ago)
- Last Synced: 2024-06-11T16:59:41.322Z (5 months ago)
- Topics: earth-observation, lsma, multispectral-images, raster, remote-sensing, satellite-data, satellite-imagery, spectral-mixture-analysis
- Language: Python
- Homepage:
- Size: 5.4 MB
- Stars: 103
- Watchers: 9
- Forks: 24
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES
- License: LICENSE
- Citation: CITATION.md
Awesome Lists containing this project
- awesome-earthobservation-code - unmixing - Interactive tools for spectral mixture analysis of multispectral raster data in `Python` (`Python` processing of optical imagery (non deep learning) / Processing imagery - post processing)
README
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3585979.svg
:target: https://doi.org/10.5281/zenodo.3585979==========================
Interactive Unmixing Tools
==========================Overview
========This is a library of interactive tools and functions for performing linear spectral mixture analysis (LSMA) and spatially adaptive spectral mixture analysis (SASMA).
It supports parallel fully constrained least-squares (FCLS) mixture analysis over multiple processes, allowing for very efficient mapping of endmember abundances, both in the spatially adaptive approach and in regular LSMA.
In detail, the `unmixing` module includes tools and functions to support:- Stacking raster bands from any GDAL file format, including HDF;
- Applying a mask or a combination of masks to a raster;
- Generating raster masks from saturated pixels or using density slicing (e.g., to mask water pixels);
- Applying CFMask output and other quality assurance layers from the USGS;
- Band-wise compositing of reflectance (or fraction/ abundance images);
- Tasseled cap transformation and other indices including NDVI and RNDSI;
- Dimensionality reduction through the Minimum Noise Fraction (MNF);
- Radiometric rectification of a raster time series;
- Visualizing the mixing space of a moderate resolution raster;
- Interactive selection of pixels in the mixing space, which are then captured in a KML file;
- Endmember induction and plotting of endmembers for linear spectral mixture analysis (LSMA);
- Fully constrained least squares (FCLS) unmixing;
- Spatial interpolation of endmembers for spatially adaptive spectral mixture analysis (SASMA);
- Learning of endmember candidates for SASMA using classification and regression trees (CART);
- Validation of unmixing through a forward model of reflectance;**For an overview and tutorial on how to use this library, check out the iPython Notebook(s) in the** ``docs/`` **folder:**
-
-Installation and Setup
======================Because this is a scientific library, there are complex dependencies that may be difficult to install.
For GNU/Linux systems, particularly Ubuntu, look at ``install.sh`` for a guide on installing the system dependencies required for the Python dependencies.At this time, installation is intended for development purposes only.
As such, ``unmixing`` should be installed in "editable" mode using ``pip``; see .
From the ``unmixing`` directory, where ``setup.py`` is found::$ pip install -e .
Dependencies
------------* ``numpy``
* ``scipy``
* ``matplotlib``
* ``pysptools``
* ``GDAL``
* ``pykml``
* ``scikit-learn`` (For SASMA)Use System Dependencies
-----------------------Many of the core packages, particularly NumPy and SciPy, have wide adoption and use.
They also take a lot of time and clock cycles to compile into a virtual environment.
Consequently, it is recommended that these libraries be installed globally (system-wide).Other packages should be installed only in the virtual environment.
To use both system-wide and local packages within a virtual environment, the virtual environment must be set up with the ``--system-site-packages`` option::sudo apt-get install python3-numpy python3-scipy python3-matplotlib python3-zmq
virtualenv -p /usr/bin/python3.5 --system-site-packagesThe local packages can be installed within the virtual environment via ``pip``::
source /my/virtualenv/bin/activate
pip install -r REQUIREMENTSDocumentation
=============Python Dependencies
-------------------Some resources on the dependencies can be found:
* ``matplotlib``
* PySptools
* PySptools on PyPIThird-Party Tools
-----------------Documentation on related (but not required) third-party tools can be found:
* Fmask
* CFmask (A C version of Fmask)
* LEDAPSFoundations
===========Hyperspectral Imaging (HSI) Cubes
---------------------------------Many of the tools in this library are designed to work with HSI cubes.
While the raster arrays read in from GDAL are ``p x m x n`` arrays, HSI cubes are ``n x m x p`` arrays, where ``m`` is the row index, `n` is the column index, and ``p`` is the spectral band number.
It is important to note that the row index `n` corresponds to the latitude while the column index `m` corresponds to the longitude.
Thus, the coordinates ``(n, m)`` can be converted directly to a longitude-latitude pair.