Functor and application for local Rx score computation
In OTB there is a
LocalRxDetectorFilter that computes local Rx score on an input hyperspectral image.
Also, there is currently no application that computes local Rx score in OTB. This MR also introduces this application.
Local Rx detection is an expensive operation. It requires, for each pixel, the estimation of the correlation matrix of the pixels in the neighborhood and its inversion. The computational complexity of the algorithm is of order
O(N*L^3) , where
N is the number of pixels in the image and
L the number of bands. Nevertheless, I think this algorithm has its place in OTB, as it is one of the most used algorithm for hyperspectral anomaly detection. The need for this application has been expressed in #1530 (closed).
At the moment the application only computes the score and outputs it. It does not apply a threshold on the computed score to detect anomalies. As thresholding can be done with
BandMath, I don't think that this application needs to do it.
This Merge Request also removes the
LocalRxDetectorNonThreadFilter and its test, why do we have this in OTB anyway ?
local Rx functor:
The local Rx score computation can be computed on each pixel using its neighboring pixels, therefore the filter can be replaced by a
a functor taking a neighborhhod as input. This merge request introduces this functor.
Because of the bug in
FunctorImageFilter in #1802 (closed), we can't be replace the filter by a functor yet. In this MR the
LocalRxDetectorFilter has not been removed, and the version using a
functorImageFilter has been implemented.
The result are identical between the
LocalRxDetectorFilter and the
FunctorImageFilter except on image border : the
LocalRxDetectorFilter does not compute score on borders (using a
ImageBoundaryFacesCalculator) and the
FunctorImageFilter computes score on border using a
: Zhao, Chunhui & Wang, Yulei & Qi, Bin & Wang, Jia. (2015). Global and Local Real-Time Anomaly Detectors for Hyperspectral Remote Sensing Imagery. Remote Sensing. 7. 3966-3985. 10.3390/rs70403966.
Classes and files
otbLocalRxDetection.cxx where the new application is implemented.
A new application has been created :
LocalRxDetection, it has the following parameters :
in: input multi-channel image
out: output image
ram: ram parameter (int).
a test has been added for the
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
- All discussions are resolved
- At least 2
👍votes from core developers, no 👎vote.
- The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement