Endmembers extraction classes


ATGP

class pysptools.eea.ATGP

Automatic target generation process endmembers induction algorithm.

display(axes=None, suffix=None)

Display the endmembers to a IPython Notebook.

Parameters:
axes: dictionary [default None]
  • axes[‘wavelength’] : a wavelengths list (1D python list). If None or not specified the list is automaticaly numbered starting at 1.
  • axes[‘x’] : the x axis label, ‘Wavelength’ if None or not specified. axes[‘x’] is copied verbatim.
  • axes[‘y’] : the y axis label, ‘Brightness’ if None or not specified. axes[‘y’] is copied verbatim.
suffix: string [default None]
Suffix to add to the title.
extract(M, q, normalize=False, mask=None)

Extract the endmembers.

Parameters:
M: numpy array
A HSI cube (m x n x p).
q: int
Number of endmembers to be induced (positive integer > 0).
normalize: boolean [default False]
Normalize M before unmixing.
mask: numpy array [default None]
A binary mask, if True the corresponding signal is part of the endmembers search.
Returns: numpy array
Set of induced endmembers (N x p).
References:
A. Plaza y C.-I. Chang, “Impact of Initialization on Design of Endmember Extraction Algorithms”, Geoscience and Remote Sensing, IEEE Transactions on, vol. 44, no. 11, pgs. 3397-3407, 2006.
get_idx()
Returns: numpy array
Array of indices into the HSI cube corresponding to the induced endmembers
plot(path, axes=None, suffix=None)

Plot the endmembers.

Parameters:
path: string
The path where to put the plot.
axes: dictionary [default None]
  • axes[‘wavelength’] : a wavelengths list (1D python list). If None or not specified the list is automaticaly numbered starting at 1.
  • axes[‘x’] : the x axis label, ‘Wavelength’ if None or not specified. axes[‘x’] is copied verbatim.
  • axes[‘y’] : the y axis label, ‘Brightness’ if None or not specified. axes[‘y’] is copied verbatim.
suffix: string [default None]
Suffix to add to the file name.

FIPPI

class pysptools.eea.FIPPI

Fast Iterative Pixel Purity Index (FIPPI) endmembers induction algorithm.

display(axes=None, suffix=None)

Display the endmembers to a IPython Notebook.

Parameters:
axes: dictionary [default None]
  • axes[‘wavelength’] : a wavelengths list (1D python list). If None or not specified the list is automaticaly numbered starting at 1.
  • axes[‘x’] : the x axis label, ‘Wavelength’ if None or not specified. axes[‘x’] is copied verbatim.
  • axes[‘y’] : the y axis label, ‘Brightness’ if None or not specified. axes[‘y’] is copied verbatim.
suffix: string [default None]
Suffix to add to the title.
extract(M, q=None, maxit=None, normalize=False)

Extract the endmembers.

Parameters:
M: numpy array
A HSI cube (m x n x p).
q: int [default None]
Number of endmembers to be induced, if None use HfcVd to determine the number of endmembers to induce.
maxit: int [default None]
Maximum number of iterations. Default = 3*q.
normalize: boolean [default False]
Normalize M before unmixing.
Returns: numpy array
Set of induced endmembers (N x p).
References:
Chang, C.-I., “A fast iterative algorithm for implementation of pixel purity index”, Geoscience and Remote Sensing Letters, IEEE, vol. 3, no. 1, pags. 63-67, 2006.
get_idx()
Returns: numpy array
Array of indices into the HSI cube corresponding to the induced endmembers.
plot(path, axes=None, suffix=None)

Plot the endmembers.

Parameters:
path: string
The path where to put the plot.
axes: dictionary [default None]
  • axes[‘wavelength’] : a wavelengths list (1D python list). If None or not specified the list is automaticaly numbered starting at 1.
  • axes[‘x’] : the x axis label, ‘Wavelength’ if None or not specified. axes[‘x’] is copied verbatim.
  • axes[‘y’] : the y axis label, ‘Brightness’ if None or not specified. axes[‘y’] is copied verbatim.
suffix: string [default None]
Suffix to add to the file name.

NFINDR

class pysptools.eea.NFINDR

N-FINDR endmembers induction algorithm.

display(axes=None, suffix=None)

Display the endmembers to a IPython Notebook.

Parameters:
axes: dictionary [default None]
  • axes[‘wavelength’] : a wavelengths list (1D python list). If None or not specified the list is automaticaly numbered starting at 1.
  • axes[‘x’] : the x axis label, ‘Wavelength’ if None or not specified. axes[‘x’] is copied verbatim.
  • axes[‘y’] : the y axis label, ‘Brightness’ if None or not specified. axes[‘y’] is copied verbatim.
suffix: string [default None]
Suffix to add to the title.
extract(M, q, transform=None, maxit=None, normalize=False, ATGP_init=False, mask=None)

Extract the endmembers.

Parameters:
M: numpy array
A HSI cube (m x n x p).
q: int
The number of endmembers to be induced.
transform: numpy array [default None]
The transformed ‘M’ cube by MNF (m x n x components). In this case the number of components must == q-1. If None, the built-in call to PCA is used to transform M in q-1 components.
maxit: int [default None]
The maximum number of iterations. Default is 3*p.
normalize: boolean [default False]
If True, M is normalized before doing the endmembers induction.
ATGP_init: boolean [default False]
Use ATGP to generate the first endmembers set instead of a random selection.
mask: numpy array [default None]
A binary mask, when True the corresponding signal is part of the endmembers search.
Returns: numpy array
Set of induced endmembers (N x p).
References:
Winter, M. E., “N-FINDR: an algorithm for fast autonomous spectral end-member determination in hyperspectral data”, presented at the Imaging Spectrometry V, Denver, CO, USA, 1999, vol. 3753, pgs. 266-275.
Note:
The division by (factorial(p-1)) is an invariant for this algorithm, for this reason it is skipped.
get_idx()
Returns : numpy array
Array of indices into the HSI cube corresponding to the induced endmembers
get_iterations()
Returns : int
The number of iterations.
plot(path, axes=None, suffix=None)

Plot the endmembers.

Parameters:
path: string
The path where to put the plot.
axes: dictionary [default None]
  • axes[‘wavelength’] : a wavelengths list (1D python list). If None or not specified the list is automaticaly numbered starting at 1.
  • axes[‘x’] : the x axis label, ‘Wavelength’ if None or not specified. axes[‘x’] is copied verbatim.
  • axes[‘y’] : the y axis label, ‘Brightness’ if None or not specified. axes[‘y’] is copied verbatim.
suffix: string [default None]
Suffix to add to the file name.

PPI

class pysptools.eea.PPI

Performs the pixel purity index algorithm for endmember finding.

display(axes=None, suffix=None)

Display the endmembers to a IPython Notebook.

Parameters:
axes: dictionary [default None]
  • axes[‘wavelength’] : a wavelengths list (1D python list). If None or not specified the list is automaticaly numbered starting at 1.
  • axes[‘x’] : the x axis label, ‘Wavelength’ if None or not specified. axes[‘x’] is copied verbatim.
  • axes[‘y’] : the y axis label, ‘Brightness’ if None or not specified. axes[‘y’] is copied verbatim.
suffix: string [default None]
Suffix to add to the title.
extract(M, q, numSkewers=10000, normalize=False)

Extract the endmembers.

Parameters:
M: numpy array
A HSI cube (m x n x p).
q: int
Number of endmembers to find.
numSkewers: int [default 10000]
Number of “skewer” vectors to project data onto. In general, recommendation from the literature is 10000 skewers.
Returns: numpy array
Recovered endmembers (N x p).
get_idx()
Returns: numpy array
Array of indices into the HSI cube corresponding to the induced endmembers
plot(path, axes=None, suffix=None)

Plot the endmembers.

Parameters:
path: string
The path where to put the plot.
axes: dictionary [default None]
  • axes[‘wavelength’] : a wavelengths list (1D python list). If None or not specified the list is automaticaly numbered starting at 1.
  • axes[‘x’] : the x axis label, ‘Wavelength’ if None or not specified. axes[‘x’] is copied verbatim.
  • axes[‘y’] : the y axis label, ‘Brightness’ if None or not specified. axes[‘y’] is copied verbatim.
suffix: string [default None]
Suffix to add to the file name.