Skip to content
Snippets Groups Projects
Commit 8e57c1e7 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

BUG : correction of correlation texture formula

parent dee72642
No related branches found
No related tags found
No related merge requests found
......@@ -71,8 +71,8 @@ public:
}
}
double meanPOff = sumProb/this->GetHisto().size();
double meanPNeigh = sumProb/this->GetHisto()[0].size();
double meanPOff = sumProb/static_cast<double>(this->GetHisto().size());
double meanPNeigh = sumProb/static_cast<double>(this->GetHisto()[0].size());
// Standard deviation of p for offset region
double stdPOff = 0.;
......@@ -81,7 +81,7 @@ public:
double sumTemp = 0.;
for (unsigned s = 0; s<this->GetHisto()[r].size(); s++)
{
sumTemp += this->GetHisto()[r][s];
sumTemp += this->GetHisto()[r][s]*areaInv;
}
stdPOff += vcl_pow( (meanPOff-sumTemp), 2);
}
......@@ -95,7 +95,7 @@ public:
double sumTemp = 0.;
for (unsigned s = 0; s<this->GetHisto().size(); s++)
{
sumTemp += this->GetHisto()[s][r];
sumTemp += this->GetHisto()[s][r]*areaInv;
}
stdPNeigh += vcl_pow( (meanPNeigh-sumTemp), 2);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment