From 487e6122b514615990aac484f02d6c0685b24bc7 Mon Sep 17 00:00:00 2001 From: Cedric <cedric.traizet@c-s.fr> Date: Thu, 10 Jan 2019 10:37:05 +0100 Subject: [PATCH] ENH: added false alarm rate to the vd algorithm --- .../app/otbEndmemberNumberEstimation.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Modules/Applications/AppHyperspectral/app/otbEndmemberNumberEstimation.cxx b/Modules/Applications/AppHyperspectral/app/otbEndmemberNumberEstimation.cxx index f1ec8acc1b..2636aab914 100644 --- a/Modules/Applications/AppHyperspectral/app/otbEndmemberNumberEstimation.cxx +++ b/Modules/Applications/AppHyperspectral/app/otbEndmemberNumberEstimation.cxx @@ -95,6 +95,14 @@ private: AddChoice("algo.vd", "vd"); SetParameterDescription("algo.vd", "virtual dimensionality"); + AddParameter( ParameterType_Float , "algo.vd.far" , "false alarm rate" + "Maximum training predictors"); + SetMinimumParameterFloatValue("algo.vd.far",0); + SetMaximumParameterFloatValue("algo.vd.far",1); + SetDefaultParameterFloat( "algo.vd.far" , 1.0E-3 ); + SetParameterDescription( "algo.vd.far" , + "False alarm rate for the virtual dimensionality algorithm"); + AddParameter(ParameterType_Int,"number","Number of endmembers"); SetParameterDescription("number", "Estimated number of endmembers"); SetParameterRole("number", Role_Output); @@ -134,6 +142,7 @@ private: vd->SetCovariance(statisticsFilter->GetCovariance().GetVnlMatrix()); vd->SetCorrelation(statisticsFilter->GetCorrelation().GetVnlMatrix()); vd->SetNumberOfPixels(GetParameterImage("in")->GetLargestPossibleRegion().GetNumberOfPixels()); + vd->SetFAR(GetParameterFloat("algo.vd.far")); vd->Compute(); numberOfEndmembers = vd->GetNumberOfEndmembers(); } -- GitLab