Linear Spectral Unmixing (Image Analyst)

Available with Image Analyst license.

Available with Spatial Analyst license.

Summary

Performs subpixel classification and calculates the fractional abundance of different land cover types for individual pixels.

Linear Spectral Unmixing

Usage

  • This tool calculates the fractional cover for individual pixels that contain multiple land cover types. It generates a multiband raster in which each band corresponds to the fractional abundance of each land cover class. For example, you can use it to perform land cover classification on a multispectral image to identify photosynthetic vegetation, bare soil, and dead or nonphotosynthetic vegetation.

  • The order of the output multiband raster follows the order of the input spectral profile.

  • The number of classes cannot exceed the number of bands in the input raster. For example, you cannot extract information about more than 8 classes from an 8-band raster.

  • The following is an example of a spectral profile provided as a .json file:

    {
      "EsriEndmemberDefinitionFile" : 0,
      "FileVersion" : 1,
      "NumberEndmembers" : 3,
      "NumberBands" : 7,
      "Endmembers" : [	
        {
          "EndmemberID" : 1,
          "EndmemberName" : "urban",
          "SpectralProfile" : [
                88,
    			                     42,
    			                     48,
    			                     38,
    			                     86,
    			                    115,
    			                     59
              ]
        },
        {
          "EndmemberID" : 2,
          "EndmemberName" : "vegetation",
          "SpectralProfile" : [
    			                       50,
    			                       21,
    			                       20,
    			                       35,
    			                       50,
    			                      110,
    			                       23
              ]
        },
        {
          "EndmemberID" : 3,
          "EndmemberName" : "water",
          "SpectralProfile" : [
    			                       51,
    			                       20,
    			                       14,
    			                        9,
    			                        7,
    			                      116,
    			                        4
              ]
        }
      ]        
    }
  • Classifier definition files (.ecd) generated from the Train Maximum Likelihood Classifier tool are the only classifier output currently supported.

  • Polygon features require the following field names:

    • classname—A text field indicating the name of the class category
    • classvalue—A long integer field containing the integer value for each class category
  • When calculating the fractional abundance of each land cover class, the solution can include negative coefficients or fractions. If this occurs, review the training samples in your input spectral profile to confirm that they accurately represent each class. If they appear correct, select Non-negative for Output Value Option.

Parameters

LabelExplanationData Type
Input Raster

The input raster dataset.

Raster Dataset; Mosaic Dataset; Mosaic Layer; Raster Layer; File; Image Service
Input Training Features or Spectral Profile

The spectral information for the different land cover classes.

This can be provided as polygon features, a training sample feature class generated from the Training Samples Manager, a classifier definition file (.ecd) generated from the Train Maximum Likelihood Classifier tool, or a JSON file (.json) that contains the class spectral profiles.

File; Feature Layer; String
Output Value Option
(Optional)

Specifies how the output pixel values will be defined.

  • Sum to one —Class values for each pixel will be provided in decimal format with the sum of all classes equal to 1. For example, Class1 = 0.16; Class2 = 0.24; Class3 = 0.60.
  • Non-negative —There will be no negative output values.
String

Return Value

LabelExplanationData Type
Output Raster

The output multiband raster dataset.

Raster

LinearSpectralUnmixing(in_raster, in_spectral_profile_file, {value_option})
NameExplanationData Type
in_raster

The input raster dataset.

Raster Dataset; Mosaic Dataset; Mosaic Layer; Raster Layer; File; Image Service
in_spectral_profile_file

The spectral information for the different land cover classes.

This can be provided as polygon features, a classifier definition file (.ecd) generated from the Train Maximum Likelihood Classifier tool, or a JSON file (.json) that contains the class spectral profiles.

File; Feature Layer; String
value_option
[value_option,...]
(Optional)

Specifies how the output pixel values will be defined.

  • SUM_TO_ONEClass values for each pixel will be provided in decimal format with the sum of all classes equal to 1. For example, Class1 = 0.16; Class2 = 0.24; Class3 = 0.60.
  • NON_NEGATIVEThere will be no negative output values.
String

Return Value

NameExplanationData Type
out_raster

The output multiband raster dataset.

Raster

Code sample

LinearSpectralUnmixing example 1 (Python window)

This example calculates the fractional abundance of classes from a classifier definition file (.ecd) and generates a multiband raster.

# Import system modules
import arcpy
from arcpy.ia import *

# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")

# Execute 
unmixing_outputs = LinearSpectralUnmixing("C:/data/landsat7_image.crf",
    "C:/data/train_maxi_likelihood_ecd_output.ecd", "SUM_TO_ONE;NON_NEGATIVE")
	
# Save output
unmixing_outputs.save("C:/data/unmixing_outputs.crf")
LinearSpectralUnmixing example 2 (stand-alone script)

This example calculates the fractional abundance of classes from a classifier definition file (.ecd) and generates a multiband raster.

# Import system modules
import arcpy
from arcpy.ia import *

# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")

# Define input parameters
inFile = "C:/data/landsat7_image.crf"
json_file = "C:/data/customized_endmembers.json"
options = "SUM_TO_ONE" 

# Execute 
unmixing_outputs = LinearSpectralUnmixing(inFile, json_file, options)
	
# Save output
unmixing_outputs.save("C:/data/unmixing_outputs_using_json.crf")
LinearSpectralUnmixing example 3 (stand-alone script)

This example calculates the fractional abundance of classes from a training sample feature class (.shp) and generates a multiband raster.

# Import system modules
import arcpy
from arcpy.ia import *

# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")

# Define input parameters
inFile = "C:/data/landsat7_image.crf"
training_features = "C:/data/training_features.shp"
options = "SUM_TO_ONE;NON_NEGATIVE" 

# Execute 
unmixing_outputs = LinearSpectralUnmixing(inFile, training_features, options)
	
# Save output
unmixing_outputs.save("C:/data/unmixing_outputs_using_training_features.crf")

Licensing information

  • Basic: Requires Image Analyst or Spatial Analyst
  • Standard: Requires Image Analyst or Spatial Analyst
  • Advanced: Requires Image Analyst or Spatial Analyst

Related topics