CN106340020A - Super-pixel segmentation method and device - Google Patents
Super-pixel segmentation method and device Download PDFInfo
- Publication number
- CN106340020A CN106340020A CN201510404423.4A CN201510404423A CN106340020A CN 106340020 A CN106340020 A CN 106340020A CN 201510404423 A CN201510404423 A CN 201510404423A CN 106340020 A CN106340020 A CN 106340020A
- Authority
- CN
- China
- Prior art keywords
- pixel
- center point
- initial center
- point
- euclidean distance
- 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.)
- Pending
Links
Abstract
The invention provides a super-pixel segmentation method and device. The method comprises the steps that N pixel points use multidimensional space values, and parameters for controlling clustering tightness are preset; Euclidean distance between every two pixel points in N pixel points is calculated; the initial center points of K clusters are selected among N pixel points through the preset minimum Euclidean distance and the center point probability value; a circular ring inequation is used; the nearest center point of other pixel points is determined among K initial center points; and the pixel points which belong to the same center point are identified as the same super-pixel to realize K super-pixel segmentation. According to the embodiment provided by the invention, compactness parameters are used; the super-pixel compactness can be directly controlled; the center points of K super-pixels are determined through the circular ring inequation; the number of times of inner loop of a K-means clustering method is greatly reduced; the super-pixel segmentation speed is accelerated; and the problems of slow segmentation speed and poor compactness in the prior art are solved.
Description
Technical field
The present embodiments relate to image processing techniquess, more particularly, to a kind of superpixel segmentation method and device.
Background technology
The sensuously consistent pixel clusters in ability domain representation digital picture of super-pixel (superpixel), by
Multiple pixel compositions, typically appear as identical or approximate color and brightness.Super-pixel utilizes pixel and picture
Between element, the similarity degree of feature is grouped to pixel, thus obtaining the redundancy of image, reduces
The complexity of successive image process task.
Super-pixel segmentation technology can be used for the application such as target recognition, image segmentation, three-dimensional reconstruction.Using super
The major advantage of pixel is that computational efficiency is high.Compared with being represented using pixel, represented using super-pixel
The image primitive quantity required for computing can be greatly reduced.
Superpixel segmentation method has many kinds, substantially can be divided into the method based on graph theory and be based under gradient
The method of fall, illustrates to main method below:
The feature of normalized cuts method is the super-pixel controllable quantity producing, compact shape, each super
Elemental area is substantially similar.Shortcoming is that algorithm is computationally intensive, speed is slow.
Mean shift method belongs to pattern search algorithm, and it passes through in pixel characteristic space iteration is mobile
The heart, generates image segmentation.The super-pixel that mean shift method produces is accurate for localized variation.Shortcoming
It is possible to produce irregular super-pixel it is impossible to directly control super-pixel quantity, size, compactness.
Quick shift dividing method is also a kind of pattern search dividing method, more a lot of soon than mean shift.
This algorithm passes through continuous to promote each of pixel characteristic space data point, towards can make the gloomy density of handkerchief
Estimate that the nearest pixel increasing moves, to realize the segmentation of image.Shortcoming is the super-pixel producing in shape
It is not fixing on shape and quantity, and the compactness of super-pixel is also poor.
The basic thought of turbo pixel is to randomly select a quantity of seeds point on image and adopt water
The method of flat collection is expanded, and controls the size of super-pixel block by limiting rate of increase.Shortcoming is point
The super-pixel cut out is defined to homogeneous size, compactness and border degree of depending on, splitting speed extremely slow and
It is relatively poor that border depends on situation.
There is a problem of in therefore existing super-pixel segmentation technology that splitting speed is slow, compactness is poor.
Content of the invention
The embodiment of the present invention provides a kind of superpixel segmentation method and device, is existed with overcoming in prior art
The problem that splitting speed is slow, compactness is poor.
The embodiment of the present invention provides a kind of superpixel segmentation method, comprising:
According to the hyperspace numerical value of each pixel in n pending pixel and default closely
Degree parameter, calculates the Euclidean distance between each two pixel, described compactness in described n pixel
Parameter is the parameter for controlling super-pixel compactness;
According to the Euclidean distance between each two pixel in described n pixel and default the shortest
Euclidean distance and central point probit, determine k initial center point in described n pixel, described
K is less than n, described the shortest Euclidean distance be used for representing pixel to described pixel nearest in
The shortest Euclidean distance of heart point;
Using annulus inequality, in described k initial center point, determine the nearest of other pixels respectively
Central point, the pixel belonging to same central point is defined as same super-pixel, other pictures described
Vegetarian refreshments is the pixel in described n pixel in addition to k initial center point.
The embodiment of the present invention also provides a kind of super-pixel segmentation device, comprising:
Computing module, for the hyperspace numerical value according to each pixel in n pending pixel
And default tightness parameter, calculate in described n pixel the Euclidean between each two pixel away from
From described tightness parameter is the parameter for controlling super-pixel compactness;
First determining module, for each two pixel in n pixel being calculated according to described computing module
Euclidean distance between point, and default the shortest Euclidean distance and central point probit, at described n
K initial center point is determined, described k is less than n, and described the shortest Euclidean distance is used for representing in pixel
One pixel is to the shortest Euclidean distance of the nearest central point of described pixel;
Second determining module, for using annulus inequality, k determining in described first determining module
Determine the nearest central point of other pixels in initial center point respectively, same central point will be belonged to
Pixel is defined as same super-pixel, and other pixels described are except k in described n pixel
Pixel outside initial center point.
Embodiment of the present invention superpixel segmentation method, n pixel is adopted hyperspace numerical value, and in advance
If controlling the parameter of cluster compactness, calculate the Euclidean distance between each two pixel in n pixel,
By default the shortest Euclidean distance and central point probit, select to determine k in described n pixel
The initial center point of individual cluster, further, using annulus inequality, in described k initial center point
The middle nearest central point determining other pixels respectively, will belong to the pixel of same central point afterwards
It is defined as same super-pixel, realize the segmentation of k super-pixel.Because the embodiment of the present invention is using closely
Degree parameter, can directly control the compactness of super-pixel, determine k due to employing the search of annulus inequality
The central point of individual super-pixel, is greatly reduced the number of times of k means clustering method interior loop, accelerates super
The splitting speed of pixel, solves the problems, such as in prior art that splitting speed is slow, compactness is poor.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality
The accompanying drawing applying required use in example or description of the prior art be briefly described it should be apparent that, under
Accompanying drawing in the description of face is some embodiments of the present invention, for those of ordinary skill in the art,
On the premise of not paying creative labor, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of superpixel segmentation method embodiment one of the present invention;
Fig. 2 is a kind of flow chart of the embodiment two of superpixel segmentation method of the present invention;
Fig. 3 is the schematic diagram of the annulus search adopting in the embodiment of the present invention;
Fig. 4 is a kind of structural representation of the embodiment three of present invention super-pixel segmentation device.
Specific embodiment
Purpose, technical scheme and advantage for making the embodiment of the present invention are clearer, below in conjunction with this
Accompanying drawing in bright embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained under the premise of not making creative work
The every other embodiment obtaining, broadly falls into the scope of protection of the invention.
Fig. 1 is the flow chart of superpixel segmentation method embodiment one of the present invention, as shown in figure 1, this enforcement
The method of example may include that
Step 101, according to the hyperspace numerical value of each pixel in n pending pixel and
Default tightness parameter, calculates the Euclidean distance between each two pixel in described n pixel,
Described tightness parameter is the parameter for controlling super-pixel compactness;
Wherein, described hyperspace numerical value includes 3-dimensional color value and 2 dimension space positional values;
Include when step 101 implements:
Using formulaCalculate the color between two pixels
Apart from dlab, wherein, i represents a pixel, and j represents one other pixel point, and l, a, b are pixel
Value in lab color space;
Using formulaCalculate the locus distance between two pixels
dxy, wherein, x represents the position numerical value of pixel, and xy is pixel i, and j is on image x/y plane
Position;
Using formulaCalculate Euclidean distance d between two pixels, wherein,Represent the interval between the central point of super-pixel.
Step 102, according to the Euclidean distance between each two pixel in described n pixel, and
Default the shortest Euclidean distance and central point probit, during in described n pixel, determination k is initial
Heart point, described k is less than n, and described the shortest Euclidean distance is used for representing a pixel to described pixel
Nearest central point the shortest Euclidean distance.
The principle selecting initial center point in the embodiment of the present invention is between the initial center point choosing
Distance is remote as far as possible, and that is, the Euclidean distance value between initial center point is big as far as possible.
Wherein, step 102 includes when implementing:
Step a, select any one pixel x in n pixel as the first initial center point,
C1=x;
Step b, calculate other n-1 pixel respectively to the first initial center point c1Euclidean distance
d(c1), wherein, other n-1 pixel be in n pixel in addition to the first initial center point x
Other pixels;
Step c, according to step b calculate other n-1 pixel each to the first initial center point x
Euclidean distance d (c1), by d (c1) higher value corresponding pixel x1As the second initial center point c2,
c2=x1∈n;
Wherein, step c includes when implementing: first, calculates every in other n-1 pixel
Individual pixel is to the first initial center point c1Euclidean distance d (c1) quadratic sum, i.e. σ d (c1)2, afterwards,
A pixel x is selected in other n-1 pixel1It is assumed that pixel x1To the first initial center
Point c1Euclidean distance be d (x1), by d (x1) square, i.e. d (x1)2Divided by σ d (c1)2Alternatively
Two initial center point c2Probit, that is,Work as probitWhen bigger, corresponding picture
Vegetarian refreshments x1Elect the second initial center point c as2Probability also bigger, conversely, working as probitLess
When, corresponding pixel x1Elect the second initial center point c as2Probability also less;
Step d, calculate other n-2 pixel respectively to the second initial center point c2Euclidean distance
d(c2), wherein, other n-2 pixel is except the first initial center point c in n pixel1With
Two initial center point c2Outside other pixels;
Step e, according to step d calculate other n-2 pixel to the second initial center point c2Europe
Family name is apart from d (c2), by d (c2) it is higher value corresponding pixel x2As the 3rd initial center point c3,
c3=x " ∈ n;Wherein, step e includes when implementing: first, calculates other n-2 pixel
In each pixel to the second initial center point c2Euclidean distance d (c2) quadratic sum, i.e. σ d (c2)2,
Afterwards, other n-2 pixel selects a pixel x2It is assumed that pixel x2Initial to second
Central point c2Euclidean distance be d (x2), by d (x2) square, i.e. d (x2)2Divided by σ d (c2)2Make
For selecting the 3rd initial center point c3Probit, that is,Work as probitWhen bigger,
Corresponding pixel x2Elect the 3rd initial center point c as3Probability also bigger, conversely, working as probitMore hour, corresponding pixel x2Elect the 3rd initial center point c as3Probability also less;
By that analogy, until selecting k-th initial center point, that is, select the general of k-th initial center point
Rate value isWhen probit isWhen bigger, corresponding pixel xk-1Elect kth as
Individual initial center point ckProbability also bigger, conversely, working as probitMore hour, corresponding picture
Vegetarian refreshments xk-1Elect k-th initial center point c askProbability also less;
Wherein, ck-1For k-1 initial center point, d (ck-1) it is except at the beginning of k-1 in n pixel
Other pixels outside beginning central point, that is, each of n-k+1 pixel pixel is to kth -1
The Euclidean distance of initial center point;d(xk-1) for the one of pixel x in n-k+1 pixelk-1Arrive
The Euclidean distance of -1 initial center point of kth.
Step 103, utilize annulus inequality, determine other pictures respectively in described k initial center point
The nearest central point of vegetarian refreshments, by the pixel using same initial center point as its nearest central point
Be defined as same super-pixel, other pixels described be in described n pixel except k initially in
Pixel outside heart point.
Include when step 103 implements:
≤ | | x-c | |, wherein, x is for step a, described annulus inequality include the first inequality | | | x | |-| | c ' | | |
Any pixel point in other pixels, c is set to distribute to the initial center point of pixel x, and described first
Inequality represents with initial center point c for initial point one circle ring area of definition, if meeting described first
Formula, then can determine that presence other central points c' than initial center point c closer to pixel x;
Step b, central point c' is set to distribute to initial center point c of pixel x in step a, that is,
Say, make c'=c, judge whether again than c closer to pixel x central point c', if meeting described
First inequality, then can determine that exist than c closer to pixel x central point c';
Circulating repetition step b, until being unsatisfactory for described first inequality, or meets the second inequality
| | | x-c | | < | | | x | |-| | c ' | | | or | | x-c | |≤| | x-c ' | |, then can determine that and do not exist than c closer to pixel x
Central point c', then described central point c is defined as the nearest central point of described pixel x, wherein,
C ∈ k, c ' ∈ k;
It should be noted that step b is when implementing, it is that central point c' is replaced with the first of pixel x
Beginning central point c is that is to say, that define a circle ring area with initial center point c' for initial point, if meeting not
Equation | | | x | |-| | c " | |≤| | x-c'| |, then can determine that exist than c' closer to pixel x central point c ";Afterwards, by c "
Replace with initial center point c of pixel x that is to say, that with initial center point c " define one for initial point
Circle ring area, if meeting inequality | | | x | |-| | c " ' | |≤| | x-c " | |, can determine that presence than c " closer to pixel x
Central point c " ';
By that analogy, until determining the immediate central point of pixel x, for example, work as satisfaction
| | x-c " ' | | < | | | x | |-| | c " " | | | or | | x-c " ' | |≤| | x-c " " | |, you can determine and do not exist than c " ' closer in pixel x
Heart point c " ", then by central point c " ' determine the immediate central point of pixel x.
Afterwards, the pixel belonging to same central point is defined as same super-pixel.
Further, after step 103, that is, utilize annulus inequality, in described k initial center point
The middle nearest central point determining other pixels respectively, the pixel belonging to same central point is determined
After same super-pixel, also include:
Isolated pixel point is added the super-pixel closest with described isolated pixel point, wherein, described isolated
Pixel refers to also not determine the pixel of nearest central point by above-mentioned steps 103;For example, picture is set
Vegetarian refreshments x, to the longest Euclidean distance of nearest central point, calculates pixel x respectively to described k initial center
The Euclidean distance of point, must beat k Euclidean distance it is assumed that this k Euclidean distance is all higher than arranging the longest Euclidean
Distance, then can determine that pixel x is isolated pixel point, now can be added to this isolated pixel point and be somebody's turn to do
The closest super-pixel of described isolated pixel point.
In another embodiment of the present invention, can also include after step 101:
Select k pixel as initial center point in described n pixel;
Each initial center point corresponding pixel cluster (quite with above-mentioned super-pixel), according to it
His pixel arrives the Euclidean distance of described k initial center point respectively, and other pixels described are distributed to
The initial center point corresponding pixel cluster nearest with other pixels described;
Redefine the central point of cluster according to default cluster average, wherein, described cluster average isniFor belonging to the pixel number in cluster i, pxFor belonging to the data vector clustering i (such as
5 dimension space numerical value), i ∈ k;It should be noted that cluster here represents super-pixel;
So circulate, until object functionMeet end condition (such as
Meet default threshold value), described n pixel is divided into the super-pixel of k cluster, wherein, xjFor
Data vector (as 5 dimension space numerical value), siFor xjResiding cluster (super-pixel), μiFor clustering siMiddle picture
The meansigma methodss of vegetarian refreshments.
N pixel is adopted hyperspace numerical value by the present embodiment first, and default control cluster is closely
The parameter of degree, calculates the Euclidean distance between each two pixel in n pixel, by default
Short Euclidean distance and central point probit, select to determine the initial of k cluster in described n pixel
Central point, further, using annulus inequality, determines it in described k initial center point respectively
The pixel belonging to same central point is defined as same by the nearest central point of his pixel afterwards
Super-pixel, realizes the segmentation of k super-pixel.Because the embodiment of the present invention uses tightness parameter, permissible
Directly control the compactness of super-pixel, further, the present embodiment also uses the search of annulus inequality and determines
The central point of k super-pixel, can be greatly reduced the number of times of k means clustering method interior loop, greatly
About reduce by 97% interior loop number of times, accelerate the splitting speed of super-pixel, prior art can be solved
The problem that middle splitting speed is slow, compactness is poor.
Adopt specific embodiment below, the technical scheme of embodiment of the method shown in Fig. 1 is carried out specifically
Bright.
Fig. 2 is a kind of flow chart of the embodiment two of superpixel segmentation method of the present invention, as shown in Fig. 2
The method of the present embodiment may include that
Step 201, view data is converted to cielab color space by primary color space, to picture
The position xy of vegetarian refreshments is normalized conversion;
Step 202, by view data pixel formed labxy totally 5 dimension strong point;
The embodiment of the present invention carries out pixel cluster using in 5 dimension data space labxy.Wherein lab is figure
As pixel is in the color vector of cielab color space, xy is position on image x/y plane for the image pixel
Put.Because the ultimate range of two color-values is limited in cielab color space, and the sky of x/y plane
Between distance related to picture size.So only after normalization xy space length, could be in 5 dimension data spaces
Middle use Euclidean distance is compared.
Assume that setting super-pixel number is k, target is to divide an image into k approximately equalised super-pixel.
For the image having n pixel, the approximate size of each super-pixel is n/k pixel, the center of super-pixel
Interval between point is
Concrete distance calculating method:
Wherein d is the weighted sum of lab distance and normalized x/y plane distance.Parameter m can be used in controlling
The compactness of super-pixel.
Step 203, using kmeans++ algorithms selection k means clustering algorithm initial center point;
Wherein, k-means++ algorithm selects initial center according to the probability ratio of pixel to nearest central point
Point, specifically includes:
(1) randomly choose initial center point c1=x from pixel n;
(2) setting d (x) is as the shortest Euclidean distance from a pixel x to nearest central point;
(3) select next central point ci, wherein ci=x ' ∈ x, its probit is
(4) 2 and 3 are repeated until selecting all of k center.
Step 204, using annulus search k means Method accelerate cluster;
The embodiment of the present invention annulus search k means Method be on the basis of k means Method improve and
Come.
Wherein, k means Method is a kind of Unsupervised clustering algorithm, and its workflow is as follows:
(1) arbitrarily select k pixel from n pixel as initial cluster center, here initial
Cluster centre is equivalent to the initial center point in embodiment illustrated in fig. 1;
(2) for other pixels, arrive the Euclidean distance of these cluster centres according to them, respectively by them
Distribute to the cluster centre nearest with it, cluster centre here is equivalent to the center in embodiment illustrated in fig. 1
Point;
(3) according to the cluster centre that cluster mean value computation is new, cluster averageniFor belonging to
The vector number of cluster i, pxFor belonging to the vector of cluster i;
(4) so circulate, until target function value meets end condition, finally split data into k class.
In the present embodiment, using error sum of squares criterion function as object function:
Wherein xjFor data vector, siFor xjResiding cluster, νiFor clustering siThe meansigma methodss at midpoint.
Due to there is the substantial amounts of step comparing with cluster centre, the speed of impact cluster in above-mentioned circulation.
For this reason, the annulus search k means clustering method application annulus inequality of the embodiment of the present invention, for eliminating k
The step that in means clustering method interior loop, majority is compared with cluster centre, Fig. 3 is in the embodiment of the present invention
Using annulus search schematic diagram.
Interior loop relatively in only need to consider meet as lower inequality center c ':
|||x||-||c′|||≤||x-c|| (5)
Wherein x is data point, and c is the nearest central point distributing before.This inequality defines a circle
Ring region, central point is initial point, including any than a closer to x central point c, a here represents center
Point identification (as numbered).If formula 5 is unsatisfactory for,
| | x-c | | < | | | x | |-| | c ' | | | (6)
≤||x-c′|| (7)
According to triangle inequality, the center c ' being unsatisfactory for formula 5 inequality will not be than c closer to x.I.e. x will
Still it is assigned to cluster centre c, rather than be assigned to cluster centre c '.
The sign flag that annulus search k means clustering algorithm uses is described as follows:
C (j): cluster centre j (wherein 1≤j≤k)
S (j): cluster centre c (j) arrives its most paracentral distance
X (i): data point i (wherein 1≤i≤n)
A (i): mark data points i allocated center number
Apart from the upper bound between u (i): x (i) and c (a (i))
L (i): x (i) arrive it second paracentral apart from lower bound
Annulus search k means clustering algorithm flow process is as follows:
(1) | | x (i) | | is calculated to all i;
(2) circulation is until convergence
(21) for all of j, calculate s (j) and | | c (j) | |
(22) according to norm size to all centers ascending sort
(23) circulation i=1 arrives | x |
(231) make m=max (s (a (i))/2, l (i))
(232) if u (i)≤m jumps to next i
(233) make u (i)=d (x (i), c (a (i)))
(234) if u (i)≤m, jump to next i
(235) make l (i)=d (x (i), c (b (i)))
(236) make r=max (l (i), u (i))
(237) make j ← { j | | | | x (i) | |-| | c (j) | | |≤r }
(238) for all of j ∈ j, for cyclic search circle ring area
(2381) if d (x (i), c (j)) < u (i), then find new nearest center
L (i)=u (i);B (i)=a (i)
U (i)=d (x (i), c (j));A (i)=j
(2382) otherwise, if d (x (i), c (j)) < l (i), then in finding that new second is near
Heart l (i)=d (x (i), c (j)), a (i)=j
(2383) inequality judges to terminate
(239) loop ends
(24) loop ends
Each Dian Dao center mobile
Update the upper bound and lower bound
(3) loop ends
Search for k means Method using annulus and k means Method interior loop secondary can be greatly reduced
Number, reduces by about 97% interior loop number of times, and lifting in efficiency is no less than 10 times.
The similar pixel generating after step 205, cluster is labeled as the same super-pixel after splitting;
Step 206, isolated pixel is added to neighbouring super-pixel.
View data is switched to cielab color space by primary color space by the present invention first, add into
The normalized pixel position xy of row, forms labxy totally 5 dimension data space;For 5 dimension data spaces
All data points, using the initial center point of kmeans++ algorithms selection k means clustering algorithm;Use
Annulus search k means Method accelerates cluster;After the like numbers strong point generating after cluster is labeled as segmentation
Same super-pixel;Isolated pixel is added neighbouring super-pixel.Compared with prior art, this
In bright, super-pixel quantity is determined by the k value in k mean cluster, can directly control super-pixel quantity;
Accelerating algorithm efficiency is searched for by annulus.
It should be noted that it is " initial using kmeans++ algorithms selection k means clustering algorithm in the present invention
Central point " step is alternative step, uses this step this method instead and is still protected.In selecting initially
The method of heart point has multiple, and kmeans++ algorithm is used herein.Other alternative initial methods
Including, as seed point, random initializtion method, genetic algorithm is initial for the point selecting fixed-grid distance
Change method etc..
Fig. 4 is a kind of structural representation of the embodiment three of present invention super-pixel segmentation device, as Fig. 4 institute
Show, the device of the present embodiment may include that
Computing module 41, for the hyperspace number according to each pixel in n pending pixel
Value and default tightness parameter, calculate the Euclidean between each two pixel in described n pixel
Distance, described tightness parameter is the parameter for controlling super-pixel compactness;
First determining module 42, for each two picture in n pixel being calculated according to described computing module
Euclidean distance between vegetarian refreshments, and default the shortest Euclidean distance and central point probit, in described n
K initial center point is determined, described k is less than n, and described the shortest Euclidean distance is used for table in individual pixel
Show a pixel to the shortest Euclidean distance of the nearest central point of described pixel;
Second determining module 43, for using annulus inequality, the k determining in described first determining module
Determine the nearest central point of other pixels in individual initial center point respectively, same central point will be belonged to
Pixel be defined as same super-pixel, other pixels described be described n pixel in except k
Pixel outside individual initial center point.
For example, above-mentioned hyperspace numerical value includes 3-dimensional color value and 2 dimension space positional values;
Wherein, computing module 41 specifically can be used for:
Using formulaCalculate the color between two pixels
Distance, wherein, i represents a pixel, and j represents one other pixel point, and l, a, b exist for pixel
Value in lab color space;
Using formulaCalculate the locus distance between two pixels,
Wherein, x represents the position numerical value of pixel, and xy is pixel i, position on image x/y plane for the j;
Using formulaCalculate the Euclidean distance between two pixels, wherein,Represent the interval between the central point of super-pixel.
For example, described first determining module 42 specifically can be used for:
Step a, select any one pixel x in n pixel as the first initial center point,
C1=x;
Step b, according to each pixel in other n-1 pixel to the first initial center point c1Europe
Family name is apart from d (c1), calculate each pixel in other n-1 pixel to the first initial center point c1's
Euclidean distance d (c1) quadratic sum, i.e. σ d (c1)2, wherein, other n-1 pixel is n pixel
Other pixels in addition to the first initial center point x in point;
Step c, select one of pixel x in other n-1 pixel1If, pixel x1Arrive
First initial center point c1Euclidean distance be d (x1), by d (x1) square, i.e. d (x1)2Divided by σ d (c1)2
Alternatively the second initial center point c2Probit, that is,Work as probitWhen bigger,
Corresponding pixel x1Elect the second initial center point c as2Probability also bigger, conversely, working as probitMore hour, corresponding pixel x1Elect the second initial center point c as2Probability also less;
Step d, according to each pixel in other n-2 pixel to the second initial center point c2's
Euclidean distance d (c2), calculate each pixel in other n-2 pixel to the second initial center point c2
Euclidean distance d (c2) quadratic sum, i.e. σ d (c2)2, wherein, other n-2 pixel is n picture
Except the first initial center point c in vegetarian refreshments1With the second initial center point c2Outside other pixels;
Step e, in other n-2 pixel select a pixel x2If, pixel x2To second
Initial center point c2Euclidean distance be d (x2), by d (x2) square, i.e. d (x2)2Divided by σ d (c2)2
Alternatively the 3rd initial center point c3Probit, that is,Work as probitWhen bigger,
Corresponding pixel x2Elect the 3rd initial center point c as3Probability bigger, conversely, working as probit
More hour, corresponding pixel x2Elect the 3rd initial center point c as3Probability less;
By that analogy, until selecting k-th initial center point, that is, select the general of k-th initial center point
Rate value isWhen probit isWhen bigger, corresponding pixel xk-1Elect kth as
Individual initial center point ckProbability also bigger, conversely, working as probitMore hour, corresponding picture
Vegetarian refreshments xk-1Elect k-th initial center point c askProbability also less;
Wherein, ck-1For k-1 initial center point, d (ck-1) it is except at the beginning of k-1 in n pixel
Other pixels outside beginning central point, that is, each of n-k+1 pixel pixel is to kth -1
The Euclidean distance of initial center point;d(xk-1) for the one of pixel x in n-k+1 pixelk-1Arrive
The Euclidean distance of -1 initial center point of kth.
For example, described second determining module 43 specifically can be used for:
≤ | | x-c | |, wherein, x is for step a, described annulus inequality include the first inequality | | | x | |-| | c ' | | |
Any pixel point in other pixels, c is set to distribute to the initial center point of pixel x, and described first
Inequality represents with initial center point c for initial point one circle ring area of definition, if meeting described first
Formula, then can determine that exist than c closer to pixel x central point c';
Step b, central point c' is set to distribute to initial center point c of pixel x, even c'=c, if
Meet described first inequality, then can determine that exist than c closer to pixel x central point c';
Circulating repetition step b, until being unsatisfactory for described first inequality, or meets the second inequality
| | x-c | | < | | | x | |-| | c ' | | | or | | x-c | |≤x-c ' | |, then can determine that and do not exist than c closer to pixel x
Central point c', then described central point c is defined as the nearest central point of described pixel x, wherein,
C ∈ k, c' ∈ k.Step b implement the associated description that may be referred in embodiment illustrated in fig. 1, no longer
Repeat.
For example, described device also includes: the 3rd determining module 44, if for other pixels described
Also there is the pixel not determining nearest central point in point, then do not determined the pixel of nearest central point
Point as isolated pixel point, and by described isolated pixel point add closest with described isolated pixel point by
The super-pixel that second determining module determines.
The device of the present embodiment, can be used for executing the technical scheme of embodiment of the method shown in Fig. 1 or Fig. 2,
It is realized, and principle is similar with technique effect, and here is omitted.
Described above illustrate and describes some preferred embodiments of the present utility model, but as it was previously stated, should
When understanding that this utility model is not limited to form disclosed herein, it is not to be taken as to other embodiment
Exclusion, and can be used for various other combinations, modification and environment, and can be in utility model described herein
In contemplated scope, it is modified by the technology or knowledge of above-mentioned teaching or association area.And people from this area
The change that carried out of member and change, then all should in this practicality newly without departing from spirit and scope of the present utility model
In the protection domain of type claims.
Claims (10)
1. a kind of superpixel segmentation method it is characterised in that:
According to the hyperspace numerical value of each pixel in n pending pixel and default closely
Degree parameter, calculates the Euclidean distance between each two pixel, described compactness in described n pixel
Parameter is the parameter for controlling super-pixel compactness;
According to the Euclidean distance between each two pixel in described n pixel and default the shortest
Euclidean distance and central point probit, determine k initial center point in described n pixel, described
K is less than n, described the shortest Euclidean distance be used for representing pixel to described pixel nearest in
The shortest Euclidean distance of heart point;
Using annulus inequality, in described k initial center point, determine the nearest of other pixels respectively
Central point, the pixel belonging to same central point is defined as same super-pixel, other pictures described
Vegetarian refreshments is the pixel in described n pixel in addition to k initial center point.
2. method according to claim 1 is it is characterised in that described hyperspace numerical value includes 5
Dimension space numerical value, specifically includes 3-dimensional color value and 2 dimension space positional values;
In the described n pixel of described calculating, the Euclidean distance between each two pixel includes:
Using formula Calculate the color between two pixels
Distance, wherein, i represents a pixel, and j represents one other pixel point, and l, a, b exist for pixel
Value in lab color space;
Using formulaCalculate the locus distance between two pixels,
Wherein, x represents the position numerical value of pixel, and xy is pixel i, position on image x/y plane for the j;
Using formulaCalculate the Euclidean distance between two pixels, wherein,Represent the interval between the central point of super-pixel.
3. method according to claim 1 is it is characterised in that according in described n pixel
Euclidean distance between each two pixel, and default the shortest Euclidean distance and central point probit,
K initial center point is determined in described n pixel, comprising:
Step a, select any one pixel x in n pixel as the first initial center point,
C1=x;
Step b, according to each pixel in other n-1 pixel to the first initial center point c1Europe
Family name is apart from d (c1), calculate each pixel in other n-1 pixel to the first initial center point c1's
Euclidean distance d (c1) quadratic sum, i.e. σ d (c1)2, wherein, other n-1 pixel is n pixel
Other pixels in addition to the first initial center point x in point;
Step c, select one of pixel x in other n-1 pixel1If, pixel x1Arrive
First initial center point c1Euclidean distance be d (x1), by d (x1) square, i.e. d (x1)2Divided by σ d (c1)2
Alternatively the second initial center point c2Probit, that is,Work as probitWhen bigger,
Pixel x1Elect the second initial center point c as2Probability also bigger;
Step d, according to each pixel in other n-2 pixel to the second initial center point c2's
Euclidean distance d (c2), calculate each pixel in other n-2 pixel to the second initial center point c2
Euclidean distance d (c2) quadratic sum, i.e. σ d (c2)2, wherein, other n-2 pixel is n picture
Except the first initial center point c in vegetarian refreshments1With the second initial center point c2Outside other pixels;
Step e, in other n-2 pixel select a pixel x2If, pixel x2To second
Initial center point c2Euclidean distance be d (x2), by d (x2) square, i.e. d (x2)2Divided by σ d (c2)2
Alternatively the 3rd initial center point c3Probit, that is,Work as probitWhen bigger,
Pixel x2Elect the 3rd initial center point c as3Probability also bigger;
By that analogy, until selecting k-th initial center point, that is, select the general of k-th initial center point
Rate value isWherein, ck-1For k-1 initial center point, d (ck-1) in n pixel
Other pixels in addition to k-1 initial center point, i.e. each of n-k+1 pixel pixel
Point is to the Euclidean distance of -1 initial center point of kth;d(xk-1) for wherein in n-k+1 pixel
Individual pixel xk-1Euclidean distance to -1 initial center point of kth.
4. the method according to any one of claim 1-3 it is characterised in that utilize annulus inequality,
The nearest central point of other pixels is determined respectively in described k initial center point, comprising:
≤ | | x-c | |, wherein, x is for step a, described annulus inequality include the first inequality | | | x | |-| | c ' | | |
Any pixel point in other pixels, c is set to distribute to the initial center point of pixel x, and described first
Inequality represents with initial center point c for initial point one circle ring area of definition, if meeting described first
Formula, then can determine that exist than c closer to pixel x central point c';
Step b, central point c' is set to distribute to initial center point c of pixel x, even c'=c, if full
Described first inequality of foot, then can determine that exist than c closer to pixel x central point c';
Circulating repetition step b, until being unsatisfactory for described first inequality, or meets the second inequality
| | x-c | | < | | | x | |-| | c ' | | | or | | x-c | |≤| | x-c ' | |, then can determine that and do not exist than c closer to pixel x
Central point c', then described central point c is defined as the nearest central point of described pixel x, wherein,
C ∈ k, c ' ∈ k.
5. method according to claim 1 is it is characterised in that utilize annulus inequality, described
Determine the nearest central point of other pixels in k initial center point respectively, same center will be belonged to
After the pixel of point is defined as same super-pixel, also include:
If also there is, in other pixels described, the pixel not determining nearest central point, do not have described
There is the pixel determining nearest central point as isolated pixel point, and described isolated pixel point is added and institute
State the closest super-pixel of isolated pixel point.
6. a kind of super-pixel segmentation device is it is characterised in that include:
Computing module, for the hyperspace numerical value according to each pixel in n pending pixel
And default tightness parameter, calculate in described n pixel the Euclidean between each two pixel away from
From described tightness parameter is the parameter for controlling super-pixel compactness;
First determining module, for each two pixel in n pixel being calculated according to described computing module
Euclidean distance between point, and default the shortest Euclidean distance and central point probit, at described n
K initial center point is determined, described k is less than n, and described the shortest Euclidean distance is used for representing in pixel
One pixel is to the shortest Euclidean distance of the nearest central point of described pixel;
Second determining module, for using annulus inequality, k determining in described first determining module
Determine the nearest central point of other pixels in initial center point respectively, same central point will be belonged to
Pixel is defined as same super-pixel, and other pixels described are except k in described n pixel
Pixel outside initial center point.
7. device according to claim 6 is it is characterised in that described hyperspace numerical value includes 5
Dimension space numerical value, specifically includes 3-dimensional color value and 2 dimension space positional values;
Described computing module specifically for:
Using formula Calculate the color between two pixels
Distance, wherein, i represents a pixel, and j represents one other pixel point, and l, a, b exist for pixel
Value in lab color space;
Using formulaCalculate the locus distance between two pixels,
Wherein, x represents the position numerical value of pixel, and xy is pixel i, position on image x/y plane for the j;
Using formulaCalculate the Euclidean distance between two pixels, wherein,Represent the interval between the central point of super-pixel.
8. device according to claim 6 is it is characterised in that described first determining module is specifically used
In:
Step a, select any one pixel x in n pixel as the first initial center point,
C1=x;
Step b, according to each pixel in other n-1 pixel to the first initial center point c1Europe
Family name is apart from d (c1), calculate each pixel in other n-1 pixel to the first initial center point c1's
Euclidean distance d (c1) quadratic sum, i.e. σ d (c1)2, wherein, other n-1 pixel is n pixel
Other pixels in addition to the first initial center point x in point;
Step c, select one of pixel x in other n-1 pixel1If, pixel x1Arrive
First initial center point c1Euclidean distance be d (x1), by d (x1) square, i.e. d (x1)2Divided by σ d (c1)2
Alternatively the second initial center point c2Probit, that is,Work as probitWhen bigger,
Pixel x1Elect the second initial center point c as2Probability also bigger;
Step d, according to each pixel in other n-2 pixel to the second initial center point c2's
Euclidean distance d (c2), calculate each pixel in other n-2 pixel to the second initial center point c2
Euclidean distance d (c2) quadratic sum, i.e. σ d (c2)2, wherein, other n-2 pixel is n picture
Except the first initial center point c in vegetarian refreshments1With the second initial center point c2Outside other pixels;
Step e, in other n-2 pixel select a pixel x2If, pixel x2To second
Initial center point c2Euclidean distance be d (x2), by d (x2) square, i.e. d (x2)2Divided by σ d (c2)2
Alternatively the 3rd initial center point c3Probit, that is,Work as probitWhen bigger,
Pixel x2Elect the 3rd initial center point c as3Probability also bigger;
By that analogy, until selecting k-th initial center point, that is, select the general of k-th initial center point
Rate value isWherein, ck-1For k-1 initial center point, d (ck-1) in n pixel
Other pixels in addition to k-1 initial center point, i.e. each of n-k+1 pixel pixel
Point is to the Euclidean distance of -1 initial center point of kth;d(xk-1) for wherein in n-k+1 pixel
Individual pixel xk-1Euclidean distance to -1 initial center point of kth.
9. the device according to any one of claim 6-8 is it is characterised in that described second determines mould
Block specifically for:
≤ | | x-c | |, wherein, x is for step a, described annulus inequality include the first inequality | | | x | |-| | c ' | | |
Any pixel point in other pixels, c is set to distribute to the initial center point of pixel x, and described first
Inequality represents with initial center point c for initial point one circle ring area of definition, if meeting described first
Formula, then can determine that exist than c closer to pixel x central point c';
Step b, central point c' is set to distribute to initial center point c of pixel x, even c'=c, if full
Described first inequality of foot, then can determine that exist than c closer to pixel x central point c';
Circulating repetition step b, until being unsatisfactory for described first inequality, or meets the second inequality
| | x-c | | < | | | x | |-| | c ' | | | or | | x-c | |≤| | x-c ' | |, then can determine that and do not exist than c closer to pixel x
Central point c', then described central point c is defined as the nearest central point of described pixel x, wherein,
C ∈ k, c ' ∈ k.
10. device according to claim 6 is it is characterised in that also include:
3rd determining module, if do not determine nearest central point for also existing in other pixels described
Pixel, then using the described pixel not determining nearest central point as isolated pixel point, and will be described
Isolated pixel point adds the super-pixel closest with described isolated pixel point.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510404423.4A CN106340020A (en) | 2015-07-10 | 2015-07-10 | Super-pixel segmentation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510404423.4A CN106340020A (en) | 2015-07-10 | 2015-07-10 | Super-pixel segmentation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106340020A true CN106340020A (en) | 2017-01-18 |
Family
ID=57825924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510404423.4A Pending CN106340020A (en) | 2015-07-10 | 2015-07-10 | Super-pixel segmentation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106340020A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106971396A (en) * | 2017-03-10 | 2017-07-21 | 中国科学院遥感与数字地球研究所 | Ice sheet freeze thawing detection method based on super-pixel |
CN113223098A (en) * | 2021-06-07 | 2021-08-06 | 江南大学 | Preprocessing optimization method for image color classification |
WO2022174397A1 (en) * | 2021-02-19 | 2022-08-25 | 深圳市大疆创新科技有限公司 | Image detection method and apparatus, and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123417A (en) * | 2014-07-22 | 2014-10-29 | 上海交通大学 | Image segmentation method based on cluster ensemble |
CN104298968A (en) * | 2014-09-25 | 2015-01-21 | 电子科技大学 | Target tracking method under complex scene based on superpixel |
CN104574404A (en) * | 2015-01-14 | 2015-04-29 | 宁波大学 | Three-dimensional image relocation method |
-
2015
- 2015-07-10 CN CN201510404423.4A patent/CN106340020A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123417A (en) * | 2014-07-22 | 2014-10-29 | 上海交通大学 | Image segmentation method based on cluster ensemble |
CN104298968A (en) * | 2014-09-25 | 2015-01-21 | 电子科技大学 | Target tracking method under complex scene based on superpixel |
CN104574404A (en) * | 2015-01-14 | 2015-04-29 | 宁波大学 | Three-dimensional image relocation method |
Non-Patent Citations (4)
Title |
---|
YUJIE XU,ET,AL.: "Efficient k-Means++ Approximation with MapReduce", 《IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS》 * |
云红全等: "基于超像素时空显著性的运动目标检测算法", 《红外技术》 * |
李爱国等: "《数据挖掘原理、算法及应用》", 31 January 2012, 西安:西安电子科技大学出版社 * |
熊忠阳等: "一种有效的K-Means聚类中心初始化方法", 《计算机应用研究》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106971396A (en) * | 2017-03-10 | 2017-07-21 | 中国科学院遥感与数字地球研究所 | Ice sheet freeze thawing detection method based on super-pixel |
WO2022174397A1 (en) * | 2021-02-19 | 2022-08-25 | 深圳市大疆创新科技有限公司 | Image detection method and apparatus, and storage medium |
CN113223098A (en) * | 2021-06-07 | 2021-08-06 | 江南大学 | Preprocessing optimization method for image color classification |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109542106A (en) | A kind of paths planning method under mobile robot multi-constraint condition | |
CN105787948B (en) | A kind of Fast image segmentation method based on shape changeable resolution ratio | |
CN106250931A (en) | A kind of high-definition picture scene classification method based on random convolutional neural networks | |
CN110097178A (en) | It is a kind of paid attention to based on entropy neural network model compression and accelerated method | |
CN104537126B (en) | A kind of overlapping community discovery method based on edge graph random walk | |
CN109829449A (en) | A kind of RGB-D indoor scene mask method based on super-pixel space-time context | |
CN106340020A (en) | Super-pixel segmentation method and device | |
CN105787932B (en) | Solid matching method based on segmentation Cross-Tree | |
CN108154158B (en) | Building image segmentation method for augmented reality application | |
CN105405136A (en) | Self-adaptive spinal CT image segmentation method based on particle swarm optimization | |
US11074274B2 (en) | Large scale social graph segmentation | |
CN104123706A (en) | Image enhancement method based on adaptive immunity genetic algorithm | |
CN108230340A (en) | A kind of SLIC super-pixel extraction Weighting and super-pixel extracting method based on MMTD | |
CN107203783A (en) | Remote sensing images Pixel-level sorting technique based on adaptive convolution kernel convolutional neural networks | |
CN111767992A (en) | Dual-target incremental learning method based on convolutional neural network | |
CN110097176A (en) | A kind of neural network structure searching method applied to air quality big data abnormality detection | |
CN103761736B (en) | A kind of image partition method based on Bayes's harmony degree | |
CN112907603A (en) | Cell instance segmentation method based on Unet and watershed algorithm | |
CN107274425B (en) | A kind of color image segmentation method and device based on Pulse Coupled Neural Network | |
CN110147816A (en) | A kind of acquisition methods of color depth image, equipment, computer storage medium | |
CN110084136A (en) | Context based on super-pixel CRF model optimizes indoor scene semanteme marking method | |
CN110111342B (en) | Optimized selection method and device for matting algorithm | |
CN105913451B (en) | A kind of natural image superpixel segmentation method based on graph model | |
CN111553296A (en) | Two-value neural network stereo vision matching method based on FPGA | |
CN110503656A (en) | A kind of superpixel segmentation method and relevant device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170118 |
|
RJ01 | Rejection of invention patent application after publication |