diff --git a/Code/FeatureExtraction/otbMeanTextureFunctor.h b/Code/FeatureExtraction/otbMeanTextureFunctor.h index 4299b7940c096d9999e99281aaea92d4b0817d3b..eec3d3f07d21195c3e1690e242b1df64d66204c7 100644 --- a/Code/FeatureExtraction/otbMeanTextureFunctor.h +++ b/Code/FeatureExtraction/otbMeanTextureFunctor.h @@ -65,12 +65,12 @@ public: { for (unsigned s = 0; s < this->GetHisto()[r].size(); ++s) { - double p = static_cast<double>(this->GetHisto()[r][s]) * areaInv; + double p = static_cast<double>(this->GetHisto()[r][s]); out += (static_cast<double>(s) + 0.5) * this->GetNeighBinLength() * p; } } - return out; + return out * areaInv; } };