# Image Error Concealment Based on Deep Neural Network
## 3 Our Proposal
### Adaptive Scan Order  
Within the framework of sequential reconstruction, the previously reconstructed pixels will be used in the subsequent pixel reconstruction; hence, the prediction errors will be accumulated and propagated to the later reconstruction. The scan order, which determines the available context of each missing pixel, plays a critical role in the reconstruction performance. A common idea of scan order, as used in [8], is to first reconstruct the missing pixels whose support areas contain more available pixels. Although this scan order has achieved fairly good performance, there are still deficiencies. For example, the scan order will be exactly the same for two different missing areas that have the same area shape. Thus, it is not flexible and conducive for the extension of edges. In our method, we propose a novel adaptive scan order based on the joint credibility of the support area and reconstruction to alleviate the error propagation problem. The scan order depends not only on the credibility of the support area, but also on the credibility of the missing pixels' reconstruction. Let \(\mathrm{p}(\mathrm{x})\) stand for the confidence of pixel \(\mathrm{x}\). Then, the confidences of the pixels in the corrupted image are initialized as:  
\[\mathrm{p}(\mathrm{x})=\left\{ \begin{array}{ll}1&\mathrm{x}\mathrm{\;is\;the\; corresponding\;received\;pixel}\\ 0&\mathrm{x}\mathrm{\;is\;the\;missing\;pixel}\end{array} \right. \tag{14}\]  
where constant \(1\) stands for the pixel \(\mathrm{x}\) being correctly received, and \(0\) represents it as missing. We updated the confidence of the missing pixels to \(1\) after reconstructing them. The confidences of the pixels in the received image were initialized as shown in Figure 10.  
For each missing pixel, we find all the possible support areas around it through matching the eight templates. The sum of confidence of all the non-overlapped available pixels in these support areas is used to represent the credibility of the support area of this missing pixel, as shown in the red box in Figure 10. In the process of reconstruction, we firstly reconstructed the missing pixel whose support area had the highest credibility. However, frequently the support areas are the same; as can be seen in Figure 10, the credibility of the support areas of the current pixels \(\mathbf{y}_{1}\), \(\mathbf{y}_{2}\), \(\mathbf{y}_{3}\), and \(\mathbf{y}_{4}\) are the same. In this case, we used the credibility of the reconstructions of the current missing pixels to determine the scan order. According to the non-local self-similarity of natural images, similar samples have similar pixel values at the same position. Therefore, we used the deviation between the reconstruction and the pixel value in the same location of the corresponding similar sample to measure the credibility: the lower the deviation, the higher the credibility. Figure 10: The initialization confidence of pixels in the received image. Each square stands for one pixel. The gray pixels with label \(1\) represent the correctly received pixels, while the green ones with label \(0\) are the missing pixels. The red pixels are the currently being filled. The part in the red box is the support areas of the missing pixel \(\mathbf{y}_{1}\). Let \(\mathbf{y}_{i}^{\mathrm{u}}\) be the \(i^{\mathrm{th}}\) missing pixel that is located on the contour of the available region, and suppose that the \(n\) support area \(\mathbf{y}_{i}^{\mathrm{s_{1}}},\mathbf{y}_{i}^{\mathrm{s_{2}}},\dots,\mathbf{ y}_{i}^{\mathrm{s_{n}}}\) can be collected through matching the templates. We collected corresponding similar sample sets \(\mathbf{S}_{1},\mathbf{S}_{2},\dots,\mathbf{S}_{n}\) from the whole image.