diff --git a/Modules/Filtering/ImageManipulation/include/otbSpectralAngleFunctor.h b/Modules/Filtering/ImageManipulation/include/otbSpectralAngleFunctor.h
index dac520b8507b694bd1d51485e113e468af23b493..3d680d3b0652531af40b4945ba5fc3992be362a5 100644
--- a/Modules/Filtering/ImageManipulation/include/otbSpectralAngleFunctor.h
+++ b/Modules/Filtering/ImageManipulation/include/otbSpectralAngleFunctor.h
@@ -126,6 +126,7 @@ public:
   void SetReferencePixels(std::vector<TReference> const & ref)
   {
     m_ReferencePixels = ref;
+    m_ReferenceNorm.clear();
     // Precompute the norm of reference pixels
     for (auto const & pix : ref)
     {