SlideShare a Scribd company logo
1 of 6
Download to read offline
收稿日期:2012-07-05
基金项目:国家“九七三”计划项目(2009CB72400603);国家自然科学科学仪器专项资助项目(61027002);国家自然科学基金资助项目
(60972100)
作者简介:阎雪飞(1979—),男,博士生,E-mail:yxfamyself@sina.com;许廷发(1968—),男,教授,博士生导师.
第33卷 第9期
2013年9月
北 京 理 工 大 学 学 报
Transactions of Beijing Institute of Technology
Vol.33 No.9
Sep.2013
改进的预处理共轭梯度图像复原算法
阎雪飞, 许廷发, 白廷柱
(北京理工大学 光电学院,北京 100081)
摘 要:针对 Tikhonov正则化的预处理共轭梯度图像复原算法中模糊图像取全零扩展矩阵的不足之处,研究了零
边界条件下 Tikhonov正则化的预处理共轭梯度算法.提出了新的模糊图像的扩展矩阵,降低了原矩阵向量积的计
算误差,修正了初始梯度的取值.改进算法更符合真实的图像退化过程,有效提高了复原的图像质量.实验结果表
明:对于各种退化造成的模糊图像,与当前求解全变分正则化的IST、TwIST、SALSA 算法比较,本文算法复原效果
优于当前流行的图像复原算法.
关键词:图像复原;Tikhonov正则化;预处理共轭梯度
中图分类号:O 439   文献标志码:A   文章编号:1001-0645(2013)09-0980-05
An Improved PCG Algorithm for Image
Restoration and Reconstruction
YAN Xue-fei, XU Ting-fa, BAI Ting-zhu
(School of Optoelectronics,Beijing Institute of Technology,Beijing 100081,China)
Abstract:To deal with the shortcoming of the preconditioning conjugate gradient(PCG)method
with Tikhonov regularization in which the blurred image is extended with a zeros extension
matrix.With the careful analysis of the PCG method with Tikhonov regularization under zero
boundary condition,a new extension matrix for the blurred image was proposed.It could
decrease the matrix vector multiplication computational error and modify the initial gradient.The
improved algorithm is in accord with the real image blurring process and increases the quality of
recovered image.Experiments show that,compared with the state-of-the-art algorithms of IST,
TwIST and SALSA which solve the total-variation (TV)regularization,the proposed algorithm
performs favorably.
Key words:image restoration;Tikhonov regularization;preconditioning conjugate gradient
  图像复原是图像处理中的重要内容,在监视、显
微成像、遥感等方面,有着很多现实的应用.图像复
原是指去除或减轻在获取和传输的过程中产生的图
像像质下降.图像降质的原因可能来自于光学系统
的像差或运动等造成的图像模糊,也可能来自于探
测器和电子学系统的噪声,遥感图像质量的下降还
可能是由于大气湍流等随机噪声造成的.图像复原
的目的是对模糊图像进行相关的处理,使之尽可能
地接近于原始图像.
一般地,图像的降质过程是一个正问题,而图像
的复原过程是一个不适定的或病态的反问题[1]
.求
解的典型方法是正则化算法,近年来出现的全变分
(total-variation,TV)正则化算法[2]
,用于图像复原
效果很好.求解的数值算法有:IST 算法[3]
,TwIST
算法[4]
,SALSA 算法[5]
.零边界条件下图像退化问
题中,传统的算法均用0来填充模糊图像的扩展矩
阵,不符合真实的图像退化过程,矩阵向量积的计算
存在较大误差.
针对上述 问 题,研 究 了 Tikhonov正 则 化 的 预
处理共轭梯度算法,提出了新的模糊图像的扩展矩
阵,更符合真实的图像退化过程,降低了矩阵向量积
的计算误差.改进后的算法,取得了优于全变分正
则化算法的仿真结果.
1 数字图像退化模型
一般来讲,成像系统可以被模型化为一个线性、
空间不变性系统.退化图像表示为原始图像与成像
系统点扩散函数的二维卷积与高斯白噪声的和[6]
,
g(x,y)=h(x,y)*f(x,y)+n(x,y).(1)
式中:f(x,y)为未知原始图像;h(x,y)为点扩散函
数;g(x,y)为模糊图像;n(x,y)表示均值为0,方差
为σ
2
的高斯白噪声.
在数字图像处理中,一幅图像常常用矩阵,或是
将矩阵按字典顺序 展 开 所 得 的 列 向 量 来 表 示.于
是,图像退化过程的离散模型还可以表示为矩阵向
量积的形式.一般地,f(x,y)和h(x,y)的大小并不
相同.设f(x,y)为A×B,h(x,y)为C×D.首先检
验f(x,y)和h(x,y)的大小是否匹配:
① 若C=2A-1,D=2B-1 则两矩阵的大小
匹配,无变化.
② 若C>2A-1,D>2B-1,则提取h(x,y)中
间C=2A-1,D=2B-1的矩阵为新的h(x,y).
③ 若 C < 2A-1,D < 2B-1,则 用 0 扩 充
h(x,y)的四周,得到C=2A-1,D=2B-1的矩阵
为新的h(x,y).
h(x,y)经过这样的修改后,图像退化过程表示
为矩阵向量积形式:
g = Hf+n, (2)
式中g,f,n 代表AB×1的列向量.这些列向量是
由 A×B 的函数矩阵g(x,y),f(x,y)和n(x,y)的
各列按字典顺序展开而成.模糊矩阵 H 表示卷积
运算.具体形式取决于原始图像 f 边界条件的选
择.当边界条件为零边界条件时,H 为一个以h(x,
y)为 基 础 的 BTTB(block Toeplitz with Toeplitz
blocks)矩阵[7]
.
当图像f(x,y)的 A×B 比较大时,模糊矩阵 H
的AB×AB 会更大.直接矩阵向量积数值求解上
式,要占用大量的内存,不利于快速计算.为了节省
内存,常用如下的分块循环扩展方法来求解.
首先扩展点扩散函数h(x,y),在h(x,y)的第1
列和第1行之前加一列0和一行0,得到一个2A×
2B 的扩展矩阵
hext(x,y)=
0 0 0 … 0
0 h(0,0) h(0,1) … h(0,2B-2)
0 h(1,0) h(1,1) … h(1,2B-2)
    
0 h(2A-2,0) h(2A-2,1) … h(2A-2,2B-2
熿
燀
燄
燅)
. (3)
   接着,将hext(x,y)等分为 4 个 A×B 的分块
矩阵:
hext(x,y)=
h(1,1) h(1,2)
h(2,1) h(2,2[ ])
. (4)
  将4个分块矩阵1,3象限互换,2,4象限互换
得到
hext(x,y)=
h(2,2) h(2,1)
h(1,2) h(1,1[ ])
. (5)
  用0扩展图像f(x,y),得到一个2A×2B 的扩
展矩阵
fext(x,y)=
f(x,y)
0≤x ≤ A-1
0≤y ≤B-1
0
烅
烄
烆 其他
.(6)
gext(x,y)=ifft2{fft2[珘hext(x,y)]*
fft2[fext(x,y)]}+n(x,y). (7)
  接着,将gext(x,y)等分为 4 个 A×B 的分块
矩阵
gext(x,y)=
g(1,1) g(1,2)
g(2,1) g(2,2[ ])
, (8)
g(x,y)=g(1,1). (9)
2 Tikhonov正则化PCG 算法
从g 恢复f 是一个病态的反问题,典型的求解
方法是 Tikhonov正则化算法,复原图像表示为目
标函数的最小值:
arg min
1
2
Hf-g 
2
+
λ
2
Df 
2
. (10)
式中:λ>0为正则化参数;D 为某种正定或半正定
算子,称为惩罚矩阵.可取为某种特殊矩阵.如单
位矩阵、负拉普拉斯矩阵.
189第9期 阎雪飞等:改进的预处理共轭梯度图像复原算法
对上式求解相应的欧拉方程,得到
f =
HT
g
HT
H +λD
. (11)
令:
M = HT
H +λD, (12)
b= HT
g. (13)
则式(11)可改写为线性方程
Mf =b. (14)
  在图像处理问题中,模糊矩阵 H 往往很大.式
(14)是一个超大的线性方程,直接求解需要求解 M
的逆矩阵,数学计算量非常大,不容易实现.常用迭
代 求 解 的 方 法 求 解 近 似 解.预 处 理 共 轭 梯 度 法
(PCG)是非常适合编程计算的有效方法.其中预处
理矩阵选取最佳预处理矩阵[8]
(T.Chans optimal
preconditioner)进行计算.
对于线性方程 Mf=b,给定预处理矩阵 N,预
处理共轭梯度法可以表示为
k=0, (15)
f0 =0, (16)
r0 = Mf0 -b, (17)
z0 = N-1
r0, (18)
p0 =-z0, (19)
δ0 = 〈r0,z0〉. (20)
  开始 PCG 迭代过程
hk = Mpk, (21)
τk =
δk
〈pk,hk〉
, (22)
fk+1 =fk +τkpk, (23)
rk+1 =rk +τkhk, (24)
zk+1 = N-1
rk+1, (25)
δk+1 = 〈rk+1,zk+1〉, (26)
βk =δk+1/δk, (27)
pk+1 =-zk+1 +βkpk, (28)
k=k+1. (29)
  梯度范数达到停止准则时,停止迭代.理想情
况下,停止准则为 rk =0.一般设置 rk <0.001.
3 PCG 改进算法
3.1 传统的算法不足之处
当边界条件取零边界条件时,取惩罚矩阵 D 为
单位矩阵I.将式(13)代入式(17),得到初始梯度
r0 = Mf0 -HT
g, (30)
式中 HT
g 为一个矩阵向量积的计算,当前的数值算
法都如第1节中所示,用0扩充模糊图像g,得到一
个2A×2B 的扩展矩阵gext=
g  0A×B
0A×B 0A×
[ ]B
,从而
进行矩阵向量积的计算.
通过观察发现,在真实的图像退化过程中,模糊
图像g 的扩展矩阵gext扩展部分并不是全0,而是如
式(7)所示,由模糊矩阵 H 原始图像f 卷积计算得
出的.全0扩展矩阵引起的误差很大.
对式(14),取λ=0.01,λ=0.001,时,比较gext
取真实的扩展矩阵与全0扩展矩阵,两种情况下的
图像复原效果差异,如图1所示.
选取点扩散函数h(x,y)=fspecial(‘motion’,
图1 两种情况下图像复原效果比较
Fig.1 Results of image restoration using two types of extension matrix for comparison
 
71,56),产生模糊图像.图1(a)为(256×256)像素
的 Lena运动退化模糊图像,图1(b)和图1(c)为λ
=0.01,图1(d)和图1(e)为λ=0.001时,gext取真
实的扩展矩阵与全0扩展矩阵的图像复原效果.可
以看出:gext取全0扩展矩阵引起的误差是很大的.
在gext取真实的扩展矩阵时,λ 取值越小,复原图像
越清晰.
3.2 改进的算法
提出改进的 PCG 计算方法.该方法首先λ 取
较大值,增大惩罚矩阵的作用来抑制复原图像的病
289 北 京 理 工 大 学 学 报 第 33 卷
态问题.运行一次 PCG 算法,得出收敛的结果 f.
与模糊矩阵 H 卷积计算,修正gext接近真实的扩展
矩阵.
再以此 时 的 f,gext为 初 值,再 次 运 行 PCG 算
法.λ取较小值,用来增强复原图像中的细节.循环
往复,得到需要的收敛结果.可以表示为
① 给定初值λ=λ0,0<k<1;
②gext=0,f0=0,r0=-HT
g;
③ 运行 PCG 算法,得出收敛结果f;
④gext =Hf+n,f0 =f,r0 =Mf0 -HT
g,返
回③;
⑤λ=λ×k,返回③.
4 实验结果与分析
为了验证本文算法的有效性,进行了仿真实验.
采用峰值信噪比(RPSN ),信噪比改进(RISN )作为图
像复原性能的客观评价尺度.以(256×256)像素的
Lena,Camera man,Barbara灰度图像为测试对象,
最大迭代次数统一取为10 000次,迭代停止准则统
一取为2次循环计算所得的相对误差之差小于1×
10-7
,这时认为算法收敛,跳出循环.
本文算法中参数取值,λ0 =1.5,k=0.4.其他
算法参数的选取全部取默认值.IST 算法,α=1,β
=1.TwIST 算法,α=1.960 8,β=3.921 2.SAL-
SA 算法,λ=0.025.本文所有数值运算在 Windows
7平台下,Matlab V 7.10 上实 现.计 算 机 为Intel
酷睿i3 530双核 CPU,2GB DDR3 1333内存配置的
台式机.选取下面的点扩散函数,比较几种算法的
复原性能:
PSF1:h(x,y)=fspecial(‘motion’,71,56);
PSF2:h(x,y)=fspecial(‘gaussian’,
[21,28],10);
PSF3:h(x,y)=fspecial(‘disk’,15).
  图2~图4分别为对于 PSF1,PSF2 和 PSF3 的
Lena,Camera man,Barbara,本文改进算法与当 前
流行的图像复原算法的退化图像复原效果比较.
图2 PSF1 退化图像复原效果比较
Fig.2 Deblurring results of several algorithms from using PSF1(point spread function 1)
 
  表1为对于不同种类的点扩散函数,本文改进
算法与当前流行的图像复原算法的客观评价比较,
可以看出:本文算法的信噪比改进(RISN )均优于其
他算法,图像复原效果最好.
389第9期 阎雪飞等:改进的预处理共轭梯度图像复原算法
489 北 京 理 工 大 学 学 报 第 33 卷
search development of quartz micromachined gyroscopes
[J].Micronanoelectronic Technology,2011,49(3):173-
180.(in Chinese)
[5]路文一,崔芳,冯立辉,等.石英音叉陀螺机械及静电 耦
合误差 的 消 除 [J].北 京 理 工 大 学 学 报,2009,29(5):
420-422.
Lu Wenyi,Cui Fang,Feng Lihui,et al.Elimination of
mechanical and electrostatic coupling errors in quartz tu-
ing fork gyroscopes[J].Transactions of Beijing Institute
of Technology,2009,29(5):420-422.(in Chinese)
[6]谢立强,吴学忠,李圣怡.石英微陀螺的机械耦合问题研
究[J].国防科技大学学报,2007,29(1):131-134.
Xie Liqiang,Wu Xuezhong,Li Shengyi.The study of
mechanical coupling in quartz micromachined gyroscope
system[J].Journal of National University of Defense
Technology,2007,29(1):131-134.(in Chinese)
[7]Yang Jun,Gao Zhongyu,Zhang Rong,et al.Mechanism
analysis and system identification of the quadrature error in
MEMS gyroscope[C]∥Proceedings of MNC 2007.San-
ya,China,[s.n.],2007:437-443.
[8]刘 仁 志.现 代 电 镀 手 册 [M].北 京:化 学 工 业 出 版
社,2010.
Liu Renzhi.Modern electroplating handbook[M].Bei-
jing:Chemical Industry Press,2010.(in Chinese)
[9] Montgomery D.Design and analysis of experiments
[M].New York:John Wiley and Sons-Inc.,2001.
[10]陈晖,汪红,李光杨,等.水平与垂直流动对微电铸镀层
均匀性 的 影 响 [J].传 感 器 与 微 系 统,2011,30(6):
20-23.
Chen Hui,Wang Hong,Li Guangyang,et al.Influ-
ence of horizontal and vertical flow pattern on coating
uniformity inside micro-structures during electrodeposi-
tion[J].Transducer and Microsystem Technologies,
2011,30(6):20-23.(in Chinese)
(责任编辑:赵业玲
櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅
)
(上接第984页)
表1 几种算法的图像复原性能比较
Tab.1 Image restoration performance of several algorithms
for comparison
图像
Lena
Camera man
Barbara
算法
PSF1 PSF2 PSF3
RPSN/
dB
RISN/
dB
RPSN/
dB
RISN/
dB
RPSN/
dB
RISN/
dB
本文 35.35 18.77 38.27 19.84 38.62 20.82
IST  31.46 14.88 25.57  7.14 27.97 10.17
TWIST 31.59 15.01 25.81  7.39 28.12 10.32
SALSA 29.39 12.81 25.02  6.59 26.78  8.98
本文 32.90 17.61 36.64 19.36 36.46 19.79
IST  28.55 13.26 23.68  6.40 25.29  8.62
TWIST 28.79 13.50 23.96  6.67 25.46  8.79
SALSA 26.45 11.16 23.30  6.01 24.37  7.70
本文 31.28 15.44 36.36 18.50 38.01 20.86
IST  29.56 13.73 25.10  7.24 26.90  9.76
TWIST 29.68 13.85 25.21  7.35 27.09  9.95
SALSA 27.97 12.14 24.46  6.61 25.83  8.68
5 结 论
针对 Tikhonov正则化的预处理共轭梯度图像
复原算法中模糊图像取全零扩展矩阵的不足之处,
提出了新的模糊图像的扩展矩阵,降低了原矩阵向
量积的计算误差,修正了初始梯度的取值,改进算法
更符合真实的图像退化过程,有效提高了复原的图
像质量.实验结果表明:对于各种退化造成的模糊
图像,本文中算法复原效果优于当前流行的图像复
原算法.
参考文献:
[1]Aubert G,Kornprobst P.Mathematical problems in im-
age processing[M].New York:Springer Science+Bus-
iness Media,2006.
[2]Rudin L,Osher S,Fatemi E.Nonlinear total variation
based noise removal algorithms[J].Phys D,1992,60:
259-268.
[3]Beck A,Teboulle M.A fast iterative shrinkage-thresh-
olding algorithm for linear inverse problems[J].SIAM
J,Imaging Sci,2009,2(1):183-202.
[4]Bioucas-Dias J,Figueiredo M.A new TwIST:two-step
iterative shrinkage/thresholding algorithms for image
restoration[J].IEEE Transactions on Image Process-
ing,2007,16(12):2992-3004.
[5]Afonso M V,Bioucas-Dias J M,Figueiredo M A T.
Fast image recovery using variable splitting and con-
strained optimization[J].IEEE Transactions on Image
Processing,2010,19(9):2345-2356.
[6]Gonzalez G C,Woods R E.Digital image processing[M].
3rd ed.London:London Prentice Hall,2007:333-335.
[7]Vogel C R.Computational methods for inverse problems
[M].Philadelphia:SIAM,2002.
[8]Chan T F,Olkin J A.Circulant preconditioners for To-
eplitz-block matrices[J].Numerical Algorithms,1994,
6:89-101.
(责任编辑:赵业玲)
099 北 京 理 工 大 学 学 报 第 33 卷

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

改进的预处理共轭梯度图像复原算法_阎雪飞

  • 1. 收稿日期:2012-07-05 基金项目:国家“九七三”计划项目(2009CB72400603);国家自然科学科学仪器专项资助项目(61027002);国家自然科学基金资助项目 (60972100) 作者简介:阎雪飞(1979—),男,博士生,E-mail:yxfamyself@sina.com;许廷发(1968—),男,教授,博士生导师. 第33卷 第9期 2013年9月 北 京 理 工 大 学 学 报 Transactions of Beijing Institute of Technology Vol.33 No.9 Sep.2013 改进的预处理共轭梯度图像复原算法 阎雪飞, 许廷发, 白廷柱 (北京理工大学 光电学院,北京 100081) 摘 要:针对 Tikhonov正则化的预处理共轭梯度图像复原算法中模糊图像取全零扩展矩阵的不足之处,研究了零 边界条件下 Tikhonov正则化的预处理共轭梯度算法.提出了新的模糊图像的扩展矩阵,降低了原矩阵向量积的计 算误差,修正了初始梯度的取值.改进算法更符合真实的图像退化过程,有效提高了复原的图像质量.实验结果表 明:对于各种退化造成的模糊图像,与当前求解全变分正则化的IST、TwIST、SALSA 算法比较,本文算法复原效果 优于当前流行的图像复原算法. 关键词:图像复原;Tikhonov正则化;预处理共轭梯度 中图分类号:O 439   文献标志码:A   文章编号:1001-0645(2013)09-0980-05 An Improved PCG Algorithm for Image Restoration and Reconstruction YAN Xue-fei, XU Ting-fa, BAI Ting-zhu (School of Optoelectronics,Beijing Institute of Technology,Beijing 100081,China) Abstract:To deal with the shortcoming of the preconditioning conjugate gradient(PCG)method with Tikhonov regularization in which the blurred image is extended with a zeros extension matrix.With the careful analysis of the PCG method with Tikhonov regularization under zero boundary condition,a new extension matrix for the blurred image was proposed.It could decrease the matrix vector multiplication computational error and modify the initial gradient.The improved algorithm is in accord with the real image blurring process and increases the quality of recovered image.Experiments show that,compared with the state-of-the-art algorithms of IST, TwIST and SALSA which solve the total-variation (TV)regularization,the proposed algorithm performs favorably. Key words:image restoration;Tikhonov regularization;preconditioning conjugate gradient   图像复原是图像处理中的重要内容,在监视、显 微成像、遥感等方面,有着很多现实的应用.图像复 原是指去除或减轻在获取和传输的过程中产生的图 像像质下降.图像降质的原因可能来自于光学系统 的像差或运动等造成的图像模糊,也可能来自于探 测器和电子学系统的噪声,遥感图像质量的下降还 可能是由于大气湍流等随机噪声造成的.图像复原 的目的是对模糊图像进行相关的处理,使之尽可能 地接近于原始图像. 一般地,图像的降质过程是一个正问题,而图像 的复原过程是一个不适定的或病态的反问题[1] .求 解的典型方法是正则化算法,近年来出现的全变分 (total-variation,TV)正则化算法[2] ,用于图像复原 效果很好.求解的数值算法有:IST 算法[3] ,TwIST 算法[4] ,SALSA 算法[5] .零边界条件下图像退化问 题中,传统的算法均用0来填充模糊图像的扩展矩
  • 2. 阵,不符合真实的图像退化过程,矩阵向量积的计算 存在较大误差. 针对上述 问 题,研 究 了 Tikhonov正 则 化 的 预 处理共轭梯度算法,提出了新的模糊图像的扩展矩 阵,更符合真实的图像退化过程,降低了矩阵向量积 的计算误差.改进后的算法,取得了优于全变分正 则化算法的仿真结果. 1 数字图像退化模型 一般来讲,成像系统可以被模型化为一个线性、 空间不变性系统.退化图像表示为原始图像与成像 系统点扩散函数的二维卷积与高斯白噪声的和[6] , g(x,y)=h(x,y)*f(x,y)+n(x,y).(1) 式中:f(x,y)为未知原始图像;h(x,y)为点扩散函 数;g(x,y)为模糊图像;n(x,y)表示均值为0,方差 为σ 2 的高斯白噪声. 在数字图像处理中,一幅图像常常用矩阵,或是 将矩阵按字典顺序 展 开 所 得 的 列 向 量 来 表 示.于 是,图像退化过程的离散模型还可以表示为矩阵向 量积的形式.一般地,f(x,y)和h(x,y)的大小并不 相同.设f(x,y)为A×B,h(x,y)为C×D.首先检 验f(x,y)和h(x,y)的大小是否匹配: ① 若C=2A-1,D=2B-1 则两矩阵的大小 匹配,无变化. ② 若C>2A-1,D>2B-1,则提取h(x,y)中 间C=2A-1,D=2B-1的矩阵为新的h(x,y). ③ 若 C < 2A-1,D < 2B-1,则 用 0 扩 充 h(x,y)的四周,得到C=2A-1,D=2B-1的矩阵 为新的h(x,y). h(x,y)经过这样的修改后,图像退化过程表示 为矩阵向量积形式: g = Hf+n, (2) 式中g,f,n 代表AB×1的列向量.这些列向量是 由 A×B 的函数矩阵g(x,y),f(x,y)和n(x,y)的 各列按字典顺序展开而成.模糊矩阵 H 表示卷积 运算.具体形式取决于原始图像 f 边界条件的选 择.当边界条件为零边界条件时,H 为一个以h(x, y)为 基 础 的 BTTB(block Toeplitz with Toeplitz blocks)矩阵[7] . 当图像f(x,y)的 A×B 比较大时,模糊矩阵 H 的AB×AB 会更大.直接矩阵向量积数值求解上 式,要占用大量的内存,不利于快速计算.为了节省 内存,常用如下的分块循环扩展方法来求解. 首先扩展点扩散函数h(x,y),在h(x,y)的第1 列和第1行之前加一列0和一行0,得到一个2A× 2B 的扩展矩阵 hext(x,y)= 0 0 0 … 0 0 h(0,0) h(0,1) … h(0,2B-2) 0 h(1,0) h(1,1) … h(1,2B-2)      0 h(2A-2,0) h(2A-2,1) … h(2A-2,2B-2 熿 燀 燄 燅) . (3)    接着,将hext(x,y)等分为 4 个 A×B 的分块 矩阵: hext(x,y)= h(1,1) h(1,2) h(2,1) h(2,2[ ]) . (4)   将4个分块矩阵1,3象限互换,2,4象限互换 得到 hext(x,y)= h(2,2) h(2,1) h(1,2) h(1,1[ ]) . (5)   用0扩展图像f(x,y),得到一个2A×2B 的扩 展矩阵 fext(x,y)= f(x,y) 0≤x ≤ A-1 0≤y ≤B-1 0 烅 烄 烆 其他 .(6) gext(x,y)=ifft2{fft2[珘hext(x,y)]* fft2[fext(x,y)]}+n(x,y). (7)   接着,将gext(x,y)等分为 4 个 A×B 的分块 矩阵 gext(x,y)= g(1,1) g(1,2) g(2,1) g(2,2[ ]) , (8) g(x,y)=g(1,1). (9) 2 Tikhonov正则化PCG 算法 从g 恢复f 是一个病态的反问题,典型的求解 方法是 Tikhonov正则化算法,复原图像表示为目 标函数的最小值: arg min 1 2 Hf-g  2 + λ 2 Df  2 . (10) 式中:λ>0为正则化参数;D 为某种正定或半正定 算子,称为惩罚矩阵.可取为某种特殊矩阵.如单 位矩阵、负拉普拉斯矩阵. 189第9期 阎雪飞等:改进的预处理共轭梯度图像复原算法
  • 3. 对上式求解相应的欧拉方程,得到 f = HT g HT H +λD . (11) 令: M = HT H +λD, (12) b= HT g. (13) 则式(11)可改写为线性方程 Mf =b. (14)   在图像处理问题中,模糊矩阵 H 往往很大.式 (14)是一个超大的线性方程,直接求解需要求解 M 的逆矩阵,数学计算量非常大,不容易实现.常用迭 代 求 解 的 方 法 求 解 近 似 解.预 处 理 共 轭 梯 度 法 (PCG)是非常适合编程计算的有效方法.其中预处 理矩阵选取最佳预处理矩阵[8] (T.Chans optimal preconditioner)进行计算. 对于线性方程 Mf=b,给定预处理矩阵 N,预 处理共轭梯度法可以表示为 k=0, (15) f0 =0, (16) r0 = Mf0 -b, (17) z0 = N-1 r0, (18) p0 =-z0, (19) δ0 = 〈r0,z0〉. (20)   开始 PCG 迭代过程 hk = Mpk, (21) τk = δk 〈pk,hk〉 , (22) fk+1 =fk +τkpk, (23) rk+1 =rk +τkhk, (24) zk+1 = N-1 rk+1, (25) δk+1 = 〈rk+1,zk+1〉, (26) βk =δk+1/δk, (27) pk+1 =-zk+1 +βkpk, (28) k=k+1. (29)   梯度范数达到停止准则时,停止迭代.理想情 况下,停止准则为 rk =0.一般设置 rk <0.001. 3 PCG 改进算法 3.1 传统的算法不足之处 当边界条件取零边界条件时,取惩罚矩阵 D 为 单位矩阵I.将式(13)代入式(17),得到初始梯度 r0 = Mf0 -HT g, (30) 式中 HT g 为一个矩阵向量积的计算,当前的数值算 法都如第1节中所示,用0扩充模糊图像g,得到一 个2A×2B 的扩展矩阵gext= g  0A×B 0A×B 0A× [ ]B ,从而 进行矩阵向量积的计算. 通过观察发现,在真实的图像退化过程中,模糊 图像g 的扩展矩阵gext扩展部分并不是全0,而是如 式(7)所示,由模糊矩阵 H 原始图像f 卷积计算得 出的.全0扩展矩阵引起的误差很大. 对式(14),取λ=0.01,λ=0.001,时,比较gext 取真实的扩展矩阵与全0扩展矩阵,两种情况下的 图像复原效果差异,如图1所示. 选取点扩散函数h(x,y)=fspecial(‘motion’, 图1 两种情况下图像复原效果比较 Fig.1 Results of image restoration using two types of extension matrix for comparison   71,56),产生模糊图像.图1(a)为(256×256)像素 的 Lena运动退化模糊图像,图1(b)和图1(c)为λ =0.01,图1(d)和图1(e)为λ=0.001时,gext取真 实的扩展矩阵与全0扩展矩阵的图像复原效果.可 以看出:gext取全0扩展矩阵引起的误差是很大的. 在gext取真实的扩展矩阵时,λ 取值越小,复原图像 越清晰. 3.2 改进的算法 提出改进的 PCG 计算方法.该方法首先λ 取 较大值,增大惩罚矩阵的作用来抑制复原图像的病 289 北 京 理 工 大 学 学 报 第 33 卷
  • 4. 态问题.运行一次 PCG 算法,得出收敛的结果 f. 与模糊矩阵 H 卷积计算,修正gext接近真实的扩展 矩阵. 再以此 时 的 f,gext为 初 值,再 次 运 行 PCG 算 法.λ取较小值,用来增强复原图像中的细节.循环 往复,得到需要的收敛结果.可以表示为 ① 给定初值λ=λ0,0<k<1; ②gext=0,f0=0,r0=-HT g; ③ 运行 PCG 算法,得出收敛结果f; ④gext =Hf+n,f0 =f,r0 =Mf0 -HT g,返 回③; ⑤λ=λ×k,返回③. 4 实验结果与分析 为了验证本文算法的有效性,进行了仿真实验. 采用峰值信噪比(RPSN ),信噪比改进(RISN )作为图 像复原性能的客观评价尺度.以(256×256)像素的 Lena,Camera man,Barbara灰度图像为测试对象, 最大迭代次数统一取为10 000次,迭代停止准则统 一取为2次循环计算所得的相对误差之差小于1× 10-7 ,这时认为算法收敛,跳出循环. 本文算法中参数取值,λ0 =1.5,k=0.4.其他 算法参数的选取全部取默认值.IST 算法,α=1,β =1.TwIST 算法,α=1.960 8,β=3.921 2.SAL- SA 算法,λ=0.025.本文所有数值运算在 Windows 7平台下,Matlab V 7.10 上实 现.计 算 机 为Intel 酷睿i3 530双核 CPU,2GB DDR3 1333内存配置的 台式机.选取下面的点扩散函数,比较几种算法的 复原性能: PSF1:h(x,y)=fspecial(‘motion’,71,56); PSF2:h(x,y)=fspecial(‘gaussian’, [21,28],10); PSF3:h(x,y)=fspecial(‘disk’,15).   图2~图4分别为对于 PSF1,PSF2 和 PSF3 的 Lena,Camera man,Barbara,本文改进算法与当 前 流行的图像复原算法的退化图像复原效果比较. 图2 PSF1 退化图像复原效果比较 Fig.2 Deblurring results of several algorithms from using PSF1(point spread function 1)     表1为对于不同种类的点扩散函数,本文改进 算法与当前流行的图像复原算法的客观评价比较, 可以看出:本文算法的信噪比改进(RISN )均优于其 他算法,图像复原效果最好. 389第9期 阎雪飞等:改进的预处理共轭梯度图像复原算法
  • 5. 489 北 京 理 工 大 学 学 报 第 33 卷
  • 6. search development of quartz micromachined gyroscopes [J].Micronanoelectronic Technology,2011,49(3):173- 180.(in Chinese) [5]路文一,崔芳,冯立辉,等.石英音叉陀螺机械及静电 耦 合误差 的 消 除 [J].北 京 理 工 大 学 学 报,2009,29(5): 420-422. Lu Wenyi,Cui Fang,Feng Lihui,et al.Elimination of mechanical and electrostatic coupling errors in quartz tu- ing fork gyroscopes[J].Transactions of Beijing Institute of Technology,2009,29(5):420-422.(in Chinese) [6]谢立强,吴学忠,李圣怡.石英微陀螺的机械耦合问题研 究[J].国防科技大学学报,2007,29(1):131-134. Xie Liqiang,Wu Xuezhong,Li Shengyi.The study of mechanical coupling in quartz micromachined gyroscope system[J].Journal of National University of Defense Technology,2007,29(1):131-134.(in Chinese) [7]Yang Jun,Gao Zhongyu,Zhang Rong,et al.Mechanism analysis and system identification of the quadrature error in MEMS gyroscope[C]∥Proceedings of MNC 2007.San- ya,China,[s.n.],2007:437-443. [8]刘 仁 志.现 代 电 镀 手 册 [M].北 京:化 学 工 业 出 版 社,2010. Liu Renzhi.Modern electroplating handbook[M].Bei- jing:Chemical Industry Press,2010.(in Chinese) [9] Montgomery D.Design and analysis of experiments [M].New York:John Wiley and Sons-Inc.,2001. [10]陈晖,汪红,李光杨,等.水平与垂直流动对微电铸镀层 均匀性 的 影 响 [J].传 感 器 与 微 系 统,2011,30(6): 20-23. Chen Hui,Wang Hong,Li Guangyang,et al.Influ- ence of horizontal and vertical flow pattern on coating uniformity inside micro-structures during electrodeposi- tion[J].Transducer and Microsystem Technologies, 2011,30(6):20-23.(in Chinese) (责任编辑:赵业玲 櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅櫅 ) (上接第984页) 表1 几种算法的图像复原性能比较 Tab.1 Image restoration performance of several algorithms for comparison 图像 Lena Camera man Barbara 算法 PSF1 PSF2 PSF3 RPSN/ dB RISN/ dB RPSN/ dB RISN/ dB RPSN/ dB RISN/ dB 本文 35.35 18.77 38.27 19.84 38.62 20.82 IST  31.46 14.88 25.57  7.14 27.97 10.17 TWIST 31.59 15.01 25.81  7.39 28.12 10.32 SALSA 29.39 12.81 25.02  6.59 26.78  8.98 本文 32.90 17.61 36.64 19.36 36.46 19.79 IST  28.55 13.26 23.68  6.40 25.29  8.62 TWIST 28.79 13.50 23.96  6.67 25.46  8.79 SALSA 26.45 11.16 23.30  6.01 24.37  7.70 本文 31.28 15.44 36.36 18.50 38.01 20.86 IST  29.56 13.73 25.10  7.24 26.90  9.76 TWIST 29.68 13.85 25.21  7.35 27.09  9.95 SALSA 27.97 12.14 24.46  6.61 25.83  8.68 5 结 论 针对 Tikhonov正则化的预处理共轭梯度图像 复原算法中模糊图像取全零扩展矩阵的不足之处, 提出了新的模糊图像的扩展矩阵,降低了原矩阵向 量积的计算误差,修正了初始梯度的取值,改进算法 更符合真实的图像退化过程,有效提高了复原的图 像质量.实验结果表明:对于各种退化造成的模糊 图像,本文中算法复原效果优于当前流行的图像复 原算法. 参考文献: [1]Aubert G,Kornprobst P.Mathematical problems in im- age processing[M].New York:Springer Science+Bus- iness Media,2006. [2]Rudin L,Osher S,Fatemi E.Nonlinear total variation based noise removal algorithms[J].Phys D,1992,60: 259-268. [3]Beck A,Teboulle M.A fast iterative shrinkage-thresh- olding algorithm for linear inverse problems[J].SIAM J,Imaging Sci,2009,2(1):183-202. [4]Bioucas-Dias J,Figueiredo M.A new TwIST:two-step iterative shrinkage/thresholding algorithms for image restoration[J].IEEE Transactions on Image Process- ing,2007,16(12):2992-3004. [5]Afonso M V,Bioucas-Dias J M,Figueiredo M A T. Fast image recovery using variable splitting and con- strained optimization[J].IEEE Transactions on Image Processing,2010,19(9):2345-2356. [6]Gonzalez G C,Woods R E.Digital image processing[M]. 3rd ed.London:London Prentice Hall,2007:333-335. [7]Vogel C R.Computational methods for inverse problems [M].Philadelphia:SIAM,2002. [8]Chan T F,Olkin J A.Circulant preconditioners for To- eplitz-block matrices[J].Numerical Algorithms,1994, 6:89-101. (责任编辑:赵业玲) 099 北 京 理 工 大 学 学 报 第 33 卷