CN105260995B - An image inpainting and denoising method and system - Google Patents
An image inpainting and denoising method and system Download PDFInfo
- Publication number
- CN105260995B CN105260995B CN201510866909.XA CN201510866909A CN105260995B CN 105260995 B CN105260995 B CN 105260995B CN 201510866909 A CN201510866909 A CN 201510866909A CN 105260995 B CN105260995 B CN 105260995B
- Authority
- CN
- China
- Prior art keywords
- matrix
- sparse
- image
- rank
- low
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 239000011159 matrix material Substances 0.000 claims abstract description 111
- 238000012549 training Methods 0.000 claims abstract description 39
- 238000000354 decomposition reaction Methods 0.000 claims abstract description 22
- 238000005457 optimization Methods 0.000 claims abstract description 21
- 238000005516 engineering process Methods 0.000 claims abstract description 15
- 230000000694 effects Effects 0.000 claims description 22
- 230000003190 augmentative effect Effects 0.000 claims description 13
- 230000008602 contraction Effects 0.000 claims description 12
- 238000007781 pre-processing Methods 0.000 claims description 10
- 230000000007 visual effect Effects 0.000 claims description 8
- 238000011002 quantification Methods 0.000 claims description 6
- 239000013598 vector Substances 0.000 claims description 6
- 238000011156 evaluation Methods 0.000 claims description 3
- 239000004576 sand Substances 0.000 claims 4
- 230000007812 deficiency Effects 0.000 abstract description 2
- 238000012545 processing Methods 0.000 abstract description 2
- 230000006378 damage Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000000513 principal component analysis Methods 0.000 description 7
- 230000008439 repair process Effects 0.000 description 6
- 238000000605 extraction Methods 0.000 description 5
- 238000011158 quantitative evaluation Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 230000008921 facial expression Effects 0.000 description 3
- 230000014509 gene expression Effects 0.000 description 3
- 230000001815 facial effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012937 correction Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
本发明公开了一种图像修复与去噪方法及系统,对于给定的原始训练图像,该方法包括:通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练样本图像数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵,根据所述训练图像样本数据的低秩和稀疏特性,确定所述训练图像样本数据的联合低秩与稀疏主成分特征以及错误矩阵,实现对所述原始的可能包含错误的图像进行修复与去噪处理,得到经过修复与去噪后的图像。本发明所提供的图像修复与去噪方法及系统,在对图像数据进行特征描述的同时充分考虑了数据的鲁棒低秩和稀疏特性,以克服现有技术的不足,提高了图像修复与去噪的性能及模型的鲁棒性。
The invention discloses an image repairing and denoising method and system. For a given original training image, the method includes: by introducing the idea of joint low-rank and sparse matrix decomposition, and using convex optimization technology, the given training sample The image data matrix is decomposed into a joint low-rank and sparse principal component feature encoding matrix and a sparse error matrix, and the joint low-rank and sparse principal component features of the training image sample data are determined according to the low-rank and sparse characteristics of the training image sample data. and an error matrix, so as to perform repairing and denoising processing on the original image that may contain errors, and obtain an image after repairing and denoising. The image repairing and denoising method and system provided by the present invention fully consider the robust low rank and sparse characteristics of the data while characterizing the image data, so as to overcome the deficiencies of the prior art and improve the image repairing and denoising. noise performance and model robustness.
Description
技术领域technical field
本发明涉及计算机视觉和图像处理技术领域,特别是涉及一种图像修复与去噪方法及系统。The present invention relates to the technical field of computer vision and image processing, in particular to an image restoration and denoising method and system.
背景技术Background technique
在大量的实际应用中,现实中数据可用高维的属性或特征进行描绘,例如视觉图像,但高维数据中往往包含许多冗余信息或噪音。因此,近年来如何进行有效的图像恢复以及如何通过特征学习或低秩、稀疏编码技术进行图像的有效描述引起了广泛的关注。In a large number of practical applications, real data can be described by high-dimensional attributes or features, such as visual images, but high-dimensional data often contain a lot of redundant information or noise. Therefore, how to perform effective image restoration and how to effectively describe images through feature learning or low-rank, sparse coding techniques has attracted extensive attention in recent years.
特征提取旨在通过映射或变换的方法获取描述性强的紧凑特征,实现从高维到低维的变换。PCA(Principal Component Analysis)是一种最具代表性的无监督特征学习模型。具体操作为:对于一个给定的数据矩阵(其中,n是样本维度,N是样本数量),PCA通过最大化数据的协方差结构,优化得到一个潜在的投影矩阵 Feature extraction aims to obtain descriptive and compact features through mapping or transformation methods, and realize transformation from high-dimensional to low-dimensional. PCA (Principal Component Analysis) is one of the most representative unsupervised feature learning models. The specific operation is: for a given data matrix (where n is the sample dimension and N is the number of samples), PCA optimizes a potential projection matrix by maximizing the covariance structure of the data
其中,I是一个单位矩阵,d表示所要降到的维度,||·||2是l2范数,为所有样本的平均值。PCA可以有效揭示出数据间的线性关系,但基于L2范数的PCA模型被证实对噪声数据、异常值或像素破坏非常敏感,因此实际上它可能并不能准确揭示数据的子空间结构。Among them, I is an identity matrix, d represents the dimension to be reduced to, || · || 2 is the l 2 norm, is the average of all samples. PCA can effectively reveal the linear relationship between the data, but the PCA model based on the L2 norm has been proved to be very sensitive to noisy data, outliers or pixel corruption, so it may not actually reveal the subspace structure of the data accurately.
为了弥补PCA的不足、增强模型对噪声数据和错误数据的鲁棒性,近几年一些鲁棒的主成分特征提取模型被提出,其中RPCA(Robust Principal Component Analysis)是一种较为新颖有效的方法。RPCA技术是通过以下的核范数最小化问题来进行数据修复和特征提取:In order to make up for the shortcomings of PCA and enhance the robustness of the model to noisy data and erroneous data, some robust principal component feature extraction models have been proposed in recent years, among which RPCA (Robust Principal Component Analysis) is a relatively novel and effective method. . RPCA technology performs data repair and feature extraction through the following kernel norm minimization problem:
<L,E>=arg minL,E||L||*+γ||E||1,s.t.X=L+E<L,E>=arg min L,E ||L|| * +γ||E|| 1 ,stX=L+E
其中,γ>0是一个权衡参数,E=X-L代表稀疏错误数据,上述问题的最优解L*为原始数据的“最低秩描述”,也对应原始数据的最佳主成分特征。Among them, γ>0 is a trade-off parameter, E=XL represents sparse error data, and the optimal solution L * of the above problem is the "lowest rank description" of the original data, which also corresponds to the best principal component feature of the original data.
当数据错误程度较低时,RPCA可以有效地恢复原始数据。但是RPCA技术只考虑了数据的低秩鲁棒特性,没有考虑到数据描述过程中的稀疏鲁棒特性,因此在进行主成分特征提取时可能会对图像修复的结果造成一定的负面影响。When the degree of data error is low, RPCA can effectively restore the original data. However, the RPCA technology only considers the low-rank robustness of the data, and does not consider the sparse robustness in the data description process. Therefore, the extraction of principal component features may have a certain negative impact on the results of image inpainting.
发明内容SUMMARY OF THE INVENTION
本发明的目的是提供一种图像修复与去噪的方法及系统,目的在于解决现有技术中未同时考虑数据的鲁棒低秩和稀疏特性的问题。The purpose of the present invention is to provide a method and system for image inpainting and denoising, and the purpose is to solve the problem that the robust low-rank and sparse characteristics of data are not considered in the prior art at the same time.
为解决上述技术问题,本发明提供一种图像修复与去噪方法,包括:In order to solve the above technical problems, the present invention provides an image restoration and denoising method, including:
对训练图像样本数据进行预处理操作,以及对模型参数进行初始化设置;Preprocess the training image sample data and initialize the model parameters;
通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵;By introducing the idea of joint low-rank and sparse matrix decomposition, and using convex optimization technology, the given training image sample data matrix is decomposed into joint low-rank and sparse principal component feature encoding matrix and sparse error matrix;
对原始的图像进行修复与去噪处理,得到经过修复与去噪后的图像。Repair and denoise the original image to get the repaired and denoised image.
可选地,所述通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵包括:Optionally, by introducing the idea of joint low-rank and sparse matrix decomposition, and using convex optimization technology, the given training image sample data matrix is decomposed into joint low-rank and sparse principal component feature encoding matrix and sparse error matrix including:
对于向量集合将数据矩阵X分解为联合低秩与稀疏主成分特征编码矩阵LS以及稀疏错误矩阵E:for vector sets Decompose the data matrix X into a joint low-rank and sparse principal component feature encoding matrix L S and a sparse error matrix E:
其中,λ>0为权衡参数,α∈[0,1]为低秩和稀疏编码项之间的权衡参数,||·||*为矩阵的核范数,||·||1为l1范数,通过优化得到的最优解LS*为所述训练图像样本数据的联合低秩与稀疏主成分特征编码矩阵,xi为所述训练图像样本数据中的一个样本,n为图像样本的维度,N是图像样本的总数量。where λ>0 is the trade-off parameter, α∈[0,1] is the trade-off parameter between low-rank and sparse coding terms, ||·|| * is the kernel norm of the matrix, and ||·|| 1 is l 1 norm, The optimal solution L S* obtained by optimization is the joint low-rank and sparse principal component feature coding matrix of the training image sample data, x i is a sample in the training image sample data, n is the dimension of the image sample, N is the total number of image samples.
可选地,所述通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵包括:Optionally, by introducing the idea of joint low-rank and sparse matrix decomposition, and using convex optimization technology, the given training image sample data matrix is decomposed into joint low-rank and sparse principal component feature encoding matrix and sparse error matrix including:
将数据矩阵X分解为联合低秩与稀疏主成分特征编码矩阵LS以及稀疏错误矩阵E:Decompose the data matrix X into a joint low-rank and sparse principal component feature encoding matrix L S and a sparse error matrix E:
定义增广拉格朗日函数:Define the augmented Lagrangian function:
其中,Y1,Y2,Y3为拉格朗日乘子,μ为权重参数,通过所述增广拉格朗日函数来轮流交替地更新变量:Among them, Y 1 , Y 2 , and Y 3 are Lagrangian multipliers, and μ is a weight parameter. Through the augmented Lagrangian function to alternately update the variable:
通过迭代优化凸子问题,依次更新变量值完成求解:By iterative optimization of the convex subproblem, the solution is completed by sequentially updating the variable values:
J通过奇异值收缩操作求解,F和E通过标量收缩操作求解。J is solved by a singular value contraction operation, and F and E are solved by a scalar contraction operation.
可选地,在所述得到经过修复与去噪后的图像之后还包括:Optionally, after obtaining the restored and denoised image, the method further includes:
通过对经过修复与去噪后的图像进行视觉观测以及指标量化,对图像的修复效果进行评价。The image restoration effect is evaluated by visual observation and index quantification of the restored and denoised images.
本发明还提供了一种图像修复与去噪系统,包括:The present invention also provides an image restoration and denoising system, comprising:
预处理模块,用于对训练图像样本数据进行预处理操作,以及对模型参数进行初始化设置;The preprocessing module is used to preprocess the training image sample data and initialize the model parameters;
分解模块,用于通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵;The decomposition module is used to decompose a given training image sample data matrix into a joint low-rank and sparse principal component feature encoding matrix and a sparse error matrix by introducing the idea of joint low-rank and sparse matrix decomposition and using convex optimization technology;
修复模块,用于对原始的图像进行修复与去噪处理,得到经过修复与去噪后的图像。The repair module is used to repair and denoise the original image, and obtain the repaired and denoised image.
可选地,所述分解模块具体用于:Optionally, the decomposition module is specifically used for:
对于向量集合将数据矩阵X分解为联合低秩与稀疏主成分特征编码矩阵LS以及稀疏错误矩阵E:for vector sets Decompose the data matrix X into a joint low-rank and sparse principal component feature encoding matrix L S and a sparse error matrix E:
其中,λ>0为权衡参数,α∈[0,1]为低秩和稀疏编码项之间的权衡参数,||·||*为矩阵的核范数,||·||1为l1范数,通过优化得到的最优解LS*为所述训练图像样本数据的联合低秩与稀疏主成分特征编码矩阵,xi为所述训练图像样本数据中的一个样本,n为图像样本的维度,N是图像样本的总数量。where λ>0 is the trade-off parameter, α∈[0,1] is the trade-off parameter between low-rank and sparse coding terms, ||·|| * is the kernel norm of the matrix, and ||·|| 1 is l 1 norm, The optimal solution L S* obtained by optimization is the joint low-rank and sparse principal component feature coding matrix of the training image sample data, x i is a sample in the training image sample data, n is the dimension of the image sample, N is the total number of image samples.
可选地,所述分解模块具体用于:Optionally, the decomposition module is specifically used for:
将数据矩阵X分解为联合低秩与稀疏主成分特征编码矩阵LS以及稀疏错误矩阵E:Decompose the data matrix X into a joint low-rank and sparse principal component feature encoding matrix L S and a sparse error matrix E:
定义增广拉格朗日函数:Define the augmented Lagrangian function:
其中,Y1,Y2,Y3为拉格朗日乘子,μ为权重参数,通过所述增广拉格朗日函数来轮流交替地更新变量:Among them, Y 1 , Y 2 , and Y 3 are Lagrangian multipliers, and μ is a weight parameter. Through the augmented Lagrangian function to alternately update the variable:
通过迭代优化凸子问题,依次更新变量值完成求解:By iterative optimization of the convex subproblem, the solution is completed by sequentially updating the variable values:
J通过奇异值收缩操作求解,F和E通过标量收缩操作求解。J is solved by a singular value contraction operation, and F and E are solved by a scalar contraction operation.
可选地,还包括:Optionally, also include:
评价模块,用于在得到经过修复与去噪后的图像之后,通过对经过修复与去噪后的图像进行视觉观测以及指标量化,对图像的修复效果进行评价。The evaluation module is used to evaluate the restoration effect of the image by visual observation and index quantification of the restored and denoised image after obtaining the restored and denoised image.
本发明所提供的图像修复与去噪方法及系统,通过对训练图像样本数据进行预处理操作,以及对模型参数进行初始化设置;通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵;对原始的图像进行修复与去噪处理,得到经过修复与去噪后的图像。。可见,本发明所提供的图像修复与去噪方法及系统,在对图像数据进行特征描述的同时充分考虑了数据的鲁棒低秩和稀疏特性,以克服现有技术的不足,提高了图像修复与去噪的性能及模型的鲁棒性。The image repairing and denoising method and system provided by the present invention perform preprocessing operations on training image sample data and initialize model parameters; The given training image sample data matrix is decomposed into a joint low-rank and sparse principal component feature encoding matrix and a sparse error matrix; the original image is repaired and denoised, and the repaired and denoised image is obtained. . It can be seen that the image repairing and denoising method and system provided by the present invention fully consider the robust low-rank and sparse characteristics of the data while characterizing the image data, so as to overcome the deficiencies of the prior art and improve the image repairing performance. with denoising performance and model robustness.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative efforts.
图1为本发明所提供的图像修复与去噪方法的一种具体实施方式的流程图;FIG. 1 is a flowchart of a specific implementation manner of an image restoration and denoising method provided by the present invention;
图2为本发明所提供的图像修复与去噪方法的又一种具体实施方式的流程图;FIG. 2 is a flowchart of another specific implementation manner of the image restoration and denoising method provided by the present invention;
图3为对MNIST数据集的手写体图像数据进行描述的结果显示对比示意图;FIG. 3 is a schematic diagram showing the comparison of the results of describing the handwritten image data of the MNIST data set;
图4为对JAFFE数据集、AR数据集、Yale数据集和Yale-B数据集中的人脸图像数据进行描述的结果显示对比示意图;Figure 4 is a schematic diagram showing the comparison of the results of describing the face image data in the JAFFE data set, the AR data set, the Yale data set and the Yale-B data set;
图5为本发明所提供的图像修复与去噪效果的量化评价结果示意图;5 is a schematic diagram of a quantitative evaluation result of image restoration and denoising effects provided by the present invention;
图6(a)-6(f)分别为原始图像、10%像素破坏、30%像素破坏、50%像素破坏、70%像素破坏、90%像素破坏程度下的结果示意图;Figures 6(a)-6(f) are schematic diagrams of the results under the original image, 10% pixel destruction, 30% pixel destruction, 50% pixel destruction, 70% pixel destruction, and 90% pixel destruction degree, respectively;
图7本发明实施例提供的图像修复与去噪系统的结构框图。FIG. 7 is a structural block diagram of an image repairing and denoising system provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make those skilled in the art better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
本发明所提供的图像修复与去噪方法的一种具体实施方式的流程图如图1所示,该方法包括:A flowchart of a specific implementation manner of the image restoration and denoising method provided by the present invention is shown in FIG. 1 , and the method includes:
步骤S101:对训练图像样本数据进行预处理操作,以及对模型参数进行初始化设置;Step S101: preprocessing the training image sample data, and initializing the model parameters;
原始图像由于受到种种条件限制和随机干扰,往往不能直接在视觉系统中直接使用,因此在该步骤中,可以对所述原始图像进行图像预处理操作后作为所述训练图像样本数据,并对模型中的各个参数进行初始化设置。Due to various conditions and random interference, the original image cannot be used directly in the visual system. Therefore, in this step, the original image can be preprocessed as the training image sample data, and the model can be used as the sample data. Initialize each parameter in .
步骤S102:通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵;Step S102: Decompose a given training image sample data matrix into a joint low-rank and sparse principal component feature encoding matrix and a sparse error matrix by introducing the idea of joint low-rank and sparse matrix decomposition and using convex optimization technology;
步骤S103:对原始的图像进行修复与去噪处理,得到经过修复与去噪后的图像。Step S103: Repair and denoise the original image to obtain a repaired and denoised image.
本发明所提供的图像修复与去噪方法,通过对训练图像样本数据进行预处理操作,以及对模型参数进行初始化设置;通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵;对原始的图像进行修复与去噪处理,得到经过修复与去噪后的图像。。可见,本发明所提供的图像修复与去噪方法,在对图像数据进行特征描述的同时充分考虑了数据的鲁棒低秩和稀疏特性,以克服现有技术的不足,提高了图像修复与去噪的性能及模型的鲁棒性。The image repairing and denoising method provided by the present invention performs preprocessing operations on training image sample data and initializes model parameters; by introducing the idea of joint low-rank and sparse matrix decomposition, and using convex optimization technology, the given The given training image sample data matrix is decomposed into a joint low-rank and sparse principal component feature encoding matrix and a sparse error matrix; the original image is repaired and de-noised to obtain a repaired and de-noised image. . It can be seen that the image inpainting and denoising method provided by the present invention fully considers the robust low-rank and sparse characteristics of the data while characterizing the image data, so as to overcome the shortcomings of the prior art and improve the image inpainting and denoising. noise performance and model robustness.
本发明所提供的图像修复与去噪方法的另一种具体实施方式中,对确定所述训练图像样本数据的联合低秩与稀疏主成分特征,以及错误矩阵的具体过程进行详细描述。In another specific embodiment of the image inpainting and denoising method provided by the present invention, the specific process of determining the joint low-rank and sparse principal component features of the training image sample data and the error matrix is described in detail.
对于任意给定的一个可能含有错误数据的向量集合:其中,xi代表一个样本,即为原始图像的向量化描述,n是图像样本的维度,N是图像样本的总数量。For any given set of vectors that may contain erroneous data: Among them, x i represents a sample, which is the vectorized description of the original image, n is the dimension of the image sample, and N is the total number of image samples.
本实施例通过优化如下最小化问题,将给定数据矩阵X分解为一个联合低秩与稀疏主成分特征LS和一个稀疏错误项E:This embodiment decomposes a given data matrix X into a joint low-rank and sparse principal component feature L S and a sparse error term E by optimizing the following minimization problem:
其中,权衡参数λ>0取决于数据集的噪声等级,α∈[0,1]为低秩和稀疏编码项之间的权衡参数。||·||*表示一个矩阵的核范数,即这个矩阵中的奇异值之和,||·||1为l1范数,分别定义如下:Among them, the trade-off parameter λ>0 depends on the noise level of the dataset, and α∈[0,1] is the trade-off parameter between low-rank and sparse coding terms. ||·|| * represents the nuclear norm of a matrix, that is, the sum of the singular values in the matrix, and ||·|| 1 is the l 1 norm, which are defined as follows:
其中,A为一个矩阵。where A is a matrix.
通过优化上述问题,得到的最优解LS*称为原始数据的联合最低秩和最稀疏主成分特征,也对应原始数据的最优低秩和稀疏恢复。By optimizing the above problem, the obtained optimal solution L S* is called the joint lowest rank and the most sparse principal component feature of the original data, and also corresponds to the optimal low rank and sparse restoration of the original data.
上述问题具体可以通过多种解决方法进行实现。为提高效率,本实施例中采用非精确的增广拉格朗日乘子法。该方法具体包括:The above-mentioned problems can be specifically implemented through a variety of solutions. In order to improve efficiency, an inexact augmented Lagrange multiplier method is used in this embodiment. Specifically, the method includes:
首先将原问题转化成如下的等价问题:First, the original problem is transformed into the following equivalent problem:
若对稀疏错误项E进行l1范数正则化,则相应的增广拉格朗日函数可被定义如下:If the l 1 norm regularization is performed on the sparse error term E, the corresponding augmented Lagrangian function can be defined as follows:
其中,Y1,Y2,Y3为拉格朗日乘子,μ是一个正的权重参数。Among them, Y 1 , Y 2 , Y 3 are Lagrange multipliers, and μ is a positive weight parameter.
通过解决如下增广的朗格朗日函数来轮流、交替地更新变量:By solving the augmented Langrangian function as follows to update variables alternately and alternately:
由于变量之间都是相互依赖的,上述问题无法直接进行求解。本实施例中,当计算某个变量时,均固定其他变量,通过迭代地优化如下凸子问题,依次更新变量值完成求解:Since the variables are all interdependent, the above problems cannot be solved directly. In this embodiment, when calculating a certain variable, all other variables are fixed, and the solution is completed by iteratively optimizing the following convex sub-problems, and updating the variable values in turn:
其中,J可通过奇异值收缩操作求解,F和E可通过标量收缩操作解决。该方法中每一步待优化的问题都是一个凸子问题,因此可以得到有效解决。Among them, J can be solved by singular value contraction operation, and F and E can be solved by scalar contraction operation. The problem to be optimized in each step of the method is a convex sub-problem, so it can be solved efficiently.
本实施例中采用的直推式联合低秩和稀疏主成分特征编码算法的具体算法如下:The specific algorithm of the transductive joint low-rank and sparse principal component feature coding algorithm adopted in this embodiment is as follows:
输入:原始数据矩阵控制参数α,λ。Input: raw data matrix Control parameters α, λ.
输出:联合低秩与稀疏的主成分特征稀疏噪声或错误矩阵(E*←Ek+1)。Output: Joint low-rank and sparse principal component features Sparse noise or error matrix (E * ←E k+1 ).
初始化:initialization:
while还未收敛时dowhile has not converged do
固定其他变量更新低秩矩阵J:Fix other variables to update the low-rank matrix J:
固定其他变量并更新稀疏矩阵F:Fix other variables and update the sparse matrix F:
固定其他变量并更新主成分特征LS:Fix other variables and update the principal component feature L S :
固定其他变量并更新稀疏错误矩阵E:Fix other variables and update the sparse error matrix E:
固定其他变量,更新拉格朗日乘子Y1、Y2、Y3:Fix other variables and update the Lagrange multipliers Y 1 , Y 2 , Y 3 :
更新参数μ:Update parameter μ:
μk+1=min(ημk,maxμ);μ k+1 =min(ημ k ,max μ );
检查是否收敛:Check for convergence:
若则停止; like then stop;
否则k=k+1otherwise k=k+1
end while.end while.
本发明所提供的图像修复与去噪方法的又一种具体实施方式的流程图如图2所示,在上述任一实施例的基础上,本实施例在得到修复与去噪后的图像之后还可以进一步包括:A flowchart of another specific implementation of the image repairing and denoising method provided by the present invention is shown in FIG. 2 . On the basis of any of the above embodiments, in this embodiment, after obtaining the image after repairing and denoising It can further include:
步骤S104:通过对经过修复与去噪后的图像进行视觉观测以及指标量化,对图像的修复效果进行评价。Step S104: Evaluate the restoration effect of the image by performing visual observation and index quantification on the restored and denoised image.
具体地,对图像进行修复和去噪之后,可通过图像可视化技术将修复效果进行直观地展示,并可与其他相关方法的结果进行视觉比较。Specifically, after the image is inpainted and denoised, the inpainting effect can be visually displayed through image visualization technology, and can be visually compared with the results of other related methods.
此外,还可以采用基于重构精准度的量化评价指标,重构精准度定义如下:In addition, quantitative evaluation indicators based on reconstruction accuracy can also be used, and the reconstruction accuracy is defined as follows:
其中,表示对原始给定数据的恢复结果,表示在不同图像像素损坏程度的情况下对图像修复的效果。从上述定义,当在有噪音情况下修复的结果与对原始数据的修复结果较为接近时,重构精准度将是一个较大的数值;反之,为较小的数值。也就是说,越大表明图像像素纠错的效果或图像去噪的效果越好。in, represents the recovery result of the original given data, Indicates the effect of image inpainting under different image pixel damage levels. From the above definition, the result when repaired in the presence of noise with the repair results on the original data When closer, the reconstruction accuracy will be a larger number; otherwise, to a smaller value. That is, The larger the value, the better the effect of image pixel error correction or the effect of image denoising.
本发明所提供的图像修复与去噪方法,通过引入当前流行的低秩矩阵恢复和稀疏矩阵描述的思想,在进行鲁棒主成分特征提取时,同时考虑了数据的鲁棒低秩和稀疏特性,因此可提取得到描述性更强的鲁棒主成分特征,且可进一步提高图像修复与去噪的性能及模型鲁棒性,得到了更好的图像修复效果。The image inpainting and denoising method provided by the present invention takes into account the robust low-rank and sparse characteristics of the data when performing robust principal component feature extraction by introducing the current popular ideas of low-rank matrix restoration and sparse matrix description. Therefore, more descriptive and robust principal component features can be extracted, and the performance and model robustness of image inpainting and denoising can be further improved, and a better image inpainting effect can be obtained.
基于本发明的方法可对手写体修复效果进行测试,具体可以在MNIST手写体数字的数据库进行。MNIST数据库共有60000个训练样本与10000个测试样本,从中抽取了24幅数字“0”样本进行测试。人脸描述、修复与去噪效果测试在以下四个人脸数据库进行的:日本女性面部表情数据库(JAFFE)、AR人脸数据库、扩展的Yale-B人脸数据库以及Yale人脸数据库。JAFFE人脸数据库拥有由10位日本女性做出的7种表情共213张表情图。Yale人脸数据库中的图像在灯光、面部表情、是否戴眼镜等方面上有差别。扩展的Yale-B人脸数据库中约有每个人在不同照明和不同表情的情况下的64张图片。AR人脸数据库则有更多的变化,比如不同的照明、不同的表情、以及是否被围巾或太阳镜遮挡等。本实施例从每个数据库中选取24个面部图像组成一个128*192大小的数据矩阵。Based on the method of the present invention, the handwriting restoration effect can be tested, and specifically, the test can be carried out in the database of MNIST handwritten digits. The MNIST database has a total of 60,000 training samples and 10,000 test samples, from which 24 digital "0" samples were extracted for testing. The face description, inpainting, and denoising effect tests are performed on the following four face databases: Japanese Female Facial Expression Database (JAFFE), AR Face Database, Extended Yale-B Face Database, and Yale Face Database. The JAFFE face database has a total of 213 facial expressions made by 10 Japanese women in 7 types of expressions. The images in the Yale face database differ in terms of lighting, facial expressions, whether or not they wear glasses. The extended Yale-B face database has about 64 images of each person under different lighting and different expressions. The AR face database has more changes, such as different lighting, different expressions, and whether it is obscured by scarves or sunglasses. In this embodiment, 24 facial images are selected from each database to form a data matrix with a size of 128*192.
图3以及图4示出了本发明所提供的图像修复与去噪方法的效果示意图。其中,图3为对MNIST数据集的手写体图像数据进行描述的结果显示,分别显示了本发明方法与RPCA和SR的比较结果,第一行图片为RPCA方法的手写体修复效果;第二行图片为SR的手写体修复效果,第三行为本发明的手写体修复效果,图片从左至右依次为原始图片、恢复后图片以及错误。图4为对JAFFE数据集、AR数据集、Yale数据集和Yale-B数据集中的人脸图像数据进行描述的结果显示,从第一行至第四行分别为JAFFE,AR,Yale-B及Yale数据集的面部图像修复结果,图片从左至右依次为原始图片、恢复后图片以及错误。从结果可看出,本发明方法通过同时考虑数据的低秩与稀疏特性,可有效用于图像描述和自动检错,取得了更好的图像修复与去噪效果。FIG. 3 and FIG. 4 are schematic diagrams showing the effect of the image repairing and denoising method provided by the present invention. Among them, Figure 3 shows the results of describing the handwriting image data of the MNIST data set, showing the comparison results between the method of the present invention and RPCA and SR respectively. The first row of pictures is the handwriting restoration effect of the RPCA method; the second row of pictures is The handwriting restoration effect of SR, the third row is the handwriting restoration effect of the present invention, and the pictures are the original picture, the restored picture and the error in order from left to right. Figure 4 shows the results of describing the face image data in the JAFFE dataset, AR dataset, Yale dataset and Yale-B dataset. From the first row to the fourth row are JAFFE, AR, Yale-B and The facial image inpainting results of the Yale dataset, the pictures are the original picture, the restored picture and the error from left to right. It can be seen from the results that the method of the present invention can be effectively used for image description and automatic error detection by considering the low rank and sparse characteristics of data at the same time, and achieves better image restoration and denoising effects.
图5以及图6(a)-6(f)为本发明所提供的图像修复与去噪效果的量化评价结果示意图,其中图5为量化评价结果,图6(a)-6(f)为原始图像和几种不同像素破坏程度下的示例展示,其中,6(a)-6(f)分别对应原图像、10%像素破坏、30%像素破坏、50%像素破坏、70%像素破坏、90%像素破坏。本实施例中,采用AR人脸数据集中几幅图像进行实验,通过对人脸图像像素进行不同程度的破坏,进而利用本发明方法与其他相关方法进行修复、去噪,并通过重构精准度定量的度量本发明方法与其他相关方法对图像去噪的效果,其中被破坏的像素灰度值采用其逆像素灰度值进行替换,即任一被破坏的像素灰度值g被替换为255-g。可以看到,每一种方法的重构精准度都会随着像素破坏程度增加而减小。但是本发明方法表现出对破坏的像素更加鲁棒的性质,取得了更好的修复与去噪效果。Fig. 5 and Fig. 6(a)-6(f) are schematic diagrams of quantitative evaluation results of image restoration and denoising effects provided by the present invention, wherein Fig. 5 is the quantitative evaluation result, and Fig. 6(a)-6(f) is The original image and several examples of different pixel destruction levels, where 6(a)-6(f) correspond to the original image, 10% pixel destruction, 30% pixel destruction, 50% pixel destruction, 70% pixel destruction, 90% pixel destruction. In this embodiment, several images in the AR face data set are used for experiments, and the pixels of the face image are destroyed to varying degrees, and then the method of the present invention and other related methods are used for repairing and denoising, and the reconstruction accuracy is achieved. Quantitatively measure the effect of the method of the present invention and other related methods on image denoising, wherein the damaged pixel gray value is replaced by its inverse pixel gray value, that is, any damaged pixel gray value g is replaced by 255 -g. It can be seen that the reconstruction accuracy of each method decreases as the degree of pixel corruption increases. However, the method of the present invention shows the property of being more robust to the damaged pixels, and achieves better repairing and denoising effects.
上述本发明公开的实施例中详细描述了方法,对于本发明的方法可采用多种形式的系统实现,因此本发明还公开了一种系统。下面对本发明实施例提供的图像修复与去噪系统进行介绍,下文描述的图像修复与去噪系统与上文描述的图像修复与去噪方法可相互对应参照。图7为本发明实施例提供的图像修复与去噪系统的结构框图,参照图7图像修复与去噪系统可以包括:The method is described in detail in the above-mentioned embodiments disclosed in the present invention, and the method of the present invention can be implemented by various forms of systems, so the present invention also discloses a system. The image inpainting and denoising system provided by the embodiments of the present invention will be introduced below. The image inpainting and denoising system described below and the image inpainting and denoising method described above may refer to each other correspondingly. FIG. 7 is a structural block diagram of an image repairing and denoising system provided by an embodiment of the present invention. Referring to FIG. 7, the image repairing and denoising system may include:
预处理模块100,用于对训练图像样本数据进行预处理操作,以及对模型参数进行初始化设置;The preprocessing module 100 is used to perform preprocessing operations on the training image sample data and initialize the model parameters;
分解模块200,用于通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵;The decomposition module 200 is used to decompose a given training image sample data matrix into a joint low-rank and sparse principal component feature encoding matrix and a sparse error matrix by using the convex optimization technique by introducing the idea of joint low-rank and sparse matrix decomposition;
修复模块300,用于对原始的图像进行修复与去噪处理,得到经过修复与去噪后的图像。The repairing module 300 is used for repairing and denoising the original image to obtain an image after repairing and denoising.
作为一种具体实施方式,本发明所提供的图像修复与去噪系统,中上述分解模块200可以具体用于:As a specific implementation manner, in the image restoration and denoising system provided by the present invention, the above-mentioned decomposition module 200 can be specifically used for:
对于向量集合将数据矩阵X分解为联合低秩与稀疏主成分特征LS以及稀疏错误矩阵E:for vector sets Decompose data matrix X into joint low-rank and sparse principal component features L S and sparse error matrix E:
其中,λ>0为权衡参数,α∈[0,1]为低秩和稀疏编码项之间的权衡参数,||·||*表示矩阵的核范数,||·||1为l1范数,通过优化得到的最优解LS*为所述训练图像样本数据的联合低秩与稀疏主成分特征,xi为所述训练图像样本数据中的一个样本,n为图像样本的维度,N是图像样本的总数量。Among them, λ>0 is the trade-off parameter, α∈[0,1] is the trade-off parameter between low-rank and sparse coding terms, ||·|| * represents the kernel norm of the matrix, and ||·|| 1 is l 1 norm, The optimal solution L S* obtained by optimization is the joint low-rank and sparse principal component features of the training image sample data, x i is a sample in the training image sample data, n is the dimension of the image sample, and N is the The total number of image samples.
作为一种具体实施方式,本发明所提供的图像修复与去噪系统,中上述分解模块200具体用于:As a specific embodiment, in the image restoration and denoising system provided by the present invention, the above-mentioned decomposition module 200 is specifically used for:
将数据矩阵X分解为联合低秩与稀疏主成分特征LS以及稀疏错误矩阵E:Decompose data matrix X into joint low-rank and sparse principal component features L S and sparse error matrix E:
定义增广拉格朗日函数:Define the augmented Lagrangian function:
其中,Y1,Y2,Y3为拉格朗日乘子,μ为权重参数,通过所述增广拉格朗日函数来轮流交替地更新变量:Among them, Y 1 , Y 2 , and Y 3 are Lagrangian multipliers, and μ is a weight parameter. Through the augmented Lagrangian function to alternately update the variable:
通过迭代优化凸子问题,依次更新变量值完成求解:By iterative optimization of the convex subproblem, the solution is completed by sequentially updating the variable values:
J通过奇异值收缩操作求解,F和E通过标量收缩操作求解。J is solved by a singular value contraction operation, and F and E are solved by a scalar contraction operation.
作为一种具体实施方式,本发明所提供的图像修复与去噪系统还可以进一步包括有:As a specific embodiment, the image restoration and denoising system provided by the present invention may further include:
评价模块,用于在得到经过修复与去噪后的图像之后,通过对所述修复与去噪后的图像进行视觉观测以及指标量化,对图像的修复效果进行评价。The evaluation module is used to evaluate the restoration effect of the image by performing visual observation and index quantification on the restored and denoised image after obtaining the restored and denoised image.
本发明所提供的图像修复与去噪系统,通过对训练图像样本数据进行预处理操作,以及对模型参数进行初始化设置;通过引入联合低秩与稀疏矩阵分解的思想,利用凸优化技术,将给定的训练图像样本数据矩阵分解为联合低秩与稀疏主成分特征编码矩阵与稀疏错误矩阵;对原始的图像进行修复与去噪处理,得到经过修复与去噪后的图像。。可见,本发明所提供的图像修复与去噪系统,在对图像数据进行特征描述的同时充分考虑了数据的鲁棒低秩和稀疏特性,以克服现有技术的不足,提高了图像修复与去噪的性能及模型的鲁棒性。The image restoration and denoising system provided by the present invention performs preprocessing operations on the training image sample data, and initializes the model parameters; by introducing the idea of joint low-rank and sparse matrix decomposition, and using the convex optimization technology, the given The given training image sample data matrix is decomposed into a joint low-rank and sparse principal component feature encoding matrix and a sparse error matrix; the original image is repaired and de-noised to obtain a repaired and de-noised image. . It can be seen that the image inpainting and denoising system provided by the present invention fully considers the robust low-rank and sparse characteristics of the data while characterizing the image data, so as to overcome the shortcomings of the prior art and improve the image inpainting and denoising. noise performance and model robustness.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510866909.XA CN105260995B (en) | 2015-12-01 | 2015-12-01 | An image inpainting and denoising method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510866909.XA CN105260995B (en) | 2015-12-01 | 2015-12-01 | An image inpainting and denoising method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105260995A CN105260995A (en) | 2016-01-20 |
CN105260995B true CN105260995B (en) | 2019-03-08 |
Family
ID=55100670
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510866909.XA Active CN105260995B (en) | 2015-12-01 | 2015-12-01 | An image inpainting and denoising method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105260995B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108416750B (en) * | 2018-03-08 | 2019-02-12 | 闽南师范大学 | an image restoration method |
CN108562541B (en) * | 2018-04-23 | 2021-04-23 | 南京大学 | Method and device for removing speckle noise in lensless holographic microscope based on matrix decomposition |
CN111273238B (en) * | 2020-01-06 | 2022-09-27 | 中国航天科工集团八五一一研究所 | SAR (synthetic aperture radar) wide-band and narrow-band interference simultaneous inhibition method based on low-rank recovery |
CN112465713B (en) * | 2020-11-24 | 2022-07-01 | 北京大学 | Tensor low-rank model non-smooth three-dimensional image completion method based on manifold optimization |
CN113450285A (en) * | 2021-07-19 | 2021-09-28 | 天津大学 | Method for removing anti-disturbance in image |
CN113837967B (en) * | 2021-09-27 | 2023-11-17 | 南京林业大学 | Wildlife image denoising method based on sparse error constrained representation |
-
2015
- 2015-12-01 CN CN201510866909.XA patent/CN105260995B/en active Active
Non-Patent Citations (5)
Title |
---|
A Sparse Projection and Low-Rank Recovery Framework for Handwriting Representation and Salient Stroke Feature Extraction;ZHAO ZHANG等;《ACM Transactions on Intelligent Systems and Technology》;20150331;第6卷(第1期);第1-26页 * |
Bilinear low-rank coding framework and extension for robust image recovery and feature representation;Zhao Zhang等;《Knowledge-Based Systems》;20150609;第86卷;第143-157页 * |
Similarity preserving low-rank representation for enhanced data representation and effective subspace learning;Zhao Zhang等;《Neural Networks》;20141231;第53卷;第81-94页 * |
一种新的低秩分块稀疏表示的人脸识别算法;胡昭华等;《数据采集与处理》;20150930;第30卷(第5期);第1109-1120 * |
基于字典优化的稀疏表示人脸识别;熊承义等;《中南民族大学学报(自然科学版)》;20140630;第33卷(第2期);第76-79页 * |
Also Published As
Publication number | Publication date |
---|---|
CN105260995A (en) | 2016-01-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105260995B (en) | An image inpainting and denoising method and system | |
CN112419242B (en) | Reference-free image quality evaluation method based on self-attention mechanism GAN network | |
CN104008538B (en) | Based on single image super-resolution method | |
CN105354595B (en) | A robust visual image classification method and system | |
CN105469063B (en) | The facial image principal component feature extracting method and identification device of robust | |
CN105528620B (en) | method and system for combined robust principal component feature learning and visual classification | |
CN115018727A (en) | Multi-scale image restoration method, storage medium and terminal | |
CN102915527A (en) | Face image super-resolution reconstruction method based on morphological component analysis | |
CN110147782A (en) | It is a kind of based on projection dictionary to the face identification method and device of study | |
CN114255381A (en) | Training method of image recognition model, image recognition method, device and medium | |
Zhang et al. | Multi-task convnet for blind face inpainting with application to face verification | |
CN105894469A (en) | De-noising method based on external block autoencoding learning and internal block clustering | |
CN104657951A (en) | Multiplicative noise removal method for image | |
Shit et al. | An encoder‐decoder based CNN architecture using end to end dehaze and detection network for proper image visualization and detection | |
CN115496950A (en) | Image classification method based on semi-supervised discriminative dictionary pair learning with neighborhood information embedding | |
Zhou et al. | Adaptive weighted locality-constrained sparse coding for glaucoma diagnosis | |
CN117611456A (en) | Atmospheric turbulence image restoration method and system based on multiscale generation countermeasure network | |
CN108121964B (en) | Matrix-based joint sparse locality preserving projection face recognition method | |
CN114612798A (en) | Satellite image tampering detection method based on Flow model | |
Guo et al. | Joint enhanced low-rank constraint and kernel rank-order distance metric for low level vision processing | |
CN117745616A (en) | A low-light image enhancement method based on multi-prior fusion | |
Yang et al. | Regularizing subspace representation for fusing hyperspectral and multispectral images | |
Ghanem et al. | Face completion using generative adversarial network with pretrained face landmark generator | |
CN114359945A (en) | Method and device for generating express delivery abnormal bill, computer equipment and storage medium | |
CN119810394B (en) | A data processing method and system based on image acquisition device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |