发布时间: 2019-01-16 摘要点击次数: 全文下载次数: DOI: 10.11834/jig.180435 2019 | Volume 24 | Number 1 图像分析和识别

 收稿日期: 2018-07-06; 修回日期: 2018-07-31 基金项目: 国家自然科学基金项目（61702154）；安徽省自然科学基金项目（1808085QF189）；合肥工业大学校博士专项资助基金（JZ2016HGBZ0803） 第一作者简介: 周力, 1994年生, 男, 硕士研究生, 主要研究方向为图像处理、模式识别。E-mail:1768910817@qq.com. 中图法分类号: TP301.6 文献标识码: A 文章编号: 1006-8961(2019)01-0039-11

# 关键词

Level set method based on local connection operator and difference operator for segmenting texture images
Zhou Li, Min Hai
Department of Information Engineering, Hefei University of Technology, Xuancheng Campus, Xuancheng 242000, China
Supported by: National Natural Science Foundation of China (61702154)

# Abstract

Objective Images with complex texture features are difficult to segment. Many methods, such as Gabor filter and structure tensor, have been proposed to segment texture images. However, these methods present a number of drawbacks. For example, methods based on Gabor filter must set multiple scales and directions, and the desirable scale and direction parameters are difficult to select. Methods based on structure tensor must set two fixed directions to analyze intensity variations. However, many texture images include irregular direction features. Moreover, utilizing only the intensity variation information is an inadequate strategy. Morphology similarity and direction uncertainty often exist in nature texture images. Existing methods cannot be utilized to accurately segment nature texture images. Method Considering the morphology similarity and direction uncertainty of local texture patterns, we proposed the local connection and difference operators to extract the texture features of images. On the one hand, by setting a threshold for each local region, the local connection operation can be used to analyze the intensity distribution and texture morphology features. On the other hand, by considering the intensity variation trait of texture images, the local difference operation can be utilized to extract the local intensity variation. The local connection operation and the local difference operation are complementary. Then, by combining the local similarity and local difference features with the intensity information, the level set energy function was constructed and further minimized to obtain the final segmentation results. The main advantages of the proposed method can be summarized as the following two points. First, the morphology feature was proposed to analyze the local intensity distribution feature of texture images. The intensity distributions of texture images are uncertain for each object region. Thus, extracting the morphology feature of a local region is of great significance. Second, the two proposed operators are complementary. Using only one feature to segment complex texture images is a challenging task. The morphology and intensity difference features can jointly segment images, suggesting that the proposed method can be robust for different texture images. Result We verified the effectiveness of the two operators by comparing it with other operators, such as Gabor, structure tensor, extended structure tensor, and local similarity factor. Specially, we first analyzed the extraction effects of the morphology feature by comparing the proposed local connection operator with methods based on Gabor filter, on structure tensor and extended structure tensor, local similarity factor. The extracted feature of the local connection operator can be used to efficiently discriminate the object and background regions. Then, the local difference operator was used to compare the proposed approach with traditional texture feature extraction methods. The local different operator can accurately extract the local intensity variation. In addition, we conducted three comparison experiments to confirm whether the proposed method can achieve a better segmentation effect than the methods based on Gabor, structure tensor, extended structure tensor, and local similarity factor. Finally, we tested the robustness of the proposed method for different initial contours and images. The segmentation accuracy of our proposed method exceeded 97%, which was considerably higher than that of other methods. That is, the proposed operator is more effective in discriminating the different texture patterns of images. Conclusion We proposed two complementary operators, namely, the local connection operator and the local difference operator, to effectively extract texture features. The two extracted features are complementary and can be jointly utilized to segment texture images. Finally, we validated that the proposed method can obtain better segmentation results for natural texture images.

# Key words

image segmentation; level set; multiple features; local connectivity; local difference

# 1.1.1 局部连接度的定义

${\mathit{\boldsymbol{I}}_{\rm{1}}}$表示位于$I(x, y)$周围的局部邻域, ${\mathit{{I}}_{\rm{1}}}(i, j)$表示局部邻域的某个点，$J$是判断某点与中心点灰度差值是否在阈值$R$内的函数，如果在$R$内则该点置为1, 否则为0，${\mathit{\boldsymbol{I}}_{\rm{2}}}$表示$J$处理后的矩阵, 即

 $\begin{array}{*{20}{c}} {{I_2}\left( {i,j} \right) = J\left( {{I_1}\left( {i,j} \right) = } \right.}\\ {\left\{ {\begin{array}{*{20}{c}} \begin{array}{l} 1\\ 0 \end{array}&\begin{array}{l} {I_1}\left( {i,j} \right) - I\left( {x,y} \right) < R\\ 其他 \end{array} \end{array}} \right.} \end{array}$ (1)

 $\begin{array}{*{20}{c}} {{I_3}\left( {i,j} \right) = {I_2}\left( {i - 1,j - 1} \right) + {I_2}\left( {i,j - 1} \right) + }\\ {{I_2}\left( {i + 1,j - 1} \right) + {I_2}\left( {i - 1,j} \right) + {I_2}\left( {i + 1,j} \right) + }\\ {{I_2}\left( {i - 1,j + 1} \right) + {I_2}\left( {i,j + 1} \right) + }\\ {{I_2}\left( {i + 1,j + 1} \right)} \end{array}$ (2)

 ${I_4}\left( {i,j} \right) = \left\{ {\begin{array}{*{20}{c}} \begin{array}{l} 1\\ 0 \end{array}&\begin{array}{l} {I_3}\left( {i,j} \right) \ge 4\\ 其他 \end{array} \end{array}} \right.$ (3)

 $\begin{array}{*{20}{c}} {{I_{\rm{C}}}\left( {x,y} \right) = {C_0}\left( {i,j} \right) = {I_4}\left( {0,0} \right) + }\\ {{I_4}\left( {0,1} \right) + {I_4}\left( {0,2} \right) + \cdots + }\\ {{I_4}\left( {i,j} \right) + \cdots + {I_4}\left( {n,n} \right)} \end{array}$ (4)

# 1.2.1 局部差异度算子的定义

1) 对于原始图像上的某个点$I(x, y)$，取其周围邻域作为局部${\mathit{\boldsymbol{I}}_{\rm{5}}}$; 2)对局部上的每一个点${I_5}(i, j)$取其3×3的邻域${\mathit{\boldsymbol{I}}_{\rm{6}}}$中最大值与最小值; 3)这时，计算均值滤波后的图像$\mathit{\boldsymbol{p}}$，取相同位置的值$p(i, j)$; 4)原始图像中局部区域的最大灰度值与最小灰度值之和减去滤波后图像局部区域中心点的灰度值的两倍，即为该点的差异度; 5)统计局部区域中所有点的差异度，取其中的最大值作为图像上某点的局部差异度。

 ${I_{\rm{D}}}\left( {x,y} \right) = \max D\left( {i,j} \right)$ (5)

 $\begin{array}{*{20}{c}} {D\left( {i,j} \right) = \max {I_6}\left( {i,j} \right) + }\\ {\min {I_6}\left( {i,j} \right) - 2 \times p\left( {i,j} \right)} \end{array}$ (6)

 $H\left( \mathit{\Phi } \right) = \frac{1}{2}\left[ {1 + \frac{2}{{\rm{ \mathsf{ π} }}}\arctan \left( {\frac{\mathit{\Phi }}{\varepsilon }} \right)} \right],\varepsilon \to 0$ (14)

 $\delta \left( \mathit{\Phi } \right) = \frac{{\partial H\left( \mathit{\Phi } \right)}}{{\partial \left( \mathit{\Phi } \right)}} = \frac{\varepsilon }{{\left( {{\varepsilon ^2} + {\mathit{\Phi }^2}} \right){\rm{ \mathsf{ π} }}}}$ (15)

 $\begin{array}{*{20}{c}} {E = {\lambda _1}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left( {{I_{\rm{I}}}\left( x \right) - {{c'}_{\rm{I}}}} \right)}^2}H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} + }\\ {{\lambda _1}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left( {{I_{\rm{I}}}\left( x \right) - {{c''}_{\rm{I}}}} \right)}^2}\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} + }\\ {{\lambda _2}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left( {{I_{\rm{C}}}\left( x \right) - {{c'}_{\rm{C}}}} \right)}^2}H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} + }\\ {{\lambda _2}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left( {{I_{\rm{C}}}\left( x \right) - {{c''}_{\rm{C}}}} \right)}^2}\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} + }\\ {{\lambda _3}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left( {{I_{\rm{D}}}\left( x \right) - {{c'}_{\rm{D}}}} \right)}^2}H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} + }\\ {{\lambda _3}\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left( {{I_{\rm{D}}}\left( x \right) - {{c''}_{\rm{D}}}} \right)}^2}\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} + }\\ {\mu \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\nabla H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} + }\\ {\nu \int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{{\left( {\nabla \mathit{\Phi }\left( x \right) - 1} \right)}^2}{\rm{d}}x} } \end{array}$ (16)

 $\begin{array}{*{20}{c}} {\frac{{\partial \mathit{\Phi }}}{{\partial t}} = \delta \left( \mathit{\Phi } \right)\left( { - {\lambda _1}{{\left( {{I_{\rm{I}}}\left( x \right) - {{c'}_{\rm{I}}}} \right)}^2} + } \right.}\\ {{\lambda _1}{{\left( {{I_{\rm{I}}}\left( x \right) - {{c''}_{\rm{I}}}} \right)}^2} - {\lambda _2}{{\left( {{I_{\rm{C}}}\left( x \right) - {{c'}_{\rm{C}}}} \right)}^2} + }\\ {{\lambda _2}{{\left( {{I_{\rm{C}}}\left( x \right) - {{c''}_{\rm{C}}}} \right)}^2} - {\lambda _3}{{\left( {{I_{\rm{D}}}\left( x \right) - {{c'}_{\rm{D}}}} \right)}^2} + }\\ {{\lambda _3}{{\left( {{I_{\rm{D}}}\left( x \right) - {{c''}_{\rm{D}}}} \right)}^2} + \mu \delta \left( \mathit{\Phi } \right){\rm{div}}\left( {\frac{{\nabla \mathit{\Phi }}}{{\left| {\nabla \mathit{\Phi }\left( x \right)} \right|}}} \right) + }\\ {\nu \left( {{\nabla ^2}\mathit{\Phi } - {\rm{div}}\left( {\frac{{\nabla \mathit{\Phi }}}{{\left| {\nabla \mathit{\Phi }\left( x \right)} \right|}}} \right)} \right)} \end{array}$ (17)

 ${{c'}_{\rm{I}}}\left( {\mathit{\Phi }\left( x \right)} \right) = \frac{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{I_{\rm{I}}}\left( x \right)H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} }}{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} }}$ (18)

 ${{c''}_{\rm{I}}}\left( {\mathit{\Phi }\left( x \right)} \right) = \frac{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{I_{\rm{I}}}\left( x \right)\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} }}{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} }}$ (19)

 ${{c'}_{\rm{C}}}\left( {\mathit{\Phi }\left( x \right)} \right) = \frac{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{I_{\rm{C}}}\left( x \right)H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} }}{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} }}$ (20)

 ${{c''}_{\rm{C}}}\left( {\mathit{\Phi }\left( x \right)} \right) = \frac{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{I_{\rm{C}}}\left( x \right)\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} }}{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} }}$ (21)

 ${{c'}_{\rm{D}}}\left( {\mathit{\Phi }\left( x \right)} \right) = \frac{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{I_{\rm{D}}}\left( x \right)H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} }}{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {H\left( {\mathit{\Phi }\left( x \right)} \right){\rm{d}}x} }}$ (22)

 ${{c''}_{\rm{D}}}\left( {\mathit{\Phi }\left( x \right)} \right) = \frac{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {{I_{\rm{D}}}\left( x \right)\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} }}{{\int_\mathit{\boldsymbol{ \boldsymbol{\varOmega} }} {\left( {1 - H\left( {\mathit{\Phi }\left( x \right)} \right)} \right){\rm{d}}x} }}$ (23)

# 2 实验

$I_7(i, j)$表示本文提出方法所得分割结果的二值化表示，$\left({i, j} \right) \in {\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_3}$${\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}_3}表示整个图像中所有像素的位置坐标集合，I_8(i, j)表示通过手动分割结果的二值化表示，I_9(i, j)表示本文方法的分割结果和手动分割结果的差异，那么  {I_9}\left( {i,j} \right) = {I_7}\left( {i,j} \right) - {I_8}\left( {i,j} \right) (24) I_9(i, j)中值为0的位置即为本文方法划分正确的像素点。将I_9(i, j)中值为0的部分置为1，其他的部分置为0，得到新的矩阵  {I_{10}}\left( {i,j} \right) = \left\{ {\begin{array}{*{20}{c}} \begin{array}{l} 1\\ 0 \end{array}&\begin{array}{l} {I_9}\left( {i,j} \right) = 0\\ 其他 \end{array} \end{array}} \right. (25) 通过C_1函数统计{\mathit{\boldsymbol{I}}_{\rm{10}}}中1的个数可以得到本文方法的分割结果中分割正确的像素点个数a  \begin{array}{*{20}{c}} {a = \left. {{C_1}\left( {{I_{10}}\left( {i,j} \right)} \right)} \right) = {I_{10}}\left( {0,0} \right) + {I_{10}}\left( {0,1} \right) + }\\ {{I_{10}}\left( {0,2} \right) + \cdots + {I_{10}}\left( {i,j} \right) + \cdots + {I_{10}}\left( {p,q} \right)} \end{array} (26) 将分割正确的像素点个数a除以图像像素点个数即可得到本文方法的分割准确率  r = \frac{a}{{p \times q}} (27) 式中，p$$q$分别表示图像的高度和宽度。

Table 1 Comparison of segmentation accuracy

 Gabor滤波器 结构张量 LCV RLSF模型 本文方法 准确率/% 90.27 92.77 88.75 90.59 97.20

# 参考文献

• [1] Sandberg B, Chan T, Vese L. A level-set and Gabor-based active contour algorithm for segmenting textured images[R]. Los Angeles, USA: UCLA, 2002.
• [2] Hou Y L, Yang G S. Unsupervised texture segmentation algorithm based on wavelet transform[J]. Computer Engineering and Applications, 2007, 43(34): 74–77. [侯艳丽, 杨国胜. 一种基于小波变换的无监督纹理分割算法[J]. 计算机工程与应用, 2007, 43(34): 74–77. ] [DOI:10.3321/j.issn:1002-8331.2007.34.024]
• [3] Deng Y, Manjunath B S. Unsupervised segmentation of color-texture regions in images and video[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2001, 23(8): 800–810. [DOI:10.1109/34.946985]
• [4] Chen J Q, Pappas T N, Mojsilović A, et al. Adaptive perceptual color-texture image segmentation[J]. IEEE Transactions on Image Processing, 2005, 14(10): 1524–1536. [DOI:10.1109/TIP.2005.852204]
• [5] Ilea D E, Whelan P F. CTex-an adaptive unsupervised segmentation algorithm based on color-texture coherence[J]. IEEE Transactions on Image Processing, 2008, 17(10): 1926–1939. [DOI:10.1109/TIP.2008.2001047]
• [6] Chan T F, Vese L A. Active contours without edges[J]. IEEE Transactions on Image Processing, 2001, 10(2): 266–277. [DOI:10.1109/83.902291]
• [7] Houhou N, Thiran J P, Bresson X. Fast texture segmentation based on semi-local region descriptor and active contour[J]. Numerical Mathematics Theory Methods and Applications, 2009, 2(4): 445–468.
• [8] Wang X F, Huang D S, Xu H. An efficient local Chan-Vese model for image segmentation[J]. Pattern Recognition, 2010, 43(3): 603–618. [DOI:10.1016/j.patcog.2009.08.002]
• [9] Gao X B, Wang B, Tao D C, et al. A unified tensor level set method for image segmentation[M]//Lin W S, Tao D C, Kacprzyk J, et al. Multimedia Analysis, Processing and Communications. Berlin, Heidelberg: Springer, 2011: 217-238.[DOI: 10.1007/978-3-642-19551-8_7]
• [10] Niu S J, Chen Q, De Sisternes L, et al. Robust noise region-based active contour model via local similarity factor for image segmentation[J]. Pattern Recognition, 2017, 61: 104–119. [DOI:10.1016/j.patcog.2016.07.022]
• [11] Gao X B, Wang B, Tao D C, et al. A relay level set method for automatic image segmentation[J]. IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), 2011, 41(2): 518–525. [DOI:10.1109/TSMCB.2010.2065800]
• [12] Wang X C, Shan J X, Niu Y M, et al. Enhanced distance regularization for re-initialization free level set evolution with application to image segmentation[J]. Neurocomputing, 2014, 141: 223–235. [DOI:10.1016/j.neucom.2014.03.011]
• [13] Li C M, Xu C Y, Gui C F, et al. Level set evolution without re-initialization: a new variational formulation[C]//Proceedings of 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. San Diego, CA, USA: IEEE, 2005: 430-436.[DOI: 10.1109/CVPR.2005.213]
• [14] Li C M, Kao C Y, Gore J C, et al. Minimization of region-scalable fitting energy for image segmentation[J]. IEEE Transactions on Image Processing, 2008, 17(10): 1940–1949. [DOI:10.1109/TIP.2008.2002304]