Print

发布时间: 2017-12-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.170255
2017 | Volume 22 | Number 12




    图像分析和识别    




  <<上一篇 




  下一篇>> 





融入邻域作用的高斯混合分割模型及简化求解
expand article info 石雪, 李玉, 李晓丽, 赵泉华
辽宁工程技术大学测绘与地理科学学院遥感科学与应用研究所, 阜新 123000

摘要

目的 基于高斯混合模型(GMM)的图像分割方法易受噪声影响,为此采用马尔可夫随机场(MRF)将像素邻域关系引入GMM,提高算法抗噪性。针对融入邻域作用的高斯混合分割模型结构复杂、参数估计困难,难以获得全局最优分割解等问题,提出一种融入邻域作用的高斯混合分割模型及其简化求解方法。方法 首先,构建融入邻域作用的GMM。为了提高GMM的抗噪性,采用MRF建模混合模型权重系数的先验分布。然后,利用贝叶斯理论建立图像分割模型,即品质函数;由于品质函数中参数较多(包括权重系数,均值,协方差)、函数结构复杂,导致参数求解困难。因此,将品质函数中的均值和协方差定义为权重系数的函数,由此简化模型结构并方便其求解;虽然品质函数中仅包含参数权重系数,但结构比较复杂,难以求得参数的解析式。最后,采用非线性共轭梯度法(CGM)求解参数,该方法仅需利用品质函数值和参数梯度值,降低了参数求解的复杂性,并且收敛快,可以得到全局最优解。结果 为了有效而准确地验证提出的分割方法,分别采用本文算法和对比算法对合成图像和高分辨率遥感图像进行分割实验,并定性和定量地评价和分析了实验结果。实验结果表明本文方法的有效抗噪性,并得到很好的分割结果。从参数估计结果可以看出,本文算法有效简化了模型参数,并获得全局最优解。结论 提出一种融入邻域作用的高斯混合分割模型及其简化求解方法,实验结果表明,本文算法提高了算法的抗噪性,有效地简化了模型参数,并得到全局最优参数解。本文算法对具有噪声的高分辨率遥感影像广泛适用。

关键词

高分辨率遥感图像分割; 高斯混合模型; 马尔可夫随机场; 共轭梯度法; 全局最优解

Gaussian mixture model with neighbor relationship for image segmentation and simplified solving method
expand article info Shi Xue, Li Yu, Li Xiaoli, Zhao Quanhua
The Institute for Remote Sensing, School of Geomatics, Liaoning Technical University, Fuxin 123000, China
Supported by: National Natural Science Foundation of China (41301479, 41271435);Natural Science Foundation of Liaoning Province, China (2015020090)

Abstract

Objective The development of remote sensing technology has improved the resolution of remote sensing images. Thus, high-resolution remote sensing image segmentation has become a major research topic in remote sensing image processing. Geometrical details in high-resolution remote sensing images are more obvious than those in moderate resolution images, but the improvement in spatial resolution increases the spectral similarity between different classes and spectral differences of the same class. This phenomenon leads to the reduction in the statistical separability of different classes, which involves many segmentation errors. Gaussian mixture model (GMM) is a method of modeling statistical distribution of data and is successfully applied to image segmentation. Modeling based on GMM image segmentation method presents some advantages and a simple structure. However, GMM only considers the effect of pixel itself on segmentation and is sensitive to image noise. The robustness of GMM is improved by introducing neighbor relationship into GMM using Markov random field (MRF). MRF-based GMM image segmentation methods using standard expectation maximization (EM) lead to a computational problem in estimating parameters, as EM fails to obtain the global solution of segmentation model. In this study, an image segmentation method is proposed to solve the above-mentioned problem in high-resolution remote sensing image segmentation. Method The proposed remote sensing image segmentation method combines GMM based on MRF and nonlinear conjugate gradient method (CGM). In the algorithm, GMM is used to model the statistical distribution of pixel intensity in a remote sensing image. The components of GMM are Gaussian distributions, which model the statistical distribution of pixel intensity of each homogeneous area. The MRF introduces the neighbor relationship into the GMM to reduce the noise effect. In other words, the prior distribution of weight coefficient of GMM is modeled by the MRF. The segmentation model, namely, the quality function, is built by combining GMM with prior distribution of GMM weight coefficient on the basis of Bayesian theory. The quality function includes a large number of parameters, such as weight coefficient, mean, and covariance, and possesses a fairly complicated structure. The problem results in difficulty in solving the model parameters. Therefore, the proposed algorithm defines the mean and covariance as the functions of weight coefficient depending on their relationships, thereby minimizing multiple parameters to only one. Although the quality function now involves only one parameter, its structure is still complicated. For solving the parameter, a nonlinear CGM is designed for estimation. This method only uses the value of the quality function and parameter gradient and reduces the complexity of the parameter solution. At the same time, its convergence is fast and the global optimal solution can be obtained. The loss function is defined as the negative quality function to obtain the optimal segmentation, and the formula derivation of gradient of weight coefficient can be calculated easily using the said function. Result Segmentation experiments are conducted using the proposed algorithm, GMM-CGM algorithm, and spatially variable finite mixture model (SVFMM). In testing the noise resistance of the proposed algorithm, salt-and-pepper noise is added in synthetic and high-resolution remote sensing images. Segmentation results demonstrate that the proposed algorithm effectively improves the noise resistance and obtain better results than those of the compared algorithms. Comparing the estimating parameters shows that the proposed algorithm can derive the global solution whereas the compared algorithms can obtain only the local solution. The overall accuracy and Kappa coefficient are calculated from confusion matrix and are compared with those of the compared algorithms to quantitatively evaluate the proposed algorithm. The accuracy values demonstrate that the proposed algorithm can achieve more precise segmentation results than those of the compared algorithms. Conclusion This study proposes a high-resolution remote sensing image segmentation method that combines GMM based on MRF with nonlinear CGM. The proposed approach is promising and effective and presents ideal results but still needs improvement. Nonlinear CGM method exhibits many other functions that can be used to estimate the model parameters. Other parameter estimation methods that can conveniently and accurately obtain the optimal solution will be used in future works.

Key words

high resolution remote sensing images segmentation; Gaussian mixture model; Markov random field; conjugate gradient method; global optimal solution

0 引言

在高分辨率遥感图像中,由于同一目标类内像素光谱测度统计分布一致性减弱,而不同目标类间像素光谱测度统计分布相似性增强,因此难以用单一分布模型有效刻画同质区域内像素光谱测度的统计分布规律[1]。针对高分辨率遥感图像的这一特点,基于高斯混合模型(GMM)的图像分割方法得到广泛应用。GMM利用多个高斯分布拟合图像光谱测度的分布特征,其中每个高斯分量描述图像中的一类地物的像素光谱测度统计分布特征。虽然高斯分布具有结构简单、易于表达图像光谱测度分布等特点[2],但大多数GMM仅利用图像像素光谱测度值,没有考虑像素之间的空间位置关系,这导致基于该类GMM的图像分割方法对图像噪声比较敏感,难以获得精确的分割结果[3-4]

为了提高GMM分割算法的抗噪性,马尔可夫随机场(MRF)被广泛用于建模高斯分量权重系数的先验分布,很大程度地提高了GMM的抗噪性[5-6]。该类方法通常采用期望值最大化(EM)方法[7]求解参数。由于MRF在提高GMM抗噪性的同时,增加了EM算法求解参数的难度,特别是对权重系数的求解,由于约束条件的限制,进一步增大其求解的复杂性[8-9]。此外,EM算法存在收敛慢、参数估计容易陷入局部最优解等缺点,进而限制了该类算法的可应用性[10-11]

Sanjay-Gopal等人[12]提出一种贝叶斯理论框架下空间可变有限混合模型(SVFMM)图像分割方法。该算法在GMM的基础上,采用Gibbs函数[13]建模高斯分量权重系数的先验分布,即用某像素的权重系数与其邻域权重系数差的平方和表征其先验分布,以提高算法的抗噪性。虽然该方法引入了空间邻域作用,但对于高强度噪声图像其抗噪性并不显著。为了克服SVFMM算法的缺陷,进一步提高算法的抗噪性,Nikou等人[14]在SVFMM算法的基础上,提出了自适应空间可变混合模型(A-SVFMM)图像分割算法。该算法采用MRF建模GMM权重系数的先验分布,假设其服从均值为0,具有一定方差的高斯分布,并设定其方差为与类别标号有关的随机变量。在利用EM算法求解上述模型参数的过程中,需要求解关于权重系数的一元二次方程,同时要满足权重系数的约束条件,从而导致求解参数解析式的过程比较复杂[9]

针对以上基于GMM的分割方法易受图像噪声影响、参数求解困难和易于陷入局部最优解的问题,提出一种融入邻域作用的多值GMM及其简化求解方法。首先构建GMM,并采用MRF建模混合模型权重系数的先验分布;利用贝叶斯理论建立图像分割模型,即品质函数;由于模型参数较多(包括权重系数、均值和协方差)、品质函数结构复杂,导致参数求解困难。因此,本文算法将高斯分布的均值和协方差定义为权重系数的函数,从而简化了模型参数;最后,通过非线性共轭梯度法(CGM)[15]求解参数。该方法仅需利用目标函数值和函数梯度值,收敛快,并得到全局最优解[16]。为了有效地验证本文算法,采用本文算法和对比算法分别对合成图像和高分辨率遥感图像进行了分割实验。实验结果表明本文方法可以有效去噪,得到准确的分割结果,并收敛于全局最优解。

1 算法描述

1.1 多值GMM模型

给定高分辨率遥感图像$ \mathit{\boldsymbol{z}} = \left\{ {{\mathit{\boldsymbol{z}}_i}\left( {{x_i}, {y_i}} \right)|i = 1, \cdots, n} \right\} $,其中, $i$ 为像素索引, $n$ 为总像素数,$ {z_i} = {\left( {{z_{iR}}, {z_{iG}}, {z_{iB}}} \right)^{\rm{T}}} $为RGB彩色空间中像素 $i$ 的光谱测度矢量,$ {{z_{iR}}, {z_{iG}}, {z_{iB}}} $分别为$ {\mathit{\boldsymbol{z}}_i} $的红、绿、蓝分量,$ \left( {{x_i}, {y_i}} \right) $ (D为像素 $i$ 的格点位置,D称为图像域。在基于统计理论的图像处理框架下, $z$ 可视为定义在D上的特征场$ Z = \left\{ {{Z_i}\left( {{x_i}, {y_i}} \right):i = 1, \cdots, n} \right\} $的实现,其中,$ {Z_i} = {\left( {{Z_{iR}}, {Z_{iG}}, {Z_{iB}}} \right)^{\rm{T}}} $为定义在$\left( {{x_i},{y_i}} \right) $上的随机光谱测度矢量,$ {\mathit{\boldsymbol{z}}_i} $$ {\mathit{\boldsymbol{Z}}_i} $的实现。

采用多值GMM刻画$ {\mathit{\boldsymbol{Z}}_i} $的概率分布,则$ {z_i} $的概率密度为

$ \begin{array}{*{20}{c}} {p\left( {{\mathit{\boldsymbol{z}}_i}\left| {{\mathit{\boldsymbol{w}}_i},\mathit{\boldsymbol{\mu }},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right.} \right) = }\\ {\sum\limits_{j = 1}^k {{w_{ij}}N\left( {{\mathit{\boldsymbol{z}}_i}\left| {{\mathit{\boldsymbol{\mu }}_j},{\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j}} \right.} \right)} = \sum\limits_{j = 1}^k {\left\{ {{w_{ij}}\frac{1}{{{{\left( {2{\rm{ \mathsf{ π} }}} \right)}^{s/2}}{{\left| {{\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j}} \right|}^{\frac{1}{2}}}}} \times } \right.} }\\ {\left. {\exp \left[ { - \frac{1}{2}{{\left( {{\mathit{\boldsymbol{z}}_i} - {\mathit{\boldsymbol{\mu }}_j}} \right)}^{\rm{T}}}\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j^{ - 1}\left( {{\mathit{\boldsymbol{z}}_i} - {\mathit{\boldsymbol{\mu }}_j}} \right)} \right]} \right\}} \end{array} $ (1)

式中, $s$ 为像素 $i$ 光谱测度矢量维数,对于彩色空间 $s$ =3。 $k$ 为混合模型中的分量数,亦为给定图像中欲分割的同质区域(类别)数。该类别数可以通过人工目视判读后给定; $j$ 为类别索引;$ {\mathit{\boldsymbol{w}}_i} = \left\{ {{w_{ij}}|j = 1, \cdots, k} \right\} $$ {{w_{ij}}} $为像素 $i$ 属于类别 $j$ 的权重系数,满足0 < $ {{w_{ij}}} $ < 1,$ \sum\limits_{j = 1}^k {{w_{ij}} = 1;{\mathit{\boldsymbol{\mu }}_j}} = {\left[{{\mu _{jR}}, {\mu _{jG}}, {\mu _{jB}}} \right]^{\rm{T}}} $为多值高斯分布中分量 $j$ 的均值矢量;$ \sum\nolimits_j {} $为多值高斯分布中分量 $j$ 的协方差矩阵。设协方差矩阵为$ \sum\nolimits_j { = {{\left[{{{\left( {\sigma _j^{lp}} \right)}^2}} \right]}_{3 \times 3}}} $,其中,$ {{{\left( {\sigma _j^{lp}} \right)}^2}} $表示波段 $l$ 与波段 $p$ 之间的相互作用系数,彩色空间中 $l$ = 1, …, 3, $p$ =1, …, 3。为了便于参数求解,忽略不同光谱波段之间的相互作用,即当 $l$ $p$ 时,令$ {{{\left( {\sigma _j^{lp}} \right)}^2}} $= 0。因此,协方差矩阵为对角阵,即$ {\mathit{\boldsymbol{\varSigma}}}_j { = {\rm{diag}}{{\left[{\sigma {{_j^{lp}}^2}} \right]}_{3 \times 3}}} $

假设各像素光谱测度矢量相互独立,则图像$ \mathit{\boldsymbol{z}} $的或然率为

$ \begin{array}{*{20}{c}} {p\left( {\mathit{\boldsymbol{z}}\left| {\mathit{\boldsymbol{w}},\mathit{\boldsymbol{\mu }},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right.} \right) = \prod\limits_{i = 1}^n {p\left( {{\mathit{\boldsymbol{z}}_i}\left| {{\mathit{\boldsymbol{w}}_i},\mathit{\boldsymbol{\mu }},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right.} \right)} = }\\ {\prod\limits_{i = 1}^n {\left\{ \begin{array}{l} \sum\limits_{j = 1}^k {{w_{ij}}\frac{1}{{{{\left( {2{\rm{ \mathsf{ π} }}} \right)}^{s/2}}{{\left| {{\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j}} \right|}^{1/2}}}} \times } \\ \exp \left[ { - \frac{1}{2}{{\left( {{\mathit{\boldsymbol{z}}_i} - {\mathit{\boldsymbol{\mu }}_j}} \right)}^{\rm{T}}}\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j^{ - 1}\left( {{\mathit{\boldsymbol{z}}_i} - {\mathit{\boldsymbol{\mu }}_j}} \right)} \right] \end{array} \right\}} } \end{array} $ (2)

式中,$ \mathit{\boldsymbol{w}} = \left\{ {{\mathit{\boldsymbol{w}}_i}|i = 1, \cdots n} \right\} $。如将$ {\mathit{\boldsymbol{w}}_i} $视为定义在像素 $i$ 格点上的先验类别矢量,$ \mathit{\boldsymbol{w}} $则为定义在图像域上的先验类别场。为了建模邻域作用,设$ \mathit{\boldsymbol{w}} $为MRF,其分布函数定义为

$ p\left( \mathit{\boldsymbol{w}} \right) = \frac{1}{A}\exp \left[ { - \beta \sum\limits_{i = 1}^n {\sum\limits_{j = 1}^k {\sum\limits_{m \in {N_i}} {{{\left( {{w_{ij}} - {w_{mj}}} \right)}^2}} } } } \right] $ (3)

式中, $A$ 为归一化常数,$ \beta $为邻域作用系数,设为常数;$ {\mathit{\boldsymbol{N}}_i} $为像素 $i$ 的邻域像素集合; $m$ 为邻域像素索引。根据贝叶斯定理,特征场$ \mathit{\boldsymbol{Z}} $和先验类别场$ \mathit{\boldsymbol{w}} $的联合概率分布函数为$ p\left( {\mathit{\boldsymbol{w}}, \mathit{\boldsymbol{z}};\mathit{\boldsymbol{\mu }}, \mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right) = p\left( {\mathit{\boldsymbol{z}}|\mathit{\boldsymbol{w}}, \mathit{\boldsymbol{\mu }}, \mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right)p\left( \mathit{\boldsymbol{w}} \right) $。据此,定义品质函数,

$ \begin{array}{*{20}{c}} {L\left( {\mathit{\boldsymbol{w}},\mathit{\boldsymbol{z}};\mathit{\boldsymbol{\mu }},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right) = \log p\left( {\mathit{\boldsymbol{w}},\mathit{\boldsymbol{z}};\mathit{\boldsymbol{\mu }},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right) - }\\ {\sum\limits_{i = 1}^n {\log \left[ {\sum\limits_{j = 1}^k {{w_{ij}}N\left( {{\mathit{\boldsymbol{z}}_i}\left| {{\mathit{\boldsymbol{\mu }}_j},{\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j}} \right.} \right)} } \right]} - }\\ {\beta \sum\limits_{i = 1}^n {\sum\limits_{j = 1}^k {\sum\limits_{m \in {N_i}} {{{\left( {{w_{ij}} - {w_{mj}}} \right)}^2}} } } } \end{array} $ (4)

令式(4)中参数集为$ \mathit{\boldsymbol{ \boldsymbol{\varTheta} }} = \left\{ {\mathit{\boldsymbol{w}}, \mathit{\boldsymbol{\mu }}, \mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right\} $。通过最大化品质函数求解参数。因此,图像分割过程即参数Θ求解过程。以最大化品质函数为原则,求解参数估计值,

$ \left( {\mathit{\boldsymbol{\hat w}},\mathit{\boldsymbol{\hat \mu }},\mathit{\boldsymbol{ \boldsymbol{\hat \varSigma} }}} \right) = \mathop {\arg \max }\limits_{\left( {\mathit{\boldsymbol{w}},\mathit{\boldsymbol{\mu }},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right)} L\left( {\mathit{\boldsymbol{w}},\mathit{\boldsymbol{z}};\mathit{\boldsymbol{\mu }},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}} \right) $ (5)

为实现图像分割,以最大化先验类别场为准则,确定像素类属性,即将像素 $i$ 的最大先验类别$ {w_{ij}} $所对应的类数标号 $j$ 作为该像素的类别

$ {y_i} = \mathop {\arg \max }\limits_{j = 1}^k \left\{ {{w_{ij}}\left| {i = 1, \cdots ,n} \right.} \right\} $ (6)

式中,$ {y_i} $为像素 $i$ 的类别标号。

1.2 约束参数分割模型

由品质函数式(4)可以看出,模型的参数较多。同时,品质函数的表达式比较复杂,包括对数和项、平方和项,使得参数求解比较困难,因此需要简化该模型参数。为此,根据均值和方差的估计式,将均值和方差定义为关于权重系数的加权平均式,即$ {\mathit{\boldsymbol{\mu }}_j} $$ {\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j} $定为$ {\mathit{\boldsymbol{w}}_i}\left( {i = 1, \cdots, n} \right) $的函数,即

$ {\mu _{jl}} = \frac{{\sum\limits_{i = 1}^n {{w_{ij}}{z_{il}}} }}{{\sum\limits_{i = 1}^n {{w_{ij}}} }},\sigma _{jl}^2 = \frac{{\sum\limits_{i = 1}^n {{w_{ij}}{{\left( {{z_{il}} - {\mu _{jl}}} \right)}^2}} }}{{\sum\limits_{i = 1}^n {{w_{ij}}} }} $ (7)

1.3 模型求解

联合式(4)(7),则品质函数中仅包含参数$ \mathit{\boldsymbol{w}} $,即品质函数是关于$ \mathit{\boldsymbol{w}} $的函数。通过最大化品质函数求解参数$ \mathit{\boldsymbol{w}} $,继而求解出均值向量和协方差矩阵。由于函数结构比较复杂,包括对数和项、平方和项,这使得对参数$ \mathit{\boldsymbol{w}} $的求导比较困难,因此难以直接求解参数$ \mathit{\boldsymbol{w}} $的解析式。

CGM是一种求解函数最小点的迭代算法。该方法的基本思想为,结合共轭性和最速下降方法构造出一组共轭方向,并沿此方向进行搜索,求出极小值。该方法收敛快,且可收敛到全局最优解,适用于复杂目标函数的参数求解。函数$ J\left( \mathit{\boldsymbol{w}} \right) $的等值面是以$ \mathit{\boldsymbol{w}} $*为中心的椭球面,$ \mathit{\boldsymbol{w}} $*为函数的极小点。通过求得搜索方向,达到极小点。

采用CGM算法求解参数时,对品质函数取负值作为损失函数,进而求解损失函数最小点(对应最大化品质函数),即

$ \begin{array}{*{20}{c}} {J\left( {{\mathit{\boldsymbol{w}}^{t + 1}}} \right) = - L\left( {{\mathit{\boldsymbol{w}}^{t + 1}}} \right) = }\\ { - \sum\limits_{i = 1}^n {\log \left[ {\sum\limits_{j = 1}^k {w_{ij}^{\left( {t + 1} \right)}N\left( {{\mathit{\boldsymbol{z}}_i}\left| {\mathit{\boldsymbol{\mu }}_j^{\left( t \right)},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j^{\left( t \right)}} \right.} \right)} } \right]} + }\\ {\beta \sum\limits_{i = 1}^n {\sum\limits_{j = 1}^k {\sum\limits_{m \in {N_j}} {{{\left( {w_{ij}^{\left( {t + 1} \right)} - w_{mj}^{\left( t \right)}} \right)}^2}} } } } \end{array} $ (8)

当采用非线性CGM求解损失函数的极小点时,参数迭代公式为

$ \mathit{\boldsymbol{w}}_i^{\left( {t + 1} \right)} = \mathit{\boldsymbol{w}}_i^{\left( t \right)} + {\lambda ^{\left( t \right)}}\mathit{\boldsymbol{d}}_i^{\left( t \right)} $ (9)

式中, $t$ 为迭代数;$ \lambda $为步长,为标量;$ {\mathit{\boldsymbol{d}}_i} = \left\{ {{d_{ij}}|j = 1, \cdots, k} \right\} $为搜索方向,$ {d_{ij}} $为像素 $i$ 关于类别 $j$ 的搜索方向。

利用CGM求解参数最优问题的关键在于确定搜索方向。搜索方向是当前点的负梯度方向和上一次搜索方向的线性组合,设初始搜索方向为初始点负梯度方向。搜索方向公式为

$ \mathit{\boldsymbol{d}}_i^{\left( t \right)} = \left\{ \begin{array}{l} - \mathit{\boldsymbol{g}}_i^{\left( t \right)}\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;t = 1\\ - \mathit{\boldsymbol{g}}_i^{\left( t \right)} + \eta _i^{\left( t \right)}\mathit{\boldsymbol{d}}_i^{\left( {t - 1} \right)}\;\;\;\;t \ge 2 \end{array} \right. $ (10)

式中,$ {\mathit{\boldsymbol{g}}_i} = \left\{ {{g_{ij}};j = 1, \cdots, k} \right\} $为目标函数关于$ {\mathit{\boldsymbol{w}}_i} $的梯度矢量,$ {g_{ij}} $为目标函数关于$ {w_{ij}} $的梯度值。为了便于梯度函数的求解,将均值向量和协方差矩阵看做第 $t$ -1次迭代的结果,损失函数和权重系数看做第 $t$ 次迭代结果,

$ \begin{array}{l} g_{ij}^{\left( t \right)} = - \frac{{N\left( {{\mathit{\boldsymbol{z}}_i}\left| {\mathit{\boldsymbol{\mu }}_j^{\left( {t - 1} \right)},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j^{\left( {t - 1} \right)}} \right.} \right)}}{{\sum\limits_{j = 1}^k {w_{ij}^{\left( t \right)}N\left( {{\mathit{\boldsymbol{z}}_i}\left| {\mathit{\boldsymbol{\mu }}_j^{\left( {t - 1} \right)},\mathit{\boldsymbol{ \boldsymbol{\varSigma} }}_j^{\left( {t - 1} \right)}} \right.} \right)} }} + \\ \;\;\;\;\;\;\;\;\;\;\;2\beta \sum\limits_{m \in {N_i}} {\left( {w_{ij}^{\left( t \right)} - w_{mj}^{\left( {t - 1} \right)}} \right)} \end{array} $ (11)

式中,$ \eta _i^{\left( t \right)} $为搜索方向参数[17]$ {\eta _i} $的不同选择形成了不同的共轭梯度法,其中,PRP(Polak-Ribiere-polyak)方法是数值表现最好的非线性共轭梯度法之一,$ {\eta _i} $定义为

$ \eta _i^{\left( t \right)} = \frac{{{{\left[ {\mathit{\boldsymbol{g}}_i^{\left( t \right)}} \right]}^{\rm{T}}}\left[ {\mathit{\boldsymbol{g}}_i^{\left( t \right)} - \mathit{\boldsymbol{g}}_i^{\left( {t - 1} \right)}} \right]}}{{{{\left\| {\mathit{\boldsymbol{g}}_i^{\left( {t - 1} \right)}} \right\|}^2}}} $ (12)

式中,$ \left\| {\; \cdot \;} \right\| $为向量范数。在迭代过程中要求搜索方向参数为非负值,若$ \eta _{\rm{i}}^{\left( t \right)} $小于0,则令其为0,以确保PRP共轭梯度法求解得到的搜索方向满足共轭性条件。

1.4 算法流程

综上所述,本文算法流程具体步骤如下:

1) 设置参数误差 $e$ ,邻域作用参数$ \beta $,步长$ \lambda $

2) 初始化权重系数$ {\mathit{\boldsymbol{w}}^{\left( t \right)}} $

3) 根据式(7)计算均值和方差;

4) 根据式(10)-式(12)计算梯度值$ {\mathit{\boldsymbol{g}}^{\left( t \right)}} $和方向$ {\mathit{\boldsymbol{d}}^{\left( t \right)}} $

5) 根据式(9)计算$ {\mathit{\boldsymbol{w}}^{\left( {t + 1} \right)}} $

6) 重复步骤3)-5),若$ \left\| {{\mathit{\boldsymbol{g}}^{\left( t \right)}}} \right\| < e $或者达到最大循环次数则停止;

7) 根据最大化先验类别场准则得到分割结果。

2 实验结果与讨论

为了验证提出的分割算法,在Intel Core i5-3470 3.20 GHz,4 GB内存,Matlab R2011a环境下分别采用本文算法和对比算法对合成图像和高分辨率遥感图像进行了分割实验,并对实验结果进行了分析。其中对比算法采用SVFMM算法[12]和GMM-CGM算法。SVFMM算法、GMM-CGM算法和本文算法均采用GMM建模图像像素强度统计分布。SVFMM算法中采用MRF建模邻域像素的空间关系,采用EM算法估计参数。GMM-CGM算法中未引入像素空间邻域关系,采用非线性CGM算法进行参数估计。在分割实验中,各算法参数设置如下。其中,本文算法参数设置如下,迭代次数设为4 000,误差 $e$ 设为5×10-4,步长设为0.004,噪声平滑参数$ \beta $设为0.5。SVFMM参数设置如下,迭代次数设为4 000,误差 $e$ 设为5×10-4,噪声平滑参数$ \beta $设为0.5。GMM-CGM算法参数设置如下,迭代次数设为4 000,误差 $e$ 设为5×10-4,步长设为0.004。

2.1 合成图像

为了定量评价提出的分割算法,根据图 1(a)的256×256像素尺度模板图,合成一幅包含3个同质区域的彩色图像,如图 1(b)所示。在合成彩色图像时,选取了颜色较为接近的区域,如绿色的田地和深绿色的森林,同时各区域的边界不规则。

图 1 模板图像和模拟图像
Fig. 1 Template for simulation and simulated image
((a) template for simulation; (b) simulated image)

为了充分验证本文算法的有效性、准确性和抗噪性,对模拟图像(图 1(b))添加2%的椒盐噪声,如图 2(a)所示。分别采用本文算法、SVFMM算法和GMM-CGM算法对图 2(a)进行分割实验,分割结果如图 2(b)(d)。其中,图 2(b)为采用本文算法得到的分割结果,图 2(c)为采用SVFMM算法得到的分割结果,图 2(d)为采用GMM-CGM算法得到的分割结果。对比分割结果可以看出,本文算法可以很好地将各同质区域分开,并准确地拟合出各区域的边界。由于图像噪声的影响,SVFMM算法和GMM-CGM算法的分割结果并不理想,没有将各同质区域分割开,存在区域误分割现象,同时分割结果中存在较多噪声点。

图 2 分割结果
Fig. 2 Segmentation results ((a) noising image; (b) ours; (c) SVFMM algorithm; (d) GMM-GM algorithm)

为了进一步目视定性评价本文算法,分别提取各算法分割结果的轮廓线叠加在原始模拟图像上,如图 3所示。其中,图 3(a)为本文算法分割结果的轮廓线叠加,图 3(b)为SVFMM算法分割结果的轮廓线叠加,图 3(c)为GMM-CGM算法分割结果的轮廓线叠加。从图 3结果可以更清楚地看出,本文算法优于对比算法。由于本文算法采用非线性CGM算法求解参数权重系数,并取得全局最优解,因此,可以得到很好的分割结果。

图 3 轮廓线叠加结果
Fig. 3 Outline overlaid results ((a) ours; (b) SVFMM algorithm; (c) GMM-CGM algorithm)

为了定量评价本文算法的分割结果,分别根据模板图像和各算法的分割结果生成混淆矩阵,并据此计算出产品精度、制图精度、总精度和Kappa系数,见表 1。从精度表中可以看出,本文算法对于该合成彩色图像的各项精度指标均达到96%以上。其中,用户精度在98%以上,制图精度在96%以上,总精度达到98%以上,Kappa值达到98%以上。而SVFMM算法的分割精度较低,各类别精度值差距较大。其中,用户精度最低值为4.12%,制图精度最低值为47.26%,总体精度为60.62%,Kappa值为41.77%。GMM-CGM算法的分割精度较低,其中,用户精度最低值为29.59%,制图精度最低值为43.45%,总精度为54.08%,Kappa值为44.43%。上述精度结果表明本文算法具有准确性。

表 1 用户精度、产品精度、总精度和Kappa系数
Table 1 User accuracy, product accuracy, overall accuracy and Kappa coefficient

下载CSV
/%
方法 精度指标 类别1 类别2 类别3
本文 用户精度 98.50 100 98.13
制图精度 98.17 96.93 99.70
总精度 98.76
Kappa 98.12
SVFMM 用户精度 97.10 96.68 4.12
制图精度 47.26 96.92 52.41
总精度 60.62
Kappa 41.77
GMM-CGM 用户精度 29.59 98.99 44.92
制图精度 95.33 53.92 43.45
总精度 54.08
Kappa 44.43

为了验证本文算法可以得到全局最优解,利用模板图像计算了图 1(b)中的各区域的均值,分别对两个算法得到的均值估计值进行了对比,并计算了相应的误差,如表 2。从均值估计值的误差对比可以看出,本文算法的均值估计值误差很小,均在12%误差以下,总体平均误差约为3%。但SVFMM算法和GMM-CGM算法的均值估计值误差比较大,SVFMM算法最大误差值达到了285%,GMM-CGM算法最大误差值达到了343%。该实验结果说明本文算法采用非线性CGM求解参数可以得到全局最优解。同时,由于均值是由权重系数计算得出,这说明本文算法所采用的参数简化方法具有有效性和准确性。

表 2 均值对照表
Table 2 Compare means

下载CSV
/%
算法 波段 类别1 类别2 类别3
估值 误差 估值 误差 估值 误差
本文 1 10.91 12.22 134.34 2.88 20.10 6.60
2 34.10 1.45 117.82 0.06 117.81 0.37
3 34.95 1.96 87.94 1.96 30.05 2.72
SVFMM 1 14.76 18.74 137.54 0.33 82.67 285.41
2 77.00 122.54 117.35 0.03 127.27 8.43
3 31.65 11.22 89.64 0.07 68.95 123.21
GMM-CGM 1 18.57 49.39 17.77 102.38 95.23 343.96
2 79.73 130.43 60.71 48.44 112.05 4.51
3 32.22 9.32 35.14 60.82 66.70 25.59

图 4为本文算法和对比算法在4 000次迭代中均值随迭代次数变化的曲线。其中,图 4(a)为本文算法的各类别均值迭代结果,图 4(b)为SVFMM算法的各类别均值迭代结果,图 4(c)为GMM-CGM算法的各类别均值迭代结果。从图 4可以看出,本文算法分别在1 500次、200次、1 300次开始收敛,SVFMM算法分别在1 300次、1 200次、2 000次开始收敛,GMM-CGM算法分别在2 500次、3 500次、3 500次开始收敛。该实验结果说明本文算法收敛速度较快,并且收敛于全局最优解。经过4 000次迭代本文算法的平均运行时间为4 min。

图 4 不同算法的均值变化
Fig. 4 Average convergence image of different algorithms ((a) ours; (b) SVFMM algorithm; (c) GMM-CGM algorithm)

为了验证本文算法对噪声平滑参数$ \beta $的敏感性,分别选取$ \beta $=0.25, 0.5, 0.6, 0.8对合成图像进行分割实验,结果如图 5所示。从实验结果可以看出,当$ \beta $=0.25和0.5时可以得到理想的分割结果,当$ \beta $=0.6时分割结果中存在一些噪声点,当$ \beta $=0.8时,分割结果中出现错分割现象。当$ \beta $小于0.25时权重系数出现负值不符合其约束条件。该实验结果表明,当参数$ \beta $取值范围在0.25~0.5时,本文算法可以得到理想的分割结果。

图 5 不同噪声平滑参数分割结果
Fig. 5 Segmentation results of different controlling noise parameter ((a) $ \beta $=0.25; (b) $ \beta $=0.5; (c) $ \beta $=0.6; (d) $ \beta $=0.8)

2.2 高分辨率遥感图像

图 6(a)为256×256像素大小、IKONOS卫星的真彩色遥感图像,分辨率为1 m。图 6(b)(c)为256×256像素大小、WorldView-2卫星的真彩色遥感图像,分辨率为0.5 m。图 6(a)为绿化带;图 6(b)为农田;图 6(c)为海岸带地区。为了验证本文算法的抗噪性,对图 6遥感图像添加2%的椒盐噪声,如图 7所示。通过目视判读,将遥感图像的类别数分别设置为2、3、3。分别采用本文算法和对比算法对图 7进行分割实验。对比算法分别为SVFMM图像分割方法和GMM-CGM算法,其中,GMM-CGM算法采用GMM构建分割模型,并未引入邻域关系和参数简化,采用非线性CGM方法进行参数估计。

图 6 遥感图像
Fig. 6 Remote sensing images ((a) desert and forest; (b) farmland; (c) coast)
图 7 添加噪声后遥感图像
Fig. 7 Remote sensing image of adding noise ((a) desert and forest; (b) farmland; (c) coast)

图 8为对图 7进行分割实验得到的分割结果。其中,图 8(a)为采用SVFMM算法得到的分割结果;图 8(b)为采用GMM-CGM算法得到的分割结果;图 8(c)为采用本文算法得到的分割结果;图 8(d)为提取本文算法分割结果的轮廓线(红色线)叠加在原始图像上的结果图。比较SVFMM算法和本文算法的分割结果可以看出,SVFMM算法的分割结果中存在较多的噪声点,其中,图 8(a)中存在误分割区域,如蓝色的海岸和深灰色的屋顶。SVFMM算法和本文算法中都加入了邻域作用,而SVFMM算法采用EM算法进行参数求解,得到的是局部最优解,本文算法采用非线性CGM算法进行参数求解,得到的是全局最优解。通过实验的对比可以看出,本文算法的分割结果优于SVFMM算法。比较GMM-CGM算法和本文算法的分割结果可以看出,GMM-CGM算法的结果中存在较多的噪声点,其中,图 8(b)农田图中旱地区域被误分了绿色的田地。说明本文算法中引入的邻域作用有很好的抗噪性。轮廓线叠加结果进一步说明了,本文算法的结果优于对比算法的结果。

图 8 图像分割结果
Fig. 8 Segmentation results and outlines overlaid
((a) SVFMM algorithm; (b) GMM-CGM algorithm; (c) ours; (d) outline overlaid of ours)

为了对高分辨率遥感图像进行定量的评价,根据图 6的遥感图像绘制标准图像,结合图 8中各算法分割结果生成混淆矩阵,计算出各算法的产品精度、制图精度、总精度和Kappa系数,见表 3表 3图 6分割结果的精度评价。对比各算法分割结果的精度指标可以看出,本文算法的精度均高于对比算法。表 3中,图 6(c)的SVFMM算法的精度相对较低,其中,用户精度中最低值是4.67%,最高值是95.50%。由于SVFMM算法的分割结果中存在误分割,导致各类别精度值出现这一现象。表 3的精度评价结果表明,本文算法在高分辨率遥感图像分割中具有较高的分割精度。

表 3 分割结果的精度评价
Table 3 The accuracy evaluation of segmentation results

下载CSV
/%
图像 算法 精度指标 类别1 类别2 类别3
图 6(a) 本文 用户精度 99.13 98.62 -
制图精度 97.27 99.56 -
总精度 98.79
Kappa 97.30
SVFMM 用户精度 96.66 98.25 -
制图精度 96.48 98.34 -
总精度 97.72
Kappa 94.99
GMM-CGM 用户精度 94.84 97.05 -
制图精度 98.03 97.48 -
总精度 97.65
Kappa 94.83
图 6(b) 本文 用户精度 94.12 99.70 99.28
制图精度 95.83 99.11 99.50
总精度 98.23
Kappa 98.96
SVFMM 用户精度 88.89 96.07 96.71
制图精度 81.70 96.90 97.79
总精度 95.63
Kappa 92.73
GMM-CGM 用户精度 86.46 97.35 79.76
制图精度 84.52 82.47 98.87
总精度 88.51
Kappa 81.80
图 6(c) 本文 用户精度 1 84.39 91.88
制图精度 81.57 86.99 97.95
总精度 91.14
Kappa 86.22
SVFMM 用户精度 95.50 4.67 83.92
制图精度 37.01 21.43 94.11
总精度 62.55
Kappa 49.21
GMM-CGM 用户精度 97.19 82.80 90.01
制图精度 84.90 86.77 92.29
总精度 89.18
Kappa 83.37

3 结论

提出了一种融入邻域作用的多值GMM遥感图像分割方法,并通过构建GMM权重系数与均值方差的关系简化了其求解过程。传统高斯混合分割模型没有考虑邻域像素之间的关系,对图像噪声比较敏感。因此,利用MRF将像素空间位置关系作用于GMM的权重系数,用于提高GMM的抗噪性,但也增加了品质函数复杂性,导致模型参数求解比较困难。为此,本文算法采用非线性CGM进行参数求解,该方法仅需利用目标函数值和梯度函数值,克服了参数解析式求解困难的缺点,同时该方法收敛速度快,可以得到全局最优解,得到很好的分割结果。本文算法中采用固定步长,在今后的研究中,将针对步长这一问题展开研究。

参考文献

  • [1] Zhao Q H, Zhao X M, Li Y. A fuzzy ISODATA approach combing hidden Markov random field model for high resolution remote sensing image segmentation[J]. Journal of Signal Processing, 2016, 32(2): 157–166. [赵泉华, 赵雪梅, 李玉. 结合HMRF模型的模糊ISODATA高分辨率遥感图像分割[J]. 信号处理, 2016, 32(2): 157–166. ] [DOI:10.16798/j.issn.1003-0530.2016.02.005]
  • [2] McLachlan G J, Peel D. Finite Mixture Models[M]. New York: John Wiley & Sons, 2000: 1-37.
  • [3] Shen X H, Lv D Z, Wan R C. Spatially variant finite mixture model[J]. Journal of Image and Graphics, 2014, 19(12): 1820–1828. [申小虎, 吕导中, 万荣春. 空间可变有限混合模型[J]. 中国图象图形学报, 2014, 19(12): 1820–1828. ] [DOI:10.11834/jig.20141214]
  • [4] Hou Y, Yang Y, Rao N, et al. Mixture model and Markov random field-based remote sensing image unsupervised clustering method[J]. Opto-Electronics Review, 2011, 19(1): 83–88. [DOI:10.2478/s11772-010-0070-3]
  • [5] Li S Z. Markov Random Field Modeling in Image Analysis[M]. 3rd ed. London: Springer-Verlag, 2009: 21-29.
  • [6] Zhao X M, Li Y, Zhao Q H. Hidden Markov Gaussian random field based fuzzy clustering algorithm for high-resolution remote sensing image segmentation[J]. Acta Electronica Sinica, 2016, 44(3): 679–686. [赵雪梅, 李玉, 赵泉华. 基于隐马尔可夫高斯随机场模型的模糊聚类高分辨率遥感影像分割算法[J]. 电子学报, 2016, 44(3): 679–686. ] [DOI:10.3969/j.issn.0372-2112.2016.03.028]
  • [7] Diplaros A, Vlassis N, Gevers T. A spatially constrained generative model and an EM algorithm for image segmentation[J]. IEEE Transactions on Neural Networks, 2007, 18(3): 798–808. [DOI:10.1109/TNN.2007.891190]
  • [8] Blekas K, Likas A, Galatsanos N P, et al. A spatially constrained mixture model for image segmentation[J]. IEEE Transactions on Neural Networks, 2005, 16(2): 494–498. [DOI:10.1109/TNN.2004.841773]
  • [9] Nikou C, Likas A C, Galatsanos N P. A Bayesian framework for image segmentation with spatially varying mixtures[J]. IEEE Transactions on Image Processing, 2010, 19(9): 2278–2289. [DOI:10.1109/TIP.2010.2047903]
  • [10] Wang W H, Feng Q J, Liu L, et al. Segmentation of brain MR images through class-adaptive Gauss-Markov random field model and the EM algorithm[J]. Journal of Image and Graphics, 2008, 13(3): 488–493. [王文辉, 冯前进, 刘磊, 等. 基于类自适应高斯-马尔可夫随机场模型和EM算法的MR图像分割[J]. 中国图象图形学报, 2008, 13(3): 488–493. ] [DOI:10.11834/jig.20080319]
  • [11] Zhao Y J, Zhao Y S, Zhao C. Maximum likelihood TDOA-FDOA estimator using Markov Chain Monte Carlo sampling[J]. Journal of Electronics & Information Technology, 2016, 38(11): 2745–2752. [赵拥军, 赵勇胜, 赵闯. 基于马尔可夫键蒙特卡洛抽样的最大似然时差-频差联合估计算法[J]. 电子与信息学报, 2016, 38(11): 2745–2752. ] [DOI:10.11999/JEIT160050]
  • [12] Sanjay-Gopal S, Hebert T J. Bayesian pixel classification using spatially variant finite mixtures and the generalized EM algorithm[J]. IEEE Transactions on Image Processing, 1998, 7(7): 1014–1028. [DOI:10.1109/83.701161]
  • [13] Yan G, Chen W F, Feng Y Q. Generalized fuzzy Gibbs random field and research on algorithm for MR image segmentation[J]. Journal of Image and Graphics, 2005, 10(9): 1082–1088. [颜刚, 陈武凡, 冯衍秋. 广义模糊Gibbs随机场与MR图像分割算法研究[J]. 中国图象图形学报, 2005, 10(9): 1082–1088. ] [DOI:10.11834/jig.200509199]
  • [14] Nikou C, Galatsanos N P, Likas A C. A class-adaptive spatially variant mixture model for image segmentation[J]. IEEE Transactions on Image Processing, 2007, 16(4): 1121–1130. [DOI:10.1109/TIP.2007.891771]
  • [15] Li Y L, Shen Y. Fast mean shift for image segmentation based on conjugate gradient[J]. Opto-Electronic Engineering, 2009, 36(8): 94–99. [李艳灵, 沈轶. 基于共轭梯度法的快速Mean Shift图像分割[J]. 光电工程, 2009, 36(8): 94–99. ] [DOI:10.3969/j.issn.1003-501X.2009.08.018]
  • [16] Nocedal J, Wright S J. Numerical Optimization[M]. 2nd ed. New York: Springer, 2006: 101-133.
  • [17] Du X, Huang H M, Yang Y. Computation of the step of conjugate gradient method based on golden-section[J]. Bulletin of Science and Technology, 2016, 32(6): 1–4, 9. [杜雄, 黄慧明, 杨艳. 基于黄金分割的共轭梯度法步长求取方法[J]. 科技通报, 2016, 32(6): 1–4, 9. ] [DOI:10.13774/j.cnki.kjtb.2016.06.001]