|
发布时间: 2020-05-16 |
图像分析和识别 |
|
|
收稿日期: 2019-08-19; 修回日期: 2019-09-20; 预印本日期: 2019-09-27
基金项目: 国家自然科学基金项目(61772294)
第一作者简介:
王洁, 1994年生, 女, 硕士研究生, 主要研究方向为变分图像复原与图像分割。E-mail:wangjqdy@163.com;
魏伟波, 男, 副教授, 主要研究方向为图像处理、目标识别与跟踪。E-mail:njustwwb@163.com; 徐子森, 男, 高级工程师, 主要研究方向为医学工程、医学影像图像后处理。E-mail:Zisen_xu@126.com.
中图法分类号: TP391
文献标识码: A
文章编号: 1006-8961(2020)05-0926-10
|
摘要
目的 多相图像分割是图像处理与分析的重要问题,变分图像分割的Vese-Chan模型是多相图像分割的基本模型,由于该模型使用较少的标签函数构造区域划分的特征函数,具有求解规模小的优点。图割(graph cut,GC)算法可将上述能量泛函的极值问题转化为最小割/最大流问题求解,大大提高了计算效率。连续最大流(continuous max-flow,CMF)方法是经典GC算法的连续化表达,不仅具备GC算法的高效性,且克服了经典GC算法由于离散导致的精度下降问题。本文提出基于凸松弛的多相图像分割Vese-Chan模型的连续最大流方法。方法 根据划分区域编号的二进制表示构造两类特征函数,将多相图像分割转化为多个交替优化的两相图像分割问题。引入对偶变量将Vese-Chan模型转化为与最小割问题相对应的连续最大流问题,并引入Lagrange乘子设计交替方向乘子方法(alternating direction method of multipliers,ADMM),将能量泛函的优化问题转化为一系列简单的子优化问题。结果 对灰度图像和彩色图像进行数值实验,从分割效果看,本文方法对于医学图像、遥感图像等复杂图像的分割效果更加精确,对分割对象和背景更好地分离;从分割效率看,本文方法减少了迭代次数和运算时间。在使用2个标签函数的分割实验中,本文方法运算时间加速比分别为6.35%、10.75%、12.39%和7.83%;在使用3个标签函数的分割实验中,运算时间加速比分别为12.32%、15.45%和14.04%;在使用4个标签函数的分割实验中,运算时间加速比分别为16.69%和20.07%。结论 本文提出的多相图像分割Vese-Chan模型的连续最大流方法优化了分割效果,减少了迭代次数,从而提高了计算效率。
关键词
多相图像分割; Vese-Chan模型; 凸松弛; 连续最大流方法; 交替方向乘子方法
Abstract
Objective Multiphase image segmentation, an extension of two-phase image segmentation, is designed to partition images automatically into different regions according to different image features. It is a basic problem in image processing, image analysis, and computer vision. Variational image segmentation Vese-Chan model is a basic model of multiphase image segmentation that can construct characteristic functions for different phases or regions using fewer label functions, thus producing small-scale solutions. Graph cut (GC) algorithm can transform the optimization problem of energy function into the min-cut/max-flow problem, which greatly improves computational efficiency. In the spatially discrete setting, the computational results of the min-cut method are influenced by the discrete grid, resulting in measurement errors. In recent years, the continuous max-flow (CMF) method was proposed. As a continuous expression of the classical GC algorithm, CMF can keep the high efficiency of the GC algorithm and overcome measurement errors caused by the discretization of the classical GC algorithm. On the basis of the framework of variational theory, the CMF method for multiphase image segmentation Potts model and two-phase image segmentation Chan-Vese model was proposed and studied. However, a CMF method for the Vese-Chan model has not been studied. Therefore, we propose a CMF method for multiphase image segmentation Vese-Chan model based on convex relaxation and study its computational effectiveness and efficiency. Method In this study, binary label functions are used to construct different characteristic functions for different phases according to the relationship between a natural number and a binary representation of partitioned regions. The characteristic functions are divided into two parts according to the value of binary expression, i.e., 0 or 1. The characteristic functions are different. The date term of the segmentation model is also divided into two parts. Therefore, multiphase image segmentation can be transformed into two-phase image segmentation. This model can be expressed as a symmetric form of label functions, which are beneficial to interpret and realize. We introduce three dual variables, namely, source flow, sink flow, and spatial flow field. Next, we rewrite the optimization problem of energy function for the Vese-Chan model, including the above three dual variables. Flow conservation conditions are obtained by solving minimum problems of energy function. The Vese-Chan model can be transformed into a continuous max-flow problem corresponding to the min-cut problem. To improve computational efficiency in the experiments, we likewise design the alternating direction method of multipliers (ADMM) by introducing Lagrange multipliers and penalty parameters for the proposed model. The main idea of alternating optimization is to solve the optimization problem of one variable by fixing other variables. Therefore, the optimization problem of energy function can be transformed into three simple sub-problems of optimization, which can be achieved and solved more easily. For example, to solve one sub-problem on the source flow variable, the sink flow variable and spatial flow field variable should be fixed. Three dual variables must be calculated and Lagrange multipliers should be updated at each step. All of these variable need projection to satisfy the range of values. When the energy error formula is satisfied, the computational iteration stops. To represent the boundary of images after segmenting, it is necessary to threshold convex relaxed label functions into binary label functions. Finally, we can obtain segmentation results according to the binary label functions. Result Numerical experiments are performed on gray and colored images. According to the area numbers of images, numerical experiments are divided into three parts: experiments using two binary label functions, three binary label functions, and four binary label functions. Segmentation results are represented by curves of different colors. In particular, to accurately represent the segmentation effects for complicated images, we obtain the approximate segmentation results. For the segmentation effectiveness, experimental results prove that the ADMM method and our proposed method have the same segmentation effectiveness for simple synthetic images. However, compared with ADMM, our proposed method is more accurate for complex images, such as medical and remote sensing images. Moreover, our method can achieve better separation for segmented objects and background. For the computational efficiency, we use two binary label functions to compare the efficiency of four gray images, including synthetic images, a natural image, and a medical image. The acceleration ratios of computational time for our proposed method are 6.35%, 10.75%, 12.39%, and 7.83%, respectively. For the experiment of three binary label functions, three gray images are compared, including synthetic images and a remote sensing image are compared. The computational times of our proposed method improve by 12.32%, 15.45%, and 14.04% for each image. For the experiment of four binary label functions, we compare two color images, including a natural image and a synthetic image. The computational times of our proposed method improve by 16.69% and 20.07%. In the experiments, our proposed method reduces the number of iterations and improves the convergence speed. By comparing the acceleration ratio of computational time with the increase of region phases or the complexity of the image, the advantages of the computational efficiency for our method are more evident. Conclusion Continuous max-flow method is used to solve the multiphase image segmentation Vese-Chan model. Numerical experiments are performed to demonstrate the superiority of our method in terms of computational effectiveness and efficiency for medical images, remote sensing images, and color images. Our method can be applied to multiphase segmentation for three-dimensional reconstruction of medical images in the future.
Key words
multiphase image segmentation; Vese-Chan model; convex relaxation; continuous max-flow method(CMF); alternating direction method of multipliers(ADMM)
0 引言
多相图像分割的目的是根据图像特征将其自动划分为互相毗邻且不重叠的多个区域,是对两相图像分割问题研究的扩展,在医学、交通、遥感等领域的图像处理与分析中具有大量实际应用(Li等,2016;Spencer等,2019)。近几年,多相图像分割的变分模型还为高维数据的分析与分类(郑世秀,2017)奠定了重要基础。
变分图像分割方法使用连续或离散水平集函数构造不同区域的特征函数,后者又称为离散标签函数。Potts模型(Potts,1952)是多相图像分割变分模型的基础,Samson等人(2000)提出了使用n个连续水平集函数构造n个区域特征函数的多相图像分割方法,但必须添加单纯形约束以避免间隙和重叠问题。为了自动满足单纯形约束条件,潘振宽等人(2009)提出使用n-1个水平集函数设计n个特征函数的区域划分方法。为减少水平集函数的个数,Vese和Chan(2002)基于四色定理,使用m个水平集函数针对不同区域设计2m个特征函数。为了进一步降低模型的规模,Chung和Vese(2005)提出用1个水平集函数划分多相区域的分割模型,但特征函数的次数较高,不利于优化求解。Lie等人(2006)将连续水平集函数推广到离散水平集函数,提出用m个二值标签函数定义2m个特征函数的多相分割模型。Li等人(2010)还提出使用n个离散水平集函数划分n个区域的分割方法。近年来,快速分裂Bregman方法(split Bregman method, SBM)、对偶方法(dual method, DM)、增广拉格朗日方法(augmented Lagrangian method, ALM)应用于全变差(total variation, TV)模型中(Wu和Tai,2010),避免计算由TV规则项产生的曲率项,并有效提高计算效率。但使用离散水平集表示特征函数,变分模型变为非凸的,通常需要通过标签函数凸松弛(Baxter等,2017)将离散问题转化为连续问题,进一步通过凸优化及阈值化求解能量泛函的最优解。
为了提高分割计算效率,Greig等人(1989)引入一种高效的图割(graph cut,GC)算法,将能量泛函的极值问题转化为最大流/最小割问题。Boykov等人(2001),Bae和Tai(2009)将最小割方法应用到离散标签函数的图像分割模型。根据最大流和最小割定理,最小割问题可以转换为从源点到汇点的网络最大流问题。离散最大流方法存在度量误差,并且不能并行执行。为了避免该局限性,Yuan等人(2010a)通过引入对偶变量,提出与图割方法等价的连续最大流(continuous max-flow method,CMF)方法求解分割模型(Bae等,2014)。为了提高分割精度,杨晓艺等人(2013)提出空间流约束变量为非负函数的连续最大流模型及算法。为了提高多相图像分割的计算效率,Yuan等人(2010b)将CMF方法拓展到以Potts模型为基础的能量泛函极值问题。
由上述分析可见,多相图像分割Vese-Chan模型所用水平集函数的数量较少,定义的特征函数次数较低,从而模型的计算效率适中、优化计算性态较好,并得到了大量推广。本文拟基于标签函数表达的多相图像分割Vese-Chan模型,设计其快速的连续最大流方法。为此,首先引入多个对偶变量,将能量泛函的极小值问题转化为基于源流的能量泛函极大值问题。然后,引入Lagrange乘子和惩罚参数,为该模型设计交替方向乘子方法(alternating direction method of multipliers,ADMM)(Goldstein等,2014;Xiu等,2019)。最后,本文对所设计的算法进行数值实验,并验证其分割效果与计算效率。
1 相关研究工作基础
1.1 Chan-Vese模型的连续最大流方法
Chan和Vese(2001)提出了基于连续水平集函数的Chan-Vese模型,其定义为
$ \mathop {\min }\limits_{{u_1}, {u_2}, \varphi } \left\{ {\begin{array}{*{20}{l}} {E\left({{u_1}, {u_2}, \varphi } \right) = {\alpha _1}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_1}} H(\varphi){\rm{d}}x + }\\ {{\alpha _2}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_2}} (1 - H(\varphi)){\rm{d}}x + }\\ {\gamma \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left| {\nabla H(\varphi)} \right|} {\rm{d}}x} \end{array}} \right\} $ | (1) |
式中,
$ \left| {{\nabla _\varphi }(x)} \right| = 1 $ | (2) |
Chan等人(2006)使用凸方法分割连续图像区域,将离散标签函数
$ \mathop {\min }\limits_{{u_1}, {u_2}, \phi \in [0, 1]} \left\{ {\begin{array}{*{20}{l}} {E\left({{u_1}, {u_2}, \phi } \right) = {\alpha _1}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_1}\phi {\rm{d}}x + } }\\ {{\alpha _2}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_2}(1 - \phi){\rm{d}}x + } }\\ {\gamma \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {|\nabla \phi |{\rm{d}}x} } \end{array}} \right\} $ | (3) |
对于图像任意一点
$ \mathop {\min }\limits_{\phi \in [0,1]} {\mkern 1mu} \mathop {\max }\limits_{\begin{array}{*{20}{c}} {{q_t} \le {Q_1},}\\ {\begin{array}{*{20}{c}} {{q_s} \le {Q_2},}\\ {|\mathit{\boldsymbol{p}}| \le \gamma {\rm{ }}} \end{array}} \end{array}} {\mkern 1mu} \left\{ {\begin{array}{*{20}{l}} {E\left( {\phi ,{q_t},{q_s},\mathit{\boldsymbol{p}}} \right) = \int_{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}{\rm{ }}} {{q_t}} \phi {\rm{d}}x + }\\ {\int_{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}{\rm{ }}} {{q_s}} (1 - \phi ){\rm{d}}x + \int_{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}{\rm{ }}} \phi \nabla \cdot \mathit{\boldsymbol{p}}{\rm{d}}x = }\\ {\int_{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}{\rm{ }}} {{q_s}} {\rm{d}}x + \int_{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}{\rm{ }}} \phi \left( {{q_t} - {q_s} + \nabla \cdot \mathit{\boldsymbol{p}}} \right){\rm{d}}x} \end{array}} \right\} $ | (4) |
式中,
$ {q_t} - {q_s} + \nabla \cdot \mathit{\boldsymbol{p}} = 0 $ | (5) |
由极大值问题可将Chan-Vese模型的能量泛函极小值转化为源流的极大值
$ \mathop {\max }\limits_{{q_t}{Q_1}} \mathop {\max }\limits_{{q_s}{Q_2}} \mathop {\max }\limits_{|\mathit{\boldsymbol{p}}|\gamma } \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{q_s}{\rm{d}}x} $ | (6) |
1.2 Potts模型的连续最大流方法
Potts模型是变分多相图像分割的基础,其图像区域
$ \mathit{\boldsymbol{ \boldsymbol{\varOmega} }} = \bigcup\limits_{i = 1}^n {{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_i}, {\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_i}} \bigcap\limits_{i \ne j} {{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_j} = } \emptyset $ | (7) |
其能量泛函的极值问题为
$ \mathop {\min }\limits_{\left\{ {{u_i}} \right\}_{i = 1}^n} \mathop {\min }\limits_{\left\{ {{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_i}} \right\}_{i = 1}^n} \left\{ {\sum\limits_{i = 1}^n \alpha \int_{{\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_i}} {{Q_i}} {\rm{d}}x + \sum\limits_{i = 1}^n \gamma \left| {\partial {\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_i}} \right|} \right\} $ | (8) |
式中,
对于多相分割而言,为每个区域分配一个特征函数
$ \mathop {\min }\limits_{\left\{ {{u_i}} \right\}_{i = 1}^n} \left\{ {\mathop \sum \limits_{i = 1}^n \alpha \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_i}{\chi _i}{\rm{d}}x + \mathop \sum \limits_{i = 1}^n \gamma \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left| {{\nabla _{{\chi _i}}}} \right|{\rm{d}}x} } } \right\} $ | (9) |
为了满足式(7),需要满足单纯性约束
$ \mathop \sum \limits_{i = 1}^n {\chi _i}(x) = 1 $ | (10) |
Yuan等人(2010b)提出基于Potts模型的连续最大流方法,给定连续区域
$ \mathop {\max }\limits_{{q_s}, {q_i}, {\mathit{\boldsymbol{p}}_i}} \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{q_s}{\rm{d}}x} $ | (11) |
且满足以下两个流约束
$ \begin{array}{*{20}{c}} {{q_i}{Q_i}, \;\;\left| {{\mathit{\boldsymbol{p}}_i}} \right|\gamma }\\ {{q_i} - {q_s} + \nabla \cdot {\mathit{\boldsymbol{p}}_i} = 0} \end{array} $ | (12) |
2 Vese-Chan模型的连续最大流方法
2.1 Vese-Chan模型
Vese和Chan提出基于变分水平集框架的多相分割Vese-Chan模型,使用
$ \mathop {\min }\limits_\varphi \left\{ {E(\varphi) = \mathop \sum \limits_{i = 1}^{{2^m}} \alpha \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_i}{\chi _i}{\rm{d}}x + \mathop \sum \limits_{j = 1}^m \gamma } \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left| {\nabla H\left({{\varphi _j}} \right)} \right|{\rm{d}}x} } \right\} $ | (13) |
式中,特征函数
$ \begin{array}{*{20}{c}} {{\chi _i} = \prod\limits_{j = 1}^m \mathit{\Psi } \left({{\varphi _j}} \right)}\\ {\mathit{\Psi }\left({{\varphi _j}} \right) = \left\{ {\begin{array}{*{20}{l}} {H\left({{\varphi _j}} \right)}&{x \in {\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_j}}\\ {1 - H\left({{\varphi _j}} \right)}&{x \notin {\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_j}} \end{array}} \right.} \end{array} $ | (14) |
连续水平集函数
Lie等人(2006)使用
$ \mathop {\min }\limits_{\phi \in [0, 1]} \left\{ {E(\phi) = \mathop \sum \limits_{i = 1}^{{2^m}} \alpha \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_i}{\chi _i}{\rm{d}}x + \mathop \sum \limits_{j = 1}^m \gamma } \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left| {\nabla {\phi _j}} \right|{\rm{d}}x} } \right\} $ | (15) |
式中,特征函数
$ \begin{array}{l} {\chi _i} = \prod\limits_{j = 1}^m \mathit{\Psi } \left({{\phi _j}} \right)\\ \mathit{\Psi }\left({{\phi _j}} \right) = \left\{ {\begin{array}{*{20}{l}} {{\phi _j}}&{x \in {\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_j}}\\ {1 - {\phi _j}}&{x \notin {\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_j}} \end{array}} \right. \end{array} $ | (16) |
王琦等人(2010)根据要划分的区域编号与其二进制表达的关系建立特征函数
$ {\chi _i} = \mathop \prod \limits_{j = 1}^m \left({b_j^{i - 1} + {{(- 1)}^{b_j^{i - 1}}}{\phi _j}} \right) $ | (17) |
式中,区域的编号为
$ \left\{ {\begin{array}{*{20}{l}} {{\chi _1} = {\phi _1}{\phi _2}}\\ {{\chi _2} = {\phi _1}\left({1 - {\phi _2}} \right)}\\ {{\chi _3} = \left({1 - {\phi _1}} \right){\phi _2}}\\ {{\chi _4} = \left({1 - {\phi _1}} \right)\left({1 - {\phi _2}} \right)} \end{array}} \right. $ | (18) |
为了提高计算效率,Tan等人(2015)为Vese-Chan模型设计ADMM方法,引入辅助变量
$ \mathop {\min }\limits_{\phi \in [0, 1], \mathit{\boldsymbol{w}}} \left\{ {\begin{array}{*{20}{l}} {E(\phi, \mathit{\boldsymbol{w}}) = }\\ {\sum\limits_{i = 1}^{{2^m}} \alpha \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_i}} {\chi _i}{\rm{d}}x + \sum\limits_{j = 1}^m \gamma \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left| {{\mathit{\boldsymbol{w}}_j}} \right|} {\rm{d}}x + }\\ {\sum\limits_{j = 1}^m {\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{\lambda _j}} } \cdot \left({{\mathit{\boldsymbol{w}}_j} - \nabla {\phi _j}} \right){\rm{d}}x + }\\ {\frac{\theta }{2}\sum\limits_{j = 1}^m {\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left| {{\mathit{\boldsymbol{w}}_j} - \nabla {\phi _j}} \right|}^2}} } {\rm{d}}x} \end{array}} \right\} $ | (19) |
变量
$ \left\{ {\begin{array}{*{20}{c}} {\sum\limits_{i = 1}^{{2^m}} \alpha {Q_i}\frac{{\partial {\chi _i}}}{{\partial {\phi _j}}} + \nabla \cdot \lambda _j^k + }&{x \in \mathit{\boldsymbol{ \boldsymbol{\varOmega} }}}\\ {\theta \;\nabla \cdot \left({\mathit{\boldsymbol{w}}_j^k - \nabla {\phi _j}} \right) = 0}&{}\\ { - \left({\lambda _j^k + \mathit{\boldsymbol{w}}_j^k - \nabla {\phi _j}} \right) \cdot \mathit{\boldsymbol{n}} = 0}&{x \in \partial \mathit{\boldsymbol{ \boldsymbol{\varOmega} }}} \end{array}} \right. $ | (20) |
$ \mathit{\boldsymbol{w}}_j^{k + 1} = \max \left({\left| {\nabla \phi _j^{k + 1} - \frac{{\lambda _j^k}}{\theta }} \right| - \frac{\gamma }{\theta }, 0} \right)\frac{{\nabla \phi _j^{k + 1} - \frac{{\lambda _j^k}}{\theta }}}{{{{\left| {\nabla \phi _j^{k + 1} - \frac{{\lambda _j^k}}{\theta }} \right|}_\zeta }}} $ | (21) |
式中,
2.2 Vese-Chan模型的连续最大流方法
连续最大流方法应用到两相图像分割模型中,当扩展到多相分割时,需要引入大量的对偶变量。从1.1节基于Chan-Vese模型的连续最大流方法中提取关键思想,根据式(17)重新设计特征函数
$ {\chi _i} = \left\{ {\begin{array}{*{20}{l}} {{\eta _{ij}}{\phi _j}}&{b_j^{i - 1} = 0}\\ {{\eta _{ij}}\left({1 - {\phi _j}} \right)}&{b_j^{i - 1} = 1} \end{array}} \right. $ | (22) |
式中,
$ {\eta _{ij}} = \mathop \prod \limits_{\begin{array}{*{20}{c}} {l = 1}\\ {l \ne j} \end{array}}^m \left({b_l^{i - 1} + {{(- 1)}^{b_l^{i - 1}}}{\phi _l}} \right) $ | (23) |
以2个二值标签函数为例,二进制区域编号与
表 1
二进制区域编号和
Table 1
Relationship between binary region number and
1 | 0 | 0 | ||
2 | 0 | 1 | ||
3 | 1 | 0 | ||
4 | 1 | 1 |
当
$ \mathop {\min }\limits_{\phi \in [0, 1]} \left\{ {\begin{array}{*{20}{l}} {E(\phi) = \mathop \sum \limits_{i = 1}^{{2^m}} \alpha \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q_i}\eta _{ij}^0{\phi _j}{\rm{d}}x + } }\\ {\mathop \sum \limits_{i = 1}^{{2^m}} \alpha \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {} {Q_i}\eta _{ij}^1\left({1 - {\phi _j}} \right){\rm{d}}x + \gamma \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {|\overline \nabla \phi |{\rm{d}}x} } \end{array}} \right\} $ | (24) |
式中,
$ {{\bar \nabla }_\phi } = \left[ {\begin{array}{*{20}{c}} {\nabla {\phi _1}}\\ {\nabla {\phi _2}}\\ \vdots \\ {\nabla {\phi _m}} \end{array}} \right] $ | (25) |
为了形象地表示两相分割模型,令
$ \mathop {\min }\limits_{\phi \in \left[ {0, 1} \right]} \left\{ {E\left(\phi \right) = \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q^0}} {\phi _j}{\rm{d}}x + \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{Q^1}\left({1 - \phi } \right){\rm{d}}x + \gamma \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left| {{{\overline \nabla }_\phi }} \right|{\rm{d}}x} } } \right\} $ | (26) |
以
$ \begin{array}{*{20}{c}} {E(\phi) = \alpha {Q_1}\eta _{11}^0{\phi _1} + \alpha {Q_2}\eta _{21}^0{\phi _1} + }\\ {\alpha {Q_3}\eta _{31}^1\left({1 - {\phi _1}} \right) + \alpha {Q_4}\eta _{41}^1\left({1 - {\phi _1}} \right) = }\\ {\left({\alpha {Q_1}{\phi _2} + \alpha {Q_2}\left({1 - {\phi _2}} \right)} \right){\phi _1} + }\\ {\left({\alpha {Q_3}{\phi _2} + \alpha {Q_4}\left({1 - {\phi _2}} \right)} \right)\left({1 - {\phi _1}} \right)} \end{array} $ | (27) |
当
$ \begin{array}{*{20}{c}} {E(\phi) = \alpha {Q_1}\eta _{12}^0{\phi _2} + \alpha {Q_2}\eta _{22}^1\left({1 - {\phi _2}} \right) + }\\ {\alpha {Q_3}\eta _{32}^0{\phi _2} + \alpha {Q_4}\eta _{42}^1\left({1 - {\phi _2}} \right) = }\\ {\left({\alpha {Q_1}{\phi _1} + \alpha {Q_3}\left({1 - {\phi _1}} \right)} \right){\phi _2} + }\\ {\left({\alpha {Q_2}{\phi _1} + \alpha {Q_4}\left({1 - {\phi _1}} \right)} \right)\left({1 - {\phi _2}} \right)} \end{array} $ | (28) |
由此可见,
式(26)已将多相分割模型转化为交替优化的两相分割模型,因此,引入矢量化对偶变量
$ \mathop {\max }\limits_{\left| {{\mathit{\boldsymbol{q}}_t}} \right|{Q^0}|} \mathop {\max }\limits_{\left| {{\mathit{\boldsymbol{q}}_s}} \right|{Q^1}} \mathop {\max }\limits_{|\mathit{\boldsymbol{p}}|\gamma } \left\{ {E\left({{\mathit{\boldsymbol{q}}_t}, {\mathit{\boldsymbol{q}}_s}, \mathit{\boldsymbol{p}}} \right) = \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{\mathit{\boldsymbol{q}}_s}{\rm{d}}x} } \right\} $ | (29) |
并且满足流约束条件
$ {\mathit{\boldsymbol{q}}_t} - {\mathit{\boldsymbol{q}}_s} + \overline \nabla \cdot \mathit{\boldsymbol{p}} = 0 $ | (30) |
式中,
$ \overline \nabla \cdot \mathit{\boldsymbol{p}} = \left[ {\begin{array}{*{20}{c}} {\nabla \cdot {\mathit{\boldsymbol{p}}_1}}\\ {\nabla \cdot {\mathit{\boldsymbol{p}}_2}}\\ \vdots \\ {\nabla \cdot {\mathit{\boldsymbol{p}}_m}} \end{array}} \right] $ | (31) |
为了提高计算效率,为本文模型设计ADMM方法,引入拉格朗日乘子
$ \begin{array}{l} \left({\mathit{\boldsymbol{q}}_t^{k + 1}, \mathit{\boldsymbol{q}}_s^{k + 1}, {\mathit{\boldsymbol{p}}^{k + 1}}} \right) = \\ \arg \mathop {\max }\limits_{\left| {{\mathit{\boldsymbol{q}}_t}} \right| \le {Q^0}|} \mathop {\max }\limits_{\left| {{\mathit{\boldsymbol{q}}_s}} \right| \le {Q^1}} \mathop {\max }\limits_{|\mathit{\boldsymbol{p}}| \le \gamma } \left\{ {\begin{array}{*{20}{l}} {E\left({{\mathit{\boldsymbol{q}}_t}, {\mathit{\boldsymbol{q}}_s}, \mathit{\boldsymbol{p}}} \right) = \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{\mathit{\boldsymbol{q}}_s}} {\rm{d}}x + }\\ {\left. {\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{\lambda ^k}} \cdot \left({{\mathit{\boldsymbol{q}}_t} - {\mathit{\boldsymbol{q}}_s} + \bar \nabla \cdot \mathit{\boldsymbol{p}}} \right){\rm{d}}x - } \right\}}\\ {\frac{\theta }{2}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left| {{\mathit{\boldsymbol{q}}_t} - {\mathit{\boldsymbol{q}}_s} + \bar \nabla \cdot \mathit{\boldsymbol{p}}} \right|}^2}} {\rm{d}}x} \end{array}} \right\} \end{array} $ | (32) |
交替优化的主要思想是固定其他变量求解一个变量的极值问题,因此,式(32)可转化为以下子优化问题
$ \left\{ {\begin{array}{*{20}{l}} {\mathit{\boldsymbol{q}}_t^{k + 1} = \arg \mathop {\max }\limits_{\left| {{\mathit{\boldsymbol{q}}_t}} \right|{Q^0}} E\left({{\mathit{\boldsymbol{q}}_t}, \mathit{\boldsymbol{q}}_s^k, {\mathit{\boldsymbol{p}}^k}} \right)}\\ {\mathit{\boldsymbol{q}}_s^{k + 1} = \arg \mathop {\max }\limits_{\left| {{\mathit{\boldsymbol{q}}_s}} \right|{Q^1}} E\left({\mathit{\boldsymbol{q}}_t^{k + 1}, {\mathit{\boldsymbol{q}}_s}, {\mathit{\boldsymbol{p}}^k}} \right)}\\ {{\mathit{\boldsymbol{p}}^{k + 1}} = \arg \mathop {\max }\limits_{|\mathit{\boldsymbol{p}}|\gamma } E\left({\mathit{\boldsymbol{q}}_t^{k + 1}, \mathit{\boldsymbol{q}}_s^{k + 1}, \mathit{\boldsymbol{p}}} \right)} \end{array}} \right. $ | (33) |
对于式(33),固定
$ {\mathit{\boldsymbol{\lambda }}^k} - \theta \left({{\mathit{\boldsymbol{q}}_t} - \mathit{\boldsymbol{q}}_s^k + \overline \nabla \cdot {\mathit{\boldsymbol{p}}^k}} \right) = 0 $ | (34) |
$ \left\{ {\begin{array}{*{20}{l}} {\mathit{\boldsymbol{q}}_t^{k + 1} = \frac{{{\mathit{\boldsymbol{\lambda }}^k}}}{\theta } + \mathit{\boldsymbol{q}}_s^k - \bar \nabla \cdot {\mathit{\boldsymbol{p}}^k}}\\ {\mathit{\boldsymbol{q}}_t^{k + 1} = \max \left({\min \left({\left| {\mathit{\boldsymbol{q}}_t^{k + 1}} \right|, {Q^0}} \right), 0} \right)} \end{array}} \right. $ | (35) |
固定
$ \mathit{\boldsymbol{1}} - {\mathit{\boldsymbol{\lambda }}^k} + \theta \left({\mathit{\boldsymbol{q}}_t^{k + 1} - {\mathit{\boldsymbol{q}}_s} + \overline \nabla \cdot {\mathit{\boldsymbol{p}}^k}} \right) = 0 $ | (36) |
$ \left\{ {\begin{array}{*{20}{l}} {\mathit{\boldsymbol{q}}_s^{k + 1} = \frac{{1 - {\mathit{\boldsymbol{\lambda }}^k}}}{\theta } + \mathit{\boldsymbol{q}}_t^{k + 1} + \bar \nabla \cdot {\mathit{\boldsymbol{p}}^k}}\\ {\mathit{\boldsymbol{q}}_s^{k + 1} = \max \left({\min \left({\left| {\mathit{\boldsymbol{q}}_s^{k + 1}} \right|, {Q^1}} \right), 0} \right)} \end{array}} \right. $ | (37) |
固定
$ \left\{ {\begin{array}{*{20}{c}} { - \overline \nabla {\mathit{\boldsymbol{\lambda }}^k} + \theta \overline \nabla \left({\mathit{\boldsymbol{q}}_t^{k + 1} - \mathit{\boldsymbol{q}}_s^{k + 1} + \overline \nabla \cdot \mathit{\boldsymbol{p}}} \right) = 0\;\;\;x \in \mathit{\boldsymbol{ \boldsymbol{\varOmega} }}}\\ {{\mathit{\boldsymbol{\lambda }}^k} - \theta \left({\mathit{\boldsymbol{q}}_t^{k + 1} - \mathit{\boldsymbol{q}}_s^{k + 1} + \overline \nabla \cdot \mathit{\boldsymbol{p}}} \right) = 0\;\;\;\;\;\;\;\;x \in \partial \mathit{\boldsymbol{ \boldsymbol{\varOmega} }}} \end{array}} \right. $ | (38) |
并通过投影公式计算
$ {\mathit{\boldsymbol{p}}^{k + 1}} = \frac{{{\mathit{\boldsymbol{p}}^{k + 1}}}}{{\max \left({1, \frac{{\left| {{\mathit{\boldsymbol{p}}^{k + 1}}} \right|}}{\gamma }} \right)}} $ | (39) |
拉格朗日乘子
$ \left\{ {\begin{array}{*{20}{c}} {{\mathit{\boldsymbol{\lambda }}^{k + 1}} = {\mathit{\boldsymbol{\lambda }}^k} - \theta \left({\mathit{\boldsymbol{q}}_t^{k + 1} - \mathit{\boldsymbol{q}}_s^{k + 1} + \overline \nabla \cdot {\mathit{\boldsymbol{p}}^{k + 1}}} \right)}\\ {{\mathit{\boldsymbol{\lambda }}^{k + 1}} = \max \left({\min \left({\left| {{\mathit{\boldsymbol{\lambda }}^{k + 1}}} \right|, 1} \right), 0} \right)} \end{array}} \right. $ | (40) |
为了表达分割图像的边界,需要将凸松弛后的二值标签函数
$ \phi = \left\{ {\begin{array}{*{20}{c}} {1\;\;\phi \ge \tau }\\ {0\;\;\phi < \tau } \end{array}} \right. $ | (41) |
式中,
$ \left| {{E^{k + 1}} - {E^k}} \right|/{E^k} \le \varepsilon $ | (42) |
时, 交替优化过程结束,其中
上述多相图像分割Vese-Chan模型的连续最大流方法描述如下:
定义:
根据式(35)计算
根据式(37)计算
根据式(38)(39)计算
根据式(40)计算
若满足式(42), 优化结束
end for
3 数值实验与分析
Duan等人(2014)将SBM方法、DM方法和ALM方法应用到Vese-Chan分割模型中,并验证以上方法具有近似而且快速的计算效率,而ADMM方法等价于ALM方法,因此,对灰度图像和彩色图像分别采用ADMM方法(Tan等,2015)和本文提出的连续最大流方法进行分割实验,对比两者的分割效果及计算效率。为了客观比较实验结果,对每个实验中的两种方法使用相同的初始化位置,相同的参数
3.1 2个二值标签函数的实验结果与分析
对图 1所示的4幅灰度图像进行实验,式(24)中数据项的表达式为
$ {Q_i} = {\left({f - {u_i}} \right)^2}, i = 1, \cdots, {2^m} $ | (43) |
图 1(a)-(c))包含3相区域, 图 1 (d)包含4相区域,因此,对以上图像均使用2个二值标签函数进行演化,初始化二值标签函数为2个圆,在圆内
图 2是对图 1中4幅图像的分割结果对比, 参数
表 2为对图 1实验的迭代次数及运算时间。当模型能量泛函满足收敛条件时,迭代停止,两种方法的收敛条件是一致的。相比较ADMM方法,本文方法的迭代次数均有减少,表明该方法提高收敛速度。从运算时间看,本文方法所需运算时间少于ADMM方法,提高计算效率。图 1(c)的图像大小在前3幅3相图像中最大,运算时间最长,运算时间加速比最大;图 1(d)是简单的几何图像,迭代次数和运算时间较少。可以看出,随着图像尺寸及图像复杂度的增加,本文方法的计算效率提高越明显。
3.2 3个二值标签函数的实验结果与分析
对图 3所示的3幅灰度图像进行实验。这3幅图像的区域相数均大于4,因此,使用3个二值标签函数进行演化。
图 4是对图 3中3幅图像的分割结果对比,参数
3.3 4个二值标签函数的实验结果与分析
对图 5所示的2幅彩色图像进行实验,由于彩色图像包括3层,式(24)中数据项的表达式为
$ {Q_i} = \sum\limits_{c = 1}^3 {{{\left({f - {u_i}} \right)}^2}, i = 1, \cdots, {2^m}} $ | (44) |
式中,
图 6是对图 5中2幅图像的分割结果对比,参数
ADMM方法通过引入辅助变量和拉格朗日乘子,避免复杂曲率项的计算,并通过对变量的交替优化提高计算效率。本文方法引入对偶变量,转化为连续最大流模型,保持高效性及高精度性。从表 2—表 4的数据可以得出,分割的迭代次数与运算时间随着标签函数的增加而增加,并且相比较ADMM方法,本文方法的运算时间加速比有明显提高。除此之外,计算效率的提高程度也与图像的复杂程度及尺寸大小有关。
4 结论
为了进一步提高多相图像分割模型的计算效率,本文提出基于凸松弛的多相图像分割Vese-Chan模型的连续最大流方法。首先,为Vese-Chan模型设计新的特征函数,根据特征函数将模型的数据项整理为两项,从而将多相分割模型转化为交替优化的两相分割模型,便于理解与实现。其次,引入对偶变量,将Vese-Chan模型能量泛函的极小值问题转化为源流的极大值问题,为了提高计算效率,并为该模型设计ADMM方法,将能量泛函的极值问题转化为一系列简单的子优化问题。最后,对不同的多相灰度图像和彩色图像进行数值实验,对比ADMM方法和本文方法的分割效果及计算效率。实验结果表明,相比较ADMM方法,本文方法迭代次数少,具有快速的收敛速度和计算效率,并且对医学图像、遥感图像等复杂图像具有更精确的分割结果。
但是本文方法对于复杂图像的计算效率及分割精度需要进一步提高,今后可以将本文方法应用到医学图像的3维重建等方面的研究中。
参考文献
-
Bae E and Tai X C. 2009. Graph cut optimization for the piecewise constant level set method applied to multiphase image segmentation//Proceedings of the 2nd International Conference on Scale Space and Variational Methods in Computer Vision. Voss, Norway: Springer: 1-13[DOI:10.1007/978-3-642-02256-2_1]
-
Bae E, Yuan J, Tai X C and Boykov Y. 2014. A fast continuous max-flow approach to non-convex multi-labeling problems//Efficient Algorithms for Global Optimization Methods in Computer Vision. Berlin, Heidelberg: Springer: 134-154[DOI:10.1007/978-3-642-54774-4_7]
-
Baxter J S H, Rajchl M, McLeod A J, Yuan J, Peters T M. 2017. Directed acyclic graph continuous max-flow image segmentation for unconstrained label orderings. International Journal of Computer Vision, 123(3): 415-434 [DOI:10.1007/s11263-017-0994-x]
-
Boykov Y, Veksler O, Zabih R. 2001. Fast approximate energy minimization via graph cuts. IEEE Transactions on Pattern Analysis and Machine Intelligence, 23(11): 1222-1239 [DOI:10.1109/34.969114]
-
Chan T F, Esedoglu S, Nikolova M. 2006. Algorithms for finding global minimizers of image segmentation and denoising models. SIAM Journal on Applied Mathematics, 66(5): 1632-1648 [DOI:10.1137/040615286]
-
Chan T F, Vese L A. 2001. Active contours without edges. IEEE Transactions on Image Processing, 10(2): 266-277 [DOI:10.1109/83.902291]
-
Chung G and Vese L A. 2005. Energy minimization based segmentation and denoising using a multilayer level set approach//Proceedings of the 5th International Workshop on Energy Minimization Methods in Computer Vision and Pattern Recognition. St. Augustine, FL, USA: Springer: 439-455[DOI:10.1007/11585978_29]
-
Duan J M, Pan Z K, Yin X F, Wei W B, Wang G D. 2014. Some fast projection methods based on Chan-Vese model for image segmentation. EURASIP Journal on Image and Video Processing, 2014(1): 1-7 [DOI:10.1186/1687-5281-2014-7]
-
Goldstein T, O'Donoghue B, Setzer S, Baraniuk R. 2014. Fast alternating direction optimization methods. SIAM Journal on Imaging Sciences, 7(3): 1588-1623 [DOI:10.1137/120896219]
-
Greig D M, Porteous B T, Seheult A H. 1989. Exact maximum a posteriori estimation for binary images. Journal of the Royal Statistical Society:Series B (Methodological), 51(2): 271-279 [DOI:10.1111/j.2517-6161.1989.tb01764.x]
-
Li F, Ng M K, Zeng T Y, Shen C L. 2010. A multiphase image segmentation method based on fuzzy region competition. SIAM Journal on Imaging Sciences, 3(3): 277-299 [DOI:10.1137/080736752]
-
Li F, Osher S, Qin J, Yan M. 2016. A multiphase image segmentation based on fuzzy membership functions and L1-norm fidelity. Journal of Scientific Computing, 69(1): 82-106 [DOI:10.1007/s10915-016-0183-z]
-
Lie J, Lysaker M, Tai X C. 2006. A binary level set model and some applications to Mumford-Shah image segmentation. IEEE Transactions on Image Processing, 15(5): 1171-1181 [DOI:10.1109/TIP.2005.863956]
-
Pan Z K, Li H, Wei W B, Guo Z B, Zhang C F. 2009. A variational level set method of multiphase segmentation for 3D images. Chinese Journal of Computers, 32(12): 2464-2474 (潘振宽, 李华, 魏伟波, 郭振波, 张春芬. 2009. 三维图像多相分割的变分水平集方法. 计算机学报, 32(12): 2464-2474)
-
Potts R B. 1952. Some generalized order-disorder transformations. Mathematical Proceedings of the Cambridge Philosophical Society, 48(1): 106-109 [DOI:10.1017/S0305004100027419]
-
Samson C, Blanc-Féraud L, Aubert G, Zerubia J. 2000. A level set model for image classification. International Journal of Computer Vision, 40(3): 187-197 [DOI:10.1023/A:1008183109594]
-
Spencer J, Chen K, Duan J M. 2019. Parameter-free selective segmentation with convex variational methods. IEEE Transactions on Image Processing, 28(5): 2163-2172 [DOI:10.1109/TIP.2018.2883521]
-
Tan L, Wei W B and Pan Z K. 2015. Two fast alternating direction optimization methods for multiphase segmentation//Proceedings of the International Conference on Image Processing, Computer Vision, and Pattern Recognition. Monte Carlo Resort, Las Vegas: IPCV: 113-121.
-
Vese L A, Chan T F. 2002. A multiphase level set framework for image segmentation using the Mumford and Shah model. International Journal of Computer Vision, 50(3): 271-293 [DOI:10.1023/A:1020874308076]
-
Wang Q, Pan Z K, Wei W B. 2010. Split-Bregman method and dual method for multiphase image segmentation. Journal of Computer-Aided Design and Computer Graphics, 22(9): 1561-1569 (王琦, 潘振宽, 魏伟波. 2010. 多相图像分割的Split-Bregman方法及对偶方法. 计算机辅助设计与图形学学报, 22(9): 1561-1569)
-
Wu C L, Tai X C. 2010. Augmented Lagrangian method, dual methods, and split Bregman iteration for ROF, vectorial TV, and high order models. SIAM Journal on Imaging Sciences, 3(3): 300-339 [DOI:10.1137/090767558]
-
Xiu X C, Liu W Q, Li L, Kong L C. 2019. Alternating direction method of multipliers for nonconvex fused regression problems. Computational Statistics and Data Analysis, 136: 59-71 [DOI:10.1016/j.csda.2019.01.002]
-
Yang X Y, Wang X H, Song J P. 2013. Image segmentation model and algorithm based on continuous max-flow approach. Journal of Image and Graphics, 18(11): 1462-1467 (杨晓艺, 王小欢, 宋锦萍. 2013. 连续最大流图像分割模型及算法. 中国图象图形学报, 18(11): 1462-1467) [DOI:10.11834/jig.20131110]
-
Yuan J, Bae E and Tai X C. 2010a. A study on continuous max-flow and min-cut approaches//Proceedings of 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. San Francisco, USA: IEEE: 2217-2224[DOI:10.1109/CVPR.2010.5539903]
-
Yuan J, Bae E, Tai X C and Boykov Y. 2010b. A continuous max-flow approach to Potts model//Proceedings of the 11th European Conference on Computer Vision. Heraklion, Crete, Greece: Springer: 379-392[DOI:10.1007/978-3-642-15567-3_28]
-
Zheng S X. 2017. Nonlocal Variational Model for Multi-classification of Data on Graph and Fast Algorithm. Qingdao: Qingdao University (郑世秀. 2017. 图上数据多分类问题的非局部变分模型及其快速算法研究. 青岛: 青岛大学)