AN IMPROVED ALGORITHM OF DYNAMIC GRAY-THRESHOLDING FOR SEGMENTING DENSE AEOLIAN SAND PARTICLES IMAGES
MeiFanmin1,*,, LuoSui1, ChenJinguang2 1 School of Environmental and Chemical Engineering, Xi’an Polytechnic University, Xi’an 710048, China;2 School of Computer Science, Xi’an Polytechnic University, Xi’an 710048, China; 中图分类号:TP751.1 文献标识码:A
关键词:风沙;图像分割;动态灰度阈值;类间方差;查全率;查准率 Abstract Aeolian saltation plays a very key role in shaping varieties of landforms in arid area and in affecting global climate system and marine ecosystem. It is generalized as four sub-processes: aerodynamic entrainment, the grain trajectory, the grain-bed collision and wind modification. Among these sub-processes, individual particle trajectory formation is a key chain affecting grain-bed collision and interaction between sand particles and wind conditions. Nevertheless, up to date, the mechanism of sand particle trajectory formation has not yet disclosed perfectly due to lack of a sophisticated algorithm for extracting effectively sand particles from high-concentration images. The traditional algorithms with single thresholding often cannot segment sand particles effectively from backgrounds due to brightness difference among saltating particles, stable and stochastic noises in high-concentration images. The algorithm with dynamic thresholding proposed by Ohmi and Li, however, needs to preset arbitrarily empirical parameters as maximum, minimum and contrast threshold, probably introducing uncertainty of segmentation. Thus, an improved segmentation- algorithm with dynamic thresholding is proposed here, which covers denosing by substracting a background image, graying by green channel, differentiation, targets’ detection by gray-level variance and segmenting by maximum between-class variance of gray-thresholding. The highlights of new algorithm lie in two aspects: the denosing by substacting a background image and the targets’ detection. In virtue of the denosing method, such stable noise signs as stripes and maculae deriving from photography processes are removed effectively from the sand particles’ image. As the most an important precedure of the improved algorithm, the targets’ detection is able to distinguish effectively those dark sand particles from background in differential units by selection of appropriate variance of gray (3.5), but also to reduce fasle information that backgrounds could be recognized wrongly as particles. It seems that image segmented with the targets’ detection shows clearly more sand particles in contrast to image without the targets’ detection which is blurred with lots of stochastic noises. Based on horizontal and vertical coordinates of all sand particle in the study image recorded manually, such parameters as the number of sand particles identified correctly (Nie), recall rate (Rc) (refers to ratio of the extracted automatically number of sand particles to the number of real particles (Nr)) and the precision (Pr refers to ratio of Nie to Nr) were used to evaluate the algorithm. It shows that Nie, Rc and Pr is 461, 71%和86% respectively, compared to 85, 13% and 82% by the traditional algorithm. The new algorithm is better than the traditional one. Nevertheless, it should be perfected in future through many new ways.
Keywords:aeolian sand particles;image segmentation;dynamic grey-thresholding;between-class variance;recall rate;precision -->0 PDF (3667KB)元数据多维度评价相关文章收藏文章 本文引用格式导出EndNoteRisBibtex收藏本文--> 梅凡民, 雒遂, 陈金广. 一种改进的高浓度风沙图像的动态灰度阈值分割算法[J]. 力学学报, 2018, 50(3): 699-707 https://doi.org/10.6052/0459-1879-18-040 MeiFanmin, LuoSui, ChenJinguang. AN IMPROVED ALGORITHM OF DYNAMIC GRAY-THRESHOLDING FOR SEGMENTING DENSE AEOLIAN SAND PARTICLES IMAGES[J]. Chinese Journal of Theoretical and Applied Mechanics, 2018, 50(3): 699-707 https://doi.org/10.6052/0459-1879-18-040
改进的最大类间方差灰度阈值图像分割算法的流程包括扣减背景模板去噪、绿光通道灰度化处理、图像微分、灰度方差阈值 目 标检测、最大类间方差灰度阈值分割等(见图1),其中前4步算法属于图像分割的预处理. 图像去噪是图像分割前处理的第一步,本文根据图像噪声的特征来设计去噪算法. 对本组风沙图像而言,噪声可分为两类,一类为稳定的噪声,是指这组图像的某些位置会普遍出现的噪声, 包括 条纹状、条带状噪声(可能是拍摄时风洞玻璃窗对镜头上齿轮的反光所致,见图2(a))和未知原因造成的某些位置的沙粒背后的黑斑 状噪声(见图3(a)). 另一类是随机噪声(见图4). 对这两类噪声,本文分别选用扣减背景模板去噪和灰度方差阈值目标检测算法来实现. 显示原图|下载原图ZIP|生成PPT 图1改进的风沙图像灰度阈值分割算法流程图 -->Fig. 1The flow chart of an improved algorithm of maximum between-class variance of grey-thresholding for segmenting aeolian sand particles’ images -->
显示原图|下载原图ZIP|生成PPT 图2背景模板去除条纹状噪声的效果((a) 含有条纹状、条带状噪声的原图,(b) 背景模板去噪后的图像) -->Fig.2(a) An aeolian sand particles’ image with noises like stripes; (b) the denoising image by subtracting a background image -->
显示原图|下载原图ZIP|生成PPT 图3背景模板去除条纹状噪声的效果((a)含有黑斑噪声的原图,(b)背景模板去噪后的图像) -->Fig.3(a) An aeolian sand particles’ image with noises like maculae; (b) the denoising image by subtracting a background image -->
扣减背景模板去噪法是指从每幅风沙图像中扣减背景模板的信息来去除风沙图像中稳定噪声的方法. 背景模板是从连续图像中没有 沙粒的图像中选取. 图2(b)和图3(b)表明扣减背景模板法剔除了原始图像中的齿轮样的横条纹、横条带和沙粒背后的黑斑,风沙图像的整体背景呈均匀黑色, 去噪效果良好. 以往的风沙图像处理中用到模板去噪的算法[38],主要用来消除背景噪声和床面反光. 本文的结果表明该算法有效地去除了 图2中的条纹噪声和图3中沙粒后面的黑斑噪声,其对稳定噪声的效果更明显. 风沙图像也存在随机噪声(见图4). 一般地,随机噪声的去除是根据 灰度直方图的特征来选择相应的滤波器来处理[34],但这 种方法不适合高浓度风沙图像去噪,因为滤波之后一些亮度和背景相近的沙粒会被去除而造成图像目标信息的损失. 这里 采用基于灰度方差阈值的目标检测法来实现对随机噪声的去除(见后面的论述). 显示原图|下载原图ZIP|生成PPT 图4风沙图像背景的灰度直方图 -->Fig. 4Gray level histogram of backgrounds of the aeolian image -->
RGB彩色图像的灰度化一般采用均值法来处理[24],但考虑到本文图像拍摄的照明光源为绿色激光,因而采用分量法中的绿光通道来 对图像进行灰度化处理. 图5(b)表明绿光通道灰度化处理后,沙粒灰度分布均匀、饱满、清晰,其灰度化效果明显好于均值法(见图5(a)). 这也意味着以纯色激光照明拍摄的高速摄影图像,其灰度化选用分量法处理更合适. 显示原图|下载原图ZIP|生成PPT 图5灰度化效果的对比((a) 均值法,(b)绿色通道灰度化) -->Fig. 5(a) an image by graying of averaged grey value; (b) the image by graying of green channel -->
图像微分是指利用微分思想把一幅风沙图像分成微小的灰度单元并以此作为图像分割的基本单位,灰度单元大小会影响到图像分割的 效果. 一方面,微小单元划分得越小,目标信息的提取可能越详细;另一方面,微小单元划分得越小,则会耗用更多的计算资源. 因而选择合适的微小灰度单元的尺度很重要. 本文选取5 5像素的灰度单元作为图像分割的基本尺度,这个尺度根据风沙图像中沙粒的大小(最大沙粒是10 10 像素)和上述因素来共同确定. 需要说明的是,图像微分的具体尺度应该因图像本身的具体特征而定. 基于灰度方差阈值的目标检测是指通过选择合适的灰度方差阈值来检测风沙图像灰度单元中是否存在目标的方法,其数学原理是用风沙图像内的微分单元的灰度方差阈值来识别目标,可表示为 $\varphi (i)=\left\{ \begin{array}{ll} 1 , & \sigma^2_i < T \\ 0 , & \sigma^2_i <T \end{array}\!\! \right.\ \ \ (1\leq i \leq n) (1)$ 其中 为第 个微分单元的灰度方差, 为阈值. 合适的阈值 用人工实验来筛选,可分为3个步骤. (1)图像微分单元分类及灰度方差的抽样分析. 这里把图像微分单元分为亮粒子、暗粒子和背景等3类,然后抽样获得三类微分单元的灰度方差值的概率分布图(见图6). 图6显示背景类单元的灰度方差在0.5~1.7之间,其概率分布的峰值对应的灰度方差为1.1 ~ 1.3之间;暗粒子类的灰度方差在3.5 ~ 11.5之间,其中灰度方差在3.5 ~ 4.5之间的概率最大(32%),这意味着微分单元灰度方差在1.7 ~ 3.5之间的可能是暗粒子也可能是背景;亮粒子类的灰度方差在20.0 ~ 70.0之间,其中灰度方差在20.0 ~ 30.0的概率最大(28%),这表明在微分单元灰度方差数值上亮粒子易于和暗粒子及背景区分. (2)据图6来确定初步的用于目标检测的灰度方差的范围,区分暗沙粒和背景的灰度方差的阈值应该介于2.0~4.5之间. (3)在初步筛选的灰度方差阈值范围内,通过逐步试验 确定最佳阈值. 图7是灰度方差阈值在2.0~4.5之间变化时所分割的风沙图像. 当灰度方差阈值为2.0和2.5时,所提取沙粒数量很丰富,但沙粒周围会出现明显的噪声 点(见图7(a),图7(b));当灰度方差阈值为4.0和4.5时,图像上的噪声点已不明显但丢失了一些沙粒的信息(见图7(e),图7(f)); 当该阈值为3.0和3.5时,是沙粒提取数量和噪声信息的折中(见图7(c),图7(d)),这两个阈值既能尽可能完整提取沙粒的信息也可 能避免噪声信息的干扰,是比较合适的阈值. 相关的研究可根据研究目的和精度的具体要求来选择合适的灰度方差 阈值. 本文研究选择3.5作为目标识别的阈值时,图像分割的查全率和查准率均优于其他灰度方差阈值的结果(见表1),这是因为灰度标准方差 的阈值低于3.5时,有背景随机噪声的干扰而灰度标准方差阈值高于3.5会过滤掉部分目标信息. 显示原图|下载原图ZIP|生成PPT 图6包含亮粒子、暗粒子和背景等微分单元的灰度方差()的概率()分布 -->Fig. 6Probability of gray-level variances of such tiny units as bright particles, dark particles and backgrounds --> 显示原图|下载原图ZIP|生成PPT 图7不同灰度方差阈值目标检测下风沙图像分割效果(从(a)到(f),灰度标准方差阈值分别为2.0,2.5,3.0,3.5,4.0,4.5) -->Fig. 7The segmented aeolian sand particles’ images under different standard variances’ threshold of gray values (The standard variances’ threshold ranges from 2.0 to 4.5, corresponding to (a) to (f)) --> 显示原图|下载原图ZIP|生成PPT 图8改进的和传统的灰度阈值分割算法效果的比较((a)传统的算法,(b) 传统算法+图像微分,(c)改进的算法) -->Fig. 8Comparison between output of the improve algorithm and that of the traditional algorithm ((a) the output of traditional algorithm, (b) output of the traditional algorithm+differential gray grids, (c) output of the improved algorithm) -->
Note: is the number of real sand particles, is the number of identified sand particles, is the number of sand particles identified correctly,recall rate: , precision: , standard variances’ threshold of gray levels for detecting targets from tinny units. 新窗口打开 前人用O-Li法研究了风沙图像分割效果[33], 结果表明在真实粒子数500个的情况下,该算法的查准率在95% 96%,高于本算法的结果. 但应该看到,前人研究中利用的是人工生成的灰度图像,且灰度图像的分辨率为512 512,而本文为了更完整地记录沙波纹形 成过程中粒--床碰撞信息,采用的图像分辨率为512 384,这可能是造成本文算法查准率低于O-Li法的可能原因. 改进算法显著地提高了图像分割的查全率和查准率,关键的原因有2个:(1)模板去噪法有效地去除了图像中的稳定噪声;(2)灰度方 差阈值目标检测算法既提高了目标识别和分割的精细化程度,也有效地去除了图像随机噪声和降低了分割错误带来的噪声. 本文的改进算法的查全率还有一定的提升空间. 导致查全率不高有3个原因:(1)图像中部分暗粒子的亮度与背景接近,在模板去噪和 灰度阈值方差目标检测时被剔除掉;(2)单粒子分割现象;(3)表观重叠现象. 考虑到(1)是图像固有特征,今后的研究工作着重通过解 决(2)和(3)的问题来进一步提高查全率和查准率.
风沙跃移是干旱区地貌发育主要动力,其伴随的粉尘释放、输送和沉降过程对全球大气环境质量、气候系统和海洋生态系统产生了重要的影响. 为了从单个沙粒输送尺度来理解风沙输运的机制,本文针对高浓度风沙图像明暗不均和噪声的特点,提出了一个改进的动态阈值分割算法,该算法包括背景模板去噪、绿光通道灰度化处理、图像微分、灰度方差阈值目标检测和最大类间方差灰度阈值分割等. 新算法主要进展在于背景模板去噪方案和灰度方差阈值目标检测等. 背景模板去噪显著地去除了图像中齿轮样条带、横条带和沙粒背后的黑斑等稳定噪声,也使得整幅图像的背景趋近均一,为图像目标识别提供了很好的基础. 作为新算法的亮点和最重要的程序,灰度方差阈值目标检测既能够从微分灰度单元中有效地区分和识别暗粒子,也能够避免背景被识别为沙粒的错误. 高浓度风沙图像分割实验表明,改进算法的沙粒有效识别数、查全率和查准率分别为461, 71%和86%,显著地高于传统算法对应的85, 13%和82%,这表明新算法对高浓度风沙图像的分割效果良好,但还可以在诸多方面进一步的完善. The authors have declared that no competing interests exist.
BagnoldRA. The Physics of Blown Sand and Desert Dunes . London:Methuen, 1941: 265 [本文引用: 1]
[2]
AlfaroSC, GomesL. Modeling mineral aerosol production by wind erosion: Emission intensities and aerosol size distribution in source areas . J Geophys Res, 2001, 106(D16): 18075-18084 [本文引用: 1]
[3]
ZhangJ, ShaoY, HuangN. Measurements of dust deposition velocity in a wind-tunnel experiment . Atmos Chem Phys, 2014, 14: 8869-8882 [本文引用: 1]
[4]
YangY, RussellLM, LouSJ, et al. Dust-wind interactions can intensify aerosol pollution over eastern China . Nat Commun, 2017, 8: 15333 [本文引用: 1]
[5]
DumkaUC, KaskaoutisDG, SrivastavaMK, et al. Scattering and absorbing properties of near-surface aerosols over Gangetic-Himalayan region: The role of boundary layer dynamics and long-range transport . Atmo Chem Phys, 2015, 15: 1555-1572 [本文引用: 1]
[6]
MahowaldNM, BakerAR, BergamettiG, et al. Atmospheric global dust cycle and iron input to ocean . Global Biogeochemical Cycles, 2005, 19: GB4025 [本文引用: 1]
WernerBT, HaffPK. Impact process in Aeolian saltation: two dimensional simulations . Sedimentology, 1988, 35: 189-196 [本文引用: 1]
[9]
RiceMA, WillettsBB, McEwan IK. An experimental study of multiple grain-size ejecta produced by collisions of saltating grains with a flat bed . Sedimentology, 1995, 42: 695-706 [本文引用: 1]
[10]
ZhengXJ, XueL, ZhouYH. Exploration of probability distribution of velocities of saltating sand particles based on the stochastic particle-bed collisions . Physics Letters A, 2005, 341: 107-118 [本文引用: 1]
[11]
WangDW, WangY, YangB, et al. Statistical analysis of sand grain/bed collision process recorded by high-speed digital camera . Sedimentology, 2008, 55: 461-470 [本文引用: 1]
[12]
YinX, HuangN, WangZS. A numerical investigation into sand grain/slope bed collision . Powder Technology, 2017, 314: 28-38 [本文引用: 1]
[13]
OwenPR. Saltation of uniform grains in air . J Fluid Mech, 1964, 20: 225-242 [本文引用: 1]
[14]
McEwanIK, WillettsBB. Adaptation of the near-surface wind to the development of sand transport . J Fluid Mech, 1993, 252: 99-115 [本文引用: 1]
[15]
LiZS, NiJR, MendozaC. An analytic expression for wind-velocity profile within the saltation layer . Geomorphology, 2004, 60: 359-369 [本文引用: 1]
[16]
HuangN, WangZS. The formation of snow streamers in the turbulent atmosphere boundary layer . Aeolian Research, 2016, 23: 1-10 [本文引用: 1]
[17]
WangZT, ZhangCL, WangHT. Coherent structures over flat sandy surfaces in aeolian environment . Catena, 2017, 159: 144-148 [本文引用: 1]
[18]
AndersonRS. Eolian sediment transport as a stochastic process: The effects of a fluctuating . Journal of Geology, 1987, 95: 497-512 [本文引用: 1]
(ZhenXiaojing, WangPing. Numerical simulation on stochastic movement of sands in wind-blown sand .Journal of Desert Research, 2006, 26(2): 184-187 (in Chinese))
[20]
KokJF, RennoNO. A comprehensive numerical model of steady state saltation (COMSALT) . Journal of Geophysics Research, 2009, 114, D17204 [本文引用: 1]
ZhangW, KangJ, LeeS. Tracking of saltating sand trajectories over a flat surface embedded in an atmospheric boundary layer . Geomorphology, 2007, 86: 320-331 [本文引用: 3]
[23]
HoDT, ValanceA, DupontP, et al. Aeolian sand transport: Length and height distributions of saltation trajectories . Aeolian Research, 2014, 12: 65-74 [本文引用: 1]
(OgeMarques.Practical Image and Video Processing Using MatLab. Zhang Yujin Translation. Beijing:Tsinghua Press, 2013:360-363,277-299 (in Chinese)) [本文引用: 3]
[25]
ZouXY, ChengH, ZhangCL, et al. Effects of the Magnus and Saffman forces on the saltation trajectories of sand grain . Geomorphology, 2007, 90: 11-22 [本文引用: 1]
[26]
PalNR, PalSK. A review on image segmentation techniques . Pattern Recognition, 1993, 26(9): 1277-1294 [本文引用: 6]
[27]
ZhangYJ. Advances in Image & Video Segmentation. Hershey: Idea Group Inc., 2006: 1-15 [本文引用: 5]
[28]
DilpreetK, YadwinderK. Various image segmentation techniques: a review . International Journal of Computer Science and Mobile Computing, 2014, 5(3): 809-814 [本文引用: 5]
(MeiFanmin, JiangChanwen. An arithmetic method of segmenting moving aeolian sand particles’ images from background information of digital high-speed photography images .Chinese Journal of Theoretical and Applied Mechanics, 2012, 44(1):83-85 (in Chinese)) [本文引用: 1]
[30]
JiangC, DongZ, WangY. An improved particle tracking velocimetry (PTV) technique to evaluate the velocity field of saltating particles . Journal of Arid Land, 2017, 9(5): 727-742 [本文引用: 1]
(JiangChanwen, WangXiaoyan, DongZhibao. High-speed photography in measuring the velocity of sand particles in an air/particle two-phase flow .Aria Land Geography, 2017, 40(4): 746-749 (in Chinese)) [本文引用: 1]
[32]
NobuyukiO. A threshold selection method from gray-level histograms . IEEE Trans. on System, Man, and Cybernetics, 1979, 9(1): 62-66 [本文引用: 2]
(LiuWenghong, WanTian, ChengWenjuan, et al. Analysis on steady structure of bubble plume in the basis of image binarization .Journal of Hydraulic Engineering, 2009, 40(11): 1369-1373 (in Chinese)) [本文引用: 2]
(XueTing, MengXindong, ZhangTao. Extraction of bubble shape and motion feature parameters in the gas-liquid two-phase flow .Journal of Optoelectronics · Laser,2010, 21(8):1218-1220 (in Chinese)) [本文引用: 2]
(YinYanchun, ZhaoTongbin, TanYunliang, et al. Reconstruction and numerical test of the mesoscopic model of rock based on Otsu digital image processing .Rock and Soil Mechanics, 2015, 36(9):2532-2541 (in Chinese)) [本文引用: 1]
(ZhangAihua, WangFan, ChenHaiyan. Ochotona curzoniae image segmentation based on the improved CV model .J Huazhong Univ of Sci & Tech ( Natural Science Edition), 2017, 45(8):32-37 (in Chinese)) [本文引用: 1]
[37]
OhmiK, LiHY. Particle-tracking velocimetry with new algorithms . Measurement Science and Technology, 2000, 11: 603-616 [本文引用: 3]
(JiaPan, WangYuan, ZhangYang. Relaxation based on PTV with Delaunay triangulation . Acta Aerodynamic Sinica, 2012, 30(6):792-797 (in Chinese)) [本文引用: 1]
[40]
JiaP, WangY, ZhangY. Improvement in the independence of relaxation method-based particle tracking velocimetry . Measurement Science and Technology, 2013, 24: 1-13 [本文引用: 1]