In the context of signal analysis and pattern matching, alignment of 1D signals for the comparison of signal morphologies is an important problem. For image processing and computer vision, 2D optical flow (OF) methods find wide application for motion analysis and image registration and variational OF methods have been continuously improved over the past decades.
We propose a variational method for the alignment and displacement estimation of 1D signals. We pose the estimation of non-flat displacements as an optimization problem with a similarity and smoothness term similar to variational OF estimation. To this end, we can make use of efficient optimization strategies that allow real-time applications on consumer grade hardware.
We apply our method to two applications from functional neuroimaging: The alignment of 2-photon imaging line scan recordings and the denoising of evoked and event-related potentials in single trial matrices. We can report state of the art results in terms of alignment quality and computing speeds.
Existing methods for 1D alignment target mostly constant displacements, do not allow native subsample precision or precise control over regularization or are slower than the proposed method.
Our method is implemented as a MATLAB toolbox and is online available. It is suitable for 1D alignment problems, where high accuracy and high speed is needed and non-constant displacements occur.