Recover the set of materials in the scene

Contents

Syntax:

     [MAT, MATIND, MATAB] = recover_materials(S);
     [MAT, MATIND, MATAB] = recover_materials(S, [], DEBUG);
     [MAT, MATIND, MATAB] = recover_materials(S, [],[], DOWNSAMPLERATE);
     [MAT, MATIND, MATAB] = recover_materials(S, [],[],[], MAX_CLU_NUM)
     [MAT, MATIND, MATAB] = recover_materials(S, [],[],[], [], TMAX):
     [MAT, MATIND, MATAB] = recover_materials(S, [],[],[], [], [], TMIN):
     [MAT, MATIND, MATAB] = recover_materials(S, [],[],[], [], [], [],COOLRATE):
     [MAT, MATIND, MATAB] = recover_materials(S, [],[],[], [], [], [], [], SPLIT_THRESHOLD);
     [MAT, MATIND, MATAB] = recover_materials(S, METHOD, DEBUG,...
             DOWNSAMPLERATE, MAX_CLU_NUM, TMAX, TMIN, COOLRATE, SPLIT_THRESHOLD);

Description:

     This function computes the spectrum of the materials in the scene.

Input:

     S : Image reflectance spectra organised as a 2D matrix of 
          dimensions height*width x bands.
     METHOD: String denoting the method to be used, i.e. 'DA' or
          'KM' for either deterministic annealing or k-means,
          respectively. The default is determinsitic annealing ('DA').
      DEBUG: The level of debugging information to be shown at execution time. It
          ranges from 1 to 5, 1 (default) displays minimal information.
      TMAX: The maximum temperature of the deterministic annealing process. (default: 0.02)
      TMIN: The minimum temperature of the deterministic annealing process (default 0.00025)
      COOLRATE: The cooling rate at each iteration of the DA algorithm. (default: 0.8)
      MAX_CLU_NUM: The maximum number of clusters (default: 20).
      SPLIT_THRESHOLD: The threshold below which a cluster should be split. When the dot
          product between the real and the surrogate centroid vectors fall below this
          threshold, then the cluster is split (default: cos(5*pi/180)).
      DOWNSAMPLERATE:  The rate at which the input image is down sampled. 
          The default is 1 (no downsampling).

Output:

     MAT: Spectra for the materials  in the image. This is a 2D array of size 
          materials x bands.
     MATAB: The material abundancy matrix for each pixel in a matrix of size 
          height x width x materials.
     MATIND: The material indexes for each pixel on a matrix of size 
          height x width x materials.