# Low Tensor Rank Constrained Image Inpainting Using a Novel Arrangement Scheme
## 3 Methods
### Method 2: The Low Tubal Rank-Based Method  
Tensor-SVD decomposition has been efficiently used in video image completion and dynamic MR image reconstruction problems [4; 16; 48; 49]. As the color image is highly unbalanced in the size of three dimensions, which is not suitable for the low tubal rank constraint, the second flexible QA scheme is exploited to dig out the potential low tubal rank prior information.  
Considering that tubal rank minimizations are more efficient for the balanced tensor [10], we first turn the unbalanced image into the balanced order-3 data using the second flexible QA scheme.  
Take the color image size of 256 \(\times\) 256 \(\times\) 3 as an example, as shown in Figure 3a. The order-4 tensor size of 128 \(\times\) 128 \(\times\) 4 \(\times\) 3 is obtained by the basic QA schemes, and by multiplying the basic QA schemes, the order-4 tensor size of 64 \(\times\) 64 \(\times\) 4 \(\times\) 4 \(\times\) 3 is obtained. Lastly, the order-4 tensor is reshaped into the balanced order-3 tensor size of 64 \(\times\) 64 \(\times\) 48. Here, the context of 'balanced' is that the size changes from the unbalanced 256 \(\times\) 256 \(\times\) 3 to the more balanced size of 64 \(\times\) 64 \(\times\) 48. In practice, the size of the designed order-3 tensor should be as balanced as possible. We call the above the second flexible QA scheme.  
Figure 3b shows the low tubal rankness of the balanced order-3 data (with the size of \(n_{1}\times n_{2}\times n_{3}=64\times 64\times 48\) here) by plotting \(\delta_{j}\), which is defined as follows:  
\[\delta_{j}=\frac{1}{n_{3}}\sum_{i=1}^{n_{3}}T(i,\ i,\ j),\ i=1,\ 2,\ \cdots,\ \min(n_{1},\ n_{2})\]  
Then, TNN is used to enforce the tensor tubal rank in the image inpainting model as follows:  
\[\min_{X}\lVert\Phi_{2}X\rVert_{TNN}\ subject\ to\ \ X(i,\ j)=Y(i,\ j),\ \forall(i,\ j)\in\Omega \tag{12}\]  
where \(\Phi_{2}\) denotes the operator of permuting the color image into a more 'balanced' order-3 tensor using the second flexible QA scheme. Combining the low tubal rank and sparsity, we introduce auxiliary variables \(\mathcal{B}=\Phi_{2}X\) and \(Z=DX\), then rewrite (12) as the following unconstrained convex optimization problem:  
\[\begin{array}{l}\min_{X}\tau_{\Omega}(X)+\frac{I_{3}}{\Gamma}\lVert\overline {\mathcal{B}}^{(i)}\rVert_{*}+\frac{\rho}{2}\lVert\Phi_{2}X-\mathcal{B}+ \Lambda\rVert_{F}^{2}\\ \quad+\frac{\beta}{2}\lVert Z\rVert_{1}+\frac{\beta\rho_{2}}{2}\lVert DX-Z+L \rVert_{F}^{2}\end{array} \tag{13}\]  
where \(I_{3}\) is the third size of the 3-order tensor \(\Phi_{2}X\). We apply the algorithm by ADMM to solve model (13), as shown in Algorithm 2.  
Figure 3: (**a**) The second flexible QA scheme to permute the image into a balanced order-3 tensor. Take the Lena image size of 256 \(\times\) 256 \(\times\) 3 as an example. The balanced order-3 tensor size of 64 \(\times\) 64 \(\times\) 48 is obtained by multiple QA schemes. This balanced order-3 tensor is more suitable for the t-SVD decomposition than the original image size of 256 \(\times\) 256 \(\times\) 3. (**b**) The low tubal rankness of the balanced order-3 tensor.