Catalyst.earth Logo
Catalyst.earth Logo

Change Detection For SAR

CATALYST Professional provides several algorithms to facilitate Coherent Change Detection. These algorithms include AUTOSHIFT, CCDINTEN, CCDPHASE, CCDWISH and CCDWM.

The Coherent Change Detection (CCD*) functions are a complete set of tools designed specifically for the detection and analysis of changes extracted from a user-specified test and reference SAR image pair. This includes the following functions:

AUTOSHIFT - Function to prepare data for Coherent Change Detection workflow. Allows a user to align a target image to a reference image.

CCDINTEN - Measures the change in total radar backscattering between a test image and a reference image by comparing the sum of the intensities of the input channels.

CCDPHASE - Measures change based on the average coherence (over a specified window size) between two co-registered single look complex SAR images.

CCDWISH - Measures change between two single-look complex SAR images based on modified Wishart statistics.

CCDWM - Combines the results from multiple change detection techniques in a weighted manner.

This tutorial provides a user-friendly step-by-step guide to using the change detection algorithms for Synthetic Aperture Radar (SAR) data in the CATALYST Professional GUI and Python environments.

Change Detection In Focus

The SAR change detection workflow can be performed in CATALYST Professional's Focus with the help of the Algorithm Librarian. Although the CCDINTEN, CCDWISH, and CCDPHASE functions can be run here, the CCDWM is only available in EASI, Modeler and Python (shown in the tutorial).

  1. In CATALYST Professional, open Focus.
  2. Load the SAR files to be used in the change detection workflows.
    Note: The test and reference data files must be coherent. That is, they should have the same viewing geometry (beam modes), polarization, and resolution.
  3. Select the preferences for the following windows.
Running SARINGEST

SARINGEST converts SAR imagery into a PCIDSK file, extracting the required metadata.

  1. Open the Algorithm Librarian window (Tools > Algorithm Librarian...).
  2. Select SARINGEST. You can search for the algorithm using the Find... button.
  3. In the Files tab of the SARINGEST Module Control Panel, click Browse... and locate the appropriate folder to save the output PCIDSK file.
  4. Navigate to the Input Params 1 tab and click Browse... in the File field, and locate the SAR input data.
  5. Click Run.
  6. Repeat steps 1-4 for the second image. The second image will be used as a reference image for the change detection algorithms.
Running AUTOSHIFT

AUTOSHIFT is used to align the SAR images by modifying the extents of the working image (saringest_0510) to align with the reference image (saringest_0627). If AUTOSHIFT is not run, the co-registration is based on the geocoding provided by the vendor. On the other hand, if it is run, the comparison is based on “nearest neighbour” in the test file to the pixel of interest in the reference file.

AUTOSHIFT was developed to handle complex data and automatically compute a nominal offset for coherent data. It doesn't modify the image, only adjusts the geocoding information of the output file to optimize the registration. Essentially, the reference file and output file are identical except for the geocoding information. Co-registration of the images could also be improved by manually adding TPs or GCPs.

  1. In the Algorithm Librarian, select AUTOSHIFT.
  2. In the AUTOSHIFT Module Control Panel, click Browse and locate the input file:
    • Input = saringest_0510.pix
    • Reference = saringest_0627.pix
  3. In the Output Ports section, select Browse... and navigate to your output folder.
  4. In the Input Params 1 tab and enter the following parameters:
    • Search radius (pixels) = 64
    • Number of horizontal tiles = 8
    • Number of vertical tiles = 8
      Note: It is recommended to use a Search radius between 16 and a maximum offset of +5.
  5. Click Run. The result will be the target image aligned to the reference image
CCD Functions

Once the SAR data is co-registered, there are three options for change detection
CCDINTEN, CCDWISH, and CCDPHASE.

The CCD* output contains (real-valued) output channels.

  • Channel 1 = Test File (sum of all polarizations)
  • Channel 2 = Co-registered Reference File (sum of all polarizations)
  • Channel 3 = Change metric (depending upon algorithm used)
  • Channel 4 = Ranked change metric with 0 representing the smallest change and 100 representing the largest change.
Running CCDINTEN

CCDINTEN compares the sum of the intensities of the input channels to measure the change in total radar backscattering between a test image and a reference image.

  1. Select CCDINTEN from the Algorithm Librarian.
  2. In the CCDINTEN Module Control Panel, click Browse and open the input data. This will be either the AUTOSHIFT output or the SARINGEST output.
  3. In the Output Ports section, select Browse... and navigate to your output folder.
  4. In the Input Params 1 tab, enter 5 as the value for the Window size (pixels) field.
  5. Click Run.

When viewing the output in Focus, the scheme is as follows:

  • No change appears in yellow.
  • Objects in purple signify changes in the test data but not the reference data.
  • Cyan objects signify changes in the reference data but not in the test data.
Running CCDWISH

CCDWISH is used to measure the change between the SAR images based on modified Wishart statistics. Complex data (single, dual or quad) is required as input.

  1. Select CCDWISH from the Algorithm Librarian.
  2. In the CCDWISH Module Control Panel, click Browse and open the input data. This will be either the AUTOSHIFT output or the SARINGEST output.
  3. In the Output Ports section, select Browse... and navigate to your output folder.
  4. In the Input Params 1 tab, enter 5 as the value for the Window size (pixels) field.
  5. Click Run.

When viewing the output in Focus, the scheme is as follows:

  • No change appears in yellow (R + G).
  • Objects in purple signify changes in the test data but not the reference data (R + B).
  • Cyan objects signify changes in the reference data but not in the test data (G + B).
Running CCDPHASE

CCDPHASE measures change based on the average coherence between two co-registered images. Like with CCDWISH, complex data is required as input as well.

  1. Select CCDPHASE from the Algorithm Librarian.
  2. In the CCDPHASE Module Control Panel, click Browse and open the input data. This will be either the AUTOSHIFT output or the SARINGEST output.
  3. In the Output Ports section, select Browse... and navigate to your output folder.
  4. In the Input Params 1 tab, enter 5 as the value for the Window size (pixels) field.
  5. Click Run.

    Change Detection Using Python

    All of these Coherent Change Detection (CCD) modules can be used in Python. CCDWM can also be
    used in Python as it permits the user to combine the results of the change detection algorithms by specifying several CCD output files and weights to provide a “weighted metric” for the channel of interest. This is usually Channel 4 = Ranked change metric. For example, suppose a pixel shows a significant change for all CCD algorithms. In that case, it will rank as more significant than a pixel which only ranks high in one metric but not the other two (e.g. high change in Intensity but small changes in Phase or Wishart would give a low change rank if weights = (1, 1, 1) and a higher rank if weights = (3, 1, 1) and very low if weights = (0.001, 10, 10).

    Following the same workflow as with Focus, the scripts below can be used to perform change detection with SAR imagery.

    Running SARINGEST
    from pci.saringest import saringest
    
    # Ingesting the test file
    fili = r"H:\Change Detection For SAR Tutorial\Portland\U16-HH-2010-05-10-SLC\product.xml"
    filo = r"H:\Change Detection For SAR Tutorial\Output\saringest_0510.pix"
    dbiw = []
    poption = 'NEAR'
    dblayout = 'BAND'
    calibtyp = 'SIGMA'
    
    saringest(fili, filo, dbiw, poption, dblayout, calibtyp)
    
    # Ingesting the reference file
    fili = r"H:\Change Detection For SAR Tutorial\Portland\U16-HH-2010-06-27-SLC\product.xml"
    filo = r"H:\Change Detection For SAR Tutorial\Output\saringest_0627.pix"
    dbiw = []
    poption = 'NEAR'
    dblayout = 'BAND'
    calibtyp = 'SIGMA'
    
    saringest(fili, filo, dbiw, poption, dblayout, calibtyp)
    Running AUTOSHIFT
    from pci.autoshift import autoshift
    
    fili = r"H:\Change Detection For SAR Tutorial\Output\saringest_0510.pix"     # Input image to be shifted
    filref = r"H:\Change Detection For SAR Tutorial\Output\saringest_0627.pix"   # Reference image filename
    dbic = []	      # Uses all input image channels to compute the correlation
    filo = r"H:\Change Detection For SAR Tutorial\Output\autoshift_0510.pix"     # Output file name
    searchr	= [64]
    numtiles = [8, 8]     # Use 8 tiles in the X- and Y-directions
    
    autoshift(fili, filref, dbic, filo, searchr, numtiles)
    Running CCDINTEN
    from pci.ccdinten import ccdinten
    
    fili = r"H:\Change Detection For SAR Tutorial\Output\autoshift_0510.pix"     # Input image file name
    filref = r"H:\Change Detection For SAR Tutorial\Output\saringest_0627.pix"   # Reference image file name
    dbic = []          # Uses all channels to detect change
    filo = r"H:\Change Detection For SAR Tutorial\Output\ccdinten_0510.pix"      # Output file name
    winsize = [5] 	   # Use a processing window of 5 by 5
    
    ccdinten(fili, filref, dbic, filo, winsize)
    Running CCDWISH
    from pci.ccdwish import ccdwish
    
    fili = r"H:\Change Detection For SAR Tutorial\Output\autoshift_0510.pix"     # Input image file name
    filref = r"H:\Change Detection For SAR Tutorial\Output\saringest_0627.pix"   # Reference image file name
    dbic = []           # Use all channels to detect change
    filo = r"H:\Change Detection For SAR Tutorial\Output\ccdwish_0510.pix"	     # Output file name
    winsize	= [5]	    # Use a 5x5 a processing window
    
    ccdwish(fili, filref, dbic, filo, winsize)
    Running CCDPHASE
    from pci.ccdphase import ccdphase
    
    fili = r"H:\Change Detection For SAR Tutorial\Output\autoshift_0510.pix"     # Input image file name
    filref = r"H:\Change Detection For SAR Tutorial\Output\saringest_0627.pix"   # Reference image file name
    dbic = []	    # Uses all polarizations to detect change
    filo = r"H:\Change Detection For SAR Tutorial\Output\ccphase_0510.pix"	     # Output file name
    winsize = []	    # Use default processing window of 5 by 5
    
    ccdphase(fili, filref, dbic, filo, winsize)
    Running CCDWM

    The MFILE used in the CCDWM algorithm can be a text file of the other CCD* algorithms, each on a new line, like in the script below. It can also be a specific file name pattern (e.g. "c:\data\*.pix") or all of the files in a folder (e.g. "c:\data")

    from pci.ccdwm import ccdwm
    
    mfile = r"H:\Change Detection For SAR Tutorial\Output\ccdfiles.txt"    # Text file listing file names to process
    weights = [2, 1, 1]        # Results from first file in MFILE will be weighted twice
    dbic = [3]                 # Use channel 3 to compute weighted change
    filo = r"H:\Change Detection For SAR Tutorial\Output\ccdwm_0510.pix"   # Output file name
    
    ccdwm(mfile, weights, dbic, filo)

    envelopephone-handsetcross