[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN107368851B - A Fast Fuzzy C-Means Clustering Image Segmentation Method with Neighborhood Selection Strategy - Google Patents

A Fast Fuzzy C-Means Clustering Image Segmentation Method with Neighborhood Selection Strategy Download PDF

Info

Publication number
CN107368851B
CN107368851B CN201710558682.1A CN201710558682A CN107368851B CN 107368851 B CN107368851 B CN 107368851B CN 201710558682 A CN201710558682 A CN 201710558682A CN 107368851 B CN107368851 B CN 107368851B
Authority
CN
China
Prior art keywords
window
pixel
neighborhood
image
means clustering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201710558682.1A
Other languages
Chinese (zh)
Other versions
CN107368851A (en
Inventor
胡跃明
余梦琦
杜娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201710558682.1A priority Critical patent/CN107368851B/en
Publication of CN107368851A publication Critical patent/CN107368851A/en
Application granted granted Critical
Publication of CN107368851B publication Critical patent/CN107368851B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种带邻域选择策略的快速模糊C均值聚类图像分割方法,包括对图像进行边缘提取,利用提取的边缘信息来选择合适大小的窗口及其邻域,窗口邻域选择策略被引入到局部相似度及新图ξ的计算过程中,并采用粒子群算法获得合适的聚类中心,改进了传统模糊C均值聚类方法,使得图像分割细节得到更好的保护。

Figure 201710558682

The invention discloses a fast fuzzy C-means clustering image segmentation method with neighborhood selection strategy. It is introduced into the calculation process of local similarity and new graph ξ, and the particle swarm algorithm is used to obtain the appropriate clustering center, which improves the traditional fuzzy C-means clustering method, so that the image segmentation details are better protected.

Figure 201710558682

Description

一种带邻域选择策略的快速模糊C均值聚类图像分割方法A Fast Fuzzy C-Means Clustering Image Segmentation Method with Neighborhood Selection Strategy

技术邻域Technology neighborhood

本发明涉及图像分割邻域,具体涉及一种带邻域选择策略的快速模糊C均值聚类图像分割方法。The invention relates to an image segmentation neighborhood, in particular to a fast fuzzy C-means clustering image segmentation method with a neighborhood selection strategy.

背景技术Background technique

图像的细节保护一直以来都是图像分割的重点和难点之一,传统的快速模糊C均值聚类图像分割方法(FGFCM)保留边缘效果并不是很好,没有考虑到窗口邻域选择与边缘信息的关系,只选择固定大小的窗口及其目标像素对应的邻域点。Image detail protection has always been one of the key and difficult points of image segmentation. The traditional Fast Fuzzy C-Means Clustering Image Segmentation (FGFCM) does not have a good effect of preserving edges, and does not take into account the selection of window neighborhoods and edge information. relationship, only select a fixed-size window and its neighbor points corresponding to the target pixel.

发明内容SUMMARY OF THE INVENTION

为了克服现有技术存在的缺点与不足,本发明提供一种带邻域选择策略的快速模糊C均值聚类图像分割方法。In order to overcome the shortcomings and deficiencies of the prior art, the present invention provides a fast fuzzy C-means clustering image segmentation method with a neighborhood selection strategy.

本发明主要利用对图像进行边缘提取,提取的边缘信息来选择合适大小的窗口及其邻域,窗口邻域选择策略被引入到局部相似度及新图ξ的计算过程中,并采用粒子群算法(PSO)获得合适的聚类中心,改进了传统模糊C均值聚类方法,使得图像分割细节得到更好的保护。The present invention mainly utilizes the edge extraction of the image, and the extracted edge information is used to select a window of suitable size and its neighborhood, the window neighborhood selection strategy is introduced into the calculation process of the local similarity and the new graph ξ, and the particle swarm algorithm is adopted. (PSO) obtains the appropriate clustering center, improves the traditional fuzzy C-means clustering method, and makes the image segmentation details better protected.

本发明采用如下技术方案:The present invention adopts following technical scheme:

一种带邻域选择策略的快速模糊C均值聚类图像分割方法,包括如下步骤:A fast fuzzy C-means clustering image segmentation method with neighborhood selection strategy, comprising the following steps:

S1输入待分割图片,提取图像边缘;S1 inputs the image to be segmented, and extracts the edge of the image;

S2基于图像边缘的邻域选择策略生成新图ξ;S2 generates a new graph ξ based on the neighborhood selection strategy of the image edge;

S3根据生成的新图,获取初始聚类中心;S3 obtains the initial cluster center according to the generated new graph;

S4快速模糊C均值聚类获得最佳聚类划分。S4 fast fuzzy C-means clustering obtains the best clustering partition.

所述S2基于图像边缘的邻域选择策略生成新图ξ,具体为:The S2 generates a new graph ξ based on the neighborhood selection strategy of the image edge, specifically:

S2.1基于图像边缘进行窗口邻域选择;S2.1 Window neighborhood selection based on image edges;

S2.2结合空间和灰度级信息获得局部相似度量,计算公式如下:S2.2 combines spatial and gray level information to obtain a local similarity measure. The calculation formula is as follows:

Figure BDA0001346485960000011
Figure BDA0001346485960000011

i像素是局部窗口的中心,k像素表示i像素的窗口邻域中的像素,该窗口邻域是基于S2.1所述的窗口邻域选择策略获得的,pi,qi是像素i的坐标,xi是窗口邻域的灰度值,λs和λg是两个比例因子;i pixel is the center of the local window, k pixel represents the pixel in the window neighborhood of i pixel, the window neighborhood is obtained based on the window neighborhood selection strategy described in S2.1, p i , q i are the pixel i coordinates, x i is the gray value of the window neighborhood, λ s and λ g are two scale factors;

σi定义为: σi is defined as:

Figure BDA0001346485960000021
Figure BDA0001346485960000021

S2.3计算生成新图ξS2.3 Calculate and generate a new graph ξ

ξ计算如下式所示ξ is calculated as follows

Figure BDA0001346485960000022
Figure BDA0001346485960000022

其中,ξi表示图ξ的第i个像素的灰度值,xk表示原图中xi邻域像素的灰度值,该窗口邻域是基于S2.1所述的窗口邻域选择策略获得的,Ni是xi的邻域集,Sik是第i个像素和第k个像素之间的局部相似度量。Among them, ξ i represents the gray value of the ith pixel in the image ξ, x k represents the gray value of the pixel in the neighborhood of xi in the original image, and the window neighborhood is based on the window neighborhood selection strategy described in S2.1 Obtained, N i is the neighborhood set of xi and S ik is the local similarity measure between the ith pixel and the kth pixel.

S2.1基于图像边缘进行窗口邻域选择,具体为:S2.1 performs window neighborhood selection based on image edges, specifically:

设定初始窗口大小为5*5,若无边缘落于该窗口内,则选择该窗口作为局部窗口,窗口内的像素点为目标像素邻域;Set the initial window size to 5*5, if no edge falls in the window, select the window as the local window, and the pixels in the window are the target pixel neighborhood;

若该窗口内存在边缘,则将窗口扩大为7*7,选择与目标像素边缘同侧的像素点作为邻域。If there is an edge in the window, expand the window to 7*7, and select the pixel on the same side as the edge of the target pixel as the neighborhood.

所述λs和λg都设置为2。The λs and λg are both set to 2.

采用粒子群算法获取初始聚类中心参数。The particle swarm algorithm was used to obtain the initial cluster center parameters.

所述S4快速模糊C均值聚类获得最佳聚类划分,具体使J值达到最小获得最佳聚类划分The S4 fast fuzzy C-means clustering obtains the best clustering division, and specifically makes the J value reach the minimum to obtain the best clustering division

Figure BDA0001346485960000023
Figure BDA0001346485960000023

其中,cj是第j类中心,uij是灰度值为i的像素点属于第j类的隶属度,M是图ξ的灰度级数,γi是与i同灰度值的像素点数,m为模糊指数因子,ξi表示图ξ的第i个像素的灰度值;Among them, c j is the center of the jth class, u ij is the membership degree of the pixel with the gray value i belonging to the jth class, M is the gray level of the graph ξ, γ i is the pixel with the same gray value as i The number of points, m is the fuzzy index factor, ξ i represents the gray value of the ith pixel of the graph ξ;

uij与cj间迭代关系如下式所示:The iterative relationship between u ij and c j is as follows:

Figure BDA0001346485960000031
Figure BDA0001346485960000031

Figure BDA0001346485960000032
Figure BDA0001346485960000032

具体过程为:The specific process is:

S4.1初始化,设置模糊指数因子m、初始迭代计数b2,最高迭代次数t2,迭代阈值ε参数,设置聚类隶属度矩阵初始值U(0)=Ubest、初始聚类中心

Figure BDA0001346485960000033
Figure BDA0001346485960000034
S4.1 Initialization, set the fuzzy index factor m, the initial iteration count b2, the maximum iteration number t2, the iteration threshold ε parameter, set the initial value of the cluster membership matrix U (0) = U best , the initial cluster center
Figure BDA0001346485960000033
Figure BDA0001346485960000034

S4.2利用cj更新类中心cj,利用uij更新隶属度矩阵U(b+1);S4.2 uses c j to update the class center c j , and uses u ij to update the membership matrix U(b+1);

S4.3若max{U(b)-U(b+1)}<ε或b2>t2,则迭代停止,否则,b=b+1,继续步骤S4.2。S4.3 If max{U(b)-U(b+1)}<ε or b2>t2, the iteration stops, otherwise, b=b+1, and go to step S4.2.

模糊指数因子m设为2,迭代计数初始化b2=0,设置最高迭代次数t2为100次,迭代终止阈值ε设为1e-5。The fuzzy index factor m is set to 2, the iteration count is initialized to b2=0, the maximum iteration number t2 is set to 100 times, and the iteration termination threshold ε is set to 1e-5.

本发明的有益效果:Beneficial effects of the present invention:

本发明在传统的快速模糊C均值聚类图像分割的方法上,增加了基于边缘的窗口邻域选择策略,对图像分割的细节保护起到了增强的作用。The invention adds an edge-based window neighborhood selection strategy to the traditional fast fuzzy C-means clustering image segmentation method, which enhances the detail protection of image segmentation.

附图说明Description of drawings

图1是本发明工作的流程图;Fig. 1 is the flow chart of the work of the present invention;

图2是本发明搜索类中心流程图;Fig. 2 is the flow chart of search class center of the present invention;

图3是窗口邻域选择策略流程图;Fig. 3 is the flow chart of window neighborhood selection strategy;

图4是聚类流程图;Fig. 4 is a clustering flow chart;

图5(a)为原图,图5(b)为标准图,图5(c)为采用传统方法FGFCM的效果图片,图5(d)为采用本方法分割的图片。Fig. 5(a) is the original image, Fig. 5(b) is the standard image, Fig. 5(c) is the effect image using the traditional method FGFCM, and Fig. 5(d) is the image segmented by this method.

具体实施方式Detailed ways

下面结合实施例及附图,对本发明作进一步地详细说明,但本发明的实施方式不限于此。The present invention will be described in further detail below with reference to the embodiments and the accompanying drawings, but the embodiments of the present invention are not limited thereto.

实施例Example

如图1-图4所示,一种带邻域选择策略的快速模糊C均值聚类图像分割方法,包括如下步骤:As shown in Figures 1-4, a fast fuzzy C-means clustering image segmentation method with a neighborhood selection strategy includes the following steps:

S1输入待分割图片,提取图像边缘;S1 inputs the image to be segmented, and extracts the edge of the image;

由于Canny边缘检测操作较方便且效果较好,选择Canny边缘检测,提取图像边缘。Because the Canny edge detection operation is more convenient and the effect is better, the Canny edge detection is selected to extract the image edge.

S2基于图像边缘的邻域选择策略生成新图ξ,具体为:S2 generates a new graph ξ based on the neighborhood selection strategy of the image edge, specifically:

S2.1通过窗口与边缘的关系选择邻域,可以增强对图像细节的保护,窗口邻域选择,具体的策略如下:S2.1 selects the neighborhood through the relationship between the window and the edge, which can enhance the protection of image details. The specific strategy for window neighborhood selection is as follows:

(1)设定初始窗口大小为5*5,若无边缘落于该窗口内,则选择该窗口作为局部窗口,窗口内的像素点为目标像素邻域;(1) Set the initial window size to 5*5. If no edge falls within the window, select the window as a local window, and the pixels in the window are the target pixel neighborhood;

(2)设定初始窗口大小为5*5,若该窗口内存在边缘,则将窗口扩大为7*7,选择与目标像素边缘同侧的像素点作为邻域。(2) Set the initial window size to 5*5. If there is an edge in the window, expand the window to 7*7, and select the pixel on the same side as the edge of the target pixel as the neighborhood.

S2.2计算局部相似度;S2.2 Calculate local similarity;

结合空间和灰度级信息获得局部相似度量,计算公式如下,设置公式中的比例因子λs、λgThe local similarity measure is obtained by combining the spatial and gray level information. The calculation formula is as follows, and the scale factors λ s and λ g in the formula are set;

Figure BDA0001346485960000041
Figure BDA0001346485960000041

i像素是局部窗口的中心,k像素表示i像素的窗口邻域中的像素,该窗口邻域是基于S2.1所述的窗口邻域选择策略获得的,pi,qi是像素i的坐标,xi是窗口邻域的灰度值,λs和λg是两个比例因子;i pixel is the center of the local window, k pixel represents the pixel in the window neighborhood of i pixel, the window neighborhood is obtained based on the window neighborhood selection strategy described in S2.1, p i , q i are the pixel i coordinates, x i is the gray value of the window neighborhood, λ s and λ g are two scale factors;

σi定义为: σi is defined as:

Figure BDA0001346485960000042
Figure BDA0001346485960000042

式(2)中Ni为i像素的窗口邻域像素集合,NR为i像素窗口内邻域像素总个数,该窗口邻域是基于步骤一所述的窗口邻域选择策略获得的。In formula (2), N i is the set of window neighborhood pixels of i pixel, NR is the total number of neighborhood pixels in the i pixel window, and the window neighborhood is obtained based on the window neighborhood selection strategy described in step 1.

本发明实施例中,λs和λg都设置为2。In the embodiment of the present invention, both λ s and λ g are set to 2.

S2.3计算生成新图ξS2.3 Calculate and generate a new graph ξ

ξ计算如下式所示ξ is calculated as follows

Figure BDA0001346485960000051
Figure BDA0001346485960000051

其中,ξi表示图ξ的第i个像素的灰度值。xk表示原图中xi邻域像素的灰度值,该窗口邻域是基于步骤一所述的窗口邻域选择策略获得的,Ni是xi的邻域集。Sik是第i个像素和第k个像素之间的局部相似度量。Among them, ξ i represents the gray value of the i-th pixel of the graph ξ. x k represents the gray value of the pixel in the neighborhood of xi in the original image, the window neighborhood is obtained based on the window neighborhood selection strategy described in step 1, and N i is the neighborhood set of xi . S ik is the local similarity measure between the ith pixel and the kth pixel.

S2.4根据生成的新图,获取初始聚类中心;S2.4 Obtain the initial cluster center according to the generated new graph;

选择不同的聚类中心会对图像分割起到不同的效果,且为了避免陷入局部最优,本发明利用粒子群算法获取较好的初始聚类中心参数,粒子群算法根据式7、8更新粒子的位置及速度。Selecting different cluster centers will have different effects on image segmentation, and in order to avoid falling into local optimum, the present invention uses particle swarm algorithm to obtain better initial cluster center parameters, and particle swarm algorithm updates particles according to equations 7 and 8. position and speed.

vij=w·vij+c1·rand1ij·(pbestij-xij)+c2·rand2ij·(gbestj-xij) (7)v ij =w · v ij +c 1 ·rand1 ij ·(pbest ij -x ij )+c 2 ·rand2 ij ·(gbest j -x ij ) (7)

xij=xij+vij (8)x ij = x ij +v ij (8)

其中i=1,2,…,M,M是该群体中粒子的总数;Vij是第i个粒子在第j次循环中的速度;xij为第i个粒子在第j次循环中的位置,pbesij和gbestj分别为第i个粒子在j次循环内的最佳位置和j次循环的全局最优粒子位置;rand1ij和rand2ij是介于(0、1)之间的随机数;c1和c2是学习因子,w为惯性因子。 where i = 1, 2, . Position, pbes ij and gbest j are the best position of the i-th particle in j cycles and the global best particle position of j cycles respectively; rand1ij and rand2ij are random numbers between (0, 1); c1 and c2 are learning factors, and w is an inertia factor.

粒子群算法的评判准则用适应度函数来表示,本发明中使用的适应度函数设置为下式9所示,当适应度值越大时,则说明粒子位置更优。The evaluation criterion of the particle swarm algorithm is represented by a fitness function. The fitness function used in the present invention is set as shown in the following formula 9. When the fitness value is larger, it means that the particle position is better.

Fitness=1/(1+J) (9)Fitness=1/(1+J) (9)

如图2所示,初始聚类中心搜索流程,具体搜索过程如下:As shown in Figure 2, the initial cluster center search process, the specific search process is as follows:

S2.4.1参数设置S2.4.1 Parameter setting

设置种群数量、种群数量、学习因子c1和c2、最高迭代次数t1、迭代计数初始化b1、聚类个数c。Set the population size, population size, learning factors c1 and c2, the highest iteration number t1, iteration count initialization b1, and the number of clusters c.

本发明的仿真实例图5中,种群数量设置为50,种群数量设置为0.5,学习因子c1和c2都设置为0.5,最高迭代次数t1为1000次,迭代计数初始化b1=1,聚类个数c设为3。In Fig. 5 of the simulation example of the present invention, the population size is set to 50, the population size is set to 0.5, the learning factors c1 and c2 are both set to 0.5, the maximum iteration number t1 is 1000 times, the iteration count initialization b1=1, the number of clusters c is set to 3.

S2.4.2随机设置粒子起始位置S2.4.2 Randomly set the starting position of particles

S2.4.3每个粒子按公式5计算隶属度,按公式9计算适应度,找到每个粒子b1次循环内最优位置及b1次循环内全局最优粒子位置,利用公式10和11更新粒子位置。S2.4.3 Calculate the membership degree of each particle according to the formula 5, calculate the fitness according to the formula 9, find the optimal position of each particle in the b1 cycle and the global optimal particle position in the b1 cycle, and use the formulas 10 and 11 to update the particle position .

S2.4.4若迭代次数b1<t1,则设置迭代次数b1=b1+1,继续步骤(3);当b1≥t1,即迭代次数达到最高迭代次数限制时,停止迭代,将获得的全局最优粒子S2.4.4 If the number of iterations b1<t1, set the number of iterations b1=b1+1, and continue with step (3); when b1≥t1, that is, when the number of iterations reaches the limit of the maximum number of iterations, stop the iteration, and the obtained global optimum particle

位置作为快速模糊C均值聚类的初始聚类中心

Figure BDA0001346485960000061
Location as initial cluster center for fast fuzzy C-means clustering
Figure BDA0001346485960000061

并通过5式获得其隶属度矩阵UbestAnd obtain its membership degree matrix U best by formula 5.

S4快速模糊C均值聚类获得最佳聚类划分;S4 fast fuzzy C-means clustering to obtain the best clustering division;

新图基础上,快速模糊C均值聚类通过使公式4最小化,来获得最佳聚类划分。Based on the new graph, fast fuzzy C-means clustering obtains the best clustering partition by minimizing Equation 4.

Figure BDA0001346485960000062
Figure BDA0001346485960000062

其中,cj是第j类中心,uij是灰度值为i的像素点属于第j类的隶属度,M是图ξ的灰度级数,γi是与i同灰度值的像素点数,m为模糊指数因子,uij与cj间迭代关系如下式5、6所示:Among them, cj is the center of the jth class, uij is the membership degree of the pixel with the gray value i belonging to the jth class, M is the gray level of the graph ξ, γ i is the number of pixels with the same gray value as i, m is the fuzzy exponent factor, and the iterative relationship between uij and cj is shown in Equations 5 and 6 below:

Figure BDA0001346485960000063
Figure BDA0001346485960000063

Figure BDA0001346485960000064
Figure BDA0001346485960000064

聚类具体步骤如下所示:The specific steps of clustering are as follows:

(1)初始化(1) Initialization

设置公式(4)、(5)、(6)中的模糊指数因子m、初始迭代计数b2,最高迭代次数t2,迭代阈值ε参数。在步骤3获得新图的基础上,利用步骤4中获得的Ubest和cvest,设置聚类隶属度矩阵初始值U(0)=Ubest、初始聚类中心

Figure BDA0001346485960000065
Figure BDA0001346485960000066
Set the fuzzy index factor m, the initial iteration count b2, the maximum iteration number t2, and the iteration threshold ε parameters in formulas (4), (5), and (6). On the basis of the new graph obtained in step 3, U best and c vest obtained in step 4 are used to set the initial value of the cluster membership matrix U (0) = U best , the initial cluster center
Figure BDA0001346485960000065
Figure BDA0001346485960000066

本发明中,模糊指数因子m设为2。迭代计数初始化b2=0,设置最高迭代次数t2为100次,迭代终止阈值ε设为1e-5。In the present invention, the blur index factor m is set to 2. The iteration count is initialized with b2=0, the maximum iteration number t2 is set to 100 times, and the iteration termination threshold ε is set to 1e-5.

(2)根据公式6更新类中心cj,利用公式5更新隶属度矩阵U(b+1)。(2) The class center c j is updated according to formula 6, and the membership degree matrix U(b+1) is updated by formula 5.

(3)若max{U(b)-U(b+1)}<ε或b2>t2,则迭代停止,否则,b=b+1,继续步骤(2)(3) If max{U(b)-U(b+1)}<ε or b2>t2, the iteration stops, otherwise, b=b+1, continue to step (2)

图像分割效果判定的标准,即分割准确率(SA)计算公式,与传统方法对比,说明该方法的准确率更高,具体结果见表1,该表为10次实验计算的平均值结果。The standard for judging the effect of image segmentation, namely the calculation formula of segmentation accuracy (SA), compared with the traditional method, it shows that the accuracy of this method is higher. The specific results are shown in Table 1, which is the average result of 10 experiments.

Figure BDA0001346485960000071
Figure BDA0001346485960000071

式中,C为聚类种数,Aj为被某种分割方法所找到的属于第J类的像素点集合,Cj为标准图中属于第J类的像素点集合,如果SA的值越高,则说明分割效果越好。理想情况下,该值为1。In the formula, C is the number of clusters, Aj is the set of pixels belonging to the Jth category found by a certain segmentation method, and Cj is the set of pixels belonging to the Jth category in the standard image. If the value of SA is higher, It means that the segmentation effect is better. Ideally, this value is 1.

表1Table 1

FGFCMFGFCM 本文方法The method of this paper 0.97700.9770 0.98200.9820

采用本发明方法进行图像分割matlab仿真效果图所示,图5(a)原图,图5(b)为标准图,图5(c)为采用本传统方法FGFCM的效果图片,图5(d)为采用本方法分割的图片,可发现本发明方法图像分割效果较好。Using the method of the present invention to perform image segmentation matlab simulation effect diagram, Figure 5 (a) the original image, Figure 5 (b) is the standard image, Figure 5 (c) is the effect image of using the traditional method FGFCM, Figure 5 (d) ) is the picture segmented by this method, and it can be found that the image segmentation effect of the method of the present invention is better.

上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受所述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。The above-mentioned embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited by the described embodiments, and any other changes, modifications, substitutions, and combinations made without departing from the spirit and principle of the present invention , simplification, all should be equivalent replacement modes, and are all included in the protection scope of the present invention.

Claims (7)

1.一种带邻域选择策略的快速模糊C均值聚类图像分割方法,其特征在于,包括如下步骤:1. a fast fuzzy C-means clustering image segmentation method with neighborhood selection strategy, is characterized in that, comprises the steps: S1输入待分割图片,提取图像边缘;S1 inputs the image to be segmented, and extracts the edge of the image; S2基于图像边缘的邻域选择策略生成新图ξ;S2 generates a new graph ξ based on the neighborhood selection strategy of the image edge; S3根据生成的新图,获取初始聚类中心;S3 obtains the initial cluster center according to the generated new graph; S4快速模糊C均值聚类获得最佳聚类划分;S4 fast fuzzy C-means clustering to obtain the best clustering division; 所述S2基于图像边缘的邻域选择策略生成新图ξ,具体为:The S2 generates a new graph ξ based on the neighborhood selection strategy of the image edge, specifically: S2.1基于图像边缘进行窗口邻域选择;S2.1 Window neighborhood selection based on image edges; S2.2结合空间和灰度级信息获得局部相似度量,计算公式如下:S2.2 combines spatial and gray level information to obtain a local similarity measure. The calculation formula is as follows:
Figure FDA0002603443100000011
Figure FDA0002603443100000011
i像素是局部窗口的中心,k像素表示i像素的窗口邻域中的像素,该窗口邻域是基于S2.1所述的窗口邻域选择策略获得的,pi,qi是像素i的坐标,xi是窗口邻域的灰度值,λs和λg是两个比例因子;i pixel is the center of the local window, k pixel represents the pixel in the window neighborhood of i pixel, the window neighborhood is obtained based on the window neighborhood selection strategy described in S2.1, p i , q i are the pixel i coordinates, x i is the gray value of the window neighborhood, λ s and λ g are two scale factors; σi定义为: σi is defined as:
Figure FDA0002603443100000012
Figure FDA0002603443100000012
其中,NR为i像素窗口内邻域像素总个数;Among them, NR is the total number of neighbor pixels in the i pixel window; S2.3计算生成新图ξS2.3 Calculate and generate a new graph ξ ξ计算如下式所示ξ is calculated as follows
Figure FDA0002603443100000013
Figure FDA0002603443100000013
其中,ξi表示图ξ的第i个像素的灰度值,xk表示原图中xi邻域像素的灰度值,Ni是xi的邻域集,Sik是第i个像素和第k个像素之间的局部相似度量。Among them, ξ i represents the gray value of the ith pixel in the image ξ, x k represents the gray value of the pixel in the neighborhood of xi in the original image, N i is the neighborhood set of xi , and S ik is the ith pixel. and the local similarity measure between the kth pixel.
2.根据权利要求1所述的快速模糊C均值聚类图像分割方法,其特征在于,S2.1基于图像边缘进行窗口邻域选择,具体为:2. fast fuzzy C-means clustering image segmentation method according to claim 1, is characterized in that, S2.1 carries out window neighborhood selection based on image edge, is specifically: 设定初始窗口大小为5*5,若无边缘落于该窗口内,则选择该窗口作为局部窗口,窗口内的像素点为目标像素邻域;Set the initial window size to 5*5, if no edge falls in the window, select the window as the local window, and the pixels in the window are the target pixel neighborhood; 若该窗口内存在边缘,则将窗口扩大为7*7,选择与目标像素边缘同侧的像素点作为邻域。If there is an edge in the window, expand the window to 7*7, and select the pixel on the same side as the edge of the target pixel as the neighborhood. 3.根据权利要求1所述的快速模糊C均值聚类图像分割方法,其特征在于,所述λs和λg都设置为2。3 . The fast fuzzy C-means clustering image segmentation method according to claim 1 , wherein the λ s and λ g are both set to 2. 4 . 4.根据权利要求1所述的快速模糊C均值聚类图像分割方法,其特征在于,采用粒子群算法获取初始聚类中心参数。4 . The fast fuzzy C-means clustering image segmentation method according to claim 1 , wherein the initial cluster center parameter is obtained by adopting a particle swarm algorithm. 5 . 5.根据权利要求1所述的快速模糊C均值聚类图像分割方法,其特征在于,所述S4快速模糊C均值聚类获得最佳聚类划分,具体使J值达到最小获得最佳聚类划分5. fast fuzzy C-means clustering image segmentation method according to claim 1, is characterized in that, described S4 fast fuzzy C-means clustering obtains optimal clustering division, specifically makes J value reach minimum to obtain optimal clustering divide
Figure FDA0002603443100000021
Figure FDA0002603443100000021
其中,cj是第j类中心,uij是灰度值为i的像素点属于第j类的隶属度,M是图ξ的灰度级数,γi是与i同灰度值的像素点数,m为模糊指数因子,ξi表示图ξ的第i个像素的灰度值;Among them, c j is the center of the jth class, u ij is the membership degree of the pixel with the gray value i belonging to the jth class, M is the gray level of the graph ξ, γ i is the pixel with the same gray value as i The number of points, m is the fuzzy index factor, ξ i represents the gray value of the ith pixel of the graph ξ; uij与cj间迭代关系如下式所示:The iterative relationship between u ij and c j is as follows:
Figure FDA0002603443100000022
Figure FDA0002603443100000022
Figure FDA0002603443100000023
Figure FDA0002603443100000023
6.根据权利要求5所述的快速模糊C均值聚类图像分割方法,其特征在于,具体过程为:6. fast fuzzy C-means clustering image segmentation method according to claim 5, is characterized in that, concrete process is: S4.1初始化,设置模糊指数因子m、初始迭代计数b2,最高迭代次数t2,迭代阈值ε参数,设置聚类隶属度矩阵初始值U(0)=Ubest、初始聚类中心
Figure FDA0002603443100000024
Figure FDA0002603443100000025
S4.1 Initialization, set the fuzzy index factor m, the initial iteration count b2, the maximum iteration number t2, the iteration threshold ε parameter, set the initial value of the cluster membership matrix U (0) = U best , the initial cluster center
Figure FDA0002603443100000024
Figure FDA0002603443100000025
S4.2利用cj更新类中心cj,利用uij更新隶属度矩阵U(b+1);S4.2 uses c j to update the class center c j , and uses u ij to update the membership matrix U(b+1); S4.3若max{U(b)-U(b+1)}<ε或b2>t2,则迭代停止,否则,b=b+1,继续步骤S4.2。S4.3 If max{U(b)-U(b+1)}<ε or b2>t2, the iteration stops, otherwise, b=b+1, and go to step S4.2.
7.根据权利要求6所述的快速模糊C均值聚类图像分割方法,其特征在于,模糊指数因子m设为2,迭代计数初始化b2=0,设置最高迭代次数t2为100次,迭代终止阈值ε设为1e-5。7 . The fast fuzzy C-means clustering image segmentation method according to claim 6 , wherein the fuzzy index factor m is set to 2, the iteration count initialization b2 = 0, the maximum iteration number t2 is set to 100 times, and the iteration termination threshold is set to 100. 8 . ε is set to 1e-5.
CN201710558682.1A 2017-07-11 2017-07-11 A Fast Fuzzy C-Means Clustering Image Segmentation Method with Neighborhood Selection Strategy Expired - Fee Related CN107368851B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710558682.1A CN107368851B (en) 2017-07-11 2017-07-11 A Fast Fuzzy C-Means Clustering Image Segmentation Method with Neighborhood Selection Strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710558682.1A CN107368851B (en) 2017-07-11 2017-07-11 A Fast Fuzzy C-Means Clustering Image Segmentation Method with Neighborhood Selection Strategy

Publications (2)

Publication Number Publication Date
CN107368851A CN107368851A (en) 2017-11-21
CN107368851B true CN107368851B (en) 2020-12-22

Family

ID=60306108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710558682.1A Expired - Fee Related CN107368851B (en) 2017-07-11 2017-07-11 A Fast Fuzzy C-Means Clustering Image Segmentation Method with Neighborhood Selection Strategy

Country Status (1)

Country Link
CN (1) CN107368851B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325937B (en) * 2018-08-20 2020-08-25 中国科学院自动化研究所 Method, device and system for counting the number of objects
CN115641331B (en) * 2022-11-18 2023-03-28 山东天意装配式建筑装备研究院有限公司 Intelligent detection method for spraying effect of wallboard film

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251893A (en) * 2008-03-28 2008-08-27 西安电子科技大学 Adaptive multi-scale texture image segmentation method based on wavelet and mean shift
CN101923714A (en) * 2010-09-02 2010-12-22 西安电子科技大学 Texture Image Segmentation Method Based on Spatially Weighted Membership Fuzzy c-means
CN102750700A (en) * 2012-06-05 2012-10-24 南京师范大学 Fast robust fuzzy C-means image segmentation method combining neighborhood information
CN103093478A (en) * 2013-02-18 2013-05-08 南京航空航天大学 Different source image rough edge test method based on rapid nuclear spatial fuzzy clustering
CN103473739A (en) * 2013-08-15 2013-12-25 华中科技大学 White blood cell image accurate segmentation method and system based on support vector machine
CN105261004A (en) * 2015-09-10 2016-01-20 西安电子科技大学 Mean shift and neighborhood information based fuzzy C-mean image segmentation method
CN106408569A (en) * 2016-08-29 2017-02-15 北京航空航天大学 Brain MRI (magnetic resonance image) segmentation method based on improved fuzzy C-means clustering algorithm

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7574028B2 (en) * 2004-11-23 2009-08-11 Carestream Health, Inc. Method for recognizing projection views of radiographs
US9652829B2 (en) * 2015-01-22 2017-05-16 Samsung Electronics Co., Ltd. Video super-resolution by fast video segmentation for boundary accuracy control

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251893A (en) * 2008-03-28 2008-08-27 西安电子科技大学 Adaptive multi-scale texture image segmentation method based on wavelet and mean shift
CN101923714A (en) * 2010-09-02 2010-12-22 西安电子科技大学 Texture Image Segmentation Method Based on Spatially Weighted Membership Fuzzy c-means
CN102750700A (en) * 2012-06-05 2012-10-24 南京师范大学 Fast robust fuzzy C-means image segmentation method combining neighborhood information
CN103093478A (en) * 2013-02-18 2013-05-08 南京航空航天大学 Different source image rough edge test method based on rapid nuclear spatial fuzzy clustering
CN103473739A (en) * 2013-08-15 2013-12-25 华中科技大学 White blood cell image accurate segmentation method and system based on support vector machine
CN105261004A (en) * 2015-09-10 2016-01-20 西安电子科技大学 Mean shift and neighborhood information based fuzzy C-mean image segmentation method
CN106408569A (en) * 2016-08-29 2017-02-15 北京航空航天大学 Brain MRI (magnetic resonance image) segmentation method based on improved fuzzy C-means clustering algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
结合边缘局部信息的FCM抗噪图像分割算法;夏菁等;《计算机辅助设计与图形学学报》;20141231;第26卷(第12期);第2203-2213页 *

Also Published As

Publication number Publication date
CN107368851A (en) 2017-11-21

Similar Documents

Publication Publication Date Title
CN109360232B (en) Indoor scene layout estimation method and device based on condition generation countermeasure network
CN104732545B (en) The texture image segmenting method with quick spectral clustering is propagated with reference to sparse neighbour
CN105976378A (en) Graph model based saliency target detection method
CN112116610A (en) Remote sensing image segmentation method, system, terminal and storage medium
CN103164693B (en) A kind of monitor video pedestrian detection matching process
CN110084248A (en) A kind of ORB feature homogenization extracting method
CN105139420A (en) Particle filter and perceptual hash-based video target tracking method
CN102930275B (en) Based on the characteristics of remote sensing image system of selection of Cramer &#39; s V index
CN104318575B (en) Multi-threshold image segmentation method based on comprehensive learning differential evolution algorithm
CN105374037B (en) A kind of X-comers auto-screening method of corner detection
CN107862702A (en) A kind of conspicuousness detection method of combination boundary connected and local contrast
CN106846326A (en) Image partition method based on multinuclear local message FCM algorithms
CN105389821B (en) It is a kind of that the medical image cutting method being combined is cut based on cloud model and figure
CN104994366A (en) FCM video key frame extracting method based on feature weighing
CN108460336A (en) A kind of pedestrian detection method based on deep learning
CN107368851B (en) A Fast Fuzzy C-Means Clustering Image Segmentation Method with Neighborhood Selection Strategy
CN109740672B (en) Multi-stream feature distance fusion system and fusion method
CN106447662A (en) Combined distance based FCM image segmentation algorithm
CN107564008B (en) A Fast SAR Image Segmentation Method Based on Fuzzy Clustering of Key Pixels
CN106778767A (en) Visual pattern feature extraction and matching process based on ORB and active vision
CN109840558A (en) Based on density peaks-core integration adaptive clustering scheme
CN111047553B (en) Characteristic point positioning method for non-contact human body parameter measurement
CN103971362B (en) SAR image change-detection based on rectangular histogram and elite genetic algorithm for clustering
CN102411776A (en) Robot visual image segmentation method based on statistics and fractal dimension
CN106373177B (en) A kind of design method for realizing optimization scene illumination estimation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201222

CF01 Termination of patent right due to non-payment of annual fee