This is a maintenance version: code review, bugs fix, classes refactoring and many small improvements that have not a direct impact on the functionality.
The module classifiers is renamed classification (Yes, again! Sorry)
This version adds compatibility to the IPython Notebook. Five examples present this feature.
This version support a noise reduction module called ‘noise’. The first version of this module is composed by:
To be compatible with the noise reduction module, ATGP and NFINDR needed some adjustments and they was updated accordingly:
This is a patch level version for the 0.10 version. The function FCLS is fixed. To run this new FCLS you need to install CVXOPT. Note that you need CVXOPT only if your intent is to run FCLS. See the Christoph Gohlke web site, it support CVXOPT for Windows.
The two majors improvements are a substantial speed up for NFINR and an interface to the convex_hull_removal function.
In details:
NFINDR exist in two versions now. The pure python version have a speed gain of 4x against the version 0.07. The code is the same, the only difference is an almost direct call to lapack. Something that we can do with numpy and scipy. The second version is a cython rewrite without a call to lapack. It give a 8x speedup compared to the 0.07 version. This result seems abnormal, beating MKL blas/lapack is difficult but not impossible. It depends on the context, check the unmixing module documentation.
The more important improvements are a documentation, a NormXCorr classifier and a fix to NFINDR.
NFINDR have a new feature. You can use ATGP to initialize the first endmembers set.
convert2d_signal_last is renamed to convert2D the signal module is renamed to sigproc
Many improvements to UCLS, NNLS, FCLS, ACE, MatchedFilter, HfcVd, NFINDR (all now in C-order). In overall this version do a better use of numpy.
Speedup improvements to ACE, SAM and SID.
New functions: hyperCem -> detextion.CEM hyperGLRT -> detection.GLRT eia.FIPPI -> unmixing.FIPPI
Added a get_idx method to the classes PPI, NFINDR, ATGP, FIPPI. This method return a index list corresponding to the induced endmembers.
Added a legend to the plot function for the classes SAM and SID.
Unlike the previous version, Cython was not use for this one. Exploring the power of numpy gave very good speedup to SID and SAM.
Fix: NFINDR: np.zeros((p), dtype=np.int16) become IDX = np.zeros((p), dtype=np.long)
In conclusion, almost all the code was revisited and improved.
The library was reorganized in many modules: abundance_map, classification, detection, formatting, material_count, signal, tests, unmixing and util. The functions as been sorted into them and in some case a class interface to the function was added. See the tests examples, they are the only documentation for now.
Cython has been introduced. For this version, only the SAM classifier is compiled with cython.
Three distributions come with this version: - the source - one with SAM classifier compiled for Windows 7 32 bits and Python 2.7 and - one with SAM classifier compiled for Windows 7 64 bits and Python 2.7
You can use the source package, it fall back on the python version of the SAM classifier. To use, unzip the package and place the checkout directory on your PYTHONPATH.
ex_clsf.py is renamed to ex_clf.py
For the class interfaces, the format of the HSI data cube is (m x n x p), m and n are the spatial indices and p is the pixel. And for a library of signals the format is (N x p), N is the indice and p the pixel.
Note : The SPy library use the C-order for the numpy representation of the data. The signal is in the innermost loop. That’s the best representation for almost all algorithms that we can apply to this kind of data. In a first attemp I tried to simulate the Matlab way of doing for hyperspectral processing (usin a F-order shape). But for this version I am revising my position and started of doing things in a more pythonic approach. For the listed functions the signal is always last. This give a gain of around 20% in speed improvement :
SAM, SID, SAM_classifier, SID_classifier
For the next versions, more functions will be migrated to the C-order, signal last.
Added from the Matlab Hyperspectral Toolbox: hyperMatchedFilter -> MatchedFilter (with a good optimisation from numpy) hyperAce -> ACE
A test program for the detections algorithms -> ex_detect.py
New functions, not from the current sources, but from articles : SID and SAM and helper functions SID_classifier and SAM_classifier
A test program for the classification algorithms -> ex_clsf.py
Added from the Matlab Hyperspectral Toolbox: hyperNnls -> NNLS
From the Endmember Induction Algorithms toolbox (EIA): EIA_ATGP -> ATGP
Patch to convert3d(): it can now accept a 1D vector as input
Added from the Matlab Hyperspectral Toolbox: hyperConvexHullRemoval -> convex_hull_removal hyperPpi -> PPI
From the Endmember Induction Algorithms toolbox (EIA): EIA_NFINDR -> NFINDR
Added two new examples, one for the convex_hull_removal, ex_hull.py and one for NFIND, ex_eia.py
A ligthweight data for the tests.
Many improvements to the tests programs.
First version!
From the Matlab Hyperspectral Toolbox:
hyperConvert2D -> convert2d_signal_first, convert2d_signal_last
hyperConvert3D -> convert3d
hyperNormalize -> normalize
hyperAtgp -> ATGP
hyperHfcVd -> HfcVd
hyperPct -> PCT, but use scikit.learn PCA
hyperUcls -> UCLS
hyperFcls -> FCLS
hyperCov -> use numpy.cov
hyperCorr -> use numpy.corrcoef
From the The piecewise constant toolbox: pwc_bilateral -> bilateral