# Rain Removal of Single Image Based on Directional Gradient Priors
## 2 Related Work  
The traditional single image rain removal method regards a rain image as a superposition of background layer and rain layer, and thus the rain model can be described as follows:  
\[Y=B+R \tag{1}\]  
where \(Y\in\Re^{M*N}\) represents a rain image, \(B\in\Re^{M*N}\) is the background layer, and \(R\in\Re^{M*N}\) is the rain layer. According to the requirement of the layer separation, the existing methods were proposed to standardize the stratified results with different priors. As a powerful image prior model, the sparsity prior has been widely used in different layer separation applications [11; 30].  
A sparse representation of the images is derived from the hypothesis of efficient neuron coding, and the human visual system adopts a low-energy metabolic information processing strategy for an external input signal, namely sparse coding [30; 31]. From the perspective of image processing, sparse coding simulates the sparse activity characteristics of physiological neurons and uses a group of atomic bases to sparsely represent the input image. In short, sparse coding is a linear combination of a large number of samples represented by a set of basis vectors [6; 31]. The coefficients corresponding to the basis vectors are sparse, that is, they contain only a few non-zero elements or a few elements far greater than zero. The general form of the sparse coding can be defined as follows:  
\[\{x,D\}=\underset{x,\;D}{\operatorname{argmin}}||y-Dx||_{k}+\lambda||x|| \tag{2}\]  
where \(y\) is the encoded data, \(x\) is the sparse vector to be estimated, \(\lambda\) represents the regularization parameter, and \(k(1\leq k\leq 2)\) is a sparse measure.  
The key to a sparse representation is to find the basis of a sparse representation of the signal [32; 33; 34]. The sparse representation of a signal can be obtained by the following two types: traditional sparse coding and convolutional sparse coding. Traditional sparse coding requires searching for a suitable dictionary from multiple redundant dictionaries trained to represent the same feature, whereas convolutional sparse coding uses the dictionary shared by all samples as the convolution kernel, which can capture the noise signal. The advantages of convolutional sparse coding can be summarized as the following four points [35; 36; 37]. First, convolution sparse coding can use a filter to form a dictionary, which is faster in execution, and the learning algorithm is not limited by the size of the image block. Second, convolution coding can capture global image features (global structure, block, and local contour features). Third, complete features can be learned from the neighborhood of the image block. Finally, image prior information can be introduced to learn the filter.  
In this study, the horizontal filter bank and the U component (the singular value decomposition of the rain layer) are used to initialize the dictionary of the background layer and the rain layer, respectively. During the process of solving the rain removal model, the sparse coding dictionary of the rain layer is further updated iteratively, and the corresponding sparse coefficient obtained through the sparse decomposition is also solved and updated.