imglib / imglib2-algorithm

Image processing algorithms for ImgLib2
http://imglib2.net/
Other
23 stars 20 forks source link

Fix the SubpixelLocalization bias bug. #13

Closed tinevez closed 9 years ago

tinevez commented 9 years ago

The SubpixelLocalization class is based on quadratic fitting of the peak it tries to localize. To retrieve an estimate of the position, we compute the gradient and the hessian at the peak integer location.

To compute the gradient and hessian, we use a randomAccess on the peak image, and iterate through dimensions.

It turns out that the randomAccess position was not restored at the peak center after dealing with a dimension. Therefore, the next dimensions were calculated off-peak.

Fixes #12.

Signed-off-by: Jean-Yves Tinevez jean-yves.tinevez@pasteur.fr

tpietzsch commented 9 years ago

great! Thanks JY!