HSImage
Hyperspectral Image Interface Library for ENVI-BIL image files
|
This library is designed to allow open-source experimentation with ENVI-BIL hyperspectral images. The goal of this software is to promote the study of hyperspectral images in the academic computer vision research world. This software provides both a C++ and Python interface for ease of use. An associated project has resulted in a publicly available library of images available at https://osf.io/pd49t/. These images are all compatible and intended to be used with this software interface library.
Currently the software ONLY supports Linux (tested on Ubuntu 14.04) and MacOS. There is no platform specific software included in HSImage, but the software has not been tested on Windows, and so cannot claim to support it. If a user wishes to use HSImage on Windows, it should be possible, but there may be issues in the compliation with linking to the OpenCV libraries.
The dependencies for HSImage are:
Tnstall it and use it to create a virtual environment, type the following into terminal:he practice of using Python virtual environments is recommended. To set up a virtual environment, type the following into terminal:
Virtualenvwrapper is a convenience package built around virtualenv and is optional for this software, but is useful for managing multiple virtual environments. THIS DOES NOT NEED TO BE INSTALLED FOR HSI TO FUNCTION.
To install it and use it to create a virtual environment, type the following into terminal:
To install Boost and Numpy type into the terminal
The OpenCV installation is non-trivial, as the HSI package requires both the Python and C++ OpenCV libraries. If you already have OpenCV 3.x with the appropriate Python version installed, there should be no additional steps needed to install HSImage. If you do not have OpenCV installed, a bash script on the repository will can peform the installation for you on Ubuntu. The steps in the script should be appropriate for MacOS, but it has not been tested.
After OpenCV is installed, the Python module will need to be symlinked into the virtual environment you have created.
Python 2:
Python 3:
where x is the minor version of Python installed on your system.
Potentially, you will need to provide the directory of the C++ OpenCV libraries to your virtualenv. This is done by modifying the LD_LIBRARY_PATH variable
Installation of HSI is handled through the PIP package manager. Simply type into your terminal:
This will build the c++/python combined library file and install it to the site-packages folder in your current Python evironment. To use the C++ libary, simply include `hsimage.h, classifiedhsimage.h, and labelfile.h in your project and link to the generated library file at compile.
To test the software, the Github repository will need to be cloned to your computer. This will give you access to the setup.py file with the testing scripts. Simply run
This will perform the set of tests and output a result to the terminal the software is ran from.