# Appendix A: Local similarity

Let and denote the two signal vectors that are reshaped from a 2D matrix or 3D tensor. In the case of evaluating denoising performance, and simply means signal and noise. The simplest way to measure the similarity between two signals is to calculate the correlation coefficient,

 (18)

where is the correlation coefficient, denotes the dot product between and . denotes the norm of the input vector. A locally calculated correlation coefficient can be used to measure the local similarity between two signals,

 (19)

where and denote the the entries of vectors and , respectively. denotes the index in a local window. denotes the length of each local window. The windowing is sometime troublesome, since the measured similarity is largely dependent on the windowing length and the measured local similarity might be discontinuous because of the separate calculations in windows. To avoid the negative performance caused by local windowing calculations, Fomel (2007) proposed an elegant way for calculating smooth local similarity via solving two inverse problems. The local similarity I use to evaluate denoising performance in this paper is defined as

 (20)

where is the calculated local similarity, denotes Hadamard (or Schur) product, and and come from two least-squares inverse problem:

 (21) (22)

where is a diagonal operator composed from the elements of : and is a diagonal operator composed from the elements of : . Equations 21 and 22 are solved via shaping regularization

 (23) (24)

where 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 and (Fomel, 2007).

2020-04-03