# Image Completion with Hybrid Interpolation in Tensor Representation
## 3 Proposed Algorithm
\right], \tag{18}\]where \(\mathbf{y}=\operatorname{vec}(\mathcal{Y})\in\mathbb{R}\mathbb{I}_{n=1}^{\mathbb{N}_{n }\times\mathbb{I}_{n}}\), \(\mathbf{F}=\mathbf{F}^{(N)}\otimes\ldots\otimes\mathbf{F}^{(1)}\in\mathbb{R}\mathbb{I}_{n=1 }^{\mathbb{N}_{n}\times\mathbb{I}_{n}=1}^{\mathbb{N}_{n}\times\mathbb{I}_{n}}\), \(\mathbf{P}=\mathbf{P}^{(N)}\otimes\ldots\otimes\mathbf{P}^{(1)}\in\mathbb{R}\mathbb{I}_{n= 1}^{\mathbb{N}_{n}\times\mathbb{I}_{n}=1}^{\mathbb{N}_{n}\times\mathbb{I}_{n }}\), \(\mathbf{w}=\operatorname{vec}(\mathcal{W})\in\mathbb{R}^{\prod_{n=1}^{\mathbb{N}_{ n}}I_{n}}\), and \(\mathbf{c}=\operatorname{vec}(\mathcal{C})\in\mathbb{R}\mathbb{I}_{n=1}^{\mathbb{ N}_{n}}\). The symbol \(\otimes\) denotes the Kronecker product, and \(\operatorname{vec}(\cdot)\) means the vectorization operator. To apply model (16) for image completion, let \(\hat{\mathcal{Y}}\) be obtained according to Definition 1. System (18) can be applied to model non-zero entries in \(\hat{\mathcal{Y}}\), using the following transformations: \(\hat{\mathbf{y}}=\operatorname{vec}(\hat{\mathcal{Y}})=\operatorname{vec}( \mathcal{Y})\), \(\hat{\mathbf{F}}=\mathbf{S}\mathbf{F}\), \(\hat{\mathbf{P}}=\mathbf{S}\mathbf{P}\), and \(\hat{\mathbf{w}}=\mathbf{S}\mathbf{w}\), where \(\mathbf{S}=\operatorname{diag}\{\operatorname{vec}(\Omega)\}\in\mathbb{R}^{ \prod_{n=1}^{\mathbb{N}_{p}}I_{p}\times\mathbb{I}_{p=1}^{\mathbb{N}_{p}}I_{p}}\) is a diagonal matrix with binary values on the main diagonal. The matrices \(\hat{\mathbf{F}}\) and \(\hat{\mathbf{P}}\) have \(|\Omega|\) zero-value rows, and \(\hat{\mathbf{F}}\) also has the same number of zero-value columns. After removing the zero-value rows and columns from the transformed system, the observed entries in \(\mathcal{M}\) can be expressed by the model  
\[\left[ \begin{array}{c}\mathbf{y}(\mathbf{\omega})\\ \mathbf{0}\end{array} \right]=\left[ \begin{array}{cc}\mathbf{F}(\mathbf{\omega},\mathbf{ \omega})&\mathbf{P}(\mathbf{\omega},:)\\ \mathbf{P}(\mathbf{\omega},:)^{T}&\mathbf{0}\end{array} \right]\left[ \begin{array}{c}\bm {w}(\mathbf{\omega})\\ \mathbf{c}\end{array} \right], \tag{19}\]  
where \(\mathbf{y}(\mathbf{\omega})=\operatorname{vec}(\mathcal{Y}(\Omega))\in\mathbb{R}^{| \Omega|}\) is a vectorized version of observed entries in \(\mathcal{M}\), \(\mathbf{F}(\mathbf{\omega},\mathbf{\omega})\in\mathbb{R}^{|\Omega|\times|\Omega|}\) is a submatrix of \(\hat{\mathbf{F}}\) by selecting non-zero rows and columns, \(\mathbf{P}(\mathbf{\omega},:)\in\mathbb{R}^{|\Omega|\times\prod_{n=1}^{\mathbb{N}_{n} }R_{n}}\) is obtained from \(\hat{\mathbf{P}}\) by removing all zero-value rows, and \(\mathbf{w}(\mathbf{\omega})=\operatorname{vec}(\mathcal{W}(\Omega))\in\mathbb{R}^{| \Omega|}\), taking into account rule (2). Note that \(|\Omega|<<\prod_{n=1}^{\mathbb{N}_{n}}I_{n}\), if the number of missing entries in \(\mathcal{M}\) is relatively large. The matrix \(\mathbf{F}(\mathbf{\omega},\mathbf{\omega})\) is positive-definite because it is generated by a GRBF. The matrix \(\mathbf{P}(\mathbf{\omega},:)\) might be ill-conditioned if the polynomial functions of higher degrees are used, but the second term in (16) is used to better approximate linear relationships, and hence there is no need to use higher degrees. In this approach, \(\forall n:R_{n}=3\), which leads to second-degree polynomials. The system matrix in (19) is therefore symmetric and positive-definite, and any least-square (LS) solver can be used to compute the vectors \(\mathbf{w}(\mathbf{\omega})\) and \(\mathbf{c}\) from (19), given \(\mathbf{y}(\mathbf{\omega})\). System (18) can also be used to compute the missing entries in \(\mathcal{M}\). Having the estimates for \(\mathbf{w}(\mathbf{\omega})\) and \(\mathbf{c}\), the missing entries can be obtained by solving the following system of linear equations:  
\[\left[ \begin{array}{c}\bar{\mathbf{y}}\\ \mathbf{0}\end{array} \right]=\left[