This document is structured as follows:
This software suite comprises the [ SparseFI - J-SparseFI - J-SparseFI-HM ] family of multi-sensor image fusion algorithms for multi- and hyperspectral image super-resolution based on sparse representations.
A detailed description of the algotihms implemented in this software suite is provided in my dissertation:
C. Grohnfeldt, "Multi-sensor Data Fusion for Multi- and Hyperspectral Resolution Enhancement Based on Sparse Representations ", Ph.D. Dissertation, Technical University of Munich, 2017; doi:10.14459/2017md1366768
This code has been tested on UNIX-based machines only. Its dependencies are as follows: gcc/g++
, OpenMPI
, curl
, wget
, grep
.
This software suite depends on two external libraries, which need to be installed and linked to the repository's main directory.
It is recommended to install those libraries outside of the repo and link them via symbolic links, as instructed further below.
Create a directory, somewhere outside of the repository, into which third party libraries will be installed.
mkdir <chosen-path-to-thirdparty-library-dir>
The Eigen project is hosted on http://eigen.tuxfamily.org. A git mirrow is available on GitHub. We'll clone that into the above-created lib directory as follows:
git clone https://github.com/eigenteam/eigen-git-mirror.git <chosen-path-to-thirdparty-library-dir>/eigen
That's it for Eigen. Further below, we will link this library to our repository's directory.
GDAL can be installed either on a system level or locally following the descriptions on www.gdal.org. Here, we'll build it from source code and install it locally to avoid dependency on sudo permissions.
-
Download the source code of the latest stable release:
cd <chosen-path-to-thirdparty-library-dir> mkdir downloads cd downloads tmp=$(curl http://download.osgeo.org/gdal/CURRENT/ | grep -o "gdal-[2-9].[0-9].[0-9].tar.gz") filename=${tmp/.tar.gz*/.tar.gz} wget "http://download.osgeo.org/gdal/CURRENT/$filename" tar zxf $filename
-
Install locally as follows:
cd ${filename/.tar.gz/} gdal_prefix="<chosen-path-to-thirdparty-library-dir>/gdal" ./configure --prefix=$gdal_prefix # for compilation on the SuperMUC, you need to load a gcc # compiler that is more recent that the default one: # module load gcc/8 make make install
-
Test if local installation process was successfull:
export PATH=${gdal_prefix}/bin:$PATH export LD_LIBRARY_PATH=${gdal_prefix}/lib:$LD_LIBRARY_PATH export GDAL_DATA=${gdal_prefix}/share/gdal gdalinfo --version
The last command should output something like the following:
GDAL 2.3.2, released 2018/09/21
. -
Clean up: Navigate to repository and remove downloaded files.
cd <path-to-repo(sparse_image_fusion)> rm -r <chosen-path-to-thirdparty-library-dir>/downloads
ln -s <chosen-path-to-thirdparty-library-dir> <path-to-repo(sparse_image_fusion)/lib>
Depending on the underlying maching this program is compiled and run on, you need to modify the Makefile
by setting the compiler variable CXX
to either mpic++
(PC) or mpiCC
(server).
module unload mpi.ibm # <- on SuperMUC only
module load mpi.intel/2018_gcc # <- on SuperMUC only
module load gcc/8 # <- on SuperMUC only
make
Run the script run.sh
, in which all program arguments are set including specification of paths to the input data set.
bash run.sh
On the SuperMUC, corresponding LoadLeveler scripts need to be created and submitted.
A technical flowchart describing the J-SpareFI-HM algorithm is given below.