diff --git a/Code/BasicFilters/otbLeeImageFilter.txx b/Code/BasicFilters/otbLeeImageFilter.txx
index d29b731d40dd84b3dd33c9f26bfbcd8b4bfae236..de2756a1e1e586a86fd742d47107277f178b2ad4 100644
--- a/Code/BasicFilters/otbLeeImageFilter.txx
+++ b/Code/BasicFilters/otbLeeImageFilter.txx
@@ -152,7 +152,9 @@ void LeeImageFilter<TInputImage, TOutputImage>::ThreadedGenerateData(
       E_I   = sum / static_cast<double>(neighborhoodSize);
       Var_I = sum2 / static_cast<double>(neighborhoodSize) - E_I * E_I;
       I = static_cast<double>(bit.GetCenterPixel());
-      if (E_I == 0)
+
+      const double epsilon = 0.0000000001;
+      if (vcl_abs(E_I) < epsilon)
         {
         dPixel = itk::NumericTraits<OutputPixelType>::Zero;
         }