CN103871050A - Image partition method, device and terminal - Google Patents

Image partition method, device and terminal Download PDF

Info

Publication number
CN103871050A
CN103871050A CN201410056698.9A CN201410056698A CN103871050A CN 103871050 A CN103871050 A CN 103871050A CN 201410056698 A CN201410056698 A CN 201410056698A CN 103871050 A CN103871050 A CN 103871050A
Authority
CN
China
Prior art keywords
region
sample point
background sample
icon
probability
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
CN201410056698.9A
Other languages
Chinese (zh)
Other versions
CN103871050B (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.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201410056698.9A priority Critical patent/CN103871050B/en
Publication of CN103871050A publication Critical patent/CN103871050A/en
Application granted granted Critical
Publication of CN103871050B publication Critical patent/CN103871050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an image partition method, an image partition device and a terminal and belongs to the field of an image processing technology. The method comprises the steps of carrying out clustering on an icon to obtain at least two regions, and selecting one of the regions to be used as a background sample point region; according to a similarity model which is built in advance, calculating the similar probability between each rest region except for the background sample point region and the background sample point region; respectively comparing each probability which is obtained by calculation with a preset threshold value, and selecting regions with the probabilities larger than the threshold value; partitioning the background sample point region and the selected regions with the probabilities larger than the threshold value to be used as the background of the icon, and partitioning the rest part to be used as the foreground of the icon. The device comprises a clustering module, a computation module, a comparison module and a partition module. According to the image partition method, the image partition device and the terminal, the processing efficiency and the instantaneity of the icon are greatly improved, the full-automation of a partitioning algorithm is realized, and the instantaneity requirement of icon processing on mobile equipment is met.

Description

Icon dividing method, device and terminal
Technical field
The disclosure relates to technical field of image processing, particularly a kind of icon dividing method, device and terminal.
Background technology
Image Segmentation Technology on mobile device has obtained significant progress in more nearest years.Along with the enhancing of multimedia signal processing ability on mobile device, how efficiently, accurately image is carried out to automatic binary segmentation and obtain prospect and background information, and be also the direction of research and development at present by the further processing that the information obtaining is applied to image.But due to the complexity of binary segmentation algorithm itself and large capacity, the diversity of input image data, while causing that full automatic binary segmentation is applied on mobile device all the time, real-time is poor.
Summary of the invention
In view of this, the disclosure provides a kind of icon dividing method, device and terminal, to improve efficiency and the real-time of icon processing.Described technical scheme is as follows:
On the one hand, provide a kind of icon dividing method, having comprised:
Icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region;
Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance;
The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value;
Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon.
Wherein, the similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point region except described background sample point region, comprising:
Calculate all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance, using probability similar to described background sample point region as described all the other each regions the probability of described color similarity.
Wherein, the similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point region except described background sample point region, comprising:
Calculate all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance;
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to the concern model of setting up in advance;
Obtain this region probability similar to described background sample point region according to the prospect location-prior value probability calculation similar to this field color in described all the other each regions.
Wherein, the concern model that described basis is set up in advance calculates the prospect location-prior value in all the other the each regions except described background sample point region, comprising:
Use the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculate the locus concern value of each pixel in described icon;
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to the locus concern value of each pixel in described icon.
Wherein, the color similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point field color except described background sample point region, comprising:
Use following color similarity model to calculate all the other the each regions probability similar to described background sample point field color except described background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except described background sample point region, P r(L, a, b) represents the region R probability similar to described background sample point field color, (L b, a b, b b) representing the color average in described background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, b n) represent the color average in the label region that is n.
Wherein, described use, in advance according to the concern model of the coordinate foundation of icon central point and each pixel, is calculated the locus concern value of each pixel in described icon, comprising:
Use following concern model to calculate the locus concern value of each pixel in described icon:
P ( i , j ) = exp ( - ( i - X C ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
Wherein, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, (X c, Y c) representing the central point of described icon, σ is default coefficient.
Wherein, the described locus concern value according to each pixel in described icon is calculated the prospect location-prior value in all the other the each regions except described background sample point region, comprising:
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to following formula:
P ( i , j ) ∈ R ‾ = 1 N Σ ( i , j ) ∈ R P ( i , j ) ;
Wherein, R is any region except described background sample point region,
Figure BDA0000467475410000033
for the prospect location-prior value of region R, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, and N is the region sum that cluster obtains.
Wherein, the prospect location-prior value probability calculation similar to this field color in all the other each regions obtains this region probability similar to described background sample point region described in described basis, comprising:
Calculate described all the other each regions probability similar to described background sample point region according to following formula:
P ( i , j ) ∈ R ( L , a , b ) = ( 1 - P ( i , j ) ∈ R ‾ ) * P R ( L , a , b ) ;
Wherein, R is any region except described background sample point region, P (i, j) ∈ R(L, a, b) represents the region R probability similar to described background sample point region,
Figure BDA0000467475410000035
for the prospect location-prior value of region R, P r(L, a, b) represents the region R probability similar to described background sample point field color.
Wherein, sample point region as a setting, one of them region of described selection, comprising:
Select wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
On the other hand, provide a kind of icon segmenting device, having comprised:
Cluster module, obtains at least two regions for icon is carried out to cluster, selects sample point region as a setting, one of them region;
Computing module, for calculating all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance;
Comparison module, for the each probability calculating is made comparisons with default threshold value respectively, selects the region that probability is greater than described threshold value;
Cut apart module, for using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon.
Wherein, described computing module comprises:
Color similarity probability calculation unit, for calculating all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance;
Determining unit, for using probability similar to described background sample point region as described all the other each regions the probability of described color similarity.
Wherein, described computing module comprises:
Color similarity probability calculation unit, for calculating all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance;
Prospect location-prior value computing unit, for calculating the prospect location-prior value in all the other the each regions except described background sample point region according to the concern model of setting up in advance;
Probability calculation unit, for obtaining this region probability similar to described background sample point region according to the prospect location-prior value probability calculation similar to this field color in described all the other each regions.
Wherein, described prospect location-prior value computing unit comprises:
Locus concern value computation subunit, for using the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculates the locus concern value of each pixel in described icon;
Prospect location-prior value computation subunit, for calculating the prospect location-prior value in all the other the each regions except described background sample point region according to the locus concern value of each pixel in described icon.
Wherein, described color similarity probability calculation unit is used for:
Use following color similarity model to calculate all the other the each regions probability similar to described background sample point field color except described background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except described background sample point region, P r(L, a, b) represents the region R probability similar to described background sample point field color, (L b, a b, b b) representing the color average in described background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, b n) represent the color average in the label region that is n.
Wherein, described locus concern value computation subunit is used for:
Use following concern model to calculate the locus concern value of each pixel in described icon:
P ( i , j ) = exp ( - ( i - X C ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
Wherein, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, (X c, Y c) representing the central point of described icon, σ is default coefficient.
Wherein, described prospect location-prior value computation subunit is used for:
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to following formula:
P ( i , j ) ∈ R ‾ = 1 N Σ ( i , j ) ∈ R P ( i , j ) ;
Wherein, R is any region except described background sample point region,
Figure BDA0000467475410000055
for the prospect location-prior value of region R, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, and N is the region sum that cluster obtains.
Wherein, described probability calculation unit is used for:
Calculate described all the other each regions probability similar to described background sample point region according to following formula:
P ( i , j ) ∈ R ( L , a , b ) = ( 1 - P ( i , j ) ∈ R ‾ ) * P R ( L , a , b ) ;
Wherein, R is any region except described background sample point region, P (i, j) ∈ R(L, a, b) represents the region R probability similar to described background sample point region, for the prospect location-prior value of region R, P r(L, a, b) represents the region R probability similar to described background sample point field color.
Wherein, described cluster module comprises:
Cluster cell, obtains at least two regions for icon is carried out to cluster;
Selected cell, for selecting wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
Another aspect, a kind of terminal is provided, include storer, and one or more than one program, one of them or more than one program are stored in storer, and are configured to carry out described more than one or one routine package containing for carrying out the instruction of following operation by more than one or one processor:
Icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region;
Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance;
The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value;
Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon.
Some beneficial effects that the technical scheme that the disclosure provides is brought can comprise: obtain at least two regions by icon is carried out to cluster, select sample point region as a setting, one of them region; Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance; The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value; Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon, owing to carrying out dividing processing based on region, without each pixel is judged to demarcation, therefore, greatly improve efficiency and the real-time of icon processing, not only realized the full-automation of partitioning algorithm, and, can reach the requirement of real-time of icon processing on mobile device.
Should be understood that, it is only exemplary that above general description and details are hereinafter described, and can not limit the disclosure.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in embodiment of the present disclosure, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only embodiment more of the present disclosure, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the icon dividing method exemplary process diagram that disclosure embodiment 1 provides;
Fig. 2 is the icon illustrative diagram that disclosure embodiment 1 provides;
Fig. 3 is the icon dividing method exemplary process diagram that disclosure embodiment 2 provides;
Fig. 4 be disclosure embodiment 2 provide icon is carried out to the illustrative diagram of cluster;
Fig. 5 is the exemplary area area histogram that disclosure embodiment 2 provides;
Fig. 6 is the icon dividing method exemplary process diagram that disclosure embodiment 3 provides;
Fig. 7 is the icon dividing method exemplary process diagram that disclosure embodiment 4 provides;
Fig. 8 is concern model and the segmentation result illustrative diagram that disclosure embodiment 4 provides;
Fig. 9 is the exemplary a kind of structural drawing of icon segmenting device that disclosure embodiment 5 provides;
Figure 10 is the exemplary another kind of structural drawing of icon segmenting device that disclosure embodiment 5 provides;
Figure 11 is the terminal exemplary block diagram that disclosure embodiment 6 provides.
By above-mentioned accompanying drawing, the embodiment that the disclosure is clear and definite has been shown, will there is hereinafter more detailed description.These accompanying drawings and text description are not the scope in order to limit disclosure design by any mode, but by reference to specific embodiment for those skilled in the art illustrate concept of the present disclosure.
Embodiment
For making object of the present disclosure, technical scheme and advantage clearer, below in conjunction with accompanying drawing, disclosure embodiment is described in further detail.
Embodiment 1
Referring to Fig. 1, the present embodiment provides a kind of icon dividing method, and the method comprises the steps.
In step 101, icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region.
In step 102, calculate all the other the each regions probability similar to this background sample point region except this background sample point region according to the similarity model of setting up in advance.
In step 103, the each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than this threshold value.
Wherein, default threshold value can arrange as required, and its span is 0-1.For example, can preset this threshold value for being 0.5 or 0.6 etc., the present embodiment is not specifically limited this.
In step 104, the Region Segmentation that this background sample point region and this probability of selecting are greater than to this threshold value is out as the background of this icon, and remainder splits the prospect as this icon.
Wherein, said method is take the color in background sample point region as basis, and which can think background to judge other region according to the probability calculating, and which can not think background.If probability is greater than threshold value, think that the color in this region and background sample point region is more approaching, can think background.If probability is less than or equal to threshold value, think that the color in this region and background sample point region is kept off, can determine and not belong to background.After All Ranges is all judged whether to belong to background, then icon is cut apart.
The icon that the present embodiment relates to includes but not limited to: desktop icons etc.Said method can be applied to icon that background is as shown in Figure 2 single etc., and the present embodiment is not specifically limited this.
Wherein, calculate all the other the each regions probability similar to this background sample point region except this background sample point region according to the similarity model of setting up in advance, can comprise:
According in advance set up color similarity model calculate all the other the each regions probability similar to this background sample point field color except this background sample point region, using the probability of this color similarity as this all the other each regions probability similar to this background sample point region.
Wherein, calculate all the other the each regions probability similar to this background sample point region except this background sample point region according to the similarity model of setting up in advance, can comprise:
Calculate all the other the each regions probability similar to this background sample point field color except this background sample point region according to the color similarity model of setting up in advance; Calculate the prospect location-prior value in all the other the each regions except this background sample point region according to the concern model of setting up in advance; According to this, the prospect location-prior value probability calculation similar to this field color in all the other each regions obtains this region probability similar to this background sample point region.
Wherein, calculate the prospect location-prior value in all the other the each regions except this background sample point region according to the concern model of setting up in advance, can comprise:
Use the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculate the locus concern value of each pixel in this icon; Calculate the prospect location-prior value in all the other the each regions except this background sample point region according to the locus concern value of each pixel in this icon.
Wherein, select sample point region as a setting, one of them region, can comprise:
Select wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
In the present embodiment, after icon is cut apart to the prospect of obtaining and background, can also utilize segmentation result to process again icon, include but not limited to: change the color of background, make the background color of the multiple icons on desktop reach unified effect; Weaken the transparency of background image, obtain thereby icon can be incorporated in desktop background, thereby can generate desktop icons of different colours and different-style etc.
The said method that the present embodiment provides, obtains at least two regions by icon is carried out to cluster, selects sample point region as a setting, one of them region; Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance; The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value; Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon, owing to carrying out dividing processing based on region, without each pixel is judged to demarcation, therefore, greatly improve efficiency and the real-time of icon processing, not only realized the full-automation of partitioning algorithm, and, can reach the requirement of real-time of icon processing on mobile device.
Embodiment 2
Referring to Fig. 3, the present embodiment provides a kind of icon dividing method, and the method comprises the steps.
In step 301, icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region.
Sample point region as a setting, one of them region of above-mentioned selection, can comprise:
Select wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
In the present embodiment, can adopt the color data of icon is transformed into Lab space, then adopt K means clustering algorithm to carry out cluster to icon, can certainly adopt other clustering algorithm to carry out cluster, the present embodiment is not specifically limited this.Wherein, the number of cluster can be set as required, as clusters number is set is 5,6 or 8 etc.
Referring to Fig. 4, for icon being carried out to the schematic diagram of cluster.Wherein, left side is pending icon, and right side is that this icon is carried out to the area schematic obtaining after cluster.Setting in advance clusters number is 5, this icon is carried out obtaining 5 regions after cluster, as shown in FIG..In each region, the color of pixel is more approaching, and zones of different color is also different.The area in these 5 regions is done after statistics with histogram, can obtain histogram as shown in Figure 5.Wherein, the area maximum in region 1, therefore, can be elected to be region 1 background sample point region.
In step 302, according in advance set up color similarity model calculate all the other the each regions probability similar to this background sample point field color except this background sample point region, using the probability of this color similarity as this all the other each regions probability similar to this background sample point region.
Wherein, calculate all the other the each regions probability similar to this background sample point field color except this background sample point region according to the color similarity model of setting up in advance, can comprise:
Use following color similarity model to calculate all the other the each regions probability similar to this background sample point field color except this background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except this background sample point region, P r(L, a, b) represents the region R probability similar to this background sample point field color, (L b, a b, b b) representing the color average in this background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, bn) and represent the color average in the label region that is n.
Certainly, except calculating β according to above-mentioned formula, under other embodiment, above-mentioned β also can be set to steady state value, and the present embodiment is not specifically limited this.
In step 303, the each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than this threshold value.
In step 304, the Region Segmentation that this background sample point region and this probability of selecting are greater than to this threshold value is out as the background of this icon, and remainder splits the prospect as this icon.
The said method that the present embodiment provides, obtains at least two regions by icon is carried out to cluster, selects sample point region as a setting, one of them region; According in advance set up color similarity model calculate all the other the each regions probability similar to this background sample point field color except this background sample point region, using the probability of this color similarity as this all the other each regions probability similar to this background sample point region; The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value; Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon, owing to carrying out dividing processing based on region, without each pixel is judged to demarcation, greatly improve efficiency and the real-time of partitioning algorithm.Area based on icon area or pixel number are chosen background sample point region, have realized robotization and have chosen background sample point region, have reached the effect of partitioning algorithm full-automation, and, can reach the requirement of real-time of icon processing on mobile device.
Embodiment 3
Referring to Fig. 6, the present embodiment provides a kind of icon dividing method, and the method comprises the steps.
In step 601, icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region.
Sample point region as a setting, one of them region of above-mentioned selection, can comprise:
Select wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
In step 602, calculate all the other the each regions probability similar to this background sample point field color except this background sample point region according to the color similarity model of setting up in advance.
In step 603, calculate the prospect location-prior value in all the other the each regions except this background sample point region according to the concern model of setting up in advance.
This step can comprise the following steps:
Use the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculate the locus concern value of each pixel in this icon;
Calculate the prospect location-prior value in all the other the each regions except this background sample point region according to the locus concern value of each pixel in this icon.
In step 604, according to this, the prospect location-prior value probability calculation similar to this field color in all the other each regions obtains this region probability similar to this background sample point region.
In step 605, the each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than this threshold value.
In step 606, the Region Segmentation that this background sample point region and this probability of selecting are greater than to this threshold value is out as the background of this icon, and remainder splits the prospect as this icon.
The said method that the present embodiment provides, obtains at least two regions by icon is carried out to cluster, selects sample point region as a setting, one of them region; Calculate all the other the each regions probability similar to this background sample point field color except this background sample point region according to the color similarity model of setting up in advance; Calculate the prospect location-prior value in all the other the each regions except this background sample point region according to the concern model of setting up in advance; According to this, the prospect location-prior value probability calculation similar to this field color in all the other each regions obtains this region probability similar to this background sample point region; The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value; Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon, owing to carrying out dividing processing based on region, without each pixel is judged to demarcation, therefore, efficiency and the real-time of icon processing are greatly improved, and, improve further the degree of accuracy of probability calculation by prospect location-prior value, not only realize the full-automation of partitioning algorithm, and, can reach the requirement of real-time of icon processing on mobile device.
Embodiment 4
Referring to Fig. 7, the present embodiment provides a kind of icon dividing method, and the method comprises the steps.
In step 701, icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region.
Sample point region as a setting, one of them region of above-mentioned selection, can comprise:
Select wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
In step 702, use the following color similarity model of setting up in advance to calculate all the other the each regions probability similar to this background sample point field color except this background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except this background sample point region, P r(L, a, b) represents the region R probability similar to this background sample point field color, (L b, a b, b b) representing the color average in this background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, b n) represent the color average in the label region that is n.
Certainly, except calculating β according to above-mentioned formula, under other embodiment, above-mentioned β also can be set to steady state value, and the present embodiment is not specifically limited this.
In step 703, use set up according to the coordinate of icon central point and each pixel in advance as ShiShimonoseki 5 injection molding types, calculate the locus concern value of each pixel in this icon:
P ( i , j ) = exp ( - ( i - X C ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
Wherein, (i, j) represents any pixel in this icon, and P (i, j) represents the locus concern value of this pixel, (X c, Y c) representing the central point of this icon, σ is default coefficient.
Wherein, the value of σ can preset, as is set to 1/4 etc. of icon width, and the present embodiment does not limit concrete numerical value.
The main thought of above-mentioned concern model is to think that prospect should roughly be distributed in the middle body of icon, therefore, the locus concern value of each pixel has reflected the degree that this pixel is concerned, degree of concern is higher, the possibility that belongs to prospect is larger, degree of concern is less, and the possibility that belongs to prospect is less.
In step 704, according to the locus concern value of each pixel in this icon, calculate the prospect location-prior value in all the other the each regions except this background sample point region according to following formula:
P ( i , j ) ∈ R ‾ = 1 N Σ ( i , j ) ∈ R P ( i , j ) ;
Wherein, R is any region except this background sample point region,
Figure BDA0000467475410000143
for the prospect location-prior value of region R, (i, j) represents any pixel in this icon, and P (i, j) represents the locus concern value of this pixel, and N is the region sum that cluster obtains.
In step 705, prospect location-prior value probability similar to this field color in all the other each regions according to this, calculates these all the other each regions probability similar to this background sample point region according to following formula:
P ( i , j ) ∈ R ( L , a , b ) = ( 1 - P ( i , j ) ∈ R ‾ ) * P R ( L , a , b ) ;
Wherein, R is any region except this background sample point region, P (i, j) ∈ R(L, a, b) represents the region R probability similar to this background sample point region,
Figure BDA0000467475410000145
for the prospect location-prior value of region R, P r(L, a, b) represents the region R probability similar to this background sample point field color.
In step 706, the each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than this threshold value.
In step 707, the Region Segmentation that this background sample point region and this probability of selecting are greater than to this threshold value is out as the background of this icon, and remainder splits the prospect as this icon.
For example, referring to Fig. 8, the concern model schematic diagram providing for the present embodiment.Wherein, left figure uses the concern model of setting up in advance to calculate the result after the locus concern value of each pixel in icon, and wherein, brighter part degree of paying close attention to is higher, and darker part degree of paying close attention to is lower.Right figure carries out based on paying close attention to model the result obtaining after icon is cut apart, and can find out that prospect and background parts are distinguished significantly.
The said method that the present embodiment provides, obtains at least two regions by icon is carried out to cluster, selects sample point region as a setting, one of them region, calculate all the other the each regions probability similar to this background sample point field color except this background sample point region according to the color similarity model of setting up in advance, calculate the prospect location-prior value in all the other the each regions except this background sample point region according to the concern model of setting up in advance, according to this, the prospect location-prior value probability calculation similar to this field color in all the other each regions obtains this region probability similar to this background sample point region, the each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value, using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon, owing to carrying out dividing processing based on region, without each pixel is judged to demarcation, therefore, efficiency and the real-time of icon processing are greatly improved, and, obtain prospect location-prior value based on paying close attention to model, cut apart in conjunction with prospect location-prior value and color similarity probability, further improve the precision of cutting apart, not only realize the full-automation of partitioning algorithm, and, can reach the requirement of real-time of icon processing on mobile device.
Embodiment 5
Referring to Fig. 9, the present embodiment provides a kind of icon segmenting device, comprising:
Cluster module 901, obtains at least two regions for icon is carried out to cluster, selects sample point region as a setting, one of them region;
Computing module 902, for calculating all the other the each regions probability similar to this background sample point region except this background sample point region according to the similarity model of setting up in advance;
Comparison module 903, for the each probability calculating is made comparisons with default threshold value respectively, selects the region that probability is greater than this threshold value;
Cut apart module 904, for Region Segmentation that this background sample point region and this probability of selecting are greater than to this threshold value, out as the background of this icon, remainder splits the prospect as this icon.
In the present embodiment, computing module 902 can comprise:
Color similarity probability calculation unit, for calculating all the other the each regions probability similar to this background sample point field color except this background sample point region according to the color similarity model of setting up in advance;
Determining unit, for using the probability of this color similarity as this all the other each regions probability similar to this background sample point region.
Referring to Figure 10, in the present embodiment, computing module 902 can comprise:
Color similarity probability calculation unit 902a, for calculating all the other the each regions probability similar to this background sample point field color except this background sample point region according to the color similarity model of setting up in advance;
Prospect location-prior value computing unit 902b, for calculating the prospect location-prior value in all the other the each regions except this background sample point region according to the concern model of setting up in advance;
Probability calculation unit 902c, obtains this region probability similar to this background sample point region for the prospect location-prior value probability calculation similar to this field color in all the other each regions according to this.
Wherein, prospect location-prior value computing unit can comprise:
Locus concern value computation subunit, for using the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculates the locus concern value of each pixel in this icon;
Prospect location-prior value computation subunit, for calculating the prospect location-prior value in all the other the each regions except this background sample point region according to the locus concern value of each pixel in this icon.
Wherein, color similarity probability calculation unit can be for:
Use following color similarity model to calculate all the other the each regions probability similar to this background sample point field color except this background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except this background sample point region, P r(L, a, b) represents the region R probability similar to this background sample point field color, (L b, a b, b b) representing the color average in this background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, b n) represent the color average in the label region that is n.
Wherein, locus concern value computation subunit can be for:
Use following concern model to calculate the locus concern value of each pixel in this icon:
P ( i , j ) = exp ( - ( i - X C ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
Wherein, (i, j) represents any pixel in this icon, and P (i, j) represents the locus concern value of this pixel, (X c, Y c) representing the central point of this icon, σ is default coefficient.
Wherein, prospect location-prior value computation subunit can be for:
Calculate the prospect location-prior value in all the other the each regions except this background sample point region according to following formula:
P ( i , j ) ∈ R ‾ = 1 N Σ ( i , j ) ∈ R P ( i , j ) ;
Wherein, R is any region except this background sample point region,
Figure BDA0000467475410000175
for region R beforescape location-prior value, (i, j) represents any pixel in this icon, and P (i, j) represents the locus concern value of this pixel, and N is the region sum that cluster obtains.
Wherein, probability calculation unit can be for:
Calculate these all the other each regions probability similar to this background sample point region according to following formula:
P ( i , j ) ∈ R ( L , a , b ) = ( 1 - P ( i , j ) ∈ R ‾ ) * P R ( L , a , b ) ;
Wherein, R is any region except this background sample point region, P (i, j) ∈ R(L, a, b) represents the region R probability similar to this background sample point region,
Figure BDA0000467475410000177
for the prospect location-prior value of region R, P r(L, a, b) represents the region R probability similar to this background sample point field color.
In the present embodiment, cluster module 901 can comprise:
Cluster cell, obtains at least two regions for icon is carried out to cluster;
Selected cell, for selecting wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
The said apparatus that the present embodiment provides can be carried out the method that above-mentioned either method embodiment provides, and process refers to the description in embodiment of the method, does not repeat herein.
The said apparatus that the present embodiment provides, obtains at least two regions by icon is carried out to cluster, selects sample point region as a setting, one of them region; Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance; The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value; Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon, owing to carrying out dividing processing based on region, without each pixel is judged to demarcation, therefore, greatly improve efficiency and the real-time of icon processing, not only realized the full-automation of partitioning algorithm, and, can reach the requirement of real-time of icon processing on mobile device.
Embodiment 6
Referring to Figure 11, the present embodiment provides a kind of terminal 1100, can comprise communication unit 1110, include one or more non-volatile readable storage mediums storer 1120, input block 1130, display unit 1140, sensor 1150, voicefrequency circuit 1160, WiFi (wireless fidelity, Wireless Fidelity) module 1170, include one or one parts such as processor 1180 and power supply 1190 of processing above core.
It will be understood by those skilled in the art that the not restriction of structure paired terminal of the terminal structure shown in Figure 11, can comprise the parts more more or less than diagram, or combine some parts, or different parts are arranged.Wherein:
Communication unit 1110 can be used for receiving and sending messages or communication process in, the reception of signal and transmission, this communication unit 1110 can be RF(Radio Frequency, radio frequency) circuit, router, modulator-demodular unit, etc. network communication equipment.Especially, in the time that communication unit 1110 is RF circuit, after the downlink information of base station is received, transfer to more than one or one processor 1180 to process; In addition, send to base station by relating to up data.Conventionally, include but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupling mechanism, LNA(Low Noise Amplifier, low noise amplifier as the RF circuit of communication unit), diplexer etc.In addition, communication unit 1110 can also be by radio communication and network and other devices communicatings.Described radio communication can be used arbitrary communication standard or agreement, include but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access (WCDMA)), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc.Storer 1120 can be used for storing software program and module, and processor 1180 is stored in software program and the module of storer 1120 by operation, thereby carries out various function application and data processing.Storer 1120 can mainly comprise storage program district and storage data field, wherein, and the application program (such as sound-playing function, image player function etc.) that storage program district can storage operation system, at least one function is required etc.; The data (such as voice data, phone directory etc.) that create according to the use of terminal 1100 etc. can be stored in storage data field.In addition, storer 1120 can comprise high-speed random access memory, can also comprise nonvolatile memory, for example at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, storer 1120 can also comprise Memory Controller, so that processor 1180 and the access of input block 1130 to storer 1120 to be provided.
Input block 1130 can be used for receiving numeral or the character information of input, and generation is inputted with user arranges and function control is relevant keyboard, mouse, control lever, optics or trace ball signal.Alternatively, input block 1130 can comprise touch-sensitive surperficial 1130a and other input equipments 1130b.Touch-sensitive surperficial 1130a, also referred to as touch display screen or Trackpad, can collect user or near touch operation (using any applicable object or near the operations of annex on touch-sensitive surperficial 1130a or touch-sensitive surperficial 1130a such as finger, stylus such as user) thereon, and drive corresponding coupling arrangement according to predefined formula.Optionally, touch-sensitive surperficial 1130a can comprise touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus detects user's touch orientation, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 1180, and the order that energy receiving processor 1180 is sent is also carried out.In addition, can adopt the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize touch-sensitive surperficial 1130a.Except touch-sensitive surperficial 1130a, input block 1130 can also comprise other input equipments 1130b.Alternatively, other input equipments 1130b can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, control lever etc.
Display unit 1140 can be used for showing the information inputted by user or the various graphical user interface of the information that offers user and terminal 1100, and these graphical user interface can be made up of figure, text, icon, video and its combination in any.Display unit 1140 can comprise display panel 1140a, optionally, can adopt LCD (Liquid Crystal Display, liquid crystal display), the form such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configures display panel 1140a.Further, touch-sensitive surperficial 1130a can cover display panel 1140a, when touch-sensitive surperficial 1130a detect thereon or near touch operation after, send processor 1180 to determine the type of touch event, corresponding vision output is provided according to the type of touch event with preprocessor 1180 on display panel 1140a.Although in Figure 11, touch-sensitive surperficial 1130a and display panel 1140a be as two independently parts realize input and input function, but in certain embodiments, can be by integrated and realize input and output function to touch-sensitive surperficial 1130a and display panel 1140a.
Terminal 1100 also can comprise at least one sensor 1150, such as optical sensor, motion sensor and other sensors.Alternatively, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor can regulate according to the light and shade of ambient light the brightness of display panel 1140a, proximity transducer can, in the time that terminal 1100 moves in one's ear, cut out display panel 1140a and/or backlight.As the one of motion sensor; Gravity accelerometer can detect the size of the acceleration that (is generally three axles) in all directions; when static, can detect size and the direction of gravity, can be used for identifying application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as passometer, knock) of mobile phone attitude etc.; As for also other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor of terminal 1100, do not repeat them here.
Voicefrequency circuit 1160, loudspeaker 1160a, microphone 1160b can provide the audio interface between user and terminal 1100.Voicefrequency circuit 1160 can, by the electric signal after the voice data conversion receiving, be transferred to loudspeaker 1160a, is converted to voice signal output by loudspeaker 1160a; On the other hand, the voice signal of collection is converted to electric signal by microphone 1160b, after being received by voicefrequency circuit 1160, be converted to voice data, after again voice data output processor 1180 being processed, through RF circuit 1110 to send to such as another terminal, or export voice data to storer 1120 so as further process.Voicefrequency circuit 1160 also may comprise earphone jack, so that communicating by letter of peripheral hardware earphone and terminal 1100 to be provided.
In order to realize radio communication, in this terminal, can dispose wireless communication unit 1170, this wireless communication unit 1170 can be WiFi module.WiFi belongs to short range wireless transmission technology, terminal 1100 by wireless communication unit 1170 can help that user sends and receive e-mail, browsing page and access streaming video etc., it provides wireless broadband internet access for user.Although Figure 11 shows wireless communication unit 1170, be understandable that, it does not belong to must forming of terminal 1100, completely can be as required in the essential scope that does not change invention and omit.
Processor 1180 is control centers of terminal 1100, utilize the various piece of various interface and the whole mobile phone of connection, by moving or carry out the software program and/or the module that are stored in storer 1120, and call the data that are stored in storer 1120, carry out various functions and the deal with data of terminal 1100, thereby mobile phone is carried out to integral monitoring.Optionally, processor 1180 can comprise one or more processing cores; Preferably, processor 1180 can integrated application processor and modem processor, and wherein, application processor is mainly processed operating system, user interface and application program etc., and modem processor is mainly processed radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 1180.
Terminal 1100 also comprises that the power supply 1190(powering to all parts is such as battery), preferably, power supply can be connected with processor 1180 logics by power-supply management system, thereby realizes the functions such as management charging, electric discharge and power managed by power-supply management system.Power supply 1190 can also comprise the random component such as one or more direct current or AC power, recharging system, power failure detection circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, terminal 1100 can also comprise camera, bluetooth module etc., does not repeat them here.
Provided above the optional structure of terminal 1100 in conjunction with Figure 11, wherein one or more module stores are in described storer and be configured to be carried out by described one or more processors, and described one or more modules have following function:
Icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region;
Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance;
The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value;
Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon.
Wherein, the similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point region except described background sample point region, comprising:
Calculate all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance, using probability similar to described background sample point region as described all the other each regions the probability of described color similarity.
Wherein, the similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point region except described background sample point region, comprising:
Calculate all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance;
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to the concern model of setting up in advance;
Obtain this region probability similar to described background sample point region according to the prospect location-prior value probability calculation similar to this field color in described all the other each regions.
Wherein, the concern model that described basis is set up in advance calculates the prospect location-prior value in all the other the each regions except described background sample point region, comprising:
Use the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculate the locus concern value of each pixel in described icon;
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to the locus concern value of each pixel in described icon.
Wherein, the color similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point field color except described background sample point region, comprising:
Use following color similarity model to calculate all the other the each regions probability similar to described background sample point field color except described background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except described background sample point region, P r(L, a, b) represents the region R probability similar to described background sample point field color, (L b, a b, b b) representing the color average in described background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, b n) represent the color average in the label region that is n.
Wherein, described use, in advance according to the concern model of the coordinate foundation of icon central point and each pixel, is calculated the locus concern value of each pixel in described icon, comprising:
Use following concern model to calculate the locus concern value of each pixel in described icon:
P ( i , j ) = exp ( - ( i - X C ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
Wherein, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, (X c, Y c) representing the central point of described icon, σ is default coefficient.
Wherein, the described locus concern value according to each pixel in described icon is calculated the prospect location-prior value in all the other the each regions except described background sample point region, comprising:
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to following formula:
P ( i , j ) ∈ R ‾ = 1 N Σ ( i , j ) ∈ R P ( i , j ) ;
Wherein, R is any region except described background sample point region,
Figure BDA0000467475410000242
for the prospect location-prior value of region R, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, and N is the region sum that cluster obtains.
Wherein, the prospect location-prior value probability calculation similar to this field color in all the other each regions obtains this region probability similar to described background sample point region described in described basis, comprising:
Calculate described all the other each regions probability similar to described background sample point region according to following formula:
P ( i , j ) ∈ R ( L , a , b ) = ( 1 - P ( i , j ) ∈ R ‾ ) * P R ( L , a , b ) ;
Wherein, R is any region except described background sample point region, P (i, j) ∈ R(L, a, b) represents the region R probability similar to described background sample point region,
Figure BDA0000467475410000244
for the prospect location-prior value of region R, P r(L, a, b) represents the region R probability similar to described background sample point field color.
Wherein, sample point region as a setting, one of them region of described selection, comprising:
Select wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
The above-mentioned terminal that the present embodiment provides, obtains at least two regions by icon is carried out to cluster, selects sample point region as a setting, one of them region; Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance; The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value; Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon, owing to carrying out dividing processing based on region, without each pixel is judged to demarcation, therefore, greatly improve efficiency and the real-time of icon processing, not only realized the full-automation of partitioning algorithm, and, can reach the requirement of real-time of icon processing on mobile device.
Embodiment 7
The present embodiment provides a kind of non-volatile readable storage medium, in this storage medium, store one or more modules (programs), when these one or more modules are used in equipment, can make this equipment carry out the instruction (instructions) of following steps:
Icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region;
Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance;
The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value;
Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon.
Wherein, the similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point region except described background sample point region, comprising:
Calculate all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance, using probability similar to described background sample point region as described all the other each regions the probability of described color similarity.
Wherein, the similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point region except described background sample point region, comprising:
Calculate all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance;
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to the concern model of setting up in advance;
Obtain this region probability similar to described background sample point region according to the prospect location-prior value probability calculation similar to this field color in described all the other each regions.
Wherein, the concern model that described basis is set up in advance calculates the prospect location-prior value in all the other the each regions except described background sample point region, comprising:
Use the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculate the locus concern value of each pixel in described icon;
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to the locus concern value of each pixel in described icon.
Wherein, the color similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point field color except described background sample point region, comprising:
Use following color similarity model to calculate all the other the each regions probability similar to described background sample point field color except described background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except described background sample point region, P r(L, a, b) represents the region R probability similar to described background sample point field color, (L b, a b, b b) representing the color average in described background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, b n) represent the color average in the label region that is n.
Wherein, described use, in advance according to the concern model of the coordinate foundation of icon central point and each pixel, is calculated the locus concern value of each pixel in described icon, comprising:
Use following concern model to calculate the locus concern value of each pixel in described icon:
P ( i , j ) = exp ( - ( i - X C ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
Wherein, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, (X c, Y c) representing the central point of described icon, σ is default coefficient.
Wherein, the described locus concern value according to each pixel in described icon is calculated the prospect location-prior value in all the other the each regions except described background sample point region, comprising:
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to following formula:
P ( i , j ) ∈ R ‾ = 1 N Σ ( i , j ) ∈ R P ( i , j ) ;
Wherein, R is any region except described background sample point region, for the prospect location-prior value of region R, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, and N is the region sum that cluster obtains.
Wherein, the prospect location-prior value probability calculation similar to this field color in all the other each regions obtains this region probability similar to described background sample point region described in described basis, comprising:
Calculate described all the other each regions probability similar to described background sample point region according to following formula:
P ( i , j ) ∈ R ( L , a , b ) = ( 1 - P ( i , j ) ∈ R ‾ ) * P R ( L , a , b ) ;
Wherein, R is any region except described background sample point region, P (i, j) ∈ R(L, a, b) represents the region R probability similar to described background sample point region,
Figure BDA0000467475410000272
for the prospect location-prior value of region R, P r(L, a, b) represents the region R probability similar to described background sample point field color.
Wherein, sample point region as a setting, one of them region of described selection, comprising:
Select wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
The above-mentioned non-volatile readable storage medium that the present embodiment provides, obtains at least two regions by icon is carried out to cluster, selects sample point region as a setting, one of them region; Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance; The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value; Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon, owing to carrying out dividing processing based on region, without each pixel is judged to demarcation, therefore, greatly improve efficiency and the real-time of icon processing, not only realized the full-automation of partitioning algorithm, and, can reach the requirement of real-time of icon processing on mobile device.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can carry out the hardware that instruction is relevant by program completes, described program can be stored in a kind of non-volatile readable storage medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present disclosure, not in order to limit the disclosure, all within spirit of the present disclosure and principle, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection domain of the present disclosure.

Claims (19)

1. an icon dividing method, is characterized in that, described method comprises:
Icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region;
Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance;
The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value;
Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon.
2. method according to claim 1, is characterized in that, the similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point region except described background sample point region, comprising:
Calculate all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance, using probability similar to described background sample point region as described all the other each regions the probability of described color similarity.
3. method according to claim 1, is characterized in that, the similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point region except described background sample point region, comprising:
Calculate all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance;
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to the concern model of setting up in advance;
Obtain this region probability similar to described background sample point region according to the prospect location-prior value probability calculation similar to this field color in described all the other each regions.
4. method according to claim 3, is characterized in that, the concern model that described basis is set up in advance calculates the prospect location-prior value in all the other the each regions except described background sample point region, comprising:
Use the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculate the locus concern value of each pixel in described icon;
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to the locus concern value of each pixel in described icon.
5. according to the method in claim 2 or 3, it is characterized in that, the color similarity model that described basis is set up in advance calculates all the other the each regions probability similar to described background sample point field color except described background sample point region, comprising:
Use following color similarity model to calculate all the other the each regions probability similar to described background sample point field color except described background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except described background sample point region, P r(L, a, b) represents the region R probability similar to described background sample point field color, (L b, a b, b b) representing the color average in described background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, b n) represent the color average in the label region that is n.
6. method according to claim 4, is characterized in that, described use, in advance according to the concern model of the coordinate foundation of icon central point and each pixel, is calculated the locus concern value of each pixel in described icon, comprising:
Use following concern model to calculate the locus concern value of each pixel in described icon:
P ( i , j ) = exp ( - ( i - X C ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
Wherein, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, (X c, Y c) representing the central point of described icon, σ is default coefficient.
7. method according to claim 4, is characterized in that, the described locus concern value according to each pixel in described icon is calculated the prospect location-prior value in all the other the each regions except described background sample point region, comprising:
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to following formula:
P ( i , j ) ∈ R ‾ = 1 N Σ ( i , j ) ∈ R P ( i , j ) ;
Wherein, R is any region except described background sample point region, for the prospect location-prior value of region R, (i, j) represents any pixel in described icon, P(i, j) represent the locus concern value of this pixel, N is the region sum that cluster obtains.
8. method according to claim 3, is characterized in that, the prospect location-prior value probability calculation similar to this field color in all the other each regions obtains this region probability similar to described background sample point region described in described basis, comprising:
Calculate described all the other each regions probability similar to described background sample point region according to following formula:
P ( i , j ) ∈ R ( L , a , b ) = ( 1 - P ( i , j ) ∈ R ‾ ) * P R ( L , a , b ) ;
Wherein, R is any region except described background sample point region, P (i, j) ∈ R(L, a, b) represents the region R probability similar to described background sample point region,
Figure FDA0000467475400000035
for the prospect location-prior value of region R, P r(L, a, b) represents the region R probability similar to described background sample point field color.
9. method according to claim 1, is characterized in that, sample point region as a setting, one of them region of described selection, comprising:
Select wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
10. an icon segmenting device, is characterized in that, described device comprises:
Cluster module, obtains at least two regions for icon is carried out to cluster, selects sample point region as a setting, one of them region;
Computing module, for calculating all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance;
Comparison module, for the each probability calculating is made comparisons with default threshold value respectively, selects the region that probability is greater than described threshold value;
Cut apart module, for using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon.
11. devices according to claim 10, is characterized in that, described computing module comprises:
Color similarity probability calculation unit, for calculating all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance;
Determining unit, for using probability similar to described background sample point region as described all the other each regions the probability of described color similarity.
12. devices according to claim 10, is characterized in that, described computing module comprises:
Color similarity probability calculation unit, for calculating all the other the each regions probability similar to described background sample point field color except described background sample point region according to the color similarity model of setting up in advance;
Prospect location-prior value computing unit, for calculating the prospect location-prior value in all the other the each regions except described background sample point region according to the concern model of setting up in advance;
Probability calculation unit, for obtaining this region probability similar to described background sample point region according to the prospect location-prior value probability calculation similar to this field color in described all the other each regions.
13. devices according to claim 12, is characterized in that, described prospect location-prior value computing unit comprises:
Locus concern value computation subunit, for using the concern model of setting up according to the coordinate of icon central point and each pixel in advance, calculates the locus concern value of each pixel in described icon;
Prospect location-prior value computation subunit, for calculating the prospect location-prior value in all the other the each regions except described background sample point region according to the locus concern value of each pixel in described icon.
14. according to the device described in claim 11 or 12, it is characterized in that, described color similarity probability calculation unit is used for:
Use following color similarity model to calculate all the other the each regions probability similar to described background sample point field color except described background sample point region:
P R ( L , a , b ) = exp ( - ( L - L B ) 2 - ( a - a B ) 2 - ( b - b B ) 2 2 * β ) ;
β = 2 N ( N - 1 ) Σ m = 1 N Σ n = m + 1 N ( ( L m - L n ) 2 + ( a m - a n ) 2 + ( b m - b n ) 2 ) ;
Wherein, R is all the other any regions except described background sample point region, P r(L, a, b) represents the region R probability similar to described background sample point field color, (L b, a b, b b) representing the color average in described background sample point region, N is the region sum that cluster obtains, β is the mean value of color distortion between N region, the label that m and n are region, (L m, a m, b m) represent the color average in the label region that is m, (L n, a n, b n) represent the color average in the label region that is n.
15. devices according to claim 13, is characterized in that, described locus concern value computation subunit is used for:
Use following concern model to calculate the locus concern value of each pixel in described icon:
P ( i , j ) = exp ( - ( i - X C ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
Wherein, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, (X c, Y c) representing the central point of described icon, σ is default coefficient.
16. devices according to claim 13, is characterized in that, described prospect location-prior value computation subunit is used for:
Calculate the prospect location-prior value in all the other the each regions except described background sample point region according to following formula:
P ( i , j ) ∈ R ‾ = 1 N Σ ( i , j ) ∈ R P ( i , j ) ;
Wherein, R is any region except described background sample point region,
Figure FDA0000467475400000062
for the prospect location-prior value of region R, (i, j) represents any pixel in described icon, and P (i, j) represents the locus concern value of this pixel, and N is the region sum that cluster obtains.
17. devices according to claim 12, is characterized in that, described probability calculation unit is used for:
Calculate described all the other each regions probability similar to described background sample point region according to following formula:
P ( i , j ) ∈ R ( L , a , b ) = ( 1 - P ( i , j ) ∈ R ‾ ) * P R ( L , a , b ) ;
Wherein, R is any region except described background sample point region, P (i, j) ∈ r(L, a, b) represents the region R probability similar to described background sample point region,
Figure FDA0000467475400000064
for the prospect location-prior value of region R, P r(L, a, b) represents the region R probability similar to described background sample point field color.
18. devices according to claim 10, is characterized in that, described cluster module comprises:
Cluster cell, obtains at least two regions for icon is carried out to cluster;
Selected cell, for selecting wherein region or the maximum sample point region as a setting, region of pixel number of area maximum.
19. 1 kinds of terminals, it is characterized in that, described terminal includes storer, and one or more than one program, one of them or more than one program are stored in storer, and are configured to carry out described more than one or one routine package containing for carrying out the instruction of following operation by more than one or one processor:
Icon is carried out to cluster and obtain at least two regions, select sample point region as a setting, one of them region;
Calculate all the other the each regions probability similar to described background sample point region except described background sample point region according to the similarity model of setting up in advance;
The each probability calculating is made comparisons with default threshold value respectively, select the region that probability is greater than described threshold value;
Using described background sample point region and described in the probability selected be greater than described threshold value Region Segmentation out as the background of described icon, remainder splits the prospect as described icon.
CN201410056698.9A 2014-02-19 2014-02-19 icon dividing method, device and terminal Active CN103871050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410056698.9A CN103871050B (en) 2014-02-19 2014-02-19 icon dividing method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410056698.9A CN103871050B (en) 2014-02-19 2014-02-19 icon dividing method, device and terminal

Publications (2)

Publication Number Publication Date
CN103871050A true CN103871050A (en) 2014-06-18
CN103871050B CN103871050B (en) 2017-12-29

Family

ID=50909555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410056698.9A Active CN103871050B (en) 2014-02-19 2014-02-19 icon dividing method, device and terminal

Country Status (1)

Country Link
CN (1) CN103871050B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105005461A (en) * 2015-06-23 2015-10-28 深圳市金立通信设备有限公司 Icon display method and terminal
WO2016011745A1 (en) * 2014-07-23 2016-01-28 小米科技有限责任公司 Image segmentation method, device and apparatus
CN107153549A (en) * 2017-05-19 2017-09-12 努比亚技术有限公司 Icon decoration method, equipment and computer-readable recording medium
CN110322453A (en) * 2019-07-05 2019-10-11 西安电子科技大学 3D point cloud semantic segmentation method based on position attention and auxiliary network
CN116721115A (en) * 2023-06-15 2023-09-08 小米汽车科技有限公司 Metallographic structure acquisition method, device, storage medium and chip

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1246085A2 (en) * 2001-03-28 2002-10-02 Eastman Kodak Company Event clustering of images using foreground/background segmentation
CN101425182A (en) * 2008-11-28 2009-05-06 华中科技大学 Image object segmentation method
CN102915541A (en) * 2012-10-31 2013-02-06 上海大学 Multi-scale image segmenting method
CN103413303A (en) * 2013-07-29 2013-11-27 西北工业大学 Infrared target segmentation method based on joint obviousness
CN103578113A (en) * 2013-11-19 2014-02-12 汕头大学 Method for extracting foreground images

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1246085A2 (en) * 2001-03-28 2002-10-02 Eastman Kodak Company Event clustering of images using foreground/background segmentation
CN101425182A (en) * 2008-11-28 2009-05-06 华中科技大学 Image object segmentation method
CN102915541A (en) * 2012-10-31 2013-02-06 上海大学 Multi-scale image segmenting method
CN103413303A (en) * 2013-07-29 2013-11-27 西北工业大学 Infrared target segmentation method based on joint obviousness
CN103578113A (en) * 2013-11-19 2014-02-12 汕头大学 Method for extracting foreground images

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张爱华: "基于模糊聚类分析的图像分割技术研究", 《中国优秀博硕士学位论文全文数据库(博士)•信息科技辑》 *
顾鑫,王海涛,汪凌峰,王颖,陈如冰,潘春洪: "基于不确定性度量的多特征融合跟踪", 《自动化学报》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016011745A1 (en) * 2014-07-23 2016-01-28 小米科技有限责任公司 Image segmentation method, device and apparatus
US9665945B2 (en) 2014-07-23 2017-05-30 Xiaomi Inc. Techniques for image segmentation
CN105005461A (en) * 2015-06-23 2015-10-28 深圳市金立通信设备有限公司 Icon display method and terminal
CN107153549A (en) * 2017-05-19 2017-09-12 努比亚技术有限公司 Icon decoration method, equipment and computer-readable recording medium
CN110322453A (en) * 2019-07-05 2019-10-11 西安电子科技大学 3D point cloud semantic segmentation method based on position attention and auxiliary network
CN116721115A (en) * 2023-06-15 2023-09-08 小米汽车科技有限公司 Metallographic structure acquisition method, device, storage medium and chip

Also Published As

Publication number Publication date
CN103871050B (en) 2017-12-29

Similar Documents

Publication Publication Date Title
CN105005909A (en) Method and device for predicting lost users
CN104679969A (en) Method and device for avoiding user churn
CN103327102A (en) Application program recommending method and device
CN103578474A (en) Method, device and equipment for voice control
CN104636047A (en) Method and device for operating objects in list and touch screen terminal
CN103605077B (en) Predetermined battery recognition methods, device and electronic equipment
CN104834529A (en) Method and device for optimizing performance of application
US20170109756A1 (en) User Unsubscription Prediction Method and Apparatus
CN106155557B (en) A kind of virtual key display methods and mobile terminal
CN104571787A (en) Message display method and communication terminal
CN104142868A (en) Connection establishment method and device
CN104679381A (en) Method and device for switching chat box
CN104134043B (en) Content is hidden, separates method, device and the terminal hidden
CN103368828B (en) A kind of message temporary storage and system
CN105302452A (en) Gesture interaction-based operation method and device
CN103871050A (en) Image partition method, device and terminal
CN103501487A (en) Method, device, terminal, server and system for updating classifier
CN104516624A (en) Method and device for inputting account information
CN104820546A (en) Functional information exhibition method and apparatus
CN104901992A (en) Resource transfer method and device
CN104092657A (en) Information transmission method, device and system
CN104731782A (en) Information handling method and mobile terminal
CN104239005A (en) Graph alignment method and device
CN104636455A (en) Acquisition method and device for application mapping information
CN104834655A (en) Method and device for displaying mass parameter of network resource

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant