From 506d0fa38f2f47102bd75cb226289c434ebc7dc5 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Mon, 9 Nov 2015 11:05:54 +0100
Subject: [PATCH] BUG: Mantis-1056: fix standard deviation

---
 .../AppClassification/app/otbComputeImagesStatistics.cxx        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/Applications/AppClassification/app/otbComputeImagesStatistics.cxx b/Modules/Applications/AppClassification/app/otbComputeImagesStatistics.cxx
index a2dac49562..f48ec15b74 100644
--- a/Modules/Applications/AppClassification/app/otbComputeImagesStatistics.cxx
+++ b/Modules/Applications/AppClassification/app/otbComputeImagesStatistics.cxx
@@ -140,7 +140,7 @@ private:
         variance[itBand] += (size[0] * size[1] - 1) * (statsEstimator->GetCovariance())(itBand, itBand);
         }
       //Increment nbSamples
-      nbSamples += size[0] * size[1] * nbBands;
+      nbSamples += size[0] * size[1];
       }
 
     //Divide by the number of input images to get the mean over all layers
-- 
GitLab