solvers

solvers#

Contains different solver implementations.

tike.align.solvers.cross_correlation(op, original, unaligned, upsample_factor=1, space='real', num_iter=None, reg_weight=1e-09)[source]#

Efficient subpixel image translation alignment by cross-correlation.

This code gives the same precision as the FFT upsampled cross-correlation in a fraction of the computation time and with reduced memory requirements. It obtains an initial estimate of the cross-correlation peak by an FFT and then refines the shift estimation by upsampling the DFT only in a small neighborhood of that estimate by means of a matrix-multiply DFT.

References

Stéfan van der Walt, Johannes L. Schönberger, Juan Nunez-Iglesias, François Boulogne, Joshua D. Warner, Neil Yager, Emmanuelle Gouillart, Tony Yu and the scikit-image contributors. scikit-image: Image processing in Python. PeerJ 2:e453 (2014) doi:10.7717/peerj.453

Manuel Guizar-Sicairos, Samuel T. Thurman, and James R. Fienup, “Efficient subpixel image registration algorithms,” Optics Letters 33, 156-158 (2008). doi:10.1364/OL.33.000156

James R. Fienup, “Invariant error metrics for image reconstruction” Optics Letters 36, 8352-8357 (1997). doi:10.1364/AO.36.008352

tike.align.solvers.farneback(op, original, unaligned, pyr_scale=0.5, levels=5, winsize=19, num_iter=16, poly_n=5, poly_sigma=1.1, flow=None, hi=None, lo=None, **kwargs)[source]#

Find the flow from unaligned to original using Farneback’s algorithm

For parameter descriptions see https://docs.opencv.org/4.3.0/dc/d6b/group__video__track.html

Parameters
  • original – The images to be aligned.

  • (L (unaligned) – The images to be aligned.

  • M – The images to be aligned.

  • N) – The images to be aligned.

  • flow ((L, M, N, 2) float32) – The inital guess for the displacement field.

References

Farneback, Gunnar “Two-Frame Motion Estimation Based on Polynomial Expansion” 2003.