# Recovering Texture with a Denoising-Process-Aware LMMSE Filter
## 2 Preliminaries and Notation  
In this paper, \(\mathbb{R}\) denotes the set of real numbers, small bold letters denote vectors, and large bold letters denote matrices. We denote the estimates of \(\mathbf{a}\) and \(\mathbf{A}\) by \(\hat{\mathbf{a}}\) and \(\hat{\mathbf{A}}\), respectively. In this section, we describe WNNM [16] (a state-of-the-art denoising method based on NLSS) because our method estimates the texture information lost via the denoising process in WNNM. In image denoising, a noisy observation is modeled as  
\[\mathbf{y}=\mathbf{x}+\mathbf{n}, \tag{1}\]  
where \(\mathbf{y}\in\mathbb{R}^{m}\) is the noisy observation with \(m\) pixels, \(\mathbf{x}\in\mathbb{R}^{m}\) is the original image that is the target of estimation, and \(\mathbf{n}\in\mathbb{R}^{m}\) is AWGN, of which the standard deviation is \(\sigma\). In WNNM, the observed image \(\mathbf{y}\) is first divided into \(I\) overlapping focused patches (\(\sqrt{L}\times\sqrt{L}\) pixels). The \(I\) depends on the image size and the noise level. Our experiment follows the default parameter of author's implementation of WNNM. For example, in the case of \(\sigma=20\), the patch size is \(6\times 6\) pixels, and the focused patches are selected by 1 pixel skip (stride 2). Therefore, when the image size is \(256\times 512\) pixels, the total number of focused patches \(I\) is 32,004 (note that similar patches are selected from \(6\times 6\) pixels patches extracted from the neighborhood (\(61\times 61\) pixels) of the focused patch. The overlapping focused patches are then vectorized. We denote the \(i\)-th focused patch of \(\mathbf{y}\) by \(\mathbf{y}_{i}\in\mathbb{R}^{L}\) (\(i=1,\cdots,I\)). Then, a search is performed for the \(M-1\) patches that are the most similar to each segmented patch \(\mathbf{y}_{i}\), and for each \(\mathbf{y}_{i}\), a patch matrix \(\tilde{\mathbf{Y}}_{i}\in\mathbb{R}^{L\times M}\) is created that includes \(\mathbf{y}_{i}\) as its leftmost column, while the remaining columns of \(\tilde{\mathbf{Y}}_{i}\) are the patches that are similar to \(\mathbf{y}_{i}\). For the \(i\)-th patches of the other components \(\mathbf{x}\) and \(\mathbf{n}_{i}\) we use similar notation, i.e., \(\mathbf{x}_{i}\) and \(\mathbf{n}_{i}\). We denote their corresponding patch matrices by \(\tilde{\mathbf{X}}_{i}\) and \(\tilde{\mathbf{N}}_{i}\). Note that the indices of the similar patches in \(\tilde{\mathbf{X}}_{i}\) and \(\tilde{\mathbf{N}}_{i}\) are the same as those in \(\tilde{\mathbf{Y}}_{i}\). For simplicity, we subtract the columnwise average of the matrix \(\tilde{\mathbf{Y}}_{i}\) from each row of \(\tilde{\mathbf{Y}}_{i}\) and denote the result by \(\mathbf{Y}_{i}\). The same columnwise average subtraction method is used in the implementation provided by [PERSON] et al. ; however, this is not explicitly described in [16]. Because we assume that \(\mathbf{n}\) is AWGN, each columnwise average of the noiseless matrix \(\tilde{\mathbf{X}}_{i}\) is sufficiently similar to that of \(\tilde{\mathbf{Y}}_{i}\). Thus, the objective of WNNM is to estimate \(\mathbf{X}_{i}\) which is obtained by subtracting the columnwise average of \(\tilde{\mathbf{X}}_{i}\) from \(\tilde{\mathbf{X}}_{i}\). The core of the denoising process of WNNM is the following equation based on the singular value decomposition (SVD) of the observed patch matrix \(\mathbf{Y}_{i}\):  
\[\hat{\mathbf{X}}_{i}=\mathbf{U}g(\Sigma_{\mathbf{Y}_{i}})\mathbf{V}^{\top}, \tag{2}\]  
where \(\hat{\mathbf{X}}_{i}\) is the denoised patch matrix, \(\mathbf{Y}_{i}=\mathbf{U}\Sigma_{\mathbf{Y}_{i}}\mathbf{V}^{\top}\) is the SVD and \(g(\cdot)\) is a threshold function. Each component \((k,k)\) of the diagonal matrix \(g(\Sigma)\) is expressed as  
\[g(\Sigma)_{k,k}= \begin{cases}0&\text{if }c_{2}<0\\ \frac{c_{1}+\sqrt{c_{2}}}{2}&\text{if }c_{2}\geq 0\end{cases} , \tag{3}\]  
where  
\[c_{1}=\Sigma_{k,k}-\epsilon,\ c_{2}=(\Sigma_{k,k}+\epsilon)^{2}-4\sigma^{2}C, \tag{4}\]  
\(C\) is an arbitrary parameter, and \(\epsilon\) is a small number.