"Edge-preserving multiscale decomposition based on local extrema"
by Kartic Subr, Cyril Soler and Fredo Durand. TOG 2009.(SIGGRAPH-Asia 09)
-----------------------------------------------------------------------------
Source code author: Kartic Subr

There are two binaries in this package. 
1) msdecomp which performs the decomposition
2) ModeEq which is a GUI tool for equalisation using the results of msdecomp.

How to build 
-------------
run BuildScript.sh in MSDecomp/
i.e.
*Location*/MSDecomp/> ./BuildScript.sh
The executable binaries will be in MSDecomp/bin

Dependencies
-------------
The following libraries are used for building msdecomp
- Sparselib: mv, sparse and spblas which are in libs/SparseLib++/1.7/lib/
  Included in this package are required for the interpolation step in constructing envelopes.  
- ImageMagick++ (not included) for image reading/writing.

The following libraries are used for building ModeEq
- OpenEXR  
- ImageMagick++ 
- QGLViewer

Running the decomposition
--------------------------
eg. *Location*/MSDecomp/> ./bin/msdecomp InputImage.png 3
decomposes InputImage.png into 3 modes and stores the results in binary files at MSDecomp/output/BinData/

Running the GUI tool for equalisation
-------------------------------------
eg. *Location*/MSDecomp/> ./bin/ModeEq -p ./output/BinData
loads the binary data in ./output/BinData and provides sliders for adjusting each mode individually.

Troubleshooting
----------------
Trouble building the GUI tool: Check that you are using qt-4
    ie. you have something like
    setenv QTDIR /usr/lib/qt4
    setenv QMAKESPEC /usr/share/qt4/mkspecs/linux-g++-64
    alias qmake qmake-qt4

Code
----
EMDecomposer2D.h/cpp provide an abstraction for image input and decomposition.
MSDecomp.cpp demonstrates how to use EMDecomposer
NHLSOpt.h/cpp provide the non-homogeneous least squares interpolation routine
