# Image Completion with Hybrid Interpolation in Tensor Representation
## 3 Proposed Algorithm
Hence, the RBF interpolation model in N-dimensional space, in which separability conditions (10), (11) are satisfied, boils down to the Tucker decomposition model, where the factor matrices \(\{\mathbf{F}^{(n)}\}\) are previously determined by rational functions._  
If \(d^{(n)}(i_{n},j_{n})=i_{n}^{j_{n}-1}\) is expressed by an exponential function, \(\tau=1\), and \(\psi(\xi)=-\xi\), then \(f^{(n)}_{i_{n}\mu_{n}}=\psi^{(n)}\left(-\frac{d^{(n)}(i_{n}j_{n})}{\tau} \right)=i_{n}^{j_{n}-1}\), and model (12) takes the form of the standard multivariate polynomial regression:  
\[y_{i_{1}\ldots,i_{N}}=\sum_{j_{1}=1}^{I_{1}}\ldots\sum_{j_{N}=1}^{I_{N}}w_{j_ {1}\ldots,j_{N}}\prod_{n=1}^{N}(i_{n})^{j_{n}-1}, \tag{14}\]  
where numbers \((I_{1},\ldots,J_{N})\) determine the degrees of the polynomial with respect to each mode, i.e.,\(\forall n:J_{n}=D_{n}+1\), where \(D_{n}\) is a degree of the polynomial along the \(n\)-th mode. Thus the multivariate polynomial regression can be also presented in the form of the Tucker decomposition model. The RBF \(\psi\) can take various forms, such as Gaussian, polyharmonic splines, multiquadrics, inverse multiquadrics, and inverse quadratics [59]. The Gaussian RBF (GRBF), expressed by \(\psi(\xi)=\exp\{\xi\}\), is commonly used for interpolation; however, it cannot be used for constructing an interpolant with polynomial precision. For example, the GRBF does not approximate a linear function \(y(x)\) well. Hence, the polynomial regression in (14) is more suitable for linear or slowly varying functions, but it often yields underestimated interpolants if the polynomial has too low of a degree. An increase in the degree leads to an ill-conditioned regression problem and unbiased least squares estimates. To tackle this problem, both interpolation approaches can be combined, which leads to the following interpolation model:  
\[y_{i_{1},\ldots,i_{N}} = \sum_{j_{1}=1}^{I_{1}}\ldots\sum_{j_{N}=1}^{I_{N}}w_{j_{1}, \ldots,j_{N}}\prod_{n=1}^{N}\exp\left(-\frac{d^{(n)}(i_{n},j_{n})}{\tau} \right)+\sum_{r_{1}=1}^{R_{1}}\ldots\sum_{r_{N}=1}^{R_{N}}c_{r_{1},\ldots,r_{N }}\prod_{n=1}^{N}(i_{n})^{r_{n}-1}. \tag{15}\]  
Model (15) can be equivalently presented in the tensor-matrix contraction form:  
\[\mathcal{Y}=\mathcal{W}\times_{1}\mathbf{F}^{(1)}\times_{2}\ldots\times_{N}\mathbf{F}^ {(N)}+\mathcal{C}\times_{1}\mathbf{P}^{(1)}\times_{2}\ldots\times_{N}\mathbf{P}^{(N)}, \tag{16}\]  
where \(\mathcal{C}=[c_{r_{1},\ldots,r_{N}}]\in\mathbb{R}^{R_{1}\times\ldots\times R_ {N}}\) is the core tensor of the polynomial regression model, and \(\forall n:\mathbf{P}^{(n)}=[p^{(n)}_{i_{n}\
u_{n}}]=[1,i_{n},i_{n}^{2},\ldots,i_{ n}^{R_{n}-1}]\in\mathbb{R}^{I_{n}\times R_{n}}\) is the respective factor matrix with \(p^{(n)}_{i_{n}\
u_{n}}=i_{n}^{r_{n}-1}\). System (16) has \(\prod_{n=1}^{N}J_{n}+\prod_{n=1}^{N}R_{n}\) variables, and only \(\prod_{n=1}^{N}I_{n}\) equations, resulting in ambiguity of its solution under the assumption that \(\forall n:J_{n}=I_{n}\). To relax this problem, a side-condition is imposed:  
\[\mathcal{W}\times_{1}\mathbf{P}^{(1)T}\times_{2}\ldots\times_{N}\mathbf{P}^{(N)T}=0. \tag{17}\]  
Vectorizing models (16), (17) and performing the straightforward mathematical operations, we get  
\[\left[ \begin{array}{c}\mathbf{y}\\ \mathbf{0}\end{array} \right]=\left[ \begin{array}{cc}\mathbf{F}&\mathbf{P}\\ \mathbf{P}^{T}&\mathbf{0}\end{array} \right]\left[ \begin{array}{c}\mathbf{w}\\ \mathbf{c}\end{array}