Represent the image spectra as a mixture of Gaussians

Contents

Syntax

 [MIXCOEFF, MEAN, STD] = get_gaussian_mixture(I, WAVELENGTH, M, DEBUG)

Description

 
  This function represents the input spectra using a Gaussian mixture model.
  
  The method used in this function is based upon the EM algorithm delivering at output the mixture coefficients, 
  the mean and standard deviation of the Gaussian components in the wavelength domain.

Input:

     
     I: Spectral data cube of dimensions height x width x bands.
     WAVELENGTH: Wavelength vector at which the image was captured.
     M: The number of Gaussian components used to represent the spectra.
     DEBUG: The level of debugging information to be displayed. The default is 1 with a maximum level of 3

Output:

     MIXCOEFF: Mixture coefficients delivered on an array of size height x width x M.
     MEAN: The means of the Gaussian components per pixel on a matrix of size height x width x M.
     STD: The standard deviations of the Gaussian components per pixel delivered on a matrix of 
	     size height x width x M.

Example

     Fit a mixture of 3 Gaussians to the spectra corresponding to the
     illuminant on the Scyllarus data structure HSZ.
 [mats, ~] = size(HSZ.L.Elements);
 [MIXCOEFF, MEAN, STD] = get_gaussian_mixture(reshape(HSZ.L.Elements, ...
 [mats 1 bands]), HSZ.HDR.wavelength, 3);