# Super-Resolution Reconstruction of Depth Image Based on Kriging Interpolation
## 2 Depth Image super-resolution Algorithm
### Interpolation Algorithm Based on Kriging Interpolation
\[\mathrm{J}+2\phi\left(\sum\limits_{i=1}^{n}\lambda_{i}-1\right) \tag{18}\]  
where \(\phi\) is the Lagrangian multiplier. We solve for the set of parameters \(\phi,\lambda_{1},\lambda_{2},\cdots,\lambda_{n}\) that minimises this cost function and thereby minimises \(\mathrm{J}\) under the constraint \(\sum_{i=1}^{n}\lambda_{i}=1\), which yields  
\[\left\{\begin{array}{c}\frac{\partial\big{(}\mathrm{J}+2\phi\left(\sum_{i=1 }^{n}\lambda_{i}-1\right)\big{)}}{\partial\lambda_{i}}=0;\;\mathrm{i}=1,2,3, \ldots\;\mathrm{n}\\ \frac{\partial\big{(}\mathrm{J}+2\phi\left(\sum_{i=1}^{n}\lambda_{i}-1\right) \big{)}  
The equations to be solved for the above weighting factor \(\lambda_{i}\) are first written in the form of a linear system of equations, as follows. \[\left\{ \begin{array}{l}\mathrm{r}_{11}\lambda_{1}+\mathrm{r}_{12}\lambda_{2}+ \cdots\mathrm{r}_{1n}\lambda_{n}-\phi{=}\mathrm{r}_{1o}\\ \mathrm{r}_{21}\lambda_{1}+\mathrm{r}_{22}\lambda_{2}+\cdots\mathrm{r}_{2n} \lambda_{n}-\phi{=}\mathrm{r}_{2o}\\ \vdots\\ \mathrm{r}_{n1}\lambda_{1}+\mathrm{r}_{n2}\lambda_{2}+\cdots\mathrm{r}_{nn} \lambda_{n}-\phi{=}\mathrm{r}_{no}\\ \lambda_{1}+\lambda_{2}+\cdots+\lambda_{n}{=}1\end{array} \right. \tag{23}\]  
The system of equations is written in matrix form, and the inverse matrix solution procedure is performed. By the definition of semi-covariance, \(\mathrm{r}_{\mathrm{ij}}=\sigma^{2}-\mathrm{C}_{\mathrm{ij}}\) and its equivalent form \(\mathrm{r}_{\mathrm{ij}}=\frac{1}{2}\mathrm{E}\left[\left(\mathrm{z}_{i}- \mathrm{z}_{j}\right)^{2}\right]\). By the previous definition (hypothetical conditions), we have \(\mathrm{Z}(\mathrm{x},\mathrm{y})=\mathrm{c}+\mathrm{R}(\mathrm{x},\mathrm{y})\), so we then have \(\mathrm{R}_{i}=\mathrm{z}_{i}-\mathrm{c}\). Further, we have \(\mathrm{z}_{i}-\mathrm{z}_{j}=\mathrm{R}_{i}-\mathrm{R}_{j}\) under these conditions:  
\[ \begin{array}{l}\mathrm{r}_{\mathrm{ij}}=\frac{1}{2}\mathrm{E}\left[\left( \mathrm{R}_{i}-\mathrm{R}_{j}\right)^{2}\right]\\ =\frac{1}{2}\mathrm{E}\left[\mathrm{R}_{i}^{2}-2\mathrm{R}_{\mathrm{ij}}+ \mathrm{R}_{j}^{2}\right]\\ =\frac{1}{2}\mathrm{E}\left[\mathrm{R}_{i}^{2}\right]+\frac{1}{2}\mathrm{E} \left[\mathrm{R}_{j}^{2}\right]-\mathrm{E}\left[\mathrm{R}_{i}\mathrm{R}_{j} \right]\end{array}  \tag{24}\]  
This follows from the fact that  
\[\mathrm{E}\left[\mathrm{R}_{i}^{2}\right]=\mathrm{E}\left[\mathrm{R}_{j}^{2} \right]=\mathrm{E}\left[\left(\mathrm{z}_{i}-\mathrm{c}\right)^{2}\right]= \mathrm{Var}(\mathrm{z}_{i})=\sigma^{2} \tag{25}\]  
\[\mathrm{E}\left[\mathrm{R}_{i}\mathrm{R}_{j}\right]{=}\mathrm{E}\left[\left( \mathrm{z}_{i}-\mathrm{c}\right)\left(\mathrm{z}_{j}-\mathrm{c}\right)\right] {=}\mathrm{Cov}\left(\mathrm{z}_{i},\mathrm{z}_{j}\right){=}\mathrm{C}_{ \mathrm{ij}} \tag{26}\]  
After substitution, we obtain  
\[\mathrm{r}_{\mathrm{ij}}=\frac{1}{2}\sigma^{2}+\frac{1}{2}\sigma^{2}-\mathrm{C }_{\mathrm{ij}}=\sigma^{2}-\mathrm{C}_{\mathrm{ij}} \tag{27}\]  
The above proof confirms that \(\mathrm{r}_{\mathrm{ij}}=\frac{1}{2}\mathrm{E}\left[\left(\mathrm{z}_{i}- \mathrm{z}_{j}\right)^{2}\right]\). The following procedure is then used to calculate \(\mathrm{r}_{\mathrm{ij}}\). Here, we continue to use the principle of similarity of attributes in space. This spatial similarity is expressed by \(\mathrm{r}_{\mathrm{ij}}=\frac{1}{2}\left(\mathrm{z}_{i}-\mathrm{z}_{j}\right) ^{2}\) in terms of distance, defining the geometric distance between \(\mathrm{z}_{i}\) and \(\mathrm{z}_{j}\) as  
\[\mathrm{d}_{\mathrm{ij}}{=}\mathrm{d}\left(\mathrm{z}_{i},\mathrm{z}_{j} \right)=\mathrm{d}\left(\left(\mathrm{x}_{i},\mathrm{y}_{i}\right),\left( \mathrm{x}_{j},\mathrm{y}_{j}\right)\right)=\sqrt{\left(\mathrm{x}_{i}- \mathrm{x}_{j}\right)^{2}+\left(\mathrm{y}_{i}-\mathrm{y}_{j}\right)^{2}} \tag{28}\]  
Kriging interpolation assumes that there is a functional relationship between \(\mathrm{r}_{\mathrm{ij}}\) and \(\mathrm{d}_{\mathrm{ij}}\), which can be linear, quadratic, exponential or logarithmic.