LocalRxDetection¶
Performs local Rx score computation on an hyperspectral image.
Description¶
Performs local Rx score computation on an input hyperspectral image. For each hyperspectral pixel, the Rx score is computed using statistics computed on a dual neighborhood. The dual neighborhood is composed of all pixel that are in between two radiuses around the center pixel. This score can then be used to detect anomalies in the image, this can be done for example by thresholding the result of this application with the BandMath application.
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.
Parameters¶
Input Image -in image
Mandatory
Input hyperspectral data cube
Output Image -out image [dtype]
Output Rx score image
Internal radius -ir int
Default value: 1
Internal radius in pixel
External radius -er int
Default value: 5
External radius in pixel
Available RAM (MB) -ram int
Default value: 256
Available memory for processing (in MB).
Examples¶
From the command-line:
otbcli_LocalRxDetection -in cupriteSubHsi.tif -out LocalRxScore.tif -ir 1 -er 5
From Python:
import otbApplication
app = otbApplication.Registry.CreateApplication("LocalRxDetection")
app.SetParameterString("in", "cupriteSubHsi.tif")
app.SetParameterString("out", "LocalRxScore.tif")
app.SetParameterInt("ir", 1)
app.SetParameterInt("er", 5)
app.ExecuteAndWriteOutput()