# A High-Efficiency Super-Resolution Reconstruction Method for Ultrasound Microvascular Imaging
## 2 Materials and Methods
### Microbubble Localization
#### 2.2.2 Data Approximation  
Given the approximate position of a microbubble (group) \(\left(\widetilde{x}_{p},\widetilde{y}_{p}\right)\) and a user-specified fitting radius \(r>0\), we define \(D=\left\{-r,\ \ldots,\ r\right\}\times\left\{-r,\ \ldots,\ r\right\}\) as a set of integer (\(x\),\(y\)) coordinates, and \(\widetilde{I}(x,y)=I\left(x+\widetilde{x}_{p},y+\widetilde{y}_{p}\right)\) as intensity values of an \(I\times l\) sub-image centered at the point \(\left(\widetilde{x}_{p},\widetilde{y}_{p}\right)\) of the raw input image \(I\), where \(l=2r+1\) is the size of the subimage. The desired sub-pixel coordinates of the microbubbles are obtained as \(\hat{x}_{p}=\hat{x}_{0}+\widetilde{x}_{p}\) and \(\hat{y}_{p}=\hat{y}_{0}+\widetilde{y}_{p}\), where \(\hat{x}_{0}\) and \(\hat{y}_{0}\) define the sub-pixel refinements of the coordinates obtained by the data approximation.  
To approximate the data with a PSF, least-squares methods are employed to minimize the sum of (weighted) squared residuals defined by the data approximation method [22]  
\[X^{2}(\boldsymbol{\theta}|D)=\sum_{x,y\in D}w\left(\widetilde{I}(x,y)-PSF(x,y| \boldsymbol{\theta})\right)^{2}. \tag{5}\]  
Here the residual value for the (\(x\),\(y\)) data point is defined as the difference between the observed image intensity \(\widetilde{I}(x,y)\) and the value approximated by the \(PSF(x,y|\boldsymbol{\theta})\), where \(\boldsymbol{\theta}\) are the PSF parameters. The residual value can be further weighted by \(w=1\), making all measurements equally significant, or weighted by \(w=1/\widetilde{I}(x,y)\), which takes into account the uncertainty in the number of detected microbubbles [23].  
The search for parameters \(\hat{\boldsymbol{\theta}}\) which minimize \(X^{2}(\boldsymbol{\theta}|D)\), leads to an optimization problem formulated as [24]  
\[\hat{\boldsymbol{\theta}}=\arg\min_{\boldsymbol{\theta}}X^{2}(\boldsymbol{ \theta}|D), \tag{6}\]  
which we solve by the Levenberg-Marquardt algorithm as implemented in the Apache Commons Math library [25]. The starting point for the optimization process is computed from the data as the difference between the maximum and the minimum intensity values for the microbubble intensity \(\theta_{N}\), and as the minimum intensity value for the background offset \(\theta_{b}\). Users have to choose the starting point for the approximate microbubble (group) width \(\theta_{\sigma}\). The sub-pixel refinement of the coordinates is obtained as \(\hat{x}_{0}=\hat{\theta}_{x}\) and \(\hat{y}_{0}=\hat{\theta}_{y}\), where \(\hat{\boldsymbol{\theta}}=\left[\hat{\theta}_{x},\hat{\theta}_{y},\ldots\right]\).  
For constraining parameters of PSF models, the Levenberg-Marquardt algorithm used above searches for values of the parameters \(\theta\) over an infinite interval. The optimization process can therefore converge to a solution with negative values which is impossible for variables corresponding to the image intensity or to the standard deviation of a Gaussian PSF. We therefore limit the interval of possible values by transforming the relevant parameters and using PSF \(\left(x,\ y|\widetilde{\boldsymbol{\theta}}\right)\) in Equation (2) instead of PSF \(\left(x,\ y|\boldsymbol{\theta}\right)\). The transformation for a 2D Gaussian PSF model is \(\widetilde{\boldsymbol{\theta}}=\left[\theta_{x},\theta_{y},\theta_{\sigma}^ {2},\theta_{N}^{2},\theta_{b}^{2}\right]\).  
The optimization process is still unconstrained but will result in positive PSF parameters. Such a transformation also improves the stability of the fit.