BCO InterpolateImageFunction : numerical error
Mantis Issue 1004, reported by tfeuvrier, assigned to jmichel, created: 2015-01-30
By using the BCO interpolator via the otbcli_RigidTransformResample appli, the values computed in the output image generated are curious. For more details, see the step to reproduce the bug.
1422630173 - gpaseroAfter a quick look in the code of the interpolator (http://hg.orfeo-toolbox.org/OTB/file/58dfcfa50477/Code/BasicFilters/otbBCOInterpolateImageFunction.txx), the normalization seems weird.
1422872630 - thomasFor performance, mayebe improve BCO loop for multi-band user case : in otbBCOInterpolateImageFunction.txx, line 269: for( unsigned int k = 0; k<componentNumber; ++k) { lineRes[i+radius].at(k) = lineRes[i+radius].at(k) + this->GetInputImage()->GetPixel( neighIndex ).GetElement(k) * BCOCoefY[j+radius]; }
by getting the pixel this->GetInputImage()->GetPixel( neighIndex ) outisde the loop, for example: const PixelType & pixel = this->GetInputImage()->GetPixel( neighIndex ); for( unsigned int k = 0; k<componentNumber; ++k) { lineRes[i+radius].at(k) = lineRes[i+radius].at(k) + pixel.GetElement(k) * BCOCoefY[j+radius]; }
1422894901 - cpalmannI confirm that there is a problem with th