# Multi-Channel Surface EMG Spatio-Temporal Image Enhancement Using Multi-Scale Hessian-Based Filters
## 2 Materials and Methods  
### Model of the MUAP Propagation  
The MUAP propagation, in spatio-temporal sEMG images, has bright (positive) and dark (negative) portions over gray (zero) background, and in general, these two portions can be modelled separately based on a second-order structure, i.e., Hessian matrix of the pixels of the sEMG image. We assume that in spatio-temporal sEMG images, the brightness of the bright portion is high in the middle and gradually decreases toward the end (Figure 2a). Therefore, the bright portion of the MUAP can be modelled as a line-like Gaussian structure transversal to its axis, i.e., x-axis, as given in the following equation (see Figure 2a):  
\[I_{0}(X,Y)=\frac{K}{\sqrt{2\pi\omega_{0}^{2}}}e^{-\frac{Y^{2}}{2\omega_{0}^{2}}} \tag{1}\]  
where \(\omega_{0}^{2}\) is the variance of the Gaussian which is proportional to the width of the MUAP propagation profile shown in Figure 2a.  
Similarly, the dark region is assumed to be darkest in the middle and then decreases gradually as approaching towards the borders (Figure 2b).  
The Hessian matrix for the line-like inclined structure, like a MUAP (Figure 2a) or any other image, can be computed as:  
\[H_{0}(X,Y)=\left[\begin{array}{cc}\frac{\partial^{2}}{\partial X^{2}}I_{0}& \frac{\partial^{2}}{\partial X\partial Y}I_{0}\\ \frac{\partial^{2}}{\partial Y\partial X}I_{0}&\frac{\partial^{2}}{\partial Y ^{2}}I_{0}\end{array}\right] \tag{2}\]  
As from Equation (1), \(I_{0}(X,Y)=\frac{K}{\sqrt{2\pi\omega_{0}^{2}}}e^{-\frac{Y^{2}}{2\omega_{0}^{2}}}\), thus the derivatives in Equation (2) can be obtained analytically as follows: \(\frac{\partial}{\partial X}I_{0}=0\), \(\frac{\partial}{\partial Y}I_{0}=-\frac{Y}{\omega_{0}^{2}}I_{0}\), \(\frac{\partial^{2}}{\partial X^{2}}I_{0}=0\), \(\frac{\partial^{2}}{\partial X\partial Y}I_{0}=0\), \(\frac{\partial^{2}}{\partial Y^{2}}I_{0}=\frac{Y^{2}-\omega_{0}^{2}}{\sigma^ {4}}I_{0}\). Replacing all these expressions in Equation (2), we get:  
\[H_{0}(X,Y)=\left[\begin{array}{cc}0&0\\ 0&\frac{Y^{2}-\omega_{0}^{2}}{\omega_{0}^{4}}I_{0}(X,Y)\end{array}\right] \tag{3}\]  
The eigenvalues and eigenvectors for the Hessian matrix in Equation (3) are computed analytically as:  
\[\lambda_{1}=0,\,\lambda_{2}=-\frac{\sigma_{0}^{2}-Y^{2}}{\sigma_{0}^{4}}I_{0} (X,Y),\,\,\overrightarrow{v}_{1}(1,0),\,\,\,\overrightarrow{v}_{2}(0,1) \tag{4}\]  
It is clear form Equation (4) that for a line-like Gaussian structure, \(\lambda_{1}\) is zero and \(\lambda_{2}\) is negative for the pixels inside the Gaussian region, i.e., \(Y^{2}<\sigma_{0}^{2}\). Based on these eigenvalues, each pixel can be classified as belonging either to the MUAP propagation region or background region. These regions can then be enhanced using the multi-scale filter described in the next subsection. A synthetic 15-pixels-wide image with Gaussian profile is shown in Figure 3. For the line-like Gaussian structure, the second  
Figure 2: (**a**) A Gaussian tubular structure of width \(\sigma_{0}\) representing the motor unit action potential (MUAP) in spatio-temporal sEMG images, (**b**) model of both the bright and dark portions of the MUAP.  
eigenvalue of the Hessian for each pixel is negative, and zero for the background pixels (see Figure 3c). This agrees with the above analytical proof.