﻿ 基于改进模糊C均值聚类的光伏面板红外图像分割
 计算机系统应用  2019, Vol. 28 Issue (5): 35-41 PDF

Infrared Image Segmentation of Photovoltaic Panel Based on Improved Fuzzy C-Means Clustering
HONG Xiang-Gong, ZHOU Shi-Fen
Information Engineering School, Nanchang University, Nanchang 330031, China
Foundation item: Year 2017, Second Batch of Industry-University Cooperation Project for Collaborative Education (201702109002)
Abstract: Infrared images have low contrast and low signal-to-noise ratio, which is always a huge challenge for the segmentation of infrared photovoltaic panel images. In order to solve the problem that the traditional Fuzzy C-Means (FCM) clustering algorithm is susceptible to the uncertainty of the initial clustering center and does not consider the spatial information, a clustering algorithm based on FCM is proposed. The algorithm uses the histogram, meanwhile, the characteristics of the graph determine the initial clustering center, and based on the traditional FCM and Fuzzy Kernel C-Means (KFCM) algorithm, the traditional FCM is improved by the relationship between the spatial information among pixels and the neighboring pixels. The objective function is clustered to derive a new objective function. The experimental results show that the proposed algorithm has significantly lower over-segmentation and mis-segmentation rate than the Otsu algorithm, the adaptive k-means algorithm, and KFCM algorithm. The effect is very close to the manual segmentation map.
Key words: fuzzy C-means     histogram     spatial Information     infrared image segmentation     Otsu

1 基于改进模糊C均值聚类算法 1.1 模糊C均值聚类算法(FCM)

 $J = \sum\limits_{{\rm{i = 1}}}^n {\sum\limits_{k = 1}^c {u_{ik}^m{{\left( {{X_i} - {X_K}} \right)}^2}} }$ (1)

 $\sum\limits_{k = 1}^c {u_{ik}^m} = 1,{\forall _i} = 1,2,3,\cdots,n$ (2)

 $\begin{split} J = & \displaystyle \sum\limits_{i = 1}^n \displaystyle\sum\limits_{k = 1}^c {u_{ik}^m{{({X_i} - {X_K})}^2}} + \sum\limits_{i = 1}^n {{\lambda _i}\left( {1 - \sum\limits_{k = 1}^c {{u_{ik}}} } \right)} \end{split}$ (3)
1.2 模糊核C均值聚类算法

 $J = \sum\limits_{i = 1}^n {\sum\limits_{k = 1}^c {u_{ik}^m} } \parallel \Phi ({X_i}) - \Phi ({X_k}){\parallel ^2}$ (4)

 $\begin{split} \parallel \Phi ({X_i}) - \Phi ({X_k}){\parallel ^2} = & {\Phi ^2}({X_i}) - 2\Phi ({X_i})\Phi ({X_k}) + {\Phi ^2}({X_k})\\ = & K({X_i},{X_k}) - 2K({X_i},{X_k}) + K({X_i},{X_k}) \end{split}$ (5)

 $K({X_{\rm{i}}},{X_k}) = {e^{\left( { - \dfrac{{\parallel {X_i} - {X_k}{\parallel ^2}}}{{2\sigma _{}^2}}} \right)}}$ (6)

 $J = \sum\limits_{i = 1}^n {\sum\limits_{k = 1}^c {u_{ik}^m} } (2 - 2K({X_i},{X_k}))$ (7)

 $\begin{split} J = & \sum\limits_{i = 1}^n {\sum\limits_{k = 1}^c {u_{ik}^m} } (2 - 2K({X_i},{X_k}))+ \sum\limits_{i = 1}^n {{\lambda _i}\left( {1 - \sum\limits_{k = 1}^c {{u_{ik}}} } \right)} \end{split}$ (8)

 $\left\{ \begin{array}{l} \dfrac{{\partial J}}{{\partial {u_{ik}}}} = mu_{ik}^{m - 1}(2 - 2K({X_i} - {X_k})) - {\lambda _i} = 0\\ \displaystyle \sum\limits_{k = 1}^c {u_{ik}^m} = 1\\ \dfrac{{\partial J}}{{\partial {X_k}}} = \displaystyle\sum\limits_{i = 1}^n {u_{ik}^m} K({X_i},{X_k})({X_i} - {X_k}) = 0 \end{array} \right.$ (9)

 $\left\{ \begin{array}{l} {u_{ik}} = \dfrac{{{{(1 - K({X_i} - {X_k}))}^{ - \dfrac{1}{{m - 1}}}}}}{{\displaystyle\sum\limits_{j = 1}^c {{{(1 - K({X_i} - {X_j}))}^{ - \dfrac{1}{{m - 1}}}}} }}\\ {X_k} = \dfrac{{\displaystyle\sum\limits_{i = 1}^n {u_{ik}^mK({X_i},{X_k}){X_i}} }}{{\displaystyle\sum\limits_{i = 1}^n {u_{ik}^mK({X_i},{X_k})} }} \end{array} \right.$ (10)
1.3 引入邻域像素信息的核FCM聚类算法

 图 1 论文方法流程图

 ${n_{jk}} = {\left( {d/\sqrt {{{({X_j} - {X_0})}^2} + {{({Y_j} - {Y_0})}^2}} } \right)^{1/K}}$ (11)

$({X_j},{Y_j})$ 为像素j在可能区域的坐标; d是目标可能区域对角线的长度, 本文取图像对角线的长度; $({X_0},{Y_0})$ 是目标近似质心的坐标.

 $\begin{split} J = & {\displaystyle\sum\limits_{i = 1}^n {\displaystyle\sum\limits_{k = 1}^c {({n_{ik}}{u_{ik}})} } ^m}(2 - 2K({X_i},{X_k}))+ \sum\limits_{i = 1}^n {{\lambda _i}\left( {1 - \sum\limits_{k = 1}^c {{u_{ik}}} } \right)} \end{split}$ (12)

 $w(j,k) = \frac{{\displaystyle\sum\limits_{j \in {N_R}\atop i \ne j} {\frac{{{e^{ - {{({X_j} - {X_k})}^2}}}}}{{2{\sigma ^2}}}} }}{{{N_R}}}$ (13)

 $\begin{split} J & = \displaystyle\sum\limits_{i = 1}^n {\displaystyle\sum\limits_{k = 1}^c {{{({n_{ik}}{u_{ik}})}^m}} } (2 - 2K({X_i},{X_k}))(1 - \alpha {w_{jk}})\\ & + \sum\limits_{i = 1}^n {{\lambda _i}\left( {1 - \sum\limits_{k = 1}^c {{u_{ik}}} } \right)} \end{split}$ (14)

 $\begin{split} J = & \displaystyle\sum\limits_{i = 1}^n {\displaystyle\sum\limits_{k = 1}^c {{{({n_{ik}}{u_{ik}})}^m}} } (2 - 2K({X_i},{X_k}))\\ & \left( {1 - \alpha \frac{{\displaystyle\sum\limits_{j \in {N_R}} {K({X_j},{X_k})} }}{{{N_R}}}} \right) + \sum\limits_{i = 1}^n {{\lambda _i}\left( {1 - \sum\limits_{k = 1}^c {{u_{ik}}} } \right)} \end{split}$ (15)

 ${u_{ik}} = \frac{{{{\left( {(1 - K({X_i} - {X_k}))\left( {1 - \alpha \frac{{\displaystyle\sum\limits_{l \in {N_R}} {K({X_l},{X_k})} }}{{{N_R}}}} \right)} \right)}^{\frac{{ - 1}}{{m - 1}}}}}}{{\displaystyle\sum\limits_{j = 1}^c {{{\left( {(1 - K({X_i} - {X_j}))\left( {1 - \alpha \frac{{\displaystyle\sum\limits_{l \in {N_R}} {K({X_l},{X_j})} }}{{{N_R}}}} \right)} \right)}^{\frac{{ - 1}}{{m - 1}}}}} }}$ (16)
 ${X_k} = \frac{{\displaystyle\sum\limits_{i = 1}^n {{{({n_{ik}}{u_{ik}})}^m}\left[\!\! {\begin{array}{*{20}{l}} {\left( {1 - \alpha \frac{{\displaystyle\sum\limits_{j \in {N_R}} {K({X_{\rm{j}}},{X_k})} }}{{{N_R}}}} \right)K({X_i},{X_k}){X_i}}\\ { + \left( {(1 \!-\! K({X_i} \!-\! {X_j}))\alpha \frac{{\displaystyle\sum\limits_{l \in {N_R}} {K({X_l},{X_j})} }}{{{N_R}}}{X_j}} \right)} \end{array}} \!\!\right]} }}{{\displaystyle\sum\limits_{i = 1}^n {{{({n_{ik}}{u_{ik}})}^m}\left[ {\begin{array}{*{20}{l}} {\left( {1 - \alpha \frac{{\displaystyle\sum\limits_{j \in {N_R}} {K({X_{\rm{j}}},{X_k})} }}{{{N_R}}}} \right)K({X_i},{X_k})}\\ { + \left( {(1 - K({X_i} - {X_j}))\alpha \frac{{\displaystyle\sum\limits_{l \in {N_R}} {K({X_l},{X_j})} }}{{{N_R}}}} \right)} \end{array}} \right]} }}$ (17)

1.4 直方图确定初始聚类中心

 ${P_s} = ((i,{h_d}(i))|{h_d}(i) > {h_d}(i - 1)\& {h_d}(i) > {h_d}(i + 1))$ (18)
 ${V_s} = ((i,{h_d}(i))|{h_d}(i) < {h_d}(i - 1)\& {h_d}(i) < {h_d}(i + 1))$ (19)

1.5 图像后处理

 图 2 灰度图

 图 3 图像直方图

2 实验结果及分析

 $P = \dfrac{{{S_1}}}{{{S_2}}}{\rm{\% }}$ (20)
 $R = \dfrac{{{S_1}}}{{{S_3}}}{\rm{\% }}$ (21)

 图 4 实验结果图

3 结语

 [1] Davis JW, Sharma V. Background-subtraction in thermal imagery using contour saliency. International Journal of Computer Vision, 2007, 71(2): 161-181. DOI:10.1007/s11263-006-4121-7 [2] 毛峡, 石天朋. 光伏热斑图像有效区域分割算法研究. 太阳能学报, 2018, 39(5): 1270-1276. [3] Alamri SS, Kalyankar NV, Khamitkar S D. Image segmentation by using threshold techniques. arXiv:1005.4020,2010. [4] Zhang KH, Song HH, Zhang L. Active contours driven by local image fitting energy. Pattern Recognition, 2010, 43(4): 1199-1206. DOI:10.1016/j.patcog.2009.10.010 [5] Tao WN, Jin H, Liu J. Unified mean shift segmentation and graph region merging algorithm for infrared ship target segmentation. Optical Engineering, 2007, 46(12): 127002. DOI:10.1117/1.2823159 [6] Liu ZY, Zhou FG, Bai XZ. Infrared ship target segmentation based on region and shape features// 2013 14th International Workshop on Image Analysis for Multimedia Interactive Services. Paris, France. 2013. 1–4. [7] Chatzis SP, Varvarigou TA. A fuzzy clustering approach toward hidden markov random field models for enhanced spatially constrained image segmentation. IEEE Transactions on Fuzzy Systems, 2008, 16(5): 1351-1361. DOI:10.1109/TFUZZ.2008.2005008 [8] Chen L, Chen CLP, Lu MZ. A multiple-kernel fuzzy C-means algorithm for image segmentation. IEEE Transactions on Systems, Man, and Cybernetics, Part B, 2011, 41(5): 1263-1274. DOI:10.1109/TSMCB.2011.2124455 [9] 王坤, 张杨, 宋胜博, 等. 改进二维Otsu和自适应遗传算法的红外图像分割. 系统仿真学报, 2017, 29(6): 1229-1236. [10] 曲杨, 许卫东, 杨骏堂, 等. 基于边缘信息和Otsu的红外图像分割方法. 指挥控制与仿真, 2017, 39(6): 130-133. DOI:10.3969/j.issn.1673-3819.2017.06.027 [11] 黄永林, 叶玉堂, 乔闹生, 等. 基于快速模糊C均值聚类算法的红外图像分割. 强激光与粒子束, 2011, 23(6): 1467-1470. [12] Chan TF, Vese LA. Active contours without edges. IEEE Transactions on Image Processing, 2001, 10(2): 266-277. DOI:10.1109/83.902291 [13] 王启银, 薛建东, 任新辉. 一种自适应的变电站设备红外图像分割方法. 红外技术, 2016, 38(9): 770-773. [14] 蒲蓬勃, 王鸽, 刘太安. 基于粒子群优化的模糊C-均值聚类改进算法. 计算机工程与设计, 2008, 29(16): 4277-4279. [15] Lou XJ, LI JY, Liu HT. Improved fuzzy C-means clustering algorithm based on distance correction. Journal of Computer Applications, 2012, 32(3): 646-648. [16] Bai XZ, Chen ZG, Zhang Y, et al. Infrared ship target segmentation based on spatial information improved FCM. IEEE Transactions on Cybernetics, 2016, 46(12): 3259-3271. DOI:10.1109/TCYB.2015.2501848 [17] Zhang DQ, Chen SC. A novel kernelized fuzzy C-means algorithm with application in medical image segmentation. Artificial Intelligence in Medicine, 2004, 32(1): 37-50. DOI:10.1016/j.artmed.2004.01.012 [18] Li SY, Ma J. A kernel fuzzy clustering infrared image segmentation algorithm based on histogram and spatial restraint. 2016 9th International Congress on Image and Signal Processing, Biomedical Engineering and Informatics. Datong, China. 2017. 313–318. [19] Liu G, Yang CL, Zhang QQ, et al. Neighborhood weight fuzzy c-means kernel clustering based infrared image segmentation. IEEE International Conference on Information and Automation. Hailar, China. 2014. 451–454. [20] 王嘉栋, 李寒松. 自适应K-means图像分割方法. 导航定位与授时, 2016, 3(5): 66-69.