﻿ 光学显微成像系统图像清晰度评价函数的对比
 光学仪器  2018, Vol. 40 Issue (1): 28-38 PDF

A comparison of sharpness functions based on microscopes
LI Xue, JIANG Minshan
School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology, Shanghai 200093, China
Abstract: Sharpness function is the key in the imaging systems.We compared sixteen functions to determine which function is most suitable.We took into consideration that are inherent to the autofocus algorithm, such as unbiasedness, unimodality, sensitivity and time-consumption.The simulation with MATLAB has shown that the Laplacian function would be our first choice for its best performance.But in a situation with Gaussian noise, the Brenner function, the Tenengrad function, sharpness function based on Prewitt edge detection operator and median filtering and discrete cosine function perform well.In a situation with salt and pepper noise, the Roberts function has good stability.
Key words: sharpness function     Gaussian noise     salt and pepper noise     Laplacian function

1 图像清晰度评价函数

(1) Brenner梯度函数(Brenner)[2]

Brenner梯度函数仅仅考察被判断点与其中一个相邻像素点之间的灰度差值, 简洁实用、计算量少, 其表达式为

 (1)

Brenner梯度算子可以看作是模板T=[-1 0 1]和对应位置的图像像素[I(x, y) I(x+1, y) I(x+2, y)]依次进行卷积, 模板T=[-1 0 1]是一个带通滤波器, Brenner梯度算子正是通过带通滤波来滤除比例较大的低频能量, 保留图像中的中频部分能量。

(2) 改进的Brenner梯度函数(ImprovedBre)

 (2)

(3) 绝对方差函数(AbsVar)[4]

 (3)

(4) Roberts梯度函数(Roberts)[5]

 (4)

(5) Laplacian函数(Laplacian)[6]

Laplacian函数就是利用了边缘检测的Laplacian算子, 其表达式为

 (5)

 (6)

 (7)

 (8)

 (9)

(7) 梯度向量模方函数(SGVM)

 (10)

(8) 自相关函数(Autocorrection)

 (11)

(9) 熵函数法(Entropy)

 (12)

(10)全频段积分函数(Integral)[11]

 (13)

(11)相邻灰度差分算子绝对值之和(Sum)[12]

 (14)

(12)中值滤波-离散余弦函数(MDCT)[13]

 (15)

(13)图像能量函数(ImageEnergy)[14]

 (16)

(14)平面微分平方和(PlanarDiff)

 (17)

(15)基于Prewitt边缘检测算子的清晰度评价函数(Prewitt)[16]

Prewitt算子与Sobel算子非常类似, 只是模板系数不同。Prewitt算子的sxsy分别用卷积模板表示为

 (18)

Prewitt边缘算子是一种一阶微分算子, 是在图像空间利用两个方向模板与图像进行邻域卷积来完成检测。

(16)基于LOG边缘检测算子的清晰度评价函数[17](LOG)

LOG算子对图像进行边缘检测时, 输出的LOG(x, y)是通过卷积运算得到的。LOG(x, y)常用模板为

 (19)

2 算法比较

2.1 单峰性、无偏性和灵敏度

 图 1 理想情况下各清晰度评价函数运算结果 Figure 1 The results of all sharpness functions

 图 2 理想情况下部分函数的运算结果 Figure 2 The results of part of sharpness functions

2.2 计算量

 图 3 理想情况下各函数运行耗时 Figure 3 Time-consumption of each algorithm

 图 4 南瓜茎细胞图像 Figure 4 Images of cell of pumpkin stem

 图 5 理想情况下各清晰度评价函数运算结果 Figure 5 The results of all sharpness functions

2.3 抗噪性

2.3.1 高斯噪声

 图 6 高斯噪声情况下各清晰度评价函数的运算结果 Figure 6 The results of all sharpness functions

 图 7 高斯噪声情况下部分函数的运算结果 Figure 7 The results of part of sharpness functions

 图 8 高斯噪声情况下表现较好的函数的运算结果 Figure 8 The algorithms with only one peak

2.3.2 椒盐噪声

 图 9 椒盐噪声情况下各清晰度评价函数的运算结果 Figure 9 The results of all sharpness functions

 图 10 椒盐噪声情况下部分函数的运算结果 Figure 10 The results of part of sharpness functions
3 结论

 [1] 任四刚, 李见为, 谢利利. 基于灰度差分法的自动调焦技术[J]. 光电工程, 2003, 30(2): 53–55. [2] 李奇, 冯华君, 徐之海, 等. 数字图象清晰度评价函数研究[J]. 光子学报, 2002, 31(6): 736–738. [3] 王健, 陈洪斌, 周国忠, 等. 改进的Brenner图像清晰度评价算法[J]. 光子学报, 2012, 41(7): 855–858. [4] 陈国金, 朱妙芬, 张克松. 图像调焦过程的清晰度评价函数研究[J]. 数据采集与处理, 2009, 24(2): 165–169. [5] 高赞, 姜威, 朱孔凤, 等. 基于Roberts梯度的自动聚焦算法[J]. 红外与激光工程, 2006, 35(1): 117–121. [6] YAO Y, ABIDI B, DOGGAZ N, et al. Evaluation of sharpness measures and search algorithms for the auto focusing of high-magnification images[C]//Proceedings of the SPIE volume 6246 visual information processing XV. Orlando: SPIE, 2006, 6246: 62460G. [7] REDONDO R, BUENO G, VALDIVIEZO J C, et al. Autofocus evaluation for brightfield microscopy pathology[J]. Journal of Biomedical Optics, 2012, 17(3): 036008. DOI:10.1117/1.JBO.17.3.036008 [8] 孙文. 调制传递函数测试仪的自动调焦技术研究[D]. 南京: 南京理工大学, 2009. http://cdmd.cnki.com.cn/Article/CDMD-10288-2009197628.htm [9] SANTOS A, DE SOLÓRZANO C O, VAQUERO JJ, et al. Evaluation of autofocus functions in molecular cytogenetic analysis[J]. Journal of Microscopy, 1997, 188(3): 264–272. DOI:10.1046/j.1365-2818.1997.2630819.x [10] JARVIS R A. Focus optimization criteria for computer image processing[J]. Microscope, 1976, 24(2): 163–180. [11] 鲍歌堂, 赵辉, 陶卫. 图像测量技术中几种自动调焦算法的对比分析[J]. 上海交通大学学报, 2005, 39(1): 121–124. [12] 吴振锋, 左洪福, 邱根良. 光学显微镜自动聚焦的技术研究[J]. 光学仪器, 2000, 22(4): 9–12. [13] ZHANG X, JIA C, XIE K. Evaluation of autofocus algorithms for automatic detection of Caenorhabditis elegans lipid droplets[J]. Progress in Biochemistry and Biophysics, 2016, 43(2): 167–175. [14] MATEOS-PÉREZ J M, REDONDO R, NAVA R, et al. Comparative evaluation of autofocus algorithms for a real-time system for automatic detection of mycobacterium tuberculosis[J]. Cytometry Part A, 2012, 81(3): 213–221. [15] 郑玉珍, 吴勇, 倪旭翔. 实时自动对焦的研究[J]. 光电工程, 2004, 31(4): 64–66. [16] 吴曦. 基于MATLAB的图像边缘检测算法的研究和实现[D]. 长春: 吉林大学, 2014. http://cdmd.cnki.com.cn/Article/CDMD-10183-1014281500.htm [17] 刘兴宝. 基于数字图像处理的自动对焦技术研究[D]. 绵阳: 中国工程物理研究院, 2007. http://cdmd.cnki.com.cn/Article/CDMD-82818-2008032633.htm