Skip to content
Snippets Groups Projects
Commit 7d44e775 authored by Julien Michel's avatar Julien Michel
Browse files

PERF: Try to remove replacement of * (1/bandwith) with / bandwith to see if it...

PERF: Try to remove replacement of * (1/bandwith) with / bandwith to see if it improves tests stability
parent 9f8f9494
Branches
Tags
No related merge requests found
......@@ -375,9 +375,7 @@ void MeanShiftSmoothingImageFilter<TInputImage, TOutputImage, TKernel, TOutputIt
neighborhoodRegion.SetSize(regionSize);
RealType weightSum = 0;
RealVector oneOverBandwidth(jointDimension), shifts(jointDimension);
for (unsigned int comp = 0; comp < jointDimension; comp++)
oneOverBandwidth[comp] = 1.0/bandwidth[comp];
RealVector shifts(jointDimension);
// An iterator on the neighborhood of the current pixel (in joint
// spatial-range domain)
......@@ -395,7 +393,7 @@ void MeanShiftSmoothingImageFilter<TInputImage, TOutputImage, TKernel, TOutputIt
for (unsigned int comp = 0; comp < jointDimension; comp++)
{
shifts[comp] = jointNeighbor[comp] - jointPixel[comp];
double d = shifts[comp] * oneOverBandwidth[comp];
double d = shifts[comp] / bandwidth[comp];
norm2 += d*d;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment