A JPEG image deblocking method based on sparse and low-rank approximation
A sparse and low-rank approximation model with a non-convex function addresses the challenge of block artifacts in JPEG images, enhancing sparsity and low-rank constraints to improve image quality and texture detail restoration.
Patent Information
- Application Number
- CN202310359681.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-06
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2043-04-06
AI Technical Summary
The existing JPEG image deblocking effect method is not effective in the case of low quality factors and insufficient recovery of edge texture details.
A unified model with sparse and low rank approximation is adopted, and a non-shaping function is used as a low rank regularization term to perform low rank constraints on non-local similar image block sets. Combined with dictionary learning and sparse encoding, the model is solved by the alternating direction iteration method.
Effectively reduces blocky artifacts of JPEG images, while restoring more image edge texture details, improving image quality.
Smart Images

Figure CN116385299B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of digital image processing, and relates to a JPEG image deblocking method based on sparse and low-rank approximation, which is used to remove blocky artifacts from JPEG images and restore the edge texture details of the images. Background Art
[0002] JPEG images are one of the most popular lossy compressed image formats. They can convert clear images into compressed images acceptable to the human eye at a relatively high compression rate, and have the advantage of small capacity. This enables JPEG images to greatly reduce the time and traffic required for transmission during network transmission. In addition, in devices with limited storage space, it can better save the space consumed by storing digital image data. Therefore, it is widely used in the storage and transmission of photos on the World Wide Web, the photo storage of digital cameras and other fields.
[0003] During the process of JPEG image compression, the image needs to be divided into multiple non-overlapping block regions, and discrete cosine transform is performed on each region separately. To reduce the data capacity, the coefficients obtained after discrete cosine transform of each region are divided by the corresponding values in the quantization table, and the results are rounded to the integer part for storage. Finally, entropy coding is used to generate the JPEG compressed bitstream. In the JPEG decompression process, it involves lossless entropy decoding, dequantization, inverse discrete cosine transform of each region, and region recombination in sequence. During the dequantization process, since the quantized results are stored by rounding, the dequantized results are not exactly the same as the pre-quantization results, which leads to the introduction of objectionable blocky artifacts in the decompressed image. The degree of influence of this kind of blocky artifact on the image is negatively correlated with the quality factor parameter set during the JPEG compression process. When the quality factor is set relatively low, the image compression rate is high, but the introduced blocky artifacts are more obvious.
[0004] Traditional JPEG image deblocking methods are divided into two categories. The first category of methods is image pre - processing technology, which uses coding methods such as wavelet transform coding and texture coding to replace the block - based DCT coding method in the process of generating JPEG images. Although this image pre - processing technology that changes the coding method can effectively eliminate the blocky artifacts of the image, it requires a complete modification of the image system from the coding end to the decoding end, resulting in too high a cost for this method. The second category of methods is image post - processing technology, which directly processes the lossy JPEG image using relevant knowledge in the field of image processing. Different from the image pre - processing technology that modifies the coding end to the decoding end of the image system to eliminate the blocky artifacts of JPEG images from the source, the image post - processing technology only needs to connect an image processing module after the decoding end to effectively reduce the blocky artifacts of JPEG images. It is fully compatible with the current image compression standard and has a low cost. Therefore, the image post - processing technology has been widely applied. In the past decade, researchers at home and abroad have proposed a large number of JPEG image deblocking methods based on image post - processing technology, such as algorithms based on the projection onto convex sets theory, algorithms based on the maximum a posteriori probability, algorithms based on spatial domain filtering, algorithms based on transform domain filtering, and algorithms based on low - rank prior, etc. Although these methods can reduce the blocky artifacts of the image to a certain extent, when the quality factor is low, the blocky artifacts of the image are still very obvious, and the edge texture of the image will also be very blurred. Utilizing the low - rank prior and sparse representation of the image is the key to effectively reducing the blocky artifacts of the image and restoring the edge texture details of the image. Summary of the Invention
[0005] The purpose of the present invention is to propose a JPEG image deblocking method based on sparse and low - rank approximation in view of the deficiencies of existing JPEG image deblocking methods. This method adopts a unified model of sparse and low - rank approximation, uses a non - integer function as the low - rank regularization term to perform low - rank constraint on the set of non - local similar image patches. Since both sparse and low - rank approximation are utilized, the final deblocked image has sparsity in the dictionary domain in the set composed of similar image patches of the same type, and low - rank property in the set composed of non - local similar image patches, thus effectively reducing the blocky artifacts of JPEG images while restoring more edge texture details of the image. The specific steps are as follows:
[0006] (1) Input a JPEG image y with blocky artifacts. Extract image patches in the pre - deblocked image using a sliding window, and cluster them using a clustering algorithm. All the image patches are clustered into K categories;
[0007] (2) Extract G target image patches in the pre - deblocked image using a sliding window, and then use a classifier to select similar image patches in the region where each target image patch is located. The set composed of these similar image patches is called the structure group;
[0008] (3) According to the clustering results of the clustering algorithm, a dictionary is learned for each set of image patches of each class, and then the l p norm is used to perform sparse coding on the sparse matrix under the corresponding dictionary; taking the structural groups extracted by the classifier as the object, a non-shaping function is used as the low-rank regularization term for each structural group for low-rank approximation, so as to establish a JPEG image deblocking effect model based on sparse and low-rank approximation:
[0009]
[0010] where is the variance of the corresponding noise in considering the JPEG image as an image contaminated by noise, and this variance value can be directly obtained from the known quantization template in the image compression process. x is the image obtained after deblocking the JPEG image, μ is the sparse regularization parameter, K represents the total number of classes co-clustered in step (1), k represents the k-th class after clustering, is an operator for extracting the image patches belonging to the k-th class after clustering from all the image patches, is a matrix representing the set of image patches of the k-th class obtained by clustering through the clustering algorithm, C k,0 x is the first column of the matrix representing the first image patch in the set of image patches of the k-th class, C k,1 x is the second column of the matrix representing the second image patch in the set of image patches of the k-th class, C k,b-1 x is the b-th column of the matrix representing the b-th image patch in the set of image patches of the k-th class, b is the total number of image patches in the set of image patches of the k-th class, D k is the dictionary learned from the set of image patches of the k-th class, A k is the sparse matrix corresponding to the dictionary D k obtained by sparse coding in the set of image patches of the k-th class , is the matrix squared of the Frobenius norm, is the sparse matrix A k l p norm to the p-th power, λ is the low-rank regularization parameter, G represents the total number of target image patches extracted in step (2), i represents the i-th of the G target image patches, is an operator for extracting the set composed of all the image patches similar to the i-th target image patch in the region where the i-th target image patch is located, and this set is also called the i-th structural group, that is is an operator for extracting the i-th structural group, is a matrix representing the i-th structural group selected by the classifier, R i,0 x is the matrix The first column of represents the first image patch in the i-th structural group, R i,1 x is the matrix The second column of represents the second image patch in the i-th structural group, R i,s-1 x is the matrix The s-th column of represents the s-th image patch in the i-th structural group, where s is the total number of image patches in the i-th structural group, L i represents the low-rank matrix obtained from the i-th structural group V i represents the matrix L i The total number of non-zero singular values of, v i represents the matrix L i The v-th of the non-zero singular values of, is the v-th non-zero singular value of the matrix L i ε is a very small positive constant used to ensure that the denominator is not zero. The alternating direction iteration method is used to solve the image block artifact model.
[0011] The innovation of the present invention is to propose a unified model for JPEG image block artifact removal based on sparse and low-rank approximation; and use an improved non-integer function as the low-rank regularization term to perform low-rank constraint on the set of non-locally similar image patches, which is continuously updated during the JPEG image block artifact removal process; and the solution steps are given.
[0012] The beneficial effects of the present invention: perform dictionary learning and sparse coding on each type of image patch set and continuously update to enhance the sparsity of the sparse matrix; at the same time, use the low-rank prior to perform low-rank approximation on the set of non-locally similar image patches, and use the non-integer function as the low-rank regularization term to enhance the low-rank constraint effect of the model; reconstruct the image using the results of sparse representation and non-local low-rank approximation, so that the finally generated image effectively removes block artifacts and restores the image edge texture details.
[0013] The present invention is mainly verified by simulation experiments, and all steps and conclusions are verified to be correct on MATLAB R2018b. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is the flow chart of the present invention;
[0015] Figure 2 is the undistorted TIFF format image used in the simulation of the present invention;
[0016] Figure 3 is the JPEG format image with a quality factor of 5 used in the simulation of the present invention;
[0017] Figure 4 are images obtained by performing deblocking on JPEG format images with a quality factor of 5 using different methods; Figure 5 is the error between the image obtained by performing deblocking on JPEG format images with a quality factor of 5 using different methods and the undistorted image. Detailed implementation manners
[0018] Referring to Figure 1 , the present invention is a JPEG image deblocking method based on sparse and low-rank approximation, and the specific steps are as follows:
[0019] Step 1, input an image, extract all image blocks in the image, and cluster all the image blocks in the image;
[0020] (1a) Input a JPEG image y with block artifacts;
[0021] (1b) Set the sliding window size to 8×8, and set the step size of each movement of the sliding window to 1. For an image with a size of 256×256, extract all the image blocks in sequence with a sliding speed of step size 1 from left to right and from top to bottom, and cluster all the image blocks, and a total of 128 categories are clustered.
[0022] Step 2, extract target image blocks, and use a classifier to select image blocks similar to the target image blocks in the area where each target image block is located, and aggregate the similar image blocks in each area into a structure group;
[0023] (2a) In the matrix corresponding to the entire image, select 20 rows at equal intervals starting from the first row, and select 20 columns at equal intervals starting from the first column, and a total of 20×20 = 400 pixel points are obtained. According to the positions of these 400 pixel points, 400 target image blocks with a size of 8×8 are extracted;
[0024] (2b) According to the 400 target image blocks obtained in step (2a), divide the block areas according to the size of 41×41 with these target image blocks as the center. If the boundary of the image is touched during the division process, the corresponding block area will become smaller, and each block area is the area where the corresponding target image block is located;
[0025] (2c) Set the sliding window size to 8×8, and set the step size of each movement of the sliding window to 1. In the area where each target image block is located, extract image blocks in sequence with a sliding speed of step size 1 from left to right and from top to bottom using the sliding window, and use a classifier to select 45 image blocks most similar to the target image block in each area to form a structure group, and a total of 400 structure groups are obtained.
[0026] Step 3: Using each set of image patches obtained in Step 1 as an object, learn dictionaries respectively, and then use the l p norm to perform sparse coding on the sparse matrix under the corresponding dictionary. Using each structure group obtained in Step 2 as an object, perform low-rank approximation on each structure group respectively by using a non-convex function as the low-rank regularization term, construct a total model based on sparse and low-rank approximation, and solve this model using the alternating direction iteration method;
[0027] (3a) Perform dictionary learning on each set of image patches obtained in Step (1b) respectively to construct a sparse representation model:
[0028]
[0029] (3b) Perform low-rank approximation on each structure group obtained in Step (2a) respectively to construct a low-rank approximation model:
[0030]
[0031] (3c) Combine Equation (1) and Equation (2) to construct a total model based on sparse and low-rank approximation:
[0032]
[0033] (3d) Fix x and L i , the sub-problem of D k and A k in the total model is Equation (1). According to the m-th atom in the dictionary D k , that is, the m-th column vector d k(:,m) of the dictionary, and the m-th row vector a k in the corresponding sparse matrix A k(m,:) , we get Update the residual matrix Perform singular value decomposition on it E m = UΣV T , use the m-th column vector u (:,m) of the left singular value matrix U to update the m-th atom d k(:,m) of the dictionary, repeat this process until all atoms in the dictionary D k are updated; use s m v T (m,:) to update the m-th row of A k , repeat this process until all row vectors of the sparse matrix A k are updated.
[0034] (3e) Fix x, D k and A k , the sub-problem of L i in the total model is Equation (2). Perform singular value decomposition and L i = PΔQ T , the lower bound of Equation (2) is obtained according to the von Neumann trace inequality as follows: where the condition for the equality sign to hold is and Let the singular value matrix the v-th singular value of be denoted as Since both the singular value matrix and Δ are diagonal matrices, with each element on the main diagonal of the matrix as the unit, the lower bound of Equation (2) can be expressed as For the in it, perform a first-order Taylor expansion, and the threshold can be obtained as Combining the condition for the equality sign to hold for the lower bound of Equation (2), the property that the threshold and the singular values of the matrix are all non-negative numbers, the solution of Equation (2) can be obtained as follows:
[0035]
[0036] (3f) Fix D k , A k and L i , the sub-problem of x in the total model is
[0037]
[0038] The minimization problem of Equation (5) is a least squares problem. The solution idea is to take the derivative with respect to x and set the derivative to 0. At this time, x is the solution that can make the function obtain the minimum value. However, this function contains matrices. According to the property that the square of the Frobenius norm of a matrix is equal to the sum of the squares of the 2-norms of each column vector in the matrix respectively, Equation (5) can be transformed from an operation containing matrices into an operation containing vectors. The specific operation is to use to replace Use to replace Therefore, Equation (5) can be changed into the following form:
[0039]
[0040] Next, take the derivative of Equation (6) with respect to x and set the derivative equal to 0, and get where I is the identity matrix; usually, the large dimension makes it very difficult to directly perform the inverse operation on it. Therefore, when setting the sliding window to extract image patches, make the image patches be extracted according to the periodic boundary condition, so that the matrix is a diagonal matrix, which can greatly reduce the time required for the inverse operation, and the closed-form solution of Equation (6) is obtained as follows:
[0041]
[0042] The obtained solution is the image after removing the blocking effect of the required JPEG image.
[0043] (3g) Repeat the process of steps (3d) to (3f) until the number of iterations reaches the preset upper limit.
[0044] The effects of the present invention can be further illustrated by the following simulation experiments:
[0045] I. Experimental conditions and content
[0046] Experimental conditions: The experiment uses TIFF images as non-distorted images as Figure 2 shown; the experiment uses JPEG images with a quality factor of 5 as lossy compressed images as Figure 3 shown; the experiment uses peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) as result evaluation indicators. PSNR is defined as:
[0047]
[0048] where x represents the image after removing the blocking effect of the JPEG image, represents the non-distorted image, N represents the total number of pixels in the image, and the higher the PSNR value, the better the effect of removing block artifacts in the JPEG image, and the clearer the edge texture details of the image. SSIM is defined as:
[0049]
[0050] where and are the means of x and , and are the standard deviations of x and , is the covariance of x and , and ε1 and ε2 are two constants to avoid instability. The value range of SSIM is [0, 1], and the closer its value is to 1, the better the effect of removing block artifacts in the JPEG image, and the clearer the edge texture details of the image.
[0051] Experimental content: Under the above conditions, the classical BM3D method in the field of removing the blocking effect of JPEG images, as well as the current leading CONCOLOR method and LR_GSC method, are compared with the method of the present invention.
[0052] Experiment 1: Use the non-distorted TIFF images in Figure 2 for JPEG compression, and set the quality factor to 5 to obtain Figure 3 with severe block artifacts., the proposed method, BM3D method, CONCOLOR method, and LR_GSC method are respectively used to perform deblocking on the severely distorted JPEG image shown below under the same conditions. The BM3D method uses the Euclidean distance to find similar image patches, combines the set of similar image patches into a three-dimensional group, performs collaborative hard threshold filtering on the entire three-dimensional group, and then splits it into a set of image patches and reconstructs the image. The result after deblocking is Figure 3 (a), and the image error after deblocking is Figure 4 (a); The CONCOLOR method divides the image into multiple regions, finds similar image patches for each region, and performs low-rank approximation on the set of similar image patches. The l Figure 5 (0 < p < 1) norm is used as the low-rank regularization term, and pixel-wise quantization constraints are imposed on the image after deblocking in each iteration. The result after deblocking is p (b), and the image error after deblocking is Figure 4 (b); The LR_GSC method divides the image into multiple regions, performs sparse coding on each region using a fixed dictionary, and then performs low-rank approximation on the sparse matrix obtained after sparse coding. The l1 norm and nuclear norm are respectively used as the sparse regularization term and low-rank regularization term. The result after deblocking is Figure 5 (c), and the image error after deblocking is Figure 4 (c); For the proposed method, the sliding window size for extracting image patches is set to 8×8, the moving step size of the sliding window is set to 1, the number of similar image patches found using the classifier in each region is set to 45, the number of clusters using the clustering algorithm is set to 128, the sparse regularization parameter μ is set to 0.005, the low-rank regularization parameter λ is set to 200, and the parameter ε in the low-rank regularization term is set to 1; The result of image deblocking using the proposed method is Figure 5 (d), and the image error after deblocking is Figure 4 (d). Figure 5 (d).
[0053] Since the BM3D method searches for similar image patches based on the entire image during the process, when the JPEG image quality factor is low and the image distortion is severe, it usually results in less-than-ideal matched similar image patches. At the same time, the quality of the final result of the BM3D algorithm highly depends on the matching of similar image patches. Therefore, when the JPEG image quality factor is low and the image distortion is severe, the deblocking effect result obtained by this algorithm is poor. Although the CONCOLOR method adds a quantization constraint term to the low-rank model for the characteristics of JPEG images, which improves the deblocking effect model of JEPG images based on low-rank approximation, it ignores the importance of sparse representation for the restoration of image texture details. The LR_GSC method uses a traditional fixed dictionary, resulting in a poor sparsity degree of the sparse matrix in this dictionary domain. At the same time, it uses the convex l1 norm and nuclear norm as the sparse regularization term and low-rank regularization term respectively, which limits the sparse constraint strength and low-rank constraint strength. In contrast, the present invention simultaneously uses sparse representation and non-local low-rank approximation, and uses a non-integer function as the low-rank regularization term, which improves the final JPEG image deblocking effect result and restores more image edge texture details. From Figure 4 As can be seen from the result graphs of JPEG image deblocking effects using various methods, the effect of removing blocky artifacts from JPEG images by the present method is the best, and at the same time, the texture details of the edges are clearer. Figure 5 In the error graph in, the darker the area, the smaller the error between the image obtained by the deblocking effect algorithm in this area and the non-distorted image, and the brighter the area, the larger the error between the image obtained by the deblocking effect algorithm in this area and the non-distorted image. As can be seen from the error graphs of various methods, the error of the present method is the smallest.
[0054] Table 1 PSNR metrics of different methods
[0055] Image JPEG itself BM3D CONCOLOR LR_GSC The present invention Barbara female image 23.86 24.98 25.70 25.85 26.87
[0056] Table 1 shows the PSNR of the JPEG image itself and the results after using different methods for JPEG image deblocking. The higher the PSNR value, the better the effect of removing blocky artifacts from the image and restoring edge texture details. It can be seen that the method of the present invention has the best effect of removing blocky artifacts from JPEG images and restoring edge texture details compared with other methods. This result is Figure 4 consistent with.
[0057] Table 2 SSIM metrics of different methods
[0058] Image JPEG itself BM3D CONCOLOR LR_GSC The present invention Barbara female image 0.6612 0.7011 0.7322 0.7407 0.7776
[0059] Table 2 shows the SSIM of the JPEG image itself and the JPEG image after deblocking using different methods. The higher the SSIM value, the more similar the deblocked image is to the undistorted image. It can be seen that the image after deblocking by the method of the present invention is the most similar to the undistorted image compared with other methods. This result is consistent with Figure 4 be consistent with
[0060] The above experiments show that the image obtained by removing block effects from JPEG by the present invention can not only well remove the block artifacts of the image and restore the texture details of the image edge, but also has good visual effects and objective evaluation indicators. Thus, it can be seen that the present invention is effective for removing block effects from JPEG images.
Claims
1. A JPEG image deblocking method based on sparse and low-rank approximation, comprising the following steps: (1) Input a JPEG image y with block artifacts. Extract image patches in the pre-deblocking image using a sliding window, and cluster them using a clustering algorithm. All the image patches are clustered into K categories; (2) Extract G target image patches in the pre-deblocking image using a sliding window. Then, in the region where each target image patch is located, use a classifier to select image patches similar to the target image patch. The set composed of these similar image patches is called the structure group; (3) According to the clustering results of the clustering algorithm, a dictionary is learned for each set of image patches of each class, and then the sparse matrix under the corresponding dictionary is sparsely encoded using the l p norm. Taking the structural groups extracted by the classifier as objects, for each structural group, a non-convex function is used as the low-rank regularization term for low-rank approximation, thereby establishing a JPEG image deblocking effect model based on sparse and low-rank approximation: where is the variance of the noise corresponding to regarding the JPEG image as an image contaminated by noise, and this variance value can be directly obtained from the quantization template known in the image compression process. \(x\) is the image obtained after removing the blocking effect of the JPEG image, \(\mu\) is the sparse regularization parameter, \(K\) represents that there are \(K\) categories in total after clustering in step (1), and \(k\) represents the \(k\)-th category after clustering. is an operator for extracting all the image patches belonging to the \(k\)-th category in the image patch. represents the set of the \(k\)-th category of image patches obtained by clustering, \(C\) k,0 \(x\) is the matrix The first column of which represents the first image patch in the set of the \(k\)-th category of image patches, \(C\) k,1 \(x\) is the matrix The second column of which represents the second image patch in the set of the \(k\)-th category of image patches, \(C\) k,b-1 \(x\) is the matrix The \(b\)-th column of which represents the \(b\)-th image patch in the set of the \(k\)-th category of image patches, and \(b\) represents that there are \(b\) image patches in the set of the \(k\)-th category of image patches, \(D\) k is the dictionary learned from the set of the \(k\)-th category of image patches, \(A\) k is the dictionary \(D\) obtained by sparse coding k in the set of the \(k\)-th category of image patches corresponding sparse matrix is the matrix square of the Frobenius norm is the sparse matrix \(A\) k the \(l\) p norm to the \(p\) power, \(\lambda\) is the low-rank regularization parameter, \(G\) represents the total number of target image patches extracted in step (2), and \(i\) represents the \(i\)-th among the \(G\) target image patches. is an operator for extracting the set consisting of all the image patches similar to the \(i\)-th target image patch in the region where the \(i\)-th target image patch is located. This set is also called the \(i\)-th structure group, that is is an operator for extracting the \(i\)-th structure group. is a matrix representing the \(i\)-th structure group selected by the classifier, \(R\) i,0 \(x\) is the matrix The first column of which represents the first image patch in the \(i\)-th structure group, \(R\) i,1 \(x\) is the matrix The second column of which represents the second image patch in the \(i\)-th structure group, \(R\) i,s-1 \(x\) is the matrix The \(s\)-th column of which represents the \(s\)-th image patch in the \(i\)-th structure group, and \(s\) is the total number of image patches in the \(i\)-th structure group, \(L\) i represents the low-rank matrix obtained from the \(i\)-th structure group , \(V\) i Denote the matrix L i The total number of non-zero singular values of, v i Denote the matrix L i The v-th among the non-zero singular values of, is the matrix L i The v-th non-zero singular value of, ε is a very small positive constant used to ensure that the denominator is not zero, and the alternating direction iteration method is used to solve the image blocking effect model.
2. The JPEG image deblocking method based on sparse and low-rank approximation according to claim 1, wherein when using the alternating direction method of multipliers to solve the problem in step (3), it can be carried out according to the following steps: (3a) Fix x and L i , the sub-problems of D k and A k in the image deblocking effect model are This sub-problem can be solved by singular value decomposition and orthogonal matching pursuit method; (3b) Fix x, D k and A k , in the image deblocking effect model, the sub-problem of L i is This sub-problem can be solved by singular value thresholding method; (3c) Fix D k , A k and L i , in the image deblocking effect model, the sub-problem of x is where represents the square of the 2-norm of the vector (y - x), and this sub-problem can be solved by the least squares method; (3d) Repeat steps (3a) to (3c) until the number of iterations reaches the preset upper limit.
3. The JPEG image deblocking method based on sparse and low-rank approximation according to claim 2, wherein when using singular value decomposition and orthogonal matching pursuit method to solve the sub-problem in step (3a), it can be carried out according to the following steps: (3a1) The dictionary D k The m-th column vector d k(:,m) in it is called the m-th atom of the dictionary, where d k(:,m) is a column vector, and the (:,m) at the subscript indicates that this column vector is composed of all the elements in the m-th column of the matrix D k . The sparse matrix A k corresponding to this column vector, the m-th row vector in it is denoted as a k(m,:) , where a k(m,:) is a row vector, and the (m,:) at the subscript indicates that this row vector is composed of all the elements in the m-th row of the matrix A k . Therefore can be converted to (3a2) Updated residual matrix Perform singular value decomposition on it, E m = UΣV T , where U is the left singular value matrix, Σ is the singular value matrix, and V T is the right singular value matrix. The superscript T in the upper right corner indicates that matrix V T is the transpose of matrix V; (3a3) Use the m-th column vector u of the left singular value matrix U (:,m) to update the m-th atom d of the dictionary k(:,m) , where u (:,m) is a column vector, and the (:,m) at the subscript indicates that this column vector is composed of all the elements in the m-th column of matrix U. Repeat steps (3a1) to (3a3) until all the atoms in the dictionary D k are updated; (3a4) Perform sparse coding using the orthogonal matching pursuit method, and use s m v T (m,:) to update the m-th row of A k , where s m is a scalar whose value is the m-th element on the main diagonal of the singular value matrix Σ in step (3a2), and v T (m,:) is a row vector representing the m-th row vector of the right singular value matrix V in step (3a2). The (m, :) at the subscript indicates that this row vector is composed of all the elements in the m-th row of the matrix V T . Repeat steps (3a1), (3a2) and (3a4) until the sparse matrix A T is updated k .
4. The JPEG image deblocking method based on sparse and low-rank approximation according to claim 2, wherein when using singular value thresholding method to solve the sub-problem in step (3b), it can be carried out according to the following steps: (3b1) Perform singular value decomposition and L i = PΔQ T , where is the left singular value matrix after performing singular value decomposition on , is the left singular value matrix after performing singular value decomposition on , is the right singular value matrix after performing singular value decomposition on , The bar above has no special meaning. Its purpose is to distinguish in step (3b1) from UΣV in step (3a2) T , P is the left singular value matrix after performing singular value decomposition on L i , Δ is the singular value matrix after performing singular value decomposition on L i , Q T is the right singular value matrix after performing singular value decomposition on L i . According to the von Neumann trace inequality, the lower bound of in step (3b) is: The condition for obtaining the equal sign is and (3b2) Singular value matrix The v-th singular value of is denoted as z v , since the singular value matrix and Δ are both diagonal matrices, with each element on the main diagonal as a unit, obtained from the lower bound in step (3b1) as follows: where is the v-th non-zero singular value of the matrix , that is, the v-th element on the main diagonal of the singular value matrix of the matrix ; is the v-th non-zero singular value of the matrix L i , that is, the v-th element on the main diagonal of the singular value matrix Δ of the matrix L i ; (3b3) For the second item in step (3b2) to perform a first-order Taylor expansion, the threshold required by the singular value threshold method can be obtained as: (3b4) Combining the condition for obtaining an equality in (3b1), the threshold obtained in (3b3), and the property that the singular values of the matrix are all non-negative, the solution to the problem in (3b) can be obtained as: where diag(τ v ) is a diagonal matrix and the v-th element in the main diagonal of this matrix is τ v , denotes the selection of the larger value between 5. The JPEG image deblocking method based on sparse and low-rank approximation according to claim 2, wherein when using the least squares method to solve the sub-problem in step (3c), it can be carried out according to the following steps: (3c1) Use to replace the in step (3c) with to replace the in step (3c), thereby converting the matrix operation in step (3c) into a vector operation, where represents the c-th column vector of matrix and is a matrix whose function is to extract the c-th image patch from the k-th set of image patches; represents the c-th column vector of matrix and is a matrix whose function is to extract the c-th image patch from the i-th structural group, a k(c) represents the c-th column vector of matrix A k and l i(c) represents the c-th column vector of matrix L i to obtain: (3c2) Using the least squares method, the solution to step (3c1) is obtained as: where I is the identity matrix, is the transpose of is the transpose of; (3c3) Since the direct inverse operation of is very difficult due to its large dimension in step (3c2), when setting the sliding window to extract image patches, the extraction of image patches is performed according to the periodic boundary condition, which can make the matrix a diagonal matrix, thus greatly reducing the time required for the inverse operation. The closed solution of (3c) is obtained as follows: The obtained solution is the image after JPEG image deblocking.