Appendix A: Review of local similarity

A common way to measure the similarity between two signals is to calculate the global correlation coefficient:

 (14)

where is the global correlation coefficient, denotes the number of samples of the signals and . In order to calculate the similarity between two signals locally, one can use the localized correlation coefficient:

 (15)

where denotes the local correlation coefficient, is the local window size.

Fomel (2007a) designed an elegant way to calculate the local similarity:

 (16) (17) (18)

Equation 16 represents that the local similarity can be expressed as the product of two vectors that are the solutions of two minimization problems. is a regularization operator for constraining and . can be chosen as a local triangular smoother to enforce the smoothness of vectors and , and then equations 17 and 18 can be solved using the shaping regularization (Fomel, 2007b):

 (19) (20)

where is a diagonal operator composed from the elements of : and is a diagonal operator composed from the elements of : . is a smoothing operator, and and are two parameters controlling the physical dimensionality and enabling fast convergence when inversion is implemented iteratively. These two parameters can be chosen as the least-squares norms of and (Fomel, 2007a). The local similarity algorithm can be used to calculate the local similarity of signal of any dimension. For 1D signals, the meanings of equations 19 and 20 are intuitive. For 2D or higher-dimensional signals, each signal is first reshaped into a 1D signal and then follows equations 19 and 20 to calculate the local similarity vector. The smoothing operator is applied to the 2D or multi-dimensional form of the original signal to enforce the smoothness in any dimension.

2020-04-11