MultivariateAlterationDetector - Multivariate Alteration Detector¶
Change detection by Multivariate Alteration Detector (MAD) algorithm
This application performs change detection between two multispectral images using the Multivariate Alteration Detector (MAD)  algorithm.
- The MAD algorithm produces a set of N change maps (where N is the maximum number of bands in first and second input images), with the following properties:
- Change maps are differences of a pair of linear combinations of bands from image 1 and bands from image 2 chosen to maximize the correlation,
- Each change map is orthogonal to the others.
This is a statistical method which can handle different modalities and even different bands and number of bands between images.
The application will output all change maps into a single multiband image. If numbers of bands in image 1 and 2 are equal, then change maps are sorted by increasing correlation. If number of bands is different, the change maps are sorted by decreasing correlation.
The application will also print the following information: - Mean1 and Mean2 which are the mean values of bands for both input images, - V1 and V2 which are the two linear transform that are applied to input image 1 and input image 2 to build the change map, - Rho, the vector of correlation associated to each change map.
The OTB filter used in this application has been implemented from the Matlab code kindly made available by the authors here . Both cases (same and different number of bands) have been validated by comparing the output image to the output produced by the Matlab code, and the reference images for testing have been generated from the Matlab code using Octave.
This section describes in details the parameters available for this application. Table  presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is MultivariateAlterationDetector .
|||Table: Parameters table for Multivariate Alteration Detector.|
|Parameter Key||Parameter Name||Parameter Type|
|in1||Input Image 1||Input image|
|in2||Input Image 2||Input image|
|out||Change Map||Output image|
|ram||Available RAM (Mb)||Int|
|inxml||Load otb application from xml file||XML input parameters file|
|outxml||Save otb application to xml file||XML output parameters file|
- Input Image 1: Multiband image of the scene before perturbations.
- Input Image 2: Mutliband image of the scene after perturbations.
- Change Map: Multiband image containing change maps. Each map will be in the range [-1,1], so a floating point output type is advised.
- Available RAM (Mb): Available memory for processing (in MB).
- Load otb application from xml file: Load otb application from xml file.
- Save otb application to xml file: Save otb application to xml file.
To run this example in command-line, use the following:
otbcli_MultivariateAlterationDetector -in1 Spot5-Gloucester-before.tif -in2 Spot5-Gloucester-after.tif -out detectedChangeImage.tif
To run this example from Python, use the following code snippet:
#!/usr/bin/python # Import the otb applications package import otbApplication # The following line creates an instance of the MultivariateAlterationDetector application MultivariateAlterationDetector = otbApplication.Registry.CreateApplication("MultivariateAlterationDetector") # The following lines set all the application parameters: MultivariateAlterationDetector.SetParameterString("in1", "Spot5-Gloucester-before.tif") MultivariateAlterationDetector.SetParameterString("in2", "Spot5-Gloucester-after.tif") MultivariateAlterationDetector.SetParameterString("out", "detectedChangeImage.tif") # The following line execute the application MultivariateAlterationDetector.ExecuteAndWriteOutput()
Input images 1 and 2 should share exactly the same origin, spacing, size, and projection if any.