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. Change maps are sorted by increasing 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 application has several output images and supports “multi-writing”. Instead of computing and writing each image independently, the streamed image blocks are written in a synchronous way for each output. The output images will be computed strip by strip, using the available RAM to compute the strip size, and a user defined streaming mode can be specified using the streaming extended filenames (type, mode and value). Note that multi-writing can be disabled using the multi-write extended filename option: &multiwrite=false, in this case the output images will be written one by one. Note that multi-writing is not supported for MPI writers.
Input Image 1
-in1 image Mandatory
Multiband image of the scene before perturbations
Input Image 2
-in2 image Mandatory
Mutliband image of the scene after perturbations.
-out image [dtype] Mandatory
Multiband image containing change maps.
Available RAM (MB)
-ram int Default value: 256
Available memory for processing (in MB).
From the command-line:
otbcli_MultivariateAlterationDetector -in1 Spot5-Gloucester-before.tif -in2 Spot5-Gloucester-after.tif -out detectedChangeImage.tif
import otbApplication app = otbApplication.Registry.CreateApplication("MultivariateAlterationDetector") app.SetParameterString("in1", "Spot5-Gloucester-before.tif") app.SetParameterString("in2", "Spot5-Gloucester-after.tif") app.SetParameterString("out", "detectedChangeImage.tif") app.ExecuteAndWriteOutput()
Input images 1 and 2 should share exactly the same origin, spacing, size, and projection if any.