CN102855624A - Image segmentation method based on generalized data field and Normalized cut (Ncut) algorithm - Google Patents

Image segmentation method based on generalized data field and Normalized cut (Ncut) algorithm Download PDF

Info

Publication number
CN102855624A
CN102855624A CN2012102656143A CN201210265614A CN102855624A CN 102855624 A CN102855624 A CN 102855624A CN 2012102656143 A CN2012102656143 A CN 2012102656143A CN 201210265614 A CN201210265614 A CN 201210265614A CN 102855624 A CN102855624 A CN 102855624A
Authority
CN
China
Prior art keywords
grid
image
value
sigma
omega
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.)
Granted
Application number
CN2012102656143A
Other languages
Chinese (zh)
Other versions
CN102855624B (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.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN201210265614.3A priority Critical patent/CN102855624B/en
Publication of CN102855624A publication Critical patent/CN102855624A/en
Application granted granted Critical
Publication of CN102855624B publication Critical patent/CN102855624B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides an image segmentation method based on a generalized data field and an Ncut algorithm. Characteristic space is divided into hierarchical grids including a first layer of grids and a second layer of grids, corresponding grid characteristic space omega s and omega b is formed simultaneously, and adjacent eight small grids of the fist layer form a large grid of the second layer; and then potential value distribution of the first layer of the grids is calculated and obtained by using a grouped dynamic frame (GDF) algorithm based on the second layer of grids. Based on the potential value distribution, the first layer of the grids are clustered, clustered results are mapped to an image, and accordingly, initial segmentation operation on the image is achieved, and the image is divided into different areas which are not mutually intersected; and finally, undirected weighted image is constructed based on the initial segmentation results of the image, and homogenous areas are combined through the Ncut algorithm based on the areas until best image segmentation results are achieved. The image segmentation method has the advantages of being rapid, simple and accurate in image segmentation.

Description

Image segmentation method based on generalized data field and Ncut algorithm
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an image segmentation method based on a generalized data field and an Ncut algorithm.
Background
Image segmentation is to divide an image into meaningful and non-coincident regions, and each region has almost the same properties, which is an important link in image processing research and an important research subject in computer vision; target detection, feature extraction and target identification all rely on accurate image segmentation technology, and the image segmentation technology is used as a basic work in image processing, so that the method is widely applied, and various segmentation algorithms are proposed successively.
Among many segmentation algorithms, nonparametric clustering is the simplest and most widely used one, and the nonparametric clustering method can be roughly divided into two categories: hierarchical clustering and density estimation; hierarchical clustering techniques classify data according to the distance between data points, which often results in higher computational complexity, and a meaningful stopping criterion cannot be directly defined for data clustering, which means that different data sets need to be set with different stopping criteria; the basic principle of non-parametric clustering based on density estimation is to use an empirical probability density function to describe the feature distribution of a data set in a feature space, a dense region in the feature space corresponds to a local maximum (i.e. a vertex) of the density function, once the position of the vertex is determined, a clustering result can be determined according to a local structure of the feature space, for example, Mean Shift (MS) is a non-parametric image clustering algorithm, but a single MS algorithm is sensitive to the selection of window width parameters, that is, the segmentation results of the algorithm have great differences for different parameter settings, and is a very time-consuming segmentation algorithm, so that in practical application, too many segmentation regions, wrong segmentation and too much time spent in the segmentation process may occur in the segmentation results of the algorithm.
In some proposed algorithms, in order to improve the segmentation result of MS, a graph-based segmentation method is integrated, which is also a very important class in image segmentation, such as normalized cuts (Ncut), average association, minimum cut, etc.; in these methods, each pixel is regarded as a vertex, adjacent points are connected by an edge, and the dissimilarity measure of two points is used as the weight of the edge, thus constructing an undirected weighted graph, compared to other graph-based segmentation algorithms, the Ncut algorithm is more widely applied, in order to overcome the defects of the MS image segmentation algorithm, the MS algorithm and the recursive Ncut algorithm are combined with each other and are called as MS-Ncut, the MS-Ncut algorithm firstly obtains an initial segmentation image containing a plurality of fragments through the MS algorithm, then, an undirected weighted graph is built according to the over-segmented blocks, an Ncut algorithm is adopted to correct the initial segmentation result, in the Ncut operation process, although the generation of the auxiliary child nodes by each node further optimizes the segmentation result to a certain extent, but the problems arising in MS-Ncut are not fundamentally solved and the time complexity of the algorithm is greatly increased.
Disclosure of Invention
In order to obtain a better segmentation result and avoid the problems, the invention provides a novel image segmentation algorithm, namely an image segmentation method based on a generalized data field and an Ncut algorithm.
In order to solve the technical problems, the invention adopts the following technical scheme:
1. an image segmentation method based on a generalized data field and an Ncut algorithm comprises the following steps,
step 1, hierarchical grid division and potential value estimation, which specifically comprises the following steps,
step 1.1, converting the RGB color feature space of the image into L u v or L a b color feature space, dividing L u v or L a b color feature space Ω into 2N × 2N small grids as the first layer grid, calculating the average value of the data points in each small grid, and forming a new feature space Ω by using the average value as the feature value of the small grids
Step 1.2, combining the eight-neighborhood small grids into a large grid serving as a second-layer grid to form a new feature space omegabAnd its corresponding grid space coordinate value;
step 1.3, potential value of each small grid in the first layer grid is calculated according to the potential value estimation formula
Figure BDA00001919392700021
Figure BDA00001919392700022
In the eigenspace omegabIn (1),
Figure BDA00001919392700024
representing coordinates of (i)th,jth,kth) The grid of (a) is formed,
Figure BDA00001919392700025
is (i)th,jth,kth) The quality of the grid is such that, f i u j u k u = ( f i u j u k u ( 1 ) , f i u j u k u ( 2 ) , f i u j u k u ( 3 ) ) , w i u j u k u = Q i u j u k u × e - ( x - x i u j u k u σ X ) 2 + ( y - y i u j u k u σ Y ) 2 ,
Figure BDA00001919392700028
is located in the grid (i)th,jth,kth) The number of inner data points is,
Figure BDA00001919392700029
is corresponding to the grid (i)th,jth,kth) A spatial coordinate value ofXAnd σYIs a spatial influence factor, σ ═ ch ═ c (h)1,h2,h3)T,σj=chjJ =1,2, 3, c is a proportionality constant, h ═ h (h)1,h2,h3)TIs the window width of the kernel density estimate, k (x) is the unit potential function;
step 2, clustering the small grids according to potential value distribution of the small grids, mapping clustering results to images, and dividing the images into different mutually disjoint areas, wherein the specific steps are as follows:
step 2.1, solving the partial derivative of the formula in the step 1.3 to obtain a formula:
Figure BDA00001919392700031
Figure BDA00001919392700032
calculating partial derivatives of each small mesh in the first layer mesh, determining all vertex meshes according to the partial derivatives, and describing the cluster { C by combining the vertex meshes through a six-neighborhood modek}k=1,…,vIn which C iskComprising at least one vertex mesh;
step 2.2 for each k ═ k1,2, …, v, cluster CkUsing the vertex grid as the initial data point, searching the grid along the direction of rising gradient value until the gradient value does not rise any moreBy now, the small grids searched along the road are divided into clusters CkPerforming the following steps;
step 2.3 after the search is completed, for each cluster CkK is 1,2, …, v, mapping all data points in each cluster to an image, merging image fragments with the number of data points less than M (20 is less than or equal to M is less than or equal to 100) points on space, and dividing an image into R misaligned initial regions omegai,i=1,2,…,R;
Step 3, combining the over-divided regions by using a region-based Ncut algorithm; the formula for calculating the weight matrix W is:
w ( i , j ) =
1 n i Σ f ∈ Ω i e - [ | | f - F j | | σ I ] 2 + 1 n j Σ f ∈ Ω j e - [ | | f - F i | | σ I ] 2 0 .
2. an image segmentation method based on generalized data fields and Ncut algorithm according to claim 1, characterized in that: the step 3 specifically comprises the following steps of,
step 3.1 constructs an undirected weighted graph G ═ V, E, W based on the non-summed initial regions obtained in step 2.3, V being the vertices of the image, E being the set of edges connecting the vertices, W being the weight matrix, according to the formula w ( i , j ) =
1 n i Σ f ∈ Ω i e - [ | | f - F j | | σ I ] 2 + 1 n j Σ f ∈ Ω j e - [ | | f - F i | | σ I ] 2 0
Calculating a weight matrix W;
step 3.2 calculates the diagonal matrix D by the weight matrix W,
where D (i, i) ═ Σj w(i,j);
Step 3.3, solving an equation (D-W) y which is lambda Dy to obtain a characteristic value and a corresponding characteristic vector, and determining a second small characteristic vector;
step 3.4 according to the formula
Figure BDA00001919392700043
Finding out a segmentation point, namely a point with the minimum Ncut value, and segmenting the image into two sub-images by using the vertex of the second small feature vector bipartite graph;
step 3.5, calculating a weight matrix for the subgraphs obtained by the two divisions respectively, and repeating the steps 3.2 to 3.4;
step 3.6 repeats step 3.5 until the value of Ncut exceeds a given threshold.
The following are presented in terms of the theory or principle used in the present invention, respectively:
inspired by the physical field, the interaction and description between the microparticles of matter are introduced into the abstract mathematical domain, thus forming a data field; the data radiation radiates the data energy of the data from a sample space to the whole maternal space, and the space which receives the data energy and is covered by the data radiation is called a data field; the data field can be regarded as a space full of data energy, and the data transmits energy to another data in the field through the data field of the data field; data points in the data field radiate energy mutually, and the energy is superposed with each other to form the potential of the data field; known space
Figure BDA00001919392700044
Data set D = { x) containing n objects therein1,x2,…,xn}. Each object is considered to have a mass of particles or nuclei around which there is an action field, and any object located within the field will be subjected to union of other objectsIn this way, a data field is defined over the entire space. The potential value of any point x ∈ Ω in the data field can be expressed as
Where K (x) is a unit potential function. σ is used to control the interaction force path between objects, and is called an influence factor. By taking the condition satisfied by the kernel in the kernel density estimation as a reference, k (x) should satisfy: k (x) dx ═ 1, — (x) dx ═ 0, 0 < r (k) ═ k (x)2dx < ∞. mass mi,miX is more than or equal to 0iIs assumed to satisfy a normalization condition and a certain convergence, i.e. has
&Sigma; i = 1 n m i = 1 , m i &GreaterEqual; 0 and lim n &RightArrow; &infin; nsup 1 &le; i &le; n { m i } = 1 .
In a multidimensional data field, the influence factor σ in the potential function estimation (1) in the whole data field has the same value in different dimensions, which means that the energy distribution of each observed data point is uniformly dispersed to all directions. But in general, data of different dimensions have different properties. σ should be anisotropic, i.e., the value of σ is different in different directions. Furthermore, when the data has different variability in different directions, or the data is located almost on a low-dimensional manifold, it is considered that estimates obtained with the same scale for each direction are often less than ideal. Therefore, in order to obtain better data field potential function estimation in a multidimensional data field, the influence factor sigma is replaced by a matrix H, and generalized data field potential function estimation is given. The formula is as follows:
Figure BDA00001919392700052
wherein, H is a P × P positive definite constant matrix related to the influence factor, P represents the dimension of the multidimensional space, and P is 1,2 and 3; for convenience, take H = σ a, where σ >0, | a | = 1. The potential function K is a real-valued multidimensional data field potential function. For convenience of calculation, H is taken as a positive definite triangular matrix, and a simplified potential function estimation based on the formula (3)
Figure BDA00001919392700053
Wherein sigmajIs the influence factor of j dimension. For example, if the data object is two-dimensional, j =1, 2.
The invention provides a novel clustering algorithm, which is based on the estimation of the potential value of a hierarchical grid structure, can effectively improve the operation speed and is called as a downhill method; comparing the hill climbing method clustering process, wherein the first step is to find the peak (maximum value point) of potential value estimation, combine the peaks positioned in six fields to be used as the clustering center of each class, then search grids along the clustering center to find clusters, and finally, all the grids containing data points are classified into one cluster; the clustering process adopted by the invention is to continuously move downwards from the mountain top until the gradient is not increased any more; the vertex of the potential value being at point 0Gradient value, i.e.
Figure BDA00001919392700054
The segmentation of an image can be performed under various different color spaces, and for the proposed algorithm, it is necessary to select a most suitable color space to segment the image, so as to achieve the optimal segmentation effect. Currently, two color spaces, L × u × v and L × a × b, are most commonly used in the field of image segmentation because the color difference displayed by L × u × v and L × a × b spaces coincides with the color difference expressed by the geometric distance in europe in the feature space; in both cases, L denotes the luminance coordinate, the only difference being the difference in the chromaticity coordinate. For the newly proposed algorithm, the results obtained on the two color spaces are not obviously different, so that the image can be segmented on any color space. The invention adopts L u v color space as characteristic space to complete image segmentation process.
1. Hierarchical meshing
The unsupervised clustering algorithm divides input data points into a plurality of classes based on the internal distance between the data points in the sample on the premise that the number of clusters is not known in advance, namely, the data points which are close in distance are most probably classified into the same class; therefore, in order to reduce the complexity of the algorithm, grids are divided in a feature space, and points in the grids are regarded as belonging to the same class in advance; specifically, a multi-dimensional grid structure is formed in the feature space, and each feature data point is projected into one of the determined small grids. For example, a three-dimensional color space, data objects may be mapped to N1×N2×N3In the grid matrix of (a); data points located on the same grid are considered to belong to one class.
The invention divides the feature space into two layers of grids, wherein the division of the second layer of grid structure is based on the result of the first grid division. Firstly, a feature space is divided into small grid structures with the volume of 2 Nx 2N to be used as first-layer grid division, then, each adjacent eight-neighborhood small grid is combined into a large grid, and the large grid is used as a second-layer grid.
2. Potential value estimation
The invention provides a new potential value estimation method by utilizing a hierarchical grid structure of a feature space. Dividing the characteristic space omega into 2 Nx 2N small grid objects, calculating the mean value of data points in each small grid, and taking the mean value as the characteristic value of the small grid, thus forming a new characteristic space omega based on the characteristic space omegasTaking the arithmetic mean value of the corresponding space coordinate axis as the space coordinate value of the grid; then merging the eight neighborhood small grids into a large grid serving as a second layer grid, and obtaining a new feature space omegabAnd its corresponding grid space coordinate value; for the eigenspace ΩbBy using
Figure BDA00001919392700071
Representing coordinates of (i)th,jth,kth) The grid of (a) is formed,
wherein
Figure BDA00001919392700072
Figure BDA00001919392700073
Is (i)th,jth,kth) The quality of the grid. Therefore for any &ForAll; f = ( f ( 1 ) , f ( 2 ) , f ( 3 ) ) T &Element; &Omega; s , The spatial coordinates are (x, y), and the potential value estimation formula is:
wherein, w i u j u k u = Q i u j u k u &times; e - ( x - x i u j u k u &sigma; X ) 2 + ( y - y i u j u k u &sigma; Y ) 2 ,
Figure BDA00001919392700077
is located in the grid (i)th,jth,kth) The number of inner data points is,
Figure BDA00001919392700078
corresponding to the grid (i)th,jth,kth) A spatial coordinate value ofXAnd σYIs a spatial impact factor. K (-) is obtained by simulating the potential value distribution of a nuclear field in physics, and is proportional to a Gaussian kernel function; to improve the accuracy of the algorithm, the impact factor σ should be set to different values for different dimensions; the multivariate potential value function K is defined as the product of 3 one-dimensional potential value functions.
Because the potential value estimation is similar to the kernel density estimation, algorithm performance can be improved by setting an impact factor σ, which is a multiple of the grid width h, i.e.: σ ═ ch ═ c (h)1,h2,h3)TWhere c is a proportionality constant, h ═ h (h)1,h2,h3)TIs the window width of the kernel density estimate; the user can self-adaptively adjust the value of c, so as to obtain image segmentation results of different levels; the h value can be obtained by using the Sheather-Jones insertion method.
3. Clustering algorithm
The invention provides a new clustering algorithm which is based on the potential value distribution of a grid structure and can effectively improve the operation speed, and the algorithm is called as a hill descending method. Compared with the hill climbing method clustering process, the first step is to find the peak of the potential value estimation, namely the maximum value point, then find the cluster by searching downwards without each peak, and finally all the small grids are clustered. The clustering of the multi-peaked character and the random shape is the special attribute of the characteristic space, the clustering process provided by the invention is that the clustering process is started from the mountain top and continuously moves downwards until the gradient value is not increased, and the peak of the potential value is the gradient value at the point 0, namely the gradient value
Figure BDA00001919392700079
Figure BDA00001919392700081
Figure BDA00001919392700082
Starting from any vertex, continuously searching according to the direction of increasing gradient values, and classifying the vertex and the searched small grids into a cluster. In the hill descent method process, unlike the hill climbing method, repeated searching for the same small lattice does not occur, thus simplifying the search process.
4. Region-based Ncut algorithm
The image segmentation can be seen as an optimal segmentation of a graph. Constructing an undirected weight G (V, E, W) on an image, wherein V is a vertex of the image, E is a set of edges connecting the vertices, and W is a weight matrix; the weight w (u, v) on each edge is the vertex u and v similarity measure function, this constructed graph is divided into two disjoint subgraphs A and B by minimizing the cut value, cut is defined as follows:
cut(A,B)=∑u∈A,v∈Bw(u,v).
however, the above formula minimization cut criterion tends to divide many isolated vertices, and to overcome this drawback, the standard cut, i.e., the Ncut algorithm, is proposed as follows:
Ncut ( A , B ) = cut ( A , B ) assoc ( A , V ) + cut ( A , B ) assoc ( B , V )
minimizing the Ncut equation to obtain the optimal partition, where the equation is represented again in matrix form as:
min x Ncut ( x ) = y T ( D - W ) y y T Dy
where D is a diagonal matrix, D (i, i) ═ ΣjW (i, j), the invention uses the initial block obtained by GDF algorithm to construct graph G (V, E, W), each block is regarded as a node, each pair of adjacent nodes are connected by an edge, the weight of the edge reflects the similarity of the attributes of two blocks, namely the possibility of belonging to the same object in the image; suppose an image is divided into N non-overlapping regions omegai(i-1, 2, …, R), which region contains niCharacteristic data points, Fi(i ═ 1,2, …, R) corresponds to each region ΩiThe weight value of each edge can be obtained by calculating the similarity of adjacent areas, and the weight of the i block and the j block is the average value of the data points in the image
w ( i , j ) =
1 n i &Sigma; f &Element; &Omega; i e - [ | | f - F j | | &sigma; I ] 2 + 1 n j &Sigma; f &Element; &Omega; j e - [ | | f - F i | | &sigma; I ] 2 if &Omega; i and &Omega; j areadjacent 0 otherwise
Wherein | is the value of the vector, σIIs a fixed influencing factor.
Compared with the prior art, the image segmentation method combining the GDF and the Ncut algorithm in the generalized data field adopts grid division for clustering, and adopts the Ncut algorithm based on the blocks to segment the image into blocks with different characteristic meanings, thereby reducing the time complexity, greatly improving the operation speed of segmentation and ensuring that the segmentation speed of the image is faster and more accurate.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a raw diagram of an embodiment of the present invention;
FIG. 3 is a setting interface diagram of the present invention;
fig. 4 is a graph of the set of L u v feature spaces in accordance with an embodiment of the present invention;
FIG. 5 is a set diagram of a grid-based feature space according to an embodiment of the present invention;
FIG. 6 is a graph of the clustering results achieved by using the GDF algorithm according to an embodiment of the present invention;
FIG. 7 is a graph of the clustering results achieved by using the GDF algorithm in accordance with an embodiment of the present invention;
FIG. 8 is a graph of initial image segmentation results according to an embodiment of the present invention;
FIG. 9 is a weight map generated by the Ncut algorithm for the range domain hierarchy of an embodiment of the present invention;
FIG. 10 is a final image segmentation result graph according to an embodiment of the present invention;
FIG. 11 is a graph of a comparison test of the present invention with other classical image segmentation algorithms;
FIG. 12 is a comparison of the present invention with other classical image segmentation algorithms at run-time.
Detailed Description
The invention will be further described with reference to examples of embodiments shown in the drawings.
Taking fig. 2 as an example, preparation work needs to be done before segmenting the image: firstly, processing coordinates (x, y) of a data point of a Kingfisher.jpg of a color image into RGB tristimulus values, and storing the RGB coordinate values of the data point in a text file form; and then reading the text file, acquiring RGB color values of all data points of the image, mapping the values to an image space to form a complete image and display the complete image, and counting 122500 data points. The size of the original image is 350 × 350; finally, algorithm parameters are input, under the default condition, the number of unilateral small grids is 2N-12, the number of large grid dimensions is 2, the feature space Simga-L-C-2.1, the feature space Simga-U-C-2.1, the feature space Simga-V-C-2.1, the coordinate space Simga-X-70, the coordinate space Simga-Y-70, the clustering smooth threshold value M-40, the block Simga-Matrix-15, the number of auxiliary nodes is 3, the Ncut division threshold value is 0.25, the three values of time (of) are 4.8054, 2.6593 and 4.8318 respectively, and h is represented by h respectively1、h2、h3As shown in fig. 3.
The specific segmentation method comprises the following steps:
step 1, hierarchical grid division and potential value estimation, which specifically comprises the following steps,
step 1.1, converting the RGB color feature space of the image into L U V color feature space, converting the initial color values (R, G, B) of all data points of the image into corresponding color feature space values (L, U, V), fig. 4 is the spatial distribution of the converted data points, dividing L U V color feature space Ω into 12 × 12 × 12 small grids as the first layer grid, calculating the mean value of the data points in each small grid, and using the mean value as the feature value of the small grid to form a new feature space ΩsAs shown in fig. 5;
step 1.2, combining the eight-neighborhood small grids into a large grid serving as a second-layer grid to form a new feature space omegabAnd its corresponding grid space coordinate value;
step 1.3, potential value of each small grid in the first layer grid is calculated according to the potential value estimation formula
Figure BDA00001919392700101
Figure BDA00001919392700103
In the eigenspace omegabIn (1),
Figure BDA00001919392700104
representing coordinates of (i)th,jth,kth) The grid of (a) is formed,
Figure BDA00001919392700105
is (i)th,jth,kth) The quality of the grid is such that, f i u j u k u = ( f i u j u k u ( 1 ) , f i u j u k u ( 2 ) , f i u j u k u ( 3 ) ) , w i u j u k u = Q i u j u k u &times; e - ( x - x i u j u k u &sigma; X ) 2 + ( y - y i u j u k u &sigma; Y ) 2 ,
Figure BDA00001919392700108
is located in the grid (i)th,jth,kth) The number of inner data points is,
Figure BDA00001919392700109
is corresponding to the grid (i)th,jth,kth) A spatial coordinate value ofXAnd σYIs a spatial impact factor, σ in the exampleXAnd σYTake a fixed value of 70, σ ═ th ═ c (h)1,h2,h3)T,σj=chjJ is 1,2, 3, c is a proportionality constant, and c has a value in the range of [2.0, 2.5 ]]The value in this example is 2.1, h ═ h (h)1,h2,h3)TIs the window width for nuclear density estimation, h values were obtained by using the Sheather-Jones interpolation, k (x) is the unit potential function;
step 2, clustering the small grids according to potential value distribution of the small grids, mapping clustering results to images, and dividing the images into different mutually disjoint areas, wherein the specific steps are as follows:
step 2.1, solving the partial derivative of the formula in the step 1.3 to obtain a formula:
Figure BDA00001919392700111
Figure BDA00001919392700112
calculating partial derivatives of each small mesh in the first layer mesh, determining all vertex meshes according to the partial derivatives, and describing the cluster { C by combining the vertex meshes through a six-neighborhood modek}k=1,…,vIn which C iskComprising at least one vertex mesh;
step 2.2 for each k ═ 1,2, …, v, cluster CkUsing the vertex grid as the initial data point, searching the grid along the direction of rising gradient value until the gradient value does not rise any more
Figure BDA00001919392700113
By now, the small grids searched along the road are divided into clusters CkPerforming the following steps;
step 2.3 after the search is completed, for each cluster CkAnd k is 1,2, …, v, mapping all data points in each cluster to an image, merging image fragments with the number of data points less than 40 points on space, and dividing one image into R non-coincident initial regions omegai,i=1,2,…,R;
For each dimension of the (L, U, V) color feature space, picking out all the small meshes of local maxima of the partial derivatives in that direction, thus forming three sets; calculating the intersection of the three sets as a candidate vertex set, if two candidate clusters include the same small grid in six neighborhoods, combining the two candidate vertex sets in turn until all the candidate vertex sets are processed, thus ensuring that no same element exists in any two sets, obtaining a new vertex set as an initial cluster center of a class, searching the grid according to a hill descending method, and clustering, wherein a clustering result is shown in fig. 6 and 7, wherein fig. 7 is a projection of an L u v plane, 15 clusters are generated in the embodiment, and are presented by five colors and three symbols, namely { blue, red, yellow, blue, green }
Figure BDA00001919392700114
{.,*,+}。
According to the generated clustering result, a class number is allocated to each small grid and the data points in the small grid, all the data points participating in clustering calculation are recorded, 121406 point records are shared in the embodiment, 1094 loss points before smoothing account for 0.0089 in total, the loss points are allocated to the class closest to the Euclidean distance of the color of the loss points, the clustering result is mapped to a plane space, non-intersected blocks are obtained, then a smoothing operation is carried out, namely, the blocks containing the data points smaller than a smoothing threshold (M = 40) are regarded as fragments, the fragments are allocated to the largest block in the surrounding neighborhood, and the class numbers of the data points in the fragments are changed, and the result is shown in FIG. 8. Step 3, combining the over-divided regions by using a region-based Ncut algorithm, which comprises the following specific steps:
step 3.1 constructs an undirected weighted graph G ═ V, E, W based on the non-summed initial regions obtained in step 2.3, V being the vertices of the image, E being the set of edges connecting the vertices, W being the weight matrix, according to the formula w ( i , j ) =
1 n i &Sigma; f &Element; &Omega; i e - [ | | f - F j | | &sigma; I ] 2 + 1 n j &Sigma; f &Element; &Omega; j e - [ | | f - F i | | &sigma; I ] 2 0
Calculating a weight matrix W;
step 3.2 calculates the diagonal matrix D by the weight matrix W,
where D (i, i) ═ Σjw(i,j);
Step 3.3, solving an equation (D-W) y which is lambda Dy to obtain a characteristic value and a corresponding characteristic vector, and determining a second small characteristic vector;
step 3.4 according to the formula
Figure BDA00001919392700123
Finding out a segmentation point, namely a point with the minimum Ncut value, and segmenting the image into two sub-images by using the vertex of the second small feature vector bipartite graph;
step 3.5, calculating a weight matrix for the subgraphs obtained by the two divisions respectively, and repeating the steps 3.2 to 3.4;
step 3.6 repeats step 3.5 until the value of Ncut exceeds a given threshold.

Claims (2)

1. An image segmentation method based on a generalized data field and an Ncut algorithm is characterized in that: comprises the following steps of (a) carrying out,
step 1, hierarchical grid division and potential value estimation, which specifically comprises the following steps,
step 1.1, converting the RGB color feature space of the image into L u v or L a b color feature space, dividing L u v or L a b color feature space Ω into 2N × 2N small grids as the first layer grid, calculating the average value of the data points in each small grid, and forming a new special grid by using the average value as the feature value of the small gridSign space omegas
Step 1.2, combining the eight-neighborhood small grids into a large grid serving as a second-layer grid to form a new feature space omegabAnd its corresponding grid space coordinate value;
step 1.3, potential value of each small grid in the first layer grid is calculated according to the potential value estimation formula
Figure FDA00001919392600011
Figure FDA00001919392600013
In the eigenspace omegabIn (1),representing coordinates of (i)th,jth,kth) The grid of (a) is formed,is (i)th,jth,kth) The quality of the grid is such that, f i u j u k u = ( f i u j u k u ( 1 ) , f i u j u k u ( 2 ) , f i u j u k u ( 3 ) ) , w i u j u k u = Q i u j u k u &times; e - ( x - x i u j u k u &sigma; X ) 2 + ( y - y i u j u k u &sigma; Y ) 2 ,
Figure FDA00001919392600018
is located in the grid (i)th,jth,kth) The number of inner data points is,
Figure FDA00001919392600019
is corresponding to the grid (i)th,jth,kth) Is empty ofInter-coordinate value, σXAnd σYIs a spatial influence factor, σ ═ ch ═ c (h)1,h2,h3)T,σj=chjJ =1,2, 3, c is a proportionality constant, h ═ h (h)1,h2,h3)TIs the window width of the kernel density estimate, k (x) is the unit potential function;
step 2, clustering the small grids according to potential value distribution of the small grids, mapping clustering results to images, and dividing the images into different mutually disjoint areas, wherein the specific steps are as follows:
step 2.1, solving the partial derivative of the formula in the step 1.3 to obtain a formula:
Figure FDA000019193926000110
calculating partial derivatives of each small mesh in the first layer mesh, determining all vertex meshes according to the partial derivatives, and describing the cluster { C by combining the vertex meshes through a six-neighborhood modek}k=1,…,vIn which C iskComprising at least one vertex mesh;
step 2.2 for each k ═ 1,2, …, v, cluster CkUsing the vertex grid as the initial data point, searching the grid along the direction of rising gradient value until the gradient value does not rise any more
Figure FDA00001919392600022
By now, the small grids searched along the road are divided into clusters CkPerforming the following steps;
step 2.3 after the search is completed, for each cluster CkK is 1,2, …, v, mapping all data points in each cluster to an image, merging image fragments with the number of data points less than M (20 is less than or equal to M is less than or equal to 100) points on space, and dividing an image into R misaligned initial regions omegai,i=1,2,…,R;
Step 3, combining the over-divided regions by using a region-based Ncut algorithm; the formula for calculating the weight matrix W is:
w ( i , j ) =
1 n i &Sigma; f &Element; &Omega; i e - [ | | f - F j | | &sigma; I ] 2 + 1 n j &Sigma; f &Element; &Omega; j e - [ | | f - F i | | &sigma; I ] 2 0 .
2. an image segmentation method based on generalized data fields and Ncut algorithm according to claim 1, characterized in that: the step 3 specifically comprises the following steps of,
step 3.1 constructs an undirected weighted graph G ═ V, E, W based on the non-summed initial regions obtained in step 2.3, V being the vertices of the image and E being the edges connecting the verticesSet, W is a weight matrix, according to the formula w ( i , j ) =
1 n i &Sigma; f &Element; &Omega; i e - [ | | f - F j | | &sigma; I ] 2 + 1 n j &Sigma; f &Element; &Omega; j e - [ | | f - F i | | &sigma; I ] 2 0
Calculating a weight matrix W;
step 3.2 calculates the diagonal matrix D by the weight matrix W,
where D (i, i) ═ Σjw(i,j);
Step 3.3, solving an equation (D-W) y which is lambda Dy to obtain a characteristic value and a corresponding characteristic vector, and determining a second small characteristic vector;
step 3.4 according to the formula
Figure FDA00001919392600031
Finding out a segmentation point, namely a point with the minimum Ncut value, and segmenting the image into two sub-images by using the vertex of the second small feature vector bipartite graph;
step 3.5, calculating a weight matrix for the subgraphs obtained by the two divisions respectively, and repeating the steps 3.2 to 3.4;
step 3.6 repeats step 3.5 until the value of Ncut exceeds a given threshold.
CN201210265614.3A 2012-07-23 2012-07-23 A kind of image partition method based on broad sense data fields and Ncut algorithm Active CN102855624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210265614.3A CN102855624B (en) 2012-07-23 2012-07-23 A kind of image partition method based on broad sense data fields and Ncut algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210265614.3A CN102855624B (en) 2012-07-23 2012-07-23 A kind of image partition method based on broad sense data fields and Ncut algorithm

Publications (2)

Publication Number Publication Date
CN102855624A true CN102855624A (en) 2013-01-02
CN102855624B CN102855624B (en) 2015-09-16

Family

ID=47402186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210265614.3A Active CN102855624B (en) 2012-07-23 2012-07-23 A kind of image partition method based on broad sense data fields and Ncut algorithm

Country Status (1)

Country Link
CN (1) CN102855624B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679760A (en) * 2013-12-05 2014-03-26 河海大学 Color image segmentation method based on Normalized cut
CN105069787A (en) * 2015-08-04 2015-11-18 浙江慧谷信息技术有限公司 Image joint segmentation algorithm based on consistency function space mapping
CN107871321A (en) * 2016-09-23 2018-04-03 南开大学 Image partition method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060247525A1 (en) * 2005-04-28 2006-11-02 Zhimin Huo Segmentation of lesions in ultrasound images
CN101923712A (en) * 2010-08-03 2010-12-22 苏州大学 Particle swarm optimization-based gene chip image segmenting method of K-means clustering algorithm
CN102222234A (en) * 2011-07-14 2011-10-19 苏州两江科技有限公司 Image object extraction method based on mean shift and K-means clustering technology
CN102254326A (en) * 2011-07-22 2011-11-23 西安电子科技大学 Image segmentation method by using nucleus transmission

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060247525A1 (en) * 2005-04-28 2006-11-02 Zhimin Huo Segmentation of lesions in ultrasound images
CN101923712A (en) * 2010-08-03 2010-12-22 苏州大学 Particle swarm optimization-based gene chip image segmenting method of K-means clustering algorithm
CN102222234A (en) * 2011-07-14 2011-10-19 苏州两江科技有限公司 Image object extraction method based on mean shift and K-means clustering technology
CN102254326A (en) * 2011-07-22 2011-11-23 西安电子科技大学 Image segmentation method by using nucleus transmission

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
伊怀锋 等: "基于均值偏移的彩色图像分割算法", 《计算机应用》 *
席秋波: "基于Ncut的图像分割算法研究", 《中国优秀硕士学位论文全文数据库》 *
陈彦至 等: "Ncut 在图像分割中的应用", 《计算机技术与发展》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679760A (en) * 2013-12-05 2014-03-26 河海大学 Color image segmentation method based on Normalized cut
CN103679760B (en) * 2013-12-05 2016-06-22 河海大学 Color image segmentation method based on Normalized cut
CN105069787A (en) * 2015-08-04 2015-11-18 浙江慧谷信息技术有限公司 Image joint segmentation algorithm based on consistency function space mapping
CN107871321A (en) * 2016-09-23 2018-04-03 南开大学 Image partition method and device
CN107871321B (en) * 2016-09-23 2021-08-27 南开大学 Image segmentation method and device

Also Published As

Publication number Publication date
CN102855624B (en) 2015-09-16

Similar Documents

Publication Publication Date Title
Wei et al. Superpixel hierarchy
US10665013B2 (en) Method for single-image-based fully automatic three-dimensional hair modeling
CN104504734B (en) A kind of color of image transmission method based on semanteme
CN108537239B (en) Method for detecting image saliency target
CN108319957A (en) A kind of large-scale point cloud semantic segmentation method based on overtrick figure
Guimarães et al. A hierarchical image segmentation algorithm based on an observation scale
CN107330897A (en) Image partition method and its system
CN105513070A (en) RGB-D salient object detection method based on foreground and background optimization
CN105354593B (en) A kind of threedimensional model sorting technique based on NMF
CN106327506A (en) Probability-partition-merging-based three-dimensional model segmentation method
CN110363236B (en) Hyperspectral image extreme learning machine clustering method for embedding space-spectrum combined hypergraph
CN102799646B (en) A kind of semantic object segmentation method towards multi-view point video
CN105046689B (en) A kind of interactive stereo-picture fast partition method based on multi-level graph structure
CN105389821B (en) It is a kind of that the medical image cutting method being combined is cut based on cloud model and figure
CN104318563A (en) Organ skeleton extraction method based on medical images
CN111680579A (en) Remote sensing image classification method for adaptive weight multi-view metric learning
Giraud et al. SCALP: Superpixels with contour adherence using linear path
Song et al. Joint graph learning and video segmentation via multiple cues and topology calibration
CN111460966B (en) Hyperspectral remote sensing image classification method based on metric learning and neighbor enhancement
CN109741358A (en) Superpixel segmentation method based on the study of adaptive hypergraph
CN102855624B (en) A kind of image partition method based on broad sense data fields and Ncut algorithm
JP2011150605A (en) Image area dividing device, image area dividing method, and image area dividing program
CN112884884A (en) Candidate region generation method and system
CN107085725A (en) A kind of method that image-region is clustered by the LLC based on adaptive codebook
CN107492101B (en) Multi-modal nasopharyngeal tumor segmentation algorithm based on self-adaptive constructed optimal graph

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant