Skip to content
Snippets Groups Projects
Commit a7bfb362 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

BUG: Incorrect pixelVarianceSquared tolerance value

parent 0e27b29f
Branches
Tags
No related merge requests found
...@@ -450,9 +450,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> ...@@ -450,9 +450,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage>
// Variance is only used in correlation. If variance is 0, then (index[0] - pixelMean) * (index[1] - pixelMean) // Variance is only used in correlation. If variance is 0, then (index[0] - pixelMean) * (index[1] - pixelMean)
// should be zero as well. In this case, set the variance to 1. in order to // should be zero as well. In this case, set the variance to 1. in order to
// avoid NaN correlation. // avoid NaN correlation.
if(pixelVarianceSquared < 0.0001)
const double epsilon = 1E-10;
if( pixelVarianceSquared < 0.001)
{ {
pixelVarianceSquared = 1.; pixelVarianceSquared = 1.;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment