Cor/Tilt estimator of ID11
Henri was asked to port the Cor/Tilt estimator of ID11 to nabu/tomwer. Basically, we could answer this is already implemented. Some comments though are in order. The basic algorithm runs the following stes:
- Compute 1d-correlation between lines of two opposite projections.
- Find the offsets that gives the maximum correlation for each row of the images to form a serie of
(v,\text{offset})
points. - Fit these samples with a degree-1 polynomial : half the intercept is the Cor estimator, half the slope is the Tilt.
This is precisely what is implemented in Nabu in estimation/tilt
, method='1d-correlation
.
A few remarks are in order to stress the differences between nabu and ID11 implementations of the same algorithm:
- The computation of the correlations.
- ID11: Remove of a 5-degree polynomial background then 1D convolution between rows of the raw projections).
- Nabu: No background removal. 1D correlation are computed in Fourier space between
image1
andnp.fliplr(image2)
.
- Computation of the offsets:
- ID11: Weighted sum of a neighborhood of the correlation maximum.
- Nabu: Fit of neighborhood of the correlation maximum with a quadratic function to get sub-pixel accuracy.
- In both cases, some median filter is applied to the offsets. Though the implementation is -again- slightly different.
- Finally, and for a reason that I do not fully understand (references seem to be in the same orientation), the returned values have opposite signs...
On small test cases, it seems that the implementation is more accurate. To conclude, I think we can tell the BL to use the existing algo (with this note to explain to potential differences).