| Label | Explanation | Data Type |
Input Raster | A multiband image. Wavelength information is required when the target spectra is a library file, and a surface reflectance raster is recommended if the target spectra data is from a spectral library. | Mosaic Layer; Raster Layer; Image Service; Raster Dataset; Mosaic Dataset |
Input Spectra File | A spectral signature file. The input can be a spectral library file that contains spectral signatures, or a feature class created from the spectral collection workflow. | Feature Layer; File |
Output Score Raster | A raster dataset that contains the matching scores from the input image and the spectral signature file. When the input raster has multiple spectral signatures, the output raster will be multiband with one band per signature. The matching scores range between 0 and 1 as a floating point number in which large values approaching 1 are a high probability match. Use the file extension to specify the output format, such as .tif (TIFF), .crf (CRF), and .dat (ENVI DAT). | Raster Dataset |
Detection Method (Optional) | Specifies the method that will be used to compute the matching scores from the input image and the spectral signature file. All scores are normalized from 0 to 1 in which a higher score is a better match.
| String |
Remove Continuum (Optional) | Specifies whether the spectra will be normalized from an image or reference data.
| Boolean |
Available with Image Analyst license.
Summary
Identifies pixels in an image that match a spectral signature.
Usage
The tool computes a matching score for each pixel and outputs a matching score raster.
This tool supports several forms of spectra input, including an Esri spectral library file (.esl) created from the Spectral Library Browse pane or the Spectral Viewer tool, or a feature class generated from the Training Samples Manager pane.
The number of bands in the input image and input spectral data must match if the input spectra is a training sample feature class.
The output will be a multiband raster if the library file contains multiple spectral signatures.
If the input spectra is from a spectral library file (.esl or .sli), spectral resampling will be applied using a band average method if the number of bands do not match. You can also resample spectra using the Resample Library Spectra tool.
If the spectral data is from a spectral library in which the reflectance values range between 0 and 1, such as the USGS spectral library, the input surface reflectance raster must also contain values between 0 and 1.
If the input image is not within 0-1, such as 8 bit or 16 bit, it is recommend that you collect the material's spectral signature from imagery using the Spectral Viewer tool. Optionally, check the Remove Continuum parameter to normalize the spectra.
The Detection Method parameter options described below allow you to calculate the matching scores between the input image and the spectral signature file:
- SAM—The Spectral Angle Mapper method measures the angle between the target spectrum and the pixel spectrum. This option is not sensitive to illumination changes.
- SID—The Spectral Information Divergence method measures the divergence between the probability distributions of the target spectrum divided by the pixel spectrum. This option is efficient in identifying mixed pixel spectra.
- SID-SAM—The product of the Spectral Information Divergence score and the tangent of the Spectral Angle Mapper score is computed. This option has better discrimination capability compared to the SID and SAM options individually.
- NS3—The Normalized Spectral Similarity method computes the spectral matching score from the Euclidean distance and the Spectral Angle Mapper score. This option has high discrimination capability but requires extensive reference data for high accuracy.
- ACE—The Adaptive Cosine Estimator method estimates the similarity between a target vector (representing the object of interest) and a pixel's spectral signature, after normalizing for background noise. Use this option when the hyperspectral image has significant background clutter.
- CEM—The Constrained Energy Minimization method uses a Finite Impulse Response (FIR) filter whose response to a pixel spectrum is greater when the spectrum is more similar to the target spectrum. Use this option when the background noise is minimal.
- MF—The Matched Filter method uses a FIR filter whose response to a mean-subtracted pixel spectrum is greater when the spectrum is more similar to the mean-subtracted target spectrum. Use this option when the background noise is additive white Gaussian noise.
When the Remove Continuum parameter is checked, a convex hull is fitted over the top of a spectrum using straight-line segments that connect local spectra maxima. The continuum will be removed by dividing it into the actual spectrum for each pixel in the image and the input spectra. This allows comparison of absorption features from a common baseline.
Parameters
DetectTargetUsingSpectra(in_raster, in_spectra, out_score_raster, {method}, {remove_continuum})| Name | Explanation | Data Type |
in_raster | A multiband image. Wavelength information is required when the target spectra is a library file, and a surface reflectance raster is recommended if the target spectra data is from a spectral library. | Mosaic Layer; Raster Layer; Image Service; Raster Dataset; Mosaic Dataset |
in_spectra | A spectral signature file. The input can be a spectral library file that contains spectral signatures, or a feature class created from the spectral collection workflow. | Feature Layer; File |
out_score_raster | A raster dataset that contains the matching scores from the input image and the spectral signature file. When the input raster has multiple spectral signatures, the output raster will be multiband with one band per signature. The matching scores range between 0 and 1 as a floating point number in which large values approaching 1 are a high probability match. Use the file extension to specify the output format, such as .tif (TIFF), .crf (CRF), and .dat (ENVI DAT). | Raster Dataset |
method (Optional) | Specifies the method that will be used to compute the matching scores from the input image and the spectral signature file. All scores are normalized from 0 to 1 in which a higher score is a better match.
| String |
remove_continuum (Optional) | Specifies whether the spectra will be normalized from an image or reference data.
| Boolean |
Code sample
This example compares a spectral signature with a hyperspectral image using the SAM option and creates a matching score raster.
# Import system modules
import arcpy from arcpy.ia import *
# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")
# Execute
out_score_raster = arcpy.ia. DetectTargetUsingSpectra(r“c:\data\aviris_image.tif”, r”C:\data\oaks_from_usgs.esl, “SAM”, “NO_REMOVE_CONTINUUM”)
out_score_raster.save(r”c:\data\result.tif”)This example compares a spectral signature with a hyperspectral image using the SAM option and creates a matching score raster.
# Import system modules
import arcpy
from arcpy.ia import *
# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst") # Execute
#Define variables
InputImage = r“c:\data\ aviris_image.tif”
targetSpectra= r”c:\data\oaks_from_usgs.esl”
outputScoreRaster = r”c:\data\score_raster.tif”
Method=”SAM”
removeContinuum = “NO_REMOVE_CONTINUUM”
#Execute
out_score_raster = arcpy.ia. DetectTargetUsingSpectra (in_raster= InputImage,
in_spectra= targetSpectra,
method= Method,
remove_condimuum= removeContinuum)
out_score_raster.save(outputScoreRaster)Environments
Licensing information
- Basic: Requires Image Analyst
- Standard: Requires Image Analyst
- Advanced: Requires Image Analyst