From a4c773057ab2d3af6fa4d121cf5d8ee3d9e5c91f Mon Sep 17 00:00:00 2001 From: Jonathan Guinet <jonathan.guinet@c-s.fr> Date: Fri, 1 Jun 2012 16:57:30 +0200 Subject: [PATCH] BUG: MeanShift bug. --- Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx b/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx index 142b1de710..389a01fa3f 100644 --- a/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx +++ b/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx @@ -561,6 +561,8 @@ MeanShiftSmoothingImageFilter<TInputImage, TOutputImage, TKernel, TOutputIterati typename OutputImageType::PixelType rangePixel(m_NumberOfComponentsPerPixel); typename OutputSpatialImageType::PixelType spatialPixel(ImageDimension); + RealVector jointPixel; + // Initialize output images to zero iterationOutput->FillBuffer(0); OutputSpatialPixelType zero(spatialOutput->GetNumberOfComponentsPerPixel()); @@ -627,7 +629,7 @@ MeanShiftSmoothingImageFilter<TInputImage, TOutputImage, TKernel, TOutputIterati // get input pixel in the joint spatial-range domain (with components // normalized by bandwith) - RealVector jointPixel = jointIt.Get(); // Pixel in the joint spatial-range domain + jointPixel = jointIt.Get(); // Pixel in the joint spatial-range domain // index of the currently processed output pixel InputIndexType const& currentIndex = jointIt.GetIndex(); -- GitLab