diff --git a/Modules/Learning/LearningBase/include/otbImageClassificationFilter.hxx b/Modules/Learning/LearningBase/include/otbImageClassificationFilter.hxx index 6b12d39fdaef90319ed857ff67d938b87b659aa6..3751c15e3185bddb2272a4c7e45d2460aa42c5ce 100644 --- a/Modules/Learning/LearningBase/include/otbImageClassificationFilter.hxx +++ b/Modules/Learning/LearningBase/include/otbImageClassificationFilter.hxx @@ -172,6 +172,7 @@ ImageClassificationFilter<TInputImage, TOutputImage, TMaskImage> bool validPoint = true; double confidenceIndex = 0.0; ProbaSampleType probaVector{m_NumberOfClasses}; + probaVector.Fill(0); // Walk the part of the image for (inIt.GoToBegin(), outIt.GoToBegin(); !inIt.IsAtEnd() && !outIt.IsAtEnd(); ++inIt, ++outIt)