# Hyperspectral Image Inpainting Based on Robust Spectral Dictionary Learning
## 1 Introduction  
In the operation of hyperspectral imaging systems, sensor malfunctions can create missing pixels, missing scan lines and other anomalies in the acquired hyperspectral image (HSI), resulting in incomplete observations of the target area. This can significantly affect subsequent processing and applications of the HSI. Therefore, it is necessary to restore the complete image information in the preprocessing of the HSI. In the field of digital image processing, the process of restoring the missing data in an image is called image inpainting [1]. Since the emergence of image inpainting problems, several algorithms have been widely studied and applied, such as interpolation methods [2, 3], partial differential equation methods [4, 5], total variation methods [6, 7, 8], texture synthesis [9], and the Huber-Markov method [10, 11]. All these algorithms were first proposed and applied for two-dimensional images and were mainly applied for the restoration of small areas. They were not suited for large areas of missing pixels. An improved partial differential equation method was applied to hyperspectral imagery [12] and preserving edge sharpness, but it suffered from excessive blurring. A hyperspectral image restored by the total variation method was prone to exhibiting a step effect, which was not beneficial for the subsequent processing of the image. As sparse representation theory has been widely applied in the field of image and signal processing, its powerful processing ability has attracted the attention of many researchers [13, 14]. Sparse representation methods have also been introduced into image inpainting problems [15, 16, 17]. Thetheoretical basis is the new theory of compressed sensing. Specifically, sparse or compressible signals in some transform domains can be reconstructed from a small amount of incomplete information. To better solve the HSI inpainting problem, it was proposed that high-precision sparse reconstruction optimization could be achieved by constructing an appropriate over-complete dictionary [18]. Many scholars have studied the construction of over-complete dictionaries for image inpainting. Among them, the most classic example is that of [PERSON] and [PERSON] [19]. They proposed the use of a K-SVD algorithm in image inpainting, with the over-complete dictionary obtained from a preliminary training process. In the K-SVD dictionary training process, the sparse coding in each iteration was obtained by the block coordinate relaxation algorithm (BCR), and the update of the dictionary atom was performed by the eigenvalue decomposition method. To minimize the objective cost function under certain constraints, each iteration of the dictionary learning accessed all elements in the training set, a batch processing method based on the second iteration. This feature made the process too computationally intensive to be applied to large-scale data sets, such as HSIs. In addition, the algorithm assumed that certain noise parameters, such as the variance, were known, and the image inpainting accuracy in practical applications was quite sensitive to the errors of estimated variance [17]. [PERSON] et al. [17] proposed a nonparametric Bayesian dictionary learning method and applied it to HSI inpainting problems. The algorithm treated dictionary learning as a factor analysis problem, in which the factor loading corresponded to dictionary atoms and adaptively exploited the potential spectral correlation between different spectral bands using beta-process factor analysis (BPFA). The dictionary set was adaptively updated by Gibbs sampling of the data to be processed and appeared as an approximation of the total _posteriori_ probability. The method used the spectral correlation of the HSIs to achieve better inpainting. However, BPFA must acquire noise or residual variance as _a priori_ knowledge, and each iteration step must access all the elements in the data set. Thus, this process is computationally intensive. Based on BPFA, [PERSON] et al.