# Optimization Methods of Compressively Sensed Image Reconstruction Based on Single-Pixel Imaging
## 3 Methods
### Algorithm Operation  
The previous subsection is the basic idea of our proposed algorithm, the specific running process and details of our algorithm is described in this subsection for solving the loss Equation (15). The gradient projection based specific steps of our algorithm are presented as follows.  
1. Initialization: the iteration number \(k\), \(k=0\); initialize \(\Phi\) and \(\Theta\) as \(\Phi^{(0)}\) and \(\Theta^{(0)}\) respectively; \(\Psi\) is the known decomposition matrix; set \(\alpha_{\min}\) and \(\alpha_{\max}\), \(\alpha^{(0)}\in[\alpha_{\min},\alpha_{\max}]\).
2. Calculate \(\delta^{(k)}\): \[\delta^{(k)}=w^{(k)}-\Phi^{(k)}.\] (19)
3. Choose the parameter \(\lambda^{(k)}\), since the loss Equation (15) is quadratic, the line search parameter \(\lambda^{(k)}\) in Equation (18) can be calculated simply using the following closed-form expression: \[\lambda^{(k)}=\textit{mid}\left\{0,\frac{\left(\delta^{(k)}\right)^{T}\!\! \
abla\!F\!\left(\Phi^{(k)}\right)}{\left(\delta^{(k)}\right)^{T}\!\!B\delta^ {(k)}},1\right\}\!,\] (20) where \(B=\left[\begin{array}{cc}\Psi\Psi^{T}&-\Psi\Psi^{T}\\ \Psi\Psi^{T}&\Psi\Psi^{T}\end{array}\right]\). When \(\left(\delta^{(k)}\right)^{T}\!\!B\delta^{(k)}=0\), set \(\lambda^{(k)}=1\).
4. The line backtracking search: \(\Phi^{(k+1)}=\Phi^{(k)}+\lambda^{(k)}\delta^{(k)}\).
5. Regularize \(\Phi^{(k+1)}\): \[\Phi(\cdot;j)^{(k+1)}\leftarrow\frac{\Phi(\cdot;j)^{(k+1)}}{\left\|\Phi(\cdot ;j)^{(k+1)}\right\|_{2}}.\] (21)
6. Elements binarization in \(\Phi^{(k+1)}\): if \(\Phi^{(0)}\) is 0-1 binary random matrix, \[\left\{\begin{array}{l}\phi_{i,j}{}^{(k+1)}=0,\phi_{i,j}{}^{(k+1)}<0\\ \phi_{i,j}{}^{(k+1)}=1,\phi_{i,j}{}^{(k+1)}>0\end{array}\right.;\] (22) if \(\Phi^{(0)}\) is part Hadamard matrix, \[\left\{\begin{array}{l}\phi_{i,j}{}^{(k+1)}=-1,\phi_{i,j}{}^{(k+1)}<0\\ \phi_{i,j}{}^{(k+1)}=+1,\phi_{i,j}{}^{(k+1)}>0\end{array}\right..\] (23)
7. Update \(\alpha\): \[\gamma^{(k)}=\left(\delta^{(k)}\right)^{T}\!\!B\delta^{(k)},\] (24) if \(\gamma^{(k)}=0\), \(\alpha^{(k)}=\alpha_{\max}\); otherwise \[\alpha^{(k)}=\textit{mid}\left\{\alpha_{\min},\frac{\left\|\delta^{(k)}\right\| _{2}^{2}}{\gamma^{(k)}},\alpha_{\max}\right\}\!.\] (25)
8. Algorithm performs convergence and meets the termination condition: \[\frac{\left\|\
abla\!F\!\left(z^{(k)}\right)\right\|_{2}}{\left\|z^{(k)} \right\|_{2}}\leq\xi,\] (26)stop the iteration, \(\xi\) is the parameter of iteration termination, and \(\Phi^{(k+1)}\) is the final approximate solution \(\hat{\Phi}\); otherwise, set \(k\)=\(k\)+1 and return to 2 until the termination condition is met.  
In step 1, our proposed initialization method of \(\Phi^{(0)}\) and \(\Theta^{(0)}\) will be described in details in Section 3.5. In the above algorithm, the sensing matrix \(\Phi\) is trained and optimized by making full use of the known information of sparsifying decomposition matrix \(\Psi\). It is worth noting that, after updating \(\Phi^{(k)}\) at each iteration, every column of \(\Phi^{(k)}\) is regularized to facilitate algorithm operation and make experimental results more balanced, as expressed in Equation (21). Because 0-1 binary random matrix and part Hadamard binary matrix are used in our single-pixel imaging system, \(\Phi^{(k)}\) needs to be set to binary matrices after regularizing \(\Phi^{(k)}\) at each iteration, as denoted in Equations (22) and (23). After the iteration stops, the last optimized binary sensing matrix \(\Phi^{(k)}\) is fixed as the deterministic binary compressed sensing matrix that is applied to the single-pixel camera. From the above theoretical analysis, one can know that the new optimized sensing matrix \(\hat{\Phi}\) obtained by our proposed method can be self-adaptive to the known wavelet decomposition matrix \(\Psi\), and would have lower mutual coherence with \(\Psi\) and higher construction accuracy in theory.