CN105224917B - A kind of method and system using color space creation skin color probability map - Google Patents

A kind of method and system using color space creation skin color probability map Download PDF

Info

Publication number
CN105224917B
CN105224917B CN201510570761.5A CN201510570761A CN105224917B CN 105224917 B CN105224917 B CN 105224917B CN 201510570761 A CN201510570761 A CN 201510570761A CN 105224917 B CN105224917 B CN 105224917B
Authority
CN
China
Prior art keywords
skin
color
probability
colour
group
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.)
Active
Application number
CN201510570761.5A
Other languages
Chinese (zh)
Other versions
CN105224917A (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.)
Chengdu Pinguo Technology Co Ltd
Original Assignee
Chengdu Pinguo Technology Co Ltd
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 Chengdu Pinguo Technology Co Ltd filed Critical Chengdu Pinguo Technology Co Ltd
Priority to CN201510570761.5A priority Critical patent/CN105224917B/en
Publication of CN105224917A publication Critical patent/CN105224917A/en
Application granted granted Critical
Publication of CN105224917B publication Critical patent/CN105224917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/169Holistic features and representations, i.e. based on the facial image taken as a whole
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Abstract

The invention discloses a kind of method and systems using color space creation skin color probability map, treat trained color image and are counted, and count the number of every group of color in the number and the non-colour of skin of every group of color in the colour of skin, form training statistical form;The probability that every group of color belongs to skin is calculated using statistical form;The probability normalization that every group of color is belonged to skin, obtains skin color probability search table;Pre-process input picture;Judged whether to detect face according to pretreated input picture, constructs skin color probability map.The present invention is intended to provide a kind of, it applies more widely, the fast skin color probability drawing generating method of processing speed.

Description

A kind of method and system using color space creation skin color probability map
Technical field
The invention belongs to field of image processings, and in particular to it is a kind of using color space creation skin color probability map method and System.
Background technique
In recent years, as camera is biometrics, mobile phone camera, a whole people have arrived in the photography epoch.Wherein to personage Shooting be a very important component part.Everybody all has sense of loving to make up and wearing beautiful clothes, and carrying out beautification to obtained portrait photo is also One of one hot spot.If knowing which position is skin in picture, which position is not skin, it will be able to be subsequent processing people As photo, such as mill skin, whitening, makeups etc. provide important help.If skin area is manually smeared out, for regular handset It is relatively complicated and complicated for user.So being just particularly important using the research that image automatically generates complexion model.
It is that MichaelJ.Jones proposes " Sta that the algorithm of acquisition complexion model is most representational in the world at present tisticalColorModelswithApplicationtoSkinDetection".This method passes through construction mixed Gaussian mould Type calculates the probability that each pixel in figure belongs to skin.But algorithm effect comes self-timer image or darker image Say unsatisfactory, and treatment process is fairly time consuming.
Summary of the invention
To solve the above-mentioned problems, a kind of method and system using color space creation skin color probability map of the present invention.This Invention is intended to provide one kind, and it applies more widely, the fast skin color probability drawing generating method of processing speed.
In order to achieve the above objectives, the technical solution adopted by the present invention is that:
A method of skin color probability map being created using color space, including the following steps:
(1) it treats trained color image to be counted, counts the number of every group of color and every group of face in the non-colour of skin in the colour of skin The number of color forms training statistical form;
(2) probability that every group of color belongs to skin is calculated using statistical form;
(3) probability that every group of color belongs to skin is normalized, obtains skin color probability search table;
(4) user's input picture is pre-processed;
(5) judged whether to detect face according to pretreated input picture, construct skin color probability map.
Further, the step (1) specifically, comprising steps of
To every color image to be trained, colour of skin position and non-colour of skin position are marked;
And by every color image to be trained, YCbCrCg color space is converted to from RGB color;
The statistical form of six 256 rows 256 column is created, each value in statistical form is used to count the pixel for belonging to corresponding color Sum, six statistical forms are colour of skin Y-Cb statistical form, colour of skin Y-Cr statistical form, colour of skin Y-Cg statistical form, non-colour of skin Y-Cb respectively Statistical form, non-colour of skin Y-Cr statistical form, non-colour of skin Y-Cg statistical form;
By each pixel in every image to be trained is according to colour of skin position and non-colour of skin position is distinguished and YCbCrCg The difference of color space is included in corresponding statistical form, forms training statistical form;
Wherein, it also needs to count all total number of pixels for belonging to the colour of skin and belongs to the total number of pixels of the non-colour of skin.
Further, colour of skin Y-Cb statistical form and non-colour of skin Y-Cb statistical form are one group, colour of skin Y-Cr statistical form and non- Colour of skin Y-Cr statistical form is one group, and colour of skin Y-Cg statistical form and non-colour of skin Y-Cg statistical form are one group, obtain Y-Cb, Y-Cr and Tri- groups of statistical forms of Y-Cg, total occupied space is 256*256*3, far less than space 256*256* occupied by YCbCrCg statistical form 256*256 is also far less than traditional RGB statistical form occupied space 256*256*256.
Further, the step (2) specifically, comprising steps of
Calculate the total number of all pixels and the probability of skin and non-skin;
Each of every group of colour of skin statistical form is worth, respectively divided by skin pixel total number, is obtained in skin comprising every The probability of group color;Each of non-colour of skin statistical form of respective sets is worth, respectively divided by non-skin pixel total number, is obtained non- It include the probability of every group of color in skin;
Show that every group of color is skin probability respectively according to Bayes rule.
Further, calculating separately Y-Cb using three groups of statistical forms, every group of color belongs to the general of skin in Y-Cr, Y-Cg Rate.
Further, the step (3) specifically, comprising steps of
Respectively 256*256 skin probability value in every group of statistical form calculate and obtains mean value and standard deviation;According to Obtained mean value and standard deviation carry out Gaussian normalization processing to each value of skin probability in corresponding group of statistical form;It will place Data acquisition system after reason forms skin color probability search table.
Wherein, probability normalization value range is [0,1].
Further, the step (4) is that input picture is converted to YCbCrCg image from RGB color;And Face datection is carried out to input picture, obtains face rectangle frame.
Further, the step (5) is calculated according to face rectangle frame detected in step (4), including Step:
If not detecting face, for each of input picture pixel, pass through its Y-Cb, Y-Cr and Y-Cg Value, is searched in obtained skin color probability search table, and obtains skin color probability by calculating;If detecting face, count respectively Calculate the mean value and variance of R, G and channel B in input picture;The Gauss skin probability of the point is calculated each point in image;It is right In each of input picture pixel, through the value of its Y-Cb, Y-Cr and Y-Cg, in obtained skin color probability search table It searches, and obtains pre- skin color probability by calculating;By Gauss skin probability and pre- skin color probability, it is general to obtain the final colour of skin Rate.
Wherein, it when carrying out mean value and variance calculates, carries out after calculating each pixel of the face detected from small To big sequence, smaller explanation is closer to then only the pixel of selection collating sequence small end is calculated.First it is ranked up, Mean value is calculated with the pixel for coming front again to mention to filter out the pixels such as the tooth for accounting for a small amount of number in the colour of skin or black eye ball High-accuracy.
On the other hand, the present invention also provides a kind of systems using color space creation skin color probability map, comprising:
Statistical form generation module counts largely color image to be trained, and counts the number of every group of color in skin With the number of every group of group color in non-skin, statistical form is formed;
Skin probability computing module, every group of color belongs to the probability of skin in counting statistics table;
Probability normalizes module, and the probability that every group of color belongs to skin is normalized;
Input picture preprocessing module, pre-processes input picture;
Skin color probability map forms module, judges whether be able to detect that face in input picture, to construct skin color probability Figure;
Wherein, statistical form generation module outlet end is connected with skin probability computing module arrival end, and skin probability calculates Module outlet end connects probability and normalizes module inlet end, and input picture preprocessing module outlet end and skin color probability map form mould Block entrance end is connected, and skin color probability map forms module inlet end and is also connected with probability normalization module.
Using the technical program the utility model has the advantages that a kind of utilization color space proposed by the invention creates skin color probability map Method and system, improved on traditional YCbCr color space, be added Cg Color Channel, thus in the space YCbCrCg The middle statistics colour of skin creates Y- Cb, tri- groups of statistical forms of Y-Cr, Y-Cg, and total occupied space is 256*256*3, is far less than Space 256*256*256*256 occupied by YCbCrCg statistical form is also far less than traditional RGB statistical form occupied space 256* 256*256;It is first ranked up when seeking Gaussian mean, then calculates mean value with the pixel for coming front, to filter out in the colour of skin The tooth of a small amount of number is accounted for, the pixels such as black eye ball improve accuracy rate;The look-up table of YCbCrCg color will be used, and passes through R, G, B The gaussian probability that path computation obtains combines, so that the result of Face Detection is more accurate.
Detailed description of the invention
Fig. 1 is the method main flow chart of the invention that skin color probability map is created using color space;
Fig. 2 is the flow chart that skin color probability search table is created in the embodiment of the present invention;
Fig. 3 is the method flow diagram that skin color probability map is constructed in the embodiment of the present invention;
Fig. 4 be the method for the invention by system structure schematic diagram.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is made into one with reference to the accompanying drawing Step illustrates.
A kind of method using color space creation skin color probability map shown in Figure 1, including the following steps:
(1) it treats trained color image to be counted, counts the number of every group of color and every group of face in the non-colour of skin in the colour of skin The number of color forms training statistical form, as shown in Figure 2.
Specific steps are as follows:
A) artificial to mark colour of skin position and non-colour of skin position to every color image to be trained.Such as colour of skin position is complete Portion is labeled as white, and non-colour of skin position is all labeled as black.
B) by every color image to be trained, YCbCrCg color space, calculation formula are converted to from RGB color It is as follows:
Y=0.299*R+0.587*G+0.114*B
Cb=-0.148*R-0.291*G+0.439*B+128
Cr=0.439*R-0.368*G-0.071*B+128
Cg=-0.318*R+0.439*G-0.121*B+128
Above-mentioned R, G, B are the value in three channels in RGB color respectively, and Y, Cb, Cr, Cg are that YCbCrCg color is empty Between value, wherein R, G, B, Y, Cb, the value range of Cr, Cg are [0,255].
C) statistical form of six 256 rows 256 column is created, each value in statistical form is used to count the picture for belonging to corresponding color Plain sum.
Wherein, six statistical forms are colour of skin Y-Cb statistical form respectively, colour of skin Y-Cr statistical form, and colour of skin Y-Cg statistical form is non- Colour of skin Y-Cb statistical form, non-colour of skin Y-Cr statistical form, non-colour of skin Y-Cg statistical form;Wherein, colour of skin Y-Cb statistical form and the non-colour of skin Y-Cb statistical form is one group, and colour of skin Y-Cr statistical form and non-colour of skin Y-Cr statistical form are one group, colour of skin Y-Cg statistical form and non-skin Color Y-Cg statistical form is one group.Y-Cb, tri- groups of statistical forms of Y-Cr, Y-Cg are created, total occupied space is 256*256*3, much few The space 256*256*256*256 occupied by YCbCrCg statistical form is also far less than traditional RGB statistical form occupied space 256*256*256。
Assuming that Y [100] Cb [200]=30000 in colour of skin Y-Cb table, then representing all Y values in training process is 100 And Cb value is 200, and the total number of pixels for belonging to skin area is 30000.
D) each of every image to be trained pixel is distinguished according to colour of skin position and non-colour of skin position and The difference of YCbCrCg color space is included in corresponding statistical form.
If scheming it according to artificial mark is colour of skin point, then the Y-Cb of colour of skin statistics point, Y-Cr, Y-Cg correspond to count value Respectively plus 1;If not being colour of skin point, then the Y-Cb of non-colour of skin statistics point, Y-Cr, Y-Cg correspond to count value and add 1 respectively.Simultaneously All total number of pixels Skincount for belonging to the colour of skin are counted, with the total number of pixels notSkincount for belonging to the non-colour of skin.
(2) probability that every group of color belongs to skin is calculated using statistical form, as shown in Figure 2.
Calculate the total number of all pixels, the probability of skin and non-skin;Each of one group of colour of skin statistical form is worth, Divided by skin pixel total number, the probability in skin comprising every group of color is obtained;Similarly to each of non-colour of skin statistical form Value obtains the probability in non-skin comprising every group of color divided by non-skin pixel total number;It is obtained respectively according to Bayes rule Every group of color is skin probability.
The total number Totalcount=Skincount+notSkincount of all pixels is calculated, calculates skin later Probability P skin=Skincount/Totalcount.
Similarly calculate the probability P notskin=notSkincount/Totalcount of non-skin.
Above in 2 formulas, Pskin and Pnotskin value range is [0,1].
Each of colour of skin statistical form Y-Cb is worth, divided by skin pixel total number Skincount, obtains wrapping in skin Color Y, the probability P 1 of Cb are organized containing certain;Similarly each of non-colour of skin statistical form Y-Cb is worth, it is always a divided by non-skin pixel Number notSkincount obtains the probability P 2 comprising certain group color YCbCrCg in non-skin.
The value range of P1 and P2 is [0,1], according to Bayes rule: P1*Pskin/ (P1*Pskin+P2* Pnotskin the probability that wherein one group of color Y, Cb are skin) is obtained;Similarly all 256*256 group colors are calculated using this method Probability, wherein the value range of Pbayes1 [Y] [Cb], Y and Cb are equal are as follows: [0,255].
The probability that 256*256 group color Y, Cr are skin similarly is calculated to colour of skin table Y-Cr and non-colour of skin table Y-Cr Pbayes2 [Y] [Cr], the value range of Y and Cr: [0,255].
The probability that 256*256 group color Y, Cg are skin similarly is calculated to colour of skin table Y-Cg and non-colour of skin table Y-Cg Pbayes3 [Y] [Cg], the value range of Y and Cg: [0,255].
The value range of Pbayes1, Pbayes2, Pbayes3 are 0 to just infinite.
(3) probability that every group of color belongs to skin is normalized, obtains skin color probability search table, as shown in Figure 2.
To 256*256 value in the skin probability of one group of statistical form, carry out calculating acquisition mean value and standard deviation;Using institute Mean value and standard deviation are obtained, to each value of the skin probability of this group of statistical form, carries out Gaussian normalization processing;By treated Data are put into skin color probability search table.
To all 256*256 values in Pbayes1 [Y] [Cb], the number count1 of wherein non-zero value is counted, will be owned Value it is cumulative, obtain probability and ProSum1.
Average mean1=ProSum1/count1 later.
Later to each Pbayes1 [Y] [Cb], carry out that squre1, calculation formula is calculated are as follows: squre1= (Pbayes1[Y][Cb]-mean1)*(Pbayes1[Y][Cb]-mean1)。
Again to all 256*256 values, add up square1, obtains squreSum.
With squreSum/cont1, the variance sigma1 of Pbayes1 [Y] [Cb] is obtained, sigma1 evolution is obtained later Standard deviation SDeviation1:SDeviation1=sqrt (sigma1).
Finally each of Pbayes1 [Y] [Cb] is worth again, carries out Gaussian normalization processing:
Pbayes1 [Y] [Cb]=((Pbayes1 [Y] [Cb]-mean1)/(3*SDeviation1)+1)/2
Treated in this way Pbayes1 [Y] [Cb], 99% all in [0,1], remaining if it is greater than 1, it is enabled to be equal to 1; If it is less than 0, it is enabled to be equal to 0.Finally make the value range [0,1] of Pbayes1 [Y] [Cb].
Similarly, same normalized is carried out to Pbayes2 [Y] [Cr] and Pbayes3 [Y] [Cg].
Wherein, probability normalization value range is [0,1].
(4) user's input picture is pre-processed, as shown in Figure 3.
Input picture is converted into YCbCrCg image from RGB color;Face datection is carried out to input picture, is obtained Face rectangle frame.
(5) judged whether to detect face according to pretreated input picture, construct skin color probability map, as shown in Figure 3.
If not detecting face, for each of input picture pixel, pass through its Y-Cb, Y-Cr and Y-Cg Value, is searched in obtained skin color probability search table, and obtains skin color probability by calculating;If detecting face, count respectively Calculate the mean value and variance of R, G and channel B in input picture;The Gauss skin probability of the point is calculated each point in image;It is right In each of input picture pixel, through the value of its Y-Cb, Y-Cr and Y-Cg, in obtained skin color probability search table It searches, and obtains pre- skin color probability by calculating;By Gauss skin probability and pre- skin color probability, it is general to obtain the final colour of skin Rate.
Wherein, it when carrying out mean value and variance calculates, carries out after calculating each pixel of the face detected from small To big sequence, smaller explanation is closer to then only the preceding pixel of selection collating sequence is calculated.It is first ranked up, then uses The pixel for coming front calculates mean value, to filter out the pixels such as the tooth for accounting for a small amount of number in the colour of skin or black eye ball, improves quasi- True rate.
A) it were it not for and detect face, then, by its Y, Cb, Cr, the value of Cg is looked into for each pixel in image It looks for Pbayes1 [Y] [Cb], Pbayes2 [Y] [Cr], the value of Pbayes3 [Y] [Cg], last skin color probability is these three values Evolution, calculation formula are as follows again for quadratic sum:
Pout=sqrt (Pbayes1 [Y] [Cb] * Pbayes1 [Y] [Cb]+
Pbayes2[Y][Cr]*Pbayes2[Y][Cr]+
Pbayes3[Y][Cg]*Pbayes3[Y][Cg])
Pout is enabled to be equal to 1 greater than 1 again.The value range [0,1] of Pout.
If b) detecting face, to all pixels in face rectangle frame, pixel is carried out in R Color Channel and is added up, is obtained The number of pixels Rectcount into the channel R and Rsum and rectangle frame.The equal of the channel R is obtained divided by Rectcount with Rsum Value, calculation formula are as follows:
Ravg=Rsum/Rectcount
Wherein the value range of Ravg is [0,255].
Later again to each of face rectangle frame pixel, a square calculating is carried out, calculation formula is as follows:
Rsqure=(R-Ravg) * (R-Ravg)
Then it is sorted from small to large to Rsqure, then smaller explanation only selects collating sequence closer to Ravg Preceding one third (or half) pixel, recalculate the Ravg ' at these positions, similarly calculate obtain Rsqure '= (R-Ravg ') * (R- Ravg '), each Rsqure ' in face rectangle frame is added up and obtains Rsquresum.Then count The variance Rsigma in the channel R is calculated, calculation formula is as follows:
Rsigma=Rsquresum/Rectcount
Similarly obtain the mean value and variance Gavg, Gsigma in the channel G, the mean value and variance Bavg, Bsigma of channel B.
(c) to point each in image, Pout is calculated according to method when not detecting face.
(d) to point each in image, using R, G, channel B value and obtained Ravg, Rsigma, Gavg, Gsigma, Bavg, Bsigma calculate the Gauss skin probability of the point, and calculation formula is as follows:
Pgaus=exp (- (R-Ravg) * (R-Ravg)/Rsigma
-(G-Gavg)*(G-Gavg)/Gsigma
-(B-Bavg)*(B-Bavg)/Bsigma)
Wherein, the value range of Pgaus is [0,1].
By (c), (d) the two of step probability multiplication obtains skin color probability to the end:
Presult=Pout*Pgaus.Presult value range [0,1].
Based on identical inventive concept, as shown in figure 4, utilizing the color space creation colour of skin general the present invention also provides a kind of The system of rate figure, comprising:
Statistical form generation module counts largely color image to be trained, and counts the number of every group of color in the colour of skin With the number of every group of color in the non-colour of skin, statistical form is formed;
Skin probability computing module, every group of color belongs to the probability of skin in counting statistics table;
Probability normalizes module, and the probability that every group of color belongs to skin is normalized;
Input picture preprocessing module, pre-processes input picture;
Skin color probability map forms module, judges whether be able to detect that face in input picture, to construct skin color probability Figure;
Wherein, statistical form generation module outlet end is connected with skin probability computing module arrival end, and skin probability calculates Module outlet end connects probability and normalizes module inlet end, and input picture preprocessing module outlet end and skin color probability map form mould Block entrance end is connected, and skin color probability map forms module inlet end and is also connected with probability normalization module.
The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention.The technology of the industry Personnel are it should be appreciated that the present invention is not limited to the above embodiments, and the above embodiments and description only describe this The principle of invention, without departing from the spirit and scope of the present invention, various changes and improvements may be made to the invention, these changes Change and improvement all fall within the protetion scope of the claimed invention.This reality invent claimed range by appended claims and Its equivalent thereof.

Claims (9)

1. a kind of method using color space creation skin color probability map, which is characterized in that including the following steps:
(1) it treats trained color image to be counted, counts in the colour of skin every group of color in the number and the non-colour of skin of every group of color Number forms training statistical form;Every group of color refers to the various combination of color component;
(2) probability that every group of color belongs to skin is calculated using statistical form;
(3) probability that every group of color belongs to skin is normalized, obtains skin color probability search table;
(4) user's input picture is pre-processed;
(5) judge whether to detect face according to pretreated input picture, by Gauss skin probability and pre- skin color probability, Obtain skin color probability map;
The calculation formula of the Gauss skin probability is Pgaus=exp (- (R-Ravg) * (R-Ravg)/Rsigma- (G- Gavg)*(G-Gavg)/Gsigma-(B-Bavg)*(B-Bavg)/Bsigma)
Wherein, Pgaus indicates Gauss skin probability;R indicates R channel value, and Ravg indicates the channel R mean value, and Rsigma indicates the channel R Mean square deviation;G indicates G channel value, and Gavg indicates the channel G mean value, and Gsigma indicates the channel G mean square deviation;B indicates channel B value, Bavg Indicate channel B mean value, Bsigma indicates channel B mean square deviation;
The pre- skin color probability in obtained skin color probability search table by searching each of input picture pixel And it is obtained by calculating.
2. a kind of method using color space creation skin color probability map according to claim 1, which is characterized in that described Step (1) comprising steps of
To every color image to be trained, colour of skin position and non-colour of skin position are marked;
And by every color image to be trained, YCbCrCg color space is converted to from RGB color;
The statistical form for creating six 256 rows 256 column, each value in statistical form be used to count belong to corresponding color pixel it is total Number, six statistical forms are colour of skin Y-Cb statistical form, colour of skin Y-Cr statistical form, colour of skin Y-Cg statistical form, non-colour of skin Y-Cb system respectively Count table, non-colour of skin Y-Cr statistical form, non-colour of skin Y-Cg statistical form;
By each pixel in every image to be trained is according to colour of skin position and non-colour of skin position is distinguished and YCbCrCg color The difference in space is included in corresponding statistical form, forms training statistical form;
Wherein, it also needs to count all total number of pixels for belonging to the colour of skin and belongs to the total number of pixels of the non-colour of skin.
3. a kind of method using color space creation skin color probability map according to claim 2, which is characterized in that the colour of skin Y-Cb statistical form and non-colour of skin Y-Cb statistical form are one group, and colour of skin Y-Cr statistical form and non-colour of skin Y-Cr statistical form are one group, skin Color Y-Cg statistical form and non-colour of skin Y-Cg statistical form are one group, obtain tri- groups of statistical forms of Y-Cb, Y-Cr and Y-Cg.
4. a kind of method using color space creation skin color probability map according to claim 3, which is characterized in that described Step (2) comprising steps of
Calculate the total number of all pixels and the probability of skin and non-skin;
Each of every group of colour of skin statistical form is worth, respectively divided by skin pixel total number, is obtained in skin comprising every group of face The probability of color;Each of non-colour of skin statistical form of respective sets is worth, respectively divided by non-skin pixel total number, obtains non-skin In include every group of color probability;
Show that every group of color is skin probability respectively according to Bayes rule.
5. a kind of method using color space creation skin color probability map according to claim 4, which is characterized in that utilize Three groups of statistical forms calculate separately Y-Cb, and every group of color belongs to the probability of skin in Y-Cr, Y-Cg.
6. a kind of method using color space creation skin color probability map according to claim 5, which is characterized in that described Step (3) comprising steps of
Respectively 256*256 skin probability value in every group of statistical form calculate and obtains mean value and standard deviation;
Gaussian normalization is carried out to each value of skin probability in corresponding group of statistical form according to obtained mean value and standard deviation Processing;
By treated, data acquisition system forms skin color probability search table;
Wherein, probability normalization value range is [0,1].
7. a kind of method using color space creation skin color probability map according to claim 6, which is characterized in that described Step (4) is that input picture is converted to YCbCrCg image from RGB color;And Face datection is carried out to input picture, Obtain face rectangle frame.
8. a kind of method using color space creation skin color probability map according to claim 7, which is characterized in that described Step (5) is calculated according to face rectangle frame detected in step (4), comprising steps of
If not detecting face, for each of input picture pixel, by the value of its Y-Cb, Y-Cr and Y-Cg, It is searched in obtained skin color probability search table, and obtains skin color probability by calculating;
If detecting face, the mean value and variance of R, G and channel B in input picture are calculated separately;To each point meter in image Calculate the Gauss skin probability of the point;For each of input picture pixel, by the value of its Y-Cb, Y-Cr and Y-Cg, It is searched in obtained skin color probability search table, and obtains pre- skin color probability by calculating;Pass through Gauss skin probability and pre- skin Color probability obtains final skin color probability;
Wherein, it when carrying out mean value and variance calculates, is carried out from small to large after calculating each pixel of the face detected Sequence, smaller explanation is closer to then only the pixel of selection collating sequence small end is calculated.
9. a kind of system using color space creation skin color probability map characterized by comprising
Statistical form generation module counts largely color image to be trained, count the colour of skin in every group of color number with it is non- The number of every group of group color in the colour of skin forms statistical form;Every group of color refers to the various combination of color component;
Skin probability computing module, every group of color belongs to the probability of skin in counting statistics table;
Probability normalizes module, and the probability that every group of color belongs to skin is normalized;
Input picture preprocessing module, pre-processes input picture;
Skin color probability map forms module, judges whether be able to detect that face in input picture, so that skin color probability map is constructed, structure Making skin color probability map is obtained by Gauss skin probability and pre- skin color probability;
The calculation formula of Gauss skin probability is Pgaus=exp (- (R-Ravg) * (R-Ravg)/Rsigma- (G-Gavg) * (G- Gavg)/Gsigma-(B-Bavg)*(B-Bavg)/Bsigma)
In the calculation formula of Gauss skin probability, Pgaus indicates Gauss skin probability;R indicates R channel value, and Ravg indicates the channel R Mean value, Rsigma indicate the channel R mean square deviation;G indicates G channel value, and Gavg indicates the channel G mean value, and Gsigma indicates that the channel G is square Difference;B indicates channel B value, and Bavg indicates channel B mean value, and Bsigma indicates channel B mean square deviation;
Pre- skin color probability is by searching and leading in obtained skin color probability search table to each of input picture pixel Calculating is crossed to obtain;
Wherein, statistical form generation module outlet end is connected with skin probability computing module arrival end, skin probability computing module Outlet end connects probability and normalizes module inlet end, and input picture preprocessing module outlet end forms module with skin color probability map and enters Mouth end is connected, and skin color probability map forms module inlet end and is also connected with probability normalization module.
CN201510570761.5A 2015-09-10 2015-09-10 A kind of method and system using color space creation skin color probability map Active CN105224917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510570761.5A CN105224917B (en) 2015-09-10 2015-09-10 A kind of method and system using color space creation skin color probability map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510570761.5A CN105224917B (en) 2015-09-10 2015-09-10 A kind of method and system using color space creation skin color probability map

Publications (2)

Publication Number Publication Date
CN105224917A CN105224917A (en) 2016-01-06
CN105224917B true CN105224917B (en) 2019-06-21

Family

ID=54993877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510570761.5A Active CN105224917B (en) 2015-09-10 2015-09-10 A kind of method and system using color space creation skin color probability map

Country Status (1)

Country Link
CN (1) CN105224917B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701474B (en) * 2016-01-15 2019-02-05 西安交通大学 A kind of video smoke recognition methods of color combining and external physical characteristic
CN105894480A (en) * 2016-05-03 2016-08-24 成都索贝数码科技股份有限公司 High-efficiency facial beautification device easy for parallel realization
CN105913400A (en) * 2016-05-03 2016-08-31 成都索贝数码科技股份有限公司 Device for obtaining high-quality and real-time beautiful image
CN106570472B (en) * 2016-11-02 2019-11-05 华为技术有限公司 A kind of skin color detection method, device and terminal
CN106981066B (en) * 2017-03-06 2019-07-12 武汉嫦娥医学抗衰机器人股份有限公司 A kind of interior face image dividing method based on the colour of skin
CN106991379B (en) * 2017-03-09 2020-07-10 Oppo广东移动通信有限公司 Human skin recognition method and device combined with depth information and electronic device
CN107424115B (en) * 2017-05-31 2020-10-27 成都品果科技有限公司 Skin color correction algorithm based on face key points
CN107274452B (en) * 2017-05-31 2020-07-24 成都品果科技有限公司 Automatic detection method for acne
CN108389234B (en) * 2018-02-05 2021-10-08 深圳市恒晨电器有限公司 Flat LCD (liquid Crystal display) heterochromatic detection method, storage device and mobile terminal
CN111047619B (en) * 2018-10-11 2022-09-30 展讯通信(上海)有限公司 Face image processing method and device and readable storage medium
CN111145086A (en) * 2019-12-27 2020-05-12 北京奇艺世纪科技有限公司 Image processing method and device and electronic equipment
CN113657401B (en) * 2021-08-24 2024-02-06 凌云光技术股份有限公司 Probability map visualization method and device for defect detection

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1700238A (en) * 2005-06-23 2005-11-23 复旦大学 Method for dividing human body skin area from color digital images and video graphs
CN1704966A (en) * 2004-05-28 2005-12-07 中国科学院计算技术研究所 Method for detecting pornographic images
CN1763765A (en) * 2004-10-21 2006-04-26 佳能株式会社 Method, device and storage medium for detecting face complexion area in image
CN101251898A (en) * 2008-03-25 2008-08-27 腾讯科技(深圳)有限公司 Skin color detection method and apparatus
CN102236786A (en) * 2011-07-04 2011-11-09 北京交通大学 Light adaptation human skin colour detection method
CN102324025A (en) * 2011-09-06 2012-01-18 北京航空航天大学 Human face detection and tracking method based on Gaussian skin color model and feature analysis

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1353516A1 (en) * 2002-04-08 2003-10-15 Mitsubishi Electric Information Technology Centre Europe B.V. A method and apparatus for detecting and/or tracking one or more colour regions in an image or sequence of images

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704966A (en) * 2004-05-28 2005-12-07 中国科学院计算技术研究所 Method for detecting pornographic images
CN1763765A (en) * 2004-10-21 2006-04-26 佳能株式会社 Method, device and storage medium for detecting face complexion area in image
CN1700238A (en) * 2005-06-23 2005-11-23 复旦大学 Method for dividing human body skin area from color digital images and video graphs
CN101251898A (en) * 2008-03-25 2008-08-27 腾讯科技(深圳)有限公司 Skin color detection method and apparatus
CN102236786A (en) * 2011-07-04 2011-11-09 北京交通大学 Light adaptation human skin colour detection method
CN102324025A (en) * 2011-09-06 2012-01-18 北京航空航天大学 Human face detection and tracking method based on Gaussian skin color model and feature analysis

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Statistical Color Models with Application to Skin Detection;MICHAEL J.JONES等;《International Journal of Computer Vision》;20020131;第46卷(第1期);第81-96页
基于改进YCbCr空间的肤色检测模式分析;黄秀常;《计算机仿真》;20100715;第27卷(第7期);第222-225页

Also Published As

Publication number Publication date
CN105224917A (en) 2016-01-06

Similar Documents

Publication Publication Date Title
CN105224917B (en) A kind of method and system using color space creation skin color probability map
CN105404861B (en) Training, detection method and the system of face key feature points detection model
CN108985181A (en) A kind of end-to-end face mask method based on detection segmentation
CN109033940B (en) A kind of image-recognizing method, calculates equipment and storage medium at device
CN101567043B (en) Face tracking method based on classification and identification
CN105913051B (en) A kind of updating device and method of the template library identifying facial image
CN102567716B (en) Face synthetic system and implementation method
CN101339661B (en) Real time human-machine interaction method and system based on moving detection of hand held equipment
CN103914699A (en) Automatic lip gloss image enhancement method based on color space
CN106780434A (en) Underwater picture visual quality evaluation method
CN110738161A (en) face image correction method based on improved generation type confrontation network
CN102117413A (en) Method for automatically filtering defective image based on multilayer feature
CN108268814A (en) A kind of face identification method and device based on the fusion of global and local feature Fuzzy
CN101493887A (en) Eyebrow image segmentation method based on semi-supervision learning and Hash index
CN103854261A (en) Method for correcting color cast images
CN107343188A (en) image processing method, device and terminal
CN103020655A (en) Remote identity authentication method based on single training sample face recognition
CN111652260B (en) Face clustering sample number selection method and system
CN109583341B (en) Method and device for detecting multi-person skeleton key points of image containing portrait
CN106650573B (en) A kind of face verification method and system across the age
CN208335207U (en) Exhibition and fair service system based on recognition of face
CN108021693A (en) A kind of image search method and device
CN103714328A (en) Adaboost algorithm for human face detection
CN103049754A (en) Picture recommendation method and device of social network
CN106886770A (en) A kind of video communication sentiment analysis householder method

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
CP02 Change in the address of a patent holder

Address after: 610041 the 13 floor of No. 1 middle Tianfu Avenue, No. 1268, high-tech zone, Chengdu, Sichuan.

Patentee after: Chengdu PinGuo Digital Entertainment Ltd.

Address before: 610041 No. 216 South City Road, Chengdu hi tech Zone, Sichuan

Patentee before: Chengdu PinGuo Digital Entertainment Ltd.

CP02 Change in the address of a patent holder