## 4 Image SR Reconstruction
### Optimization Solution
\right) \tag{26}\]  
where \(k\) is the value corresponding to the \(m\)-th row and \(n\)-th column in the matrix \(\theta\), denoted as \(\theta(m,n)\); \(D_{\theta(m,n)}\) is the \(k\)-th row vector of the sparse dictionary \(D\). Therefore, the high-resolution image block \(X_{b(i,j)}\) can be represented by the sparse coefficients as:  
\[X_{b(i,j)}=\left( \begin{array}{cccc}D_{\theta(1,1)}\widetilde{X}_{(i,j)}&D_{ \theta(1,2)}\widetilde{X}_{(i,j)}&\cdots&D_{\theta(1,5)}\widetilde{X}_{(i,j)} \\ D_{\theta(2,1)}\widetilde{X}_{(i,j)}&D_{\theta(2,2)}\widetilde{X}_{(i,j)}& \cdots&D_{\theta(2,5)}\widetilde{X}_{(i,j)}\\ \vdots&\vdots&\ddots&\vdots\\ D_{\theta(S,1)}\widetilde{X}_{(i,j)}&D_{\theta(S,2)}\widetilde{X}_{(i,j)}& \cdots&D_{\theta(S,5)}\widetilde{X}_{(i,j)}\end{array} \right)\]  
Then, \(\text{Dr}\Big{(}m,n,\widetilde{X}_{(i,j)}^{(K)}\Big{)}\) and \(\text{Dr}\Big{(}m,n,\widetilde{X}_{(i,j)}^{(K)}\Big{)}\) can be calculated by the following method:  
\[\left\{ \begin{array}{l}Dr\Big{(}m,n,\widetilde{X}_{(i,j)}^{(K)}\Big{)}=D_{ \theta(m,n)}\widetilde{X}_{(i,j)}^{(K)}-D_{\theta(m-1,n)}\widetilde{X}_{(i-(m- 1),j)}^{(K)}\\ Dc\Big{(}m,n,\widetilde{X}_{(i,j)}^{(K)}\Big{)}=D_{\theta(m,n)}\widetilde{X}_{( i,j)}^{(K)}-D_{\theta(m,n-1)}\widetilde{X}_{(i,j-(m-1))}^{(K)}\end{array} \right.\]  
where \(\
eg\) is the negation operator, and the operation method is \(\
eg(z)=\left\{ \begin{array}{l}0\ z\
eq 0\\ 1\ z=0\end{array} \right..\)  
As for \(g_{2}\Big{(}\widetilde{X}^{(K)}\Big{)}\), \(\parallel\widetilde{X}_{(i,j)}^{(K)}\parallel_{1}\) is a nondifferentiable convex function about \(\widetilde{X}_{(i,j)}^{(K)}\), and \(\parallel y_{(i,j)}-CHD\widetilde{X}_{(i,j)}^{(K)}\parallel_{2}^{2}\) is a differentiable convex function about \(\widetilde{X}_{(i,j)}^{(K)}\).Therefore, \(g_{2}\Big{(}\widetilde{X}^{(K)}\Big{)}\) cannot be directly calculated by the gradient descent method, so it is solved by the proximal gradient (PG) method:  
\[\left\{ \begin{array}{l}Z_{(i,j)}^{(K)}=\widetilde{X}_{(i,j)}^{(K)}-\beta_{( i,j)}^{(K)}D^{T}H^{T}C^{T}\Big{(}y_{(i,j)}-CHD\widetilde{X}_{(i,j)}^{(K)} \Big{)}\\ \widetilde{X}_{(i,j)}^{(K+1)}=\text{Shrink}\Big{(}Z_{(i,j)}^{(K)}\beta_{(i,j) }^{(K)}\Big{)}\\ =\text{max}\Big{\{}\left|Z_{(i,j)}^{(K)}\right|-\beta_{(i,j)}^{(K)},0\Big{\}} \circ\text{sign}\Big{(}Z_{(i,j)}^{(K)}\Big{)}\end{array} \right. \tag{27}\]  
where \(\text{Shrink}(\cdot)\) represents the soft threshold shrink function; \(\beta_{(i,j)}^{(K)}\) is actually the step size factor, and we can use the backtracking line search method to calculate its size. According to the above elaboration, the TwTVSI algorithm flow is summarized as shown in Figure 3.  
The specific calculation steps of the TwTVSI algorithm are as follows:  
Initialize \(K\) and \(\widetilde{X}\) separately. Figure 3: Block diagram of TwTVSI algorithm [29]. The first iteration: Use gradient descent to solve the TV regular term to get \(\widetilde{X}^{(k,1)}\), \(\widetilde{X}^{(k,1)}=\widetilde{X}^{(K,0)}-\lambda\mu^{(K)}g_{1}\Big{(} \widetilde{X}^{(K,0)}\Big{)}\). The second iteration: \(\widetilde{X}^{(K+1,0)}\) is obtained by using the proximal gradient method from \(\widetilde{X}^{(k,1)}\) for the sparse regular term according to Equation (27). Perform the  
Judgment: when \(\parallel Ar\Big{(}D\widetilde{X}^{(K+1,0)}\Big{)}-Ar\Big{(}D\widetilde{X}^{( K,0)}\Big{)}\parallel_{2}^{2}\) is less than the error constraint \(\varepsilon\), or \(K\) is greater than the maximum number of iterations \(K_{max}\), stop the iteration, when it is otherwise, we set \(K=K+1\) and go back to step 2. Output: high resolution image \(Ar\Big{(}D\widetilde{X}^{(K+1,0)}\Big{)}\).