陳光偉 徐梁 方亮 付雪 陳普寬



摘 要:為解決林火圖像傳統閾值分割方法時效性差、分割精度低等問題,提出一種基于多策略融合未來搜索算法(IFSA)的多閾值林火圖像分割方法。在提升算法的性能方面,采用帳篷映射(Tent 映射)初始化種群中的個體,引入自適應權重與認知因子增強種群內部信息交流,并對最優位置引入柯西分布與高斯分布結合的變異機制提高算法的收斂精度。利用改進算法對森林火災圖像進行分割,并選取最佳適應度、峰值信噪比和結構相似度作為評價指標,與粒子群優化算法、灰狼優化算法等進行對比分析。研究結果表明,改進的未來搜索算法(Improved Future Search Algorithm,IFSA)的適應度曲線收斂效果明顯優于其他對比算法,峰值信噪比、結構相似度取得最優的實驗次數分別占總實驗次數的100%與91.67%,證明基于IFSA的圖像分割方法能有效改善林火圖像分割效果,為林火特征的提取與分析建立依據。
關鍵詞:未來搜索算法;Tent混沌映射;柯西-高斯變異;多閾值圖像分割;林火圖像
中圖分類號:S??? 文獻標識碼:A?? 文章編號:1006-8023(2023)04-0134-11
Forest Fire Image Segmentation Based on Multi-strategy
Fusion Future Search Algorithm
CHEN Guangwei1, XU Liang1, FANG Liang2, FU Xue1, CHEN Pukuan2
(1.College of Mechanical and Electrical Engineering, Northeast Forestry University, Harbin 150040, China;
2.Lianyungang Tianbang Technology Development Company Ltd., Lianyungang 222346, China)
Abstract:A multi-threshold forest fire image segmentation method based on a multi-strategy fused future search algorithm (IFSA) is proposed to address the shortcomings of traditional threshold segmentation methods for forest fire images, such as poor timeliness and low segmentation accuracy. To improve the performance of the algorithm, the solution space is initialized using Tent chaotic mapping. Inertia weights and cognitive factors are introduced to enhance exchange within populations. A variational mechanism combining the Cauchy distribution and Gaussian distribution is introduced to improve the convergence accuracy of the algorithm. The improved algorithm is used to segment forest fire images, and the best adaptation, peak signal-to-noise ratio and structural similarity are selected as evaluation metrics and compared with particle swarm optimization algorithm and grey wolf optimization algorithm for analysis. The results show that the convergence of the adaptation curve of improved future search algorithm (IFSA) is better than that of other algorithms, and the number of experiments in which the peak signal-to-noise ratio and structural similarity achieved the best results accounted for 100% and 91.67% of the total number of experiments, respectively. It is proved that the IFSA-based image segmentation method can effectively improve the segmentation effect of forest fire images and establish a basis for the extraction and analysis of forest fire features.
Keywords:Future search algorithms; Tent chaotic map; Cauchy-Gaussian mutation; multi-threshold image segmentation; forest fire image
收稿日期:2022-11-22
基金項目:連云港“智能海州人才計劃”創新類項目(“氣壓密閉式大口徑流體裝卸臂”)
第一作者簡介:陳光偉,博士,副教授。研究方向為液壓伺服控制和機械設計及理論研究。E-mail: chengw730245@sina.com
引文格式:陳光偉,徐梁,方亮,等.基于多策略融合未來搜索算法的林火圖像分割[J]. 森林工程, 2023,39(4):134-144.
CHEN G W, XU L, FANG L, et al. Forest fire image segmentation based on multi-strategy fusion future search algorithm[J]. Forest Engineering, 2023, 39(4):134-144.
0 引言
近年來,由于部分地區氣候干燥以及人為原因引起的不同規模大小的森林火災多達數十起,森林火災的發生將嚴重影響森林中各種生物的生長與自然繁育。為預防森林火災,目前已研制出無人化的森林火災早期預警與視覺監測系統,其中,林火圖像分割是系統中最重要的環節之一。林火圖像分割可以從圖像中辨別出火源部分,為后續的林火特征提取與分析,以及滅火工作提供重要依據[1-3]。
圖像分割的大類方法主要有閾值分割、邊緣檢測和BP神經網絡等[4];在眾多圖像分割的方法中,閾值分割因其簡單且性能穩定而被廣泛應用。閾值分割法又可以分為多種,其中最大類間方差法(Ostu)[5]是目前公認的對閾值選取較為合理、分割效果較優的多閾值分割方法[6]。
隨著迭代次數的增加,多閾值分割方法的計算量呈指數級增長[7]。為提高算法的運算效率,產生了學科交叉下的閾值分割算法[8],如近些年來許多學者將粒子群優化算法(Particle Swarm Optimization Algorithm,PSO)[9]、灰狼優化算法(Gray Wolf optimization algorithm,GWO)[10]、烏鴉搜索算法(Crow search algorithm,CSA)[11]和帝企鵝優化算法(Emperor Penguin optimization algorithm,EPO)[12]等應用于圖像分割中,并取得了較好的優化效果。
常君杰等[13]提出了一種基于改進烏鴉算法的多閾值圖像分割方法,針對烏鴉位置更新的盲目性,采用精英分享策略,同時引入萊維飛行機制,幫助CSA跳出局部最優;同時改進烏鴉算法去優化Kapur熵函數,明顯地提高了多閾值圖像的分割精度。郎春博等[14]提出了一種模擬退火算法與粒子群算法的混合優化算法,加快以Otsu為適應度函數的多閾值圖像分割的閾值選取過程,并在處理植物冠層圖像分割問題時提高了圖像的分割精度。賈鶴鳴等[15]提出了一種基于共生生物搜索算法的多閾值分割方法,并應用于林火圖像分割;通過引入精英反策略與萊維飛行策略提高算法的尋優能力,進而獲得良好的分割效果。邢致愷等[16]針對Otsu算法用于多閾值圖像分割中存在的運算時間長與分割精度不足問題,提出應用萊維飛行對樽海鞘優化算法進行改進,從而獲得最優閾值。
近幾年,許多新發現的智能優化算法具備了更好的尋優能力,其中未來搜索算法(Future Search Algorithm, FSA)具有計算復雜度較低,收斂速度較快的優點[17];但也存在著求解精度低,易陷入局部最優的問題。鑒于此,本研究提出了一種多策略融合的未來搜索算法(Improved Future Search Algorithm,IFSA),并將其應用到林火圖像多閾值分割領域。該算法改進的基本思想是利用IFSA對Otsu函數搜索尋優,獲得最優閾值組合,最終提升林火圖像分割的精度。
本研究采用式(24)作為目標函數,通過IFSA中個體向最優個體學習,從而得到一組閾值,求取使目標函數最大的閾值組合。
3.3 基于IFSA的多閾值圖像分割流程
綜上,在FSA中引入Tent混沌、自適應權重與認知因子,以及柯西-高斯變異策略后,IFSA就具備了較強抗停滯的能力,可以更加精準、高效地找到全局最優解。
基于IFSA的圖像分割流程如圖3所示。
4 實驗設計
4.1 實驗樣本
實驗選取4幅林火圖像作為實驗樣品評估IFSA算法的性能,如圖4所示,圖4(a)為白天無遮擋的近距離火源;圖4(b)為夜間煙塵、森林遮擋的遠距離火源;圖4(c)為白天以森林為背景的遠距離火源;圖4(d)為夜間背景簡單的近距離火源。
4.2 實驗環境
通過查閱國內外文獻[31-33],種群規模過小會導致算法陷入局部最優;種群規模過大會增加算法的計算復雜度;根據實驗過程可以發現,算法迭代次數在500時可收斂至最優值。故選取最大迭代次數為500,避免浪費系統資源;此外,為驗證算法在不同維度下的圖像分割性能,選擇dim=5、10和15驗證算法在低維、高維情況下的性能;種群大小設置為30,選擇FSA、PSO、GWO、CSA、 EPO 5種算法作為對比算法;具體設置參數見表1。實驗采用Windows 10系統、仿真軟件為MATLAB 2019a、CPU為2.7 GHz的環境下進行。
4.3 評價指標
實驗中選用峰值信噪比(PSNR)、結構相似度(SSIM)和適應度函數3個參數作為圖像分割效果的評價指標。
1)PSNR值(公式中用PSNR表示)越大表明m×n彩色圖像的失真程度越小[34-35]。公式如下
PSNR=10×log(M2AXMSE)=20×log(MAXMSE)。(25)
MSE=1mn∑m-1i=0∑n-1j=0I(i,j)-K(i,j)2。(26)
式中:MAX表示圖像的最大灰度值;MSE表示均方差。
2)SSIM能夠反映場景中物體的結構與圖像的亮度及對比度。SSIM值越接近1,表明2幅結構越相似[36]。SSIM(公式中用SSIM表示)表示為
SSIM=2μxμy+d1μ2x+μ2y+d1α2σxy+d3σxσy+d32σxσy+d2σ2x+σ2y+d2。(27)
式中:μx與μy分別表示原圖像與分割后圖像的均值;σx與σy分別表示原圖像與分割后圖像的方差;σxy則表示原圖像與分割后圖像之間的協方差;d1、d2、d3是常數,取d1=(0.01×L)2,d2=(0.03×L)2,d3=d2/2,L=255。
3)適應度函數
此外,本研究以式(24)為適應度函數,利用智能優化算法對函數進行優化,求取使類間方差最大的閾值組,因此選取適應度值作為評價指標。一方面,適應度函數最終的收斂值可以反映圖像的分割精度,適應度值越大,其獲取的閾值組合更優,圖像分割精度更高;另一方面,根據適應度函數收斂曲線可以直觀反映各算法的收斂效率,即圖像分割效率。
5 實驗結果與分析
5.1 失真度與相似度分析
在表2中給出6種算法分割后圖像的SSIM和
PSNR值。從整體來看,隨著閾值分割層次逐步遞增,分割后圖像的失真程度逐漸減小,與原圖的相似性逐漸提高。根據表2中數據分析,在12組實驗中,IFSA在SSIM中最優占比為91.67%,在PSNR中最優占比為100%。 在閾值個數較少時,幾種優化算法的SSIM和PSNR數值相差較小;但隨著閾值個數增加,基于IFSA的圖像分割方法在SSIM、PSNR 2個指標均表現出良好的數據特征。這表明基于IFSA分割后的圖像在亮度、對比度和結構相似性方面與原始圖像都更加相似。此外,為了直觀體現圖像分割指標PSNR與SSIM數據之間的差異性,圖5和圖6給出30次平均運行結果的SSIM與PSNR的曲線圖。由圖5可知,閾值從5、10到15,IFSA算法的PSNR與SSIM 2項指標值均高于其他對比算法,說明算法的穩定性較高,分割后的圖像與原圖像相似度更高,失真程度更低。并且對于同一幅實驗圖像,IFSA 折線在絕大多數情況均高于對比算法。特別地,閾值選取個數增加意味著計算量的急劇增加,算法此時很容易陷入局部最優,但IFSA與其他算法之間的差值仍逐漸變大。具體分析曲線圖6可看出,在圖像(c)與(d)的維度為5時,IFSA相比FSA之間的數值差距尤為明顯,這說明改進策略的確可以提高算法的收斂精度,幫助其跳出局部最優。
5.2 Otsu適應度函數收斂曲線分析
圖7為算法對圖像(c)進行分割的Otsu適應度函數收斂曲線。其中IFSA的收斂曲線用粉色曲線與對比算法進行區分。從圖7中可以清晰發現,IFSA相比FSA有了很大的提高;特別是隨著閾值數目的增加,IFSA與FSA之間的差距愈大。對比圖像(c)在維度5到15的曲線圖,各算法的適應度函數值均隨之增加,圖像分割更細致,分割效果更佳。根據IFSA的收斂曲線走勢進行分析,由于柯西-高斯變異策略幫助算法跳出局部最優的情況,因此隨著計算復雜度的增加,IFSA仍可以收斂到比較理想的值;從收斂速度方面分析,對比各個算法收斂曲線的斜率,IFSA仍位居所有算法的前列。綜合以上分析結果,有力證明了IFSA可以在保證較高算法效率的同時獲得較出色的收斂精度。
5.3 圖像分割效果分析
各個算法在閾值K=10時,對林火圖像(a)—(d)分割后的效果圖見表2。圖(a)是夜間拍攝的林火圖像,能見度低且火源被植物遮擋,清晰度不高。對比各算法對圖(a)的分割效果可見,IFSA與CSA分割的圖像中,火源范圍分割更精準,亮度更高;此外,從對煙塵的分割效果來看,IFSA對煙塵與天空的邊界分割更清晰。圖(b)是清晰無遮擋的林火圖像,所有算法都將火源的輪廓從背景中分割出來。但是,可以觀察到IFSA分割得到林火圖像,其火源內外焰的細節更清楚。圖(c)是以森林為背景,發生在空曠草地上遠距離拍攝的林火圖像。整體來看,各個算法分割后的圖像差異最明顯之處是所提取的火源圖像完整度。其中,IFSA分割效果最優,火源輪廓與原圖像基本相符;其次為CSA與EPO,但二者與原圖相比均缺失部分火源區域,屬于欠分割。圖(d)是近距離拍攝的正在燃燒樹木。IFSA相較于前3幅圖像分割效果最好,不同分割圖像間的火源細節略有不同;特別是圖像的左半部分,圖中火勢迅猛,火焰溫度高,火焰亮度高,所以分割后的圖像亮度整體偏高,火焰區域比較連貫,雜質較少。對比分割結果來看,只有IFSA、GWO與EPO比較相符。
6 結論
為提高林火圖像的分割精度,準確辨識火源,本研究在FSA中融入Tent混沌、自適應權重與認知因子,以及柯西-高斯變異策略等多種手段,使得改進后的IFSA具備了更強搜索能力。據此,選取結構相似度、峰值信噪比與適應度值作為評價指標,對4幅林火圖像進行了實驗分割,并與其他5種分割算法進行了對比分析。結果表明: 1)相較于其他算法,IFSA分割后圖像相似度與失真度的均值最高,說明其對林火圖像分割精度達到最優;2)通過對比同一圖像不同維度的適應度函數收斂曲線,當迭代次數相同時,IFSA表現出更好的時效性與視覺效果。以上結果說明,IFSA能夠更為準確、有效地分割不同環境下的林火圖像,具備應用于實際林火監測的可行性,能夠為林火圖像的分析以及后期處理提供依據。
【參 考 文 獻】
[1]賀航,馬小晶,王宏偉.等.基于改進麻雀搜索算法的森林火災圖像多閾值分割[J].科學技術與工程,2021,21(26):11263-11270.
HE H, MA X J, WANG H W, et al. Multi-threshold segmentation of forest fire images based on improved sparrow search algorithm[J]. Science, Technology and Engineering, 2021, 21 (26): 11263-11270.
[2]陳潤.林火圖像像素標注及快速檢測算法研究[D].南京:南京林業大學,2021.
CHEN R. Research on pixel labeling and fast detection algorithm of forest fire image[D]. Nanjing: Nanjing Forestry University, 2021.
[3]胡加鑫,賈鶴鳴,邢致愷.等.基于鯨魚算法的森林火災圖像多閾值分割[J].森林工程,2018,34(4):70-74,95.
HU J X, JIA H M, XING Z K, et al. Multi-threshold segmentation of forest fire images based on whale algorithm[J]. Forest Engineering, 2018, 34 (4):70-74, 95.
[4]HAINDL M, MIKES S. A competition in unsupervised color image segmentation[J]. Pattern Recognition, 2016, 57: 136-151.
[5]史進偉,郭朝勇,劉紅寧,等.基于Hough變換和雙峰法的槍彈外觀缺陷提取[J].火力與指揮控制,2013,38(5):129-132.
SHI J W, GUO Z Y, LIU H N, et al. Bullet appearance defect extraction based on Hough transform and bimodal method [J]. Firepower and Command Control, 2013, 38 (5):129-132.
[6]OTSU N. A threshold selection method from gray-level histograms[J]. IEEE Transactions on Systems, Man, and Cybernetics, 1979, 9(1): 62-66.
[7]張田,田勇,王子.等.基于清晰度評價的自適應閾值圖像分割法[J].東北大學學報(自然科學版),2020,41(9):1231-1238.
ZHANG T, TIAN Y, WANG Z, et al. An adaptive threshold image segmentation method based on sharpness evaluation [J]. Journal of Northeastern University (Natural Science Edition), 2020, 41(9):1231-1238.
[8]AYALA H V H, SANTOS F M D, MARIANI V C, et al. Image thresholding segmentation based on a novel beta differential evolution approach[J]. Expert Systems with Applications, 2015, 42(4): 2136-2142.
[9]JIANG Y, HU T, HUANG C C, et al. An improved particle swarm optimization algorithm[J]. Applied Mathematics and Computation, 2007, 193(1): 231-239.
[10]LI Y, LIN X, LIU J. An improved gray wolf optimization algorithm to solve engineering problems[J]. Sustainability, 2021, 13(6): 3208.
[11]SAYED G I, HASSANIEN A E, AZAR A T. Feature selection via a novel chaotic crow search algorithm[J]. Neural computing and applications, 2019, 31(1): 171-188.
[12]ALWESHAH M, HAMMOURI A, ALKHALALAILEH S, et al. Intrusion detection for the internet of things (IoT) based on the emperor penguin colony optimization algorithm[J]. Journal of Ambient Intelligence and Humanized Computing, 2023,14(5):6349-6366.
[13]常君杰,李東興,鐘欣,等.改進烏鴉算法優化多閾值圖像分割[J].包裝工程,2021,42(11):238-246.
CHANG J J, LI D X, ZHONG X, et al. Improved crow algorithm for optimizing multi-threshold image segmentation[J]. Packing Engineering, 2021, 42(11):238-246.
[14]郎春博,賈鶴鳴,邢致愷,等.基于改進粒子群算法的植物冠層圖像分割[J].森林工程,2019,35(1):47-52.
LANG C B, JIA H M, XING Z K, et al. Plant canopy image segmentation based on improved particle swarm optimization[J]. Forest Engineering, 2019, 35(1):47-52.
[15]賈鶴鳴,李瑤,姜子超,等.基于改進共生生物搜索算法的林火圖像多閾值分割[J].計算機應用,2021,41(5):1465-1470.
JIA H M, LI Y, JIANG Z C, et al. Multi-threshold segmentation of forest fire image based on improved symbiotic biological search algorithm[J]. Computer Application, 2021, 41(5):1465-1470.
[16]邢致愷,賈鶴鳴,宋文龍.基于萊維飛行樽海鞘群優化算法的多閾值圖像分割[J].自動化學報,2021,47(2):363-377.
XING Z K, JIA H M, SONG W L. Multi-threshold image segmentation based on Levy flying salp swarm optimization algorithm[J]. Journal of Automation, 2021, 47(2):363-377.
[17]ELSISI M. Future search algorithm for optimization[J]. Evolutionary Intelligence, 2019, 12(1):21-31.
[18]XING Z. An improved emperor penguin optimization based multilevel thresholding for color image segmentation[J]. Knowledge-Based Systems, 2020, 194:105570.
[19] NYO M T, MEBAREK-OUDINA F, HLAING S S, et al. Otsu's thresholding technique for MRI image brain tumor segmentation[J]. Multimedia Tools and Applications, 2022: 1-13.
[20]HOSNY K M, KHALID A M, HAMZA H M, et al. Multilevel segmentation of 2D and volumetric medical images using hybrid Coronavirus Optimization Algorithm[J]. Computers in Biology and Medicine, 2022,150: 106003.
[21]SUBASREE S, SAKTHIVEL N K, BALASARASWATHI V R, et al. Selection of optimal thresholds in multi-level thresholding using multi-objective emperor penguin optimization for precise segmentation of mammogram images[J]. Journal of Circuits, Systems and Computers, 2022, 31(7): 2250131.
[22]章強,程輝,葉貞成,等.改進競爭粒子群算法及其應用[J].計算機工程與設計,2019,40(2):376-383.
ZHANG Q, CHENG H, YE Z C, et al. Improved competitive particle swarm optimization algorithm and its application[J]. Computer Engineering and Design, 2019, 40(2):376-383.
[23]王改云,陸家卓,焦傲,等.混沌粒子群雞群融合優化的RSSI質心定位算法[J].計算機工程,2021,47(6):197-202,209.
WANG G Y, LU J Z, JIAO A, et al. Chaotic particle swarm chicken swarm fusion optimization RSSI centroid localization algorithm[J]. Computer Engineering, 2021, 47(6):197-202, 209.
[24]杜曉昕,王浩,崔連和,等.基于聚類和探測精英引導的蜻蜓算法[J].浙江大學學報(工學版),2022,56(5):977-986.
DU X X, WANG H, CUI L H, et al. Dragonfly algorithm based on clustering and probe elite guidance[J]. Journal of Zhejiang University (Engineering Science Edition), 2022, 56(5):977-986.
[25]呂鑫,慕曉冬,張鈞,等.混沌麻雀搜索優化算法[J].北京航空航天大學學報,2021,47(8):1712-1720.
LYU X, MU X D, ZHANG J, et al. Chaotic sparrow search optimization algorithm[J]. Journal of Beijing University of Aeronautics and Astronautics, 2021, 47(8):1712-1720.
[26]孫宇飛,鄭曉雯,陳浩,等.基于改進遺傳算法的顎式破碎機優化方法研究[J].哈爾濱理工大學學報,2022,27(2):29-35.
SUN Y F, ZHENG X W, CHEN H, et al. Optimization of jaw crusher based on improved genetic algorithm[J]. Journal of Harbin University of Science and Technology, 2022, 27(2): 29-35.
[27]HUANG W Y, LIU Y L, ZHANG X Z. Hybrid particle swarm optimization algorithm based on the theory of reinforcement learning in psychology[J]. Systems, 2023, 11(2):83.
[28]毛清華,張強.融合柯西變異和反向學習的改進麻雀算法[J].計算機科學與探索,2021,15(6):10.
MAO T H, ZHANG Q. Improved sparrow algorithm combining Cauchy mutation and reverse learning[J]. Computer Science and Exploration, 2021, 15(6):10.
[29]KALYANI R, SATHYA P D, SAKTHIVEL V P. Medical image segmentation using exchange market algorithm[J]. Alexandria Engineering Journal, 2021, 60(6): 5039-5063.
[30]盧建宏,劉海鵬,王蒙.改進海鷗算法的多閾值圖像分割算法[J].光電子·激光,2022,33(9):932-939.
LU J H, LIU H P, WANG M. Improved seagull algorithm for multi-threshold image segmentation[J]. Photoelectron Laser, 2022, 33(9):932-939.
[31]CHEN X, HUANG H, HEIDARI A A, et al. An efficient multilevel thresholding image segmentation method based on the slime mould algorithm with bee foraging mechanism: A real case with lupus nephritis images[J]. Computers in Biology and Medicine, 2022, 142: 105179.
[32]LIU Q, LI N, JIA H, et al. Modified remora optimization algorithm for global optimization and multilevel thresholding image segmentation[J]. Mathematics, 2022, 10(7): 1014.
[33]付雪,朱良寬,黃建平,等.基于改進的北方蒼鷹算法的多閾值圖像分割[J/OL].計算機工程:1-11[2023-01-18].
FU X, ZHU L K, HUANG J P, et al.? Multi-threshold image segmentation based on the improved northern goshawk optimization[J/OL]. Computer Engineering:1-11[2023-01-18].
[34]MA G, YUE X. An improved whale optimization algorithm based on multilevel threshold image segmentation using the Otsu method[J]. Engineering Applications of Artificial Intelligence, 2022, 113: 104960.
[35]JIA H, PENG X, SONG W, et al. Multiverse optimization algorithm based on levy flight improvement for multithreshold color image segmentation[J]. IEEE Access, 2019, 7(99):32805-32844.
[36]WU B, ZHU L, CAO J, et al. A hybrid preaching optimization algorithm based on kapur entropy for multilevel thresholding color image segmentation[J]. Entropy, 2021, 23(12): 1599.