# Hyperspectral Image Inpainting Based on Robust Spectral Dictionary Learning
## 1 Introduction
[20] proposed an adaptive spectrally weighted sparse Bayesian dictionary learning method to solve the HSI inpainting problems. Through BPFA with a framework of compressive sensing, the algorithm adaptively used the potential spectral correlation between different spectral bands. Because the algorithm was improved based on the BPFA method, it also has the drawbacks of requiring noise parameters as _a priori_ knowledge and being computationally intensive. To quickly acquire the training dictionary, an online dictionary learning algorithm was proposed previously [21]. The algorithm only used one element or a subset of the data set for each iteration instead of all the elements in the training set. It was an effective statistical approximation of the batch processing method. The algorithm successfully reduced the computational complexity of the dictionary learning by using an online scheme, but it was still sensitive to noise and outliers. [PERSON] et al. [22] extended the dictionary learning algorithm to the complex domain to solve the noise reduction problem of interferometric synthetic aperture radar (InSAR) images. For actual images, the high levels of noise and the existence of outliers are still major challenges for the current online dictionary learning algorithms. At present, existing dictionary-based inpainting algorithms typically use the \(l_{2}\) norm as the data fitting term in the objective function. Thus, the dictionary update process is easily disrupted by noise and outliers. The optimization process is not robust enough to handle outliers, and it is often difficult to obtain satisfactory results in the inpainting of HSIs. In view of the large volume of hyperspectral data and the presence of high noise levels and outliers, we adopted an online scheme of dictionary learning in this work to introduce a robust function into the objective function of the dictionary update. Furthermore, we used the hyperspectral data of the image to be inpainted to construct an adaptive dictionary that was suitable for the image inpainting problem. The introduction of robust functions could enhance the robustness of the inpainting process against noise and outliers. In addition to the large data size, HSIs were also formed in a special way, resulting in three-dimensional cubic data. Because all the dictionary learning algorithms currently in use were developed from 2D images, the hyperspectral data are usually expanded into pixel spectral matrices for processing. However, algorithms such as BPFA and K-SVD still use processing methods for 2D images that select image blocks in the pixel spectral matrix as the training set for dictionary learning, and they do not make good use of the high correlation between the bands of hyperspectral data. For this reason, according to [23], we used pixel spectral vectors instead of the traditional image blocks as the training data for dictionary in this work, and the obtained dictionary dimension was the same as the image spectral dimension. Because the dictionary atom could be regarded as the spectral curve that constituted the HSI, the correlation between the spectral bands was better used, and the sparse coding obtained by the dictionary was more consistent with the physical meaning of the pixel. Thus, the inpainting effects were also better. According to aforementioned analysis, in this paper, we proposed an HSI inpainting algorithm based on online robust spectral dictionary learning, termed INORSDL. The image to be restored was processed with methods based on sparse domain modeling to finally obtain a satisfactory inpainting result. The main contributions of this paper are as follows:  
1. We model the HSI inpainting as a reconstruction problem of sparse signals under incomplete observation, with the theory of dictionary learning and sparse representation. To improve the efficiency of the dictionary learning, different from block loading algorithms, the spectral dictionary was trained progressively using the pixel spectral vectors waiting to be trained. 2.