# Photoacoustic Imaging with a Finite-Size Circular Integrating Detector
## 3 Algorithms
### Steps for Solving the Blurring Kernel Estimation  
By conducting a theoretical analysis, this problem can be transformed into solving a homogeneous linear equation system (Equation (18)). To solve this equation, referring to the method described in [32], we introduce an autocorrelation matrix \(\hat{\mathbf{E}}=\hat{\mathbf{p}}^{\mathbf{\theta}^{\mathbf{T}}}\hat{\mathbf{p }}^{\mathbf{\theta}}\). This matrix has significant mathematical properties: if the homogeneous linear equation system has a non-zero solution \(\hat{\mathbf{p}}^{\mathbf{\theta}}\), then \(\hat{\mathbf{E}}\) must have at least one zero eigenvalue. The eigenvector corresponding to the zero eigenvalue is the desired initial pressure distribution vector \(\hat{\mathbf{p}}^{\mathbf{\theta}}\), which serves as the solution to the equation system.  
To efficiently extract the eigenvector associated with the zero eigenvalue, SVD is applied to decompose matrix \(\hat{\mathbf{p}}^{\mathbf{\theta}}\). Specifically, SVD decomposes \(\hat{\mathbf{p}}^{\mathbf{\theta}}\) as follows:  
\[\hat{\mathbf{p}}^{\mathbf{\theta}}=\mathbf{U}\sum\mathbf{V}^{\mathbf{T}} \tag{21}\]  
where \(\sum\) is a diagonal matrix containing singular values arranged in descending order, and \(\mathbf{V}\) is an orthogonal matrix whose column vectors represent possible solutions for the initial pressure distribution. The column vector \(\mathbf{V_{zero}}\) corresponding to the zero singular value in \(\sum\) is the column vector of the initial pressure distribution \(\mathbf{\hat{P}^{0}}\), expressed as \(\mathbf{\hat{P}^{0}}=\mathbf{V_{zero}}\). Finally, the column vector \(\mathbf{V_{zero}}\) is rearranged into \(J\) columns to reconstruct the initial pressure distribution in the polar coordinate image.  
Although the above method can be used to directly recover the initial pressure distribution from the blurred pressure distribution, the scale of matrix \(\mathbf{\hat{P}^{0}}\) becomes extremely large when processing high-resolution images, significantly increasing computational complexity. To address this issue, we begin by selecting a small number of samples \(p_{j}^{\theta}(\phi)\) (indexed as \(j=1,2,3,\ldots\)) from the polar coordinate image and computing the corresponding initial pressure distribution vectors. Subsequently, based on the convolution relationship among the blurred pressure distribution, the blurring kernel, and the initial pressure distribution, the blurring kernel \(h_{\theta}(\phi)\) is estimated. Since the blurring kernel is consistent across all columns, this estimation result can be globally applied to remove the blurring effects in the polar coordinate image, thereby restoring the clear initial pressure distribution across the entire polar coordinate image.  
The estimation of the blurring kernel is accomplished using the least-squares method. The relationship among the blurred pressure distribution, the blurring kernel, and the initial pressure distribution can be expressed as [33]:  
\[\mathbf{A}\cdot\mathbf{h}=\mathbf{B} \tag{22}\]  
where \(\mathbf{A}\) is the convolution matrix constructed from the \(j\)-th column of the initial pressure distribution vector, \(\mathbf{h}\) is the blurring kernel vector to be estimated, and \(\mathbf{B}\) is the \(j\)-th column of the blurred pressure distribution vector. The blurring kernel is estimated by minimizing the error \(\left\|\mathbf{A}\cdot\mathbf{h}-\mathbf{B}\right\|^{2}\). The solution to this problem is given by:  
\[\mathbf{h}=\left(\mathbf{A^{T}A}\right)^{-1}\mathbf{A^{T}B} \tag{23}\]  
This method estimates the blurring kernel. With a known blurring kernel and blurred pressure distribution, the convolution matrix of the blurring kernel is constructed. Deconvolution is then performed by solving the least square method (LS) problem for each column of the polar coordinate image. This removes the effect of the blurring kernel and restores the initial pressure distribution, ultimately resulting in a high-quality photoacoustic image.