CN105844242A - Method for detecting skin color in image - Google Patents
Method for detecting skin color in image Download PDFInfo
- Publication number
- CN105844242A CN105844242A CN201610171922.8A CN201610171922A CN105844242A CN 105844242 A CN105844242 A CN 105844242A CN 201610171922 A CN201610171922 A CN 201610171922A CN 105844242 A CN105844242 A CN 105844242A
- Authority
- CN
- China
- Prior art keywords
- skin
- color
- image
- face
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Abstract
The invention discloses a method for detecting a skin color in an image. The method comprises the steps of (1), converting a to-be-detected color image from an original color space to a classified color space of the skin color; (2), detecting a human face, eliminating non-skin parts on the human face, and obtaining a human face skin area; (3) on the color image after color space conversion, acquiring the color of pixels in the human face skin area defined in the step (2) as a skin color sample; (4), establishing a skin color classifier according to the acquired skin color sample; and (5), classifying the whole image in a pixel-by-pixel manner by means of the skin color classifier established in the step (4), marking the pixel points which are classified to the skin color with white color on a skin color detection result image, and otherwise, marking with black color, thereby obtaining the skin color detection result image. The method of the invention can accurately detect different skin colors in the color image which is photographed by different kinds of imaging equipment on various illumination conditions.
Description
Technical field
The invention belongs to technical field of image processing, the method for the Face Detection being specifically related in a kind of image.
Background technology
In coloured image, owing to Skin Color Information is not affected by human body attitude, facial expression etc., there is relative stability, and owing to the color of the colour of skin Yu most of background objects has obvious difference, Face Detection technology is made to suffer from being widely applied in detection, gesture analysis, target following and image retrieval, the target of human body skin tone testing is to be automatically positioned out the skin area that human body is exposed from image, such as, detect the regions such as the face of people, hand from image.
In prior art, during area of skin color is detected, it is common that realize based on methods such as single Gauss model method, mixed Gauss model method, oval complexion model methods.Described single Gauss model method assumes that skin distribution obeys uni-modal Gaussian, by statistical analysis, the parameter of prediction Gauss distribution, sets up model based on described parameter, utilizes model to judge that whether new pixel or region are as the colour of skin.But not fully meeting uni-modal Gaussian owing to having the most agnate skin distribution, it is therefore proposed that described mixed Gauss model method, described mixed Gauss model method uses the Gaussian distribution model of multimodal to determine whether the pixel of image or region are the colour of skin.Owing under normal circumstances, Skin Color Information is when being transformed in YCbCr space, and it is within the scope of a similar oval cluster under CbCr coordinate system, so the colour of skin of people can also be detected based on complexion model oval determined by Skin Color Information.Prior art also has other method for Face Detection, such as based on regional model detection method, detection method based on histogram model etc..
But prior art is during Face Detection, it is possible that the problem that area of skin color and non-area of skin color accurately cannot be divided, may result in the inaccurate problem of Face Detection result, and Face Detection is affected bigger by complex background, illumination condition, attitudes vibration etc..
Summary of the invention
It is an object of the invention to provide a kind of method detecting the colour of skin in coloured image, it can accurately detect out the different types of colour of skin from the coloured image shot under various illumination conditions with different imaging devices.
To this end, the skin color detection method in the coloured image of present invention offer, the steps include:
(1) coloured image to be checked is transformed into from primitive color space the classification color space of the colour of skin;
(2) detection face, removes non-skin part on face, obtains face skin area, including:
(2.1) pending original color image is converted to gray level image, and therefrom detects face;
(2.2) in the human face region detected, the outline of locating human face, eyebrow, eyes, nostril, face, eliminate the region after eyebrow, eyes, nostril and face within retaining face outline as face skin area;
(3), on the coloured image behind converting colors space, in the face skin area determined in acquisition step (2), pixel color is as colour of skin sample;
(4) according to the colour of skin sample gathered, set up skin color classifier, specifically include:
(4.1) colour of skin sample of the middle collection of statistic procedure (3) respectively rectangular histogram in classification color space, and the rectangular histogram that this entire image of the coloured image behind converting colors space is in classification color space;
(4.2) for coordinate position on coloured image be (x, pixel y), it is determined that it is that the grader of the colour of skin is:
In above formula, cx,yRepresent pixel (x, y) color in classification color space, Ps(cx,y) represent colour of skin sample rectangular histogram in classification color space, PI(cx,y) represent entire image classification color space in rectangular histogram, λ is grader threshold value, its span be λ ∈ (0,1];
(5) skin color classifier set up in step (4) is used, entire image is classified pixel by pixel, is categorized as the pixel of the colour of skin, Face Detection result images is labeled as white, otherwise it is labeled as black, it is thus achieved that Face Detection result images.
As present invention further optimization, classification color space includes but not limited to YCrCb, YUV, Lab, HSV, HIS, normalized RGB.
As present invention further optimization, it is also possible to include the step that Face Detection result images carries out post processing, it, particularly as follows: detect edge on gray level image, removes the skin pixel being positioned at edge on Face Detection result images.
As present invention further optimization, described post-processing step can also include: uses etching operation to remove skin pixel scattered on Face Detection result images, uses to expand and grasps the small holes filled in large stretch of area of skin color.
The present invention propose method, its directly on image to be checked gather colour of skin sample, then on-line training skin color classifier detects the colour of skin.In the present invention, first coloured image is converted to gray level image, gray level image detects face, obtain the region at people's face skin place, then gathering pixel color from the identical region of coloured image as colour of skin sample, on-line training goes out skin color classifier to carry out Face Detection.
The present invention is without gathering and mark substantial amounts of colour of skin sample in advance as training sample set to train skin color classifier, and this grader can effectively carry out skin pixel point classification, there is excellent effect, it from the coloured image shot under various illumination conditions with different imaging devices, can accurately detect out the individual colour of skin at different ethnic group, sex and age.
Detailed description of the invention
Below in conjunction with embodiment, the present invention is further detailed explanation.
Skin color detection method in the coloured image of one embodiment of the invention, it comprises the following specific steps that:
(1) color space conversion.A given coloured image to be checked, the aggregation that it is transformed into the colour of skin from primitive color space is good, the color space that the colour of skin is good with the distinction of the non-colour of skin.
Primitive color space and statement for being different from image are convenient, in the present embodiment, the color space after conversion are referred to as color space of classifying.Color space of classifying in this step can be YCrCb, YUV, Lab, HSV, HIS, normalized RGB etc., it is also possible to good for the aggregation of the colour of skin under the conditions of shining in same light, other color space that the colour of skin is good with the distinction of the non-colour of skin.
In the present embodiment, the preferably color in classification color space represents with c;On image, coordinate is that (x, the color in classification color space of pixel y) is with cx,yRepresent.
(2) detection face, removes non-skin part on face, obtains face skin area.
(2.1) original color image is converted to gray level image, and therefrom detects face.
The detection of face is in the field of business more ripe scheme, it is well known to those skilled in the art in the art, such as utilizing Haar small echo to carry out the detection method etc. of face as the waterfall type AdaBoost grader of feature, the detailed process about Face datection does not repeats them here.
In the present embodiment, the human face region detected represents with rectangle.This rectangle preferably comprises skin and the non-skin parts (such as eyebrow, eyes, nostril, face etc.) of face, it is also possible to comprise some background areas.
(2.2) in the human face region detected, the outline of locating human face, eyebrow, eyes, nostril, face.Detailed process about Face datection does not repeats them here
The method that Face detection is in the field of business maturation, such as, utilize active shape model (ASM) to position, and therefore in the present embodiment, detailed process about Face datection does not repeats them here.
After all parts of locating human face, eliminate the region after eyebrow, eyes, nostril, face within retaining face outline as face skin area.
(3) colour of skin sample is gathered.
On the coloured image in converting colors space, in the face skin area determined in extraction step (2), pixel color is as colour of skin sample.
(4) according to the colour of skin sample gathered, skin color classifier is set up.
(4.1) colour of skin sample extracted in statistic procedure (3) rectangular histogram in classification color space, is designated as P in the present embodiments(c), statistics entire image rectangular histogram in classification color space, the present embodiment is designated as PI(c)。
(4.2) for coordinate position arbitrary on image be (x, pixel y), it is determined that it is that the grader of the colour of skin is:
In above formula, λ is grader threshold value, its span be λ ∈ (0,1].Adjust grader threshold value λ, make the colour of skin sample of θ % or above be judged to the colour of skin, the span of θ be θ ∈ (0,100].
In the present embodiment, the size of grader threshold value λ can the most specifically arrange or revise in actual applications.In a preferred embodiment, grader threshold tau can be adjusted in the following ways:
(a). the initial value arranging λ is λ=1;
(b). use above-mentioned skin color classifier that the colour of skin sample in colour of skin sample set is classified;
(c). statistics colour of skin sample set is categorized as the number of samples of the colour of skin by skin color classifier;
(d). if the number of samples being classified as the colour of skin accounts for the ratio of whole colour of skin sample set number of samples less than θ %, the suitably value of reduction λ, turn (b);Otherwise, terminate to adjust τ-value.
In the present embodiment, the value of preferably θ is 96, but the present embodiment θ takes 96 is only for example, and the unrestricted present invention.
Being only a kind of method of preferred adjustment grader threshold value λ more than it should be noted that, in the present invention, the adjustment for grader threshold value λ is not limited to this, and those skilled in the art can select other methods of adjustment according to actual needs.
(5) use the skin color classifier set up in step (4), whole image is classified pixel by pixel.It is categorized as the pixel of the colour of skin, Face Detection result images is labeled as white, otherwise is labeled as black, obtain Face Detection result images.
In one embodiment, it is also possible to the post processing carried out on Face Detection result images, specifically may include that
(6.1) on gray level image, detect edge, remove the skin pixel being positioned at edge on Face Detection result images.The present embodiment uses Sobel operator to carry out rim detection.Should be appreciated that some other edge detection operator also can obtain similar result.
(6.2) remove some scattered skin pixels on Face Detection result images, fill the small holes etc. in large stretch of area of skin color.The present embodiment preferably can use etching operation to remove the skin pixel that on Face Detection result images, some are scattered, use expansive working to fill the small holes in large stretch of area of skin color.Should be appreciated that some other image procossing morphological method also can obtain similar result.
It is to be understood that; the above, only presently preferred embodiments of the present invention, it is not intended to limit protection scope of the present invention; all any modification, equivalent substitution and improvement etc. done in the spirit and principles in the present invention etc, should be included within the scope of the present invention.
Claims (4)
1. the skin color detection method in image, the steps include:
(1) coloured image to be checked is transformed into from primitive color space the classification color space of the colour of skin;
(2) detection face, removes non-skin part on face, obtains face skin area, including:
(2.1) pending original color image is converted to gray level image, and therefrom detects face;
(2.2) in the human face region detected, the outline of locating human face, eyebrow, eyes, nose
Hole, face, eliminate the region after eyebrow, eyes, nostril and face within retaining face outline
As face skin area;
(3) on the coloured image behind converting colors space, the face determined in acquisition step (2)
In skin area, pixel color is as colour of skin sample;
(4) according to the colour of skin sample gathered, set up skin color classifier, specifically include:
(4.1) colour of skin sample of the middle collection of statistic procedure (3) respectively Nogata in classification color space
Figure, and this entire image of the coloured image behind converting colors space classification color space in straight
Fang Tu;
(4.2) for coordinate position on coloured image be (x, pixel y), it is determined that its be the colour of skin point
Class device is:
In above formula, cx,yRepresent pixel (x, y) color in classification color space, Ps(cx,y) represent skin
Colo(u)r atlas rectangular histogram in classification color space, PI(cx,y) represent that entire image is at classification color space
In rectangular histogram, λ is grader threshold value, its span be λ ∈ (0,1];
(5) use the skin color classifier set up in step (4), entire image is carried out pixel by pixel point
Class, is categorized as the pixel of the colour of skin, is labeled as white on Face Detection result images, on the contrary labelling
For black, it is thus achieved that Face Detection result images.
Skin color detection method in image the most according to claim 1, wherein, classification color is empty
Between include but not limited to YCrCb, YUV, Lab, HSV, HIS, normalized RGB.
Skin color detection method in image the most according to claim 1 and 2, wherein, the method
Also including the step that Face Detection result images carries out post processing, it is particularly as follows: on gray level image
Detection edge, removes the skin pixel being positioned at edge on Face Detection result images.
4. according to claim 1-3 any one of skin color detection method in the image stated, wherein,
Described post-processing step also includes: use etching operation to remove skin scattered on Face Detection result images
Color pixel, uses the small holes expanded in the large stretch of area of skin color of behaviour's filling.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610171922.8A CN105844242A (en) | 2016-03-23 | 2016-03-23 | Method for detecting skin color in image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610171922.8A CN105844242A (en) | 2016-03-23 | 2016-03-23 | Method for detecting skin color in image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105844242A true CN105844242A (en) | 2016-08-10 |
Family
ID=56583164
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610171922.8A Pending CN105844242A (en) | 2016-03-23 | 2016-03-23 | Method for detecting skin color in image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105844242A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106388781A (en) * | 2016-09-29 | 2017-02-15 | 深圳可思美科技有限公司 | Method for detecting skin colors and pigmentation situation of skin |
CN106846421A (en) * | 2017-02-14 | 2017-06-13 | 深圳可思美科技有限公司 | A kind of skin color detection method and device |
CN106952313A (en) * | 2017-03-21 | 2017-07-14 | 北京工商大学 | Skin complexion evaluation method based on HSI and Lab blend color models |
CN107507128A (en) * | 2017-08-08 | 2017-12-22 | 北京小米移动软件有限公司 | Image processing method and equipment |
CN107798314A (en) * | 2017-11-22 | 2018-03-13 | 北京小米移动软件有限公司 | Skin color detection method and device |
CN108939230A (en) * | 2018-05-31 | 2018-12-07 | 李洪均 | Gymnasium oxygen generating plant, gymnasium oxygen system, method for supplying oxygen and device |
CN110363088A (en) * | 2019-06-12 | 2019-10-22 | 南京理工大学 | Adaptive scytitis method for detecting area based on multi-feature fusion |
CN111027353A (en) * | 2019-02-18 | 2020-04-17 | 广东小天才科技有限公司 | Search content extraction method and electronic equipment |
CN111241889A (en) * | 2018-11-29 | 2020-06-05 | 华为技术有限公司 | Method and device for detecting and evaluating black eye |
CN111259744A (en) * | 2020-01-09 | 2020-06-09 | 五邑大学 | Face detection method and device based on skin model and SVM classifier |
CN111466882A (en) * | 2020-04-23 | 2020-07-31 | 上海祉云医疗科技有限公司 | Intelligent traditional Chinese medicine hand diagnosis analysis system and method |
CN112233064A (en) * | 2018-07-16 | 2021-01-15 | 华为技术有限公司 | Pigment detection method and electronic equipment |
WO2021016896A1 (en) * | 2019-07-30 | 2021-02-04 | 深圳市大疆创新科技有限公司 | Image processing method, system and device, and movable platform and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103106386A (en) * | 2011-11-10 | 2013-05-15 | 华为技术有限公司 | Dynamic self-adaption skin color segmentation method and device |
CN103745193A (en) * | 2013-12-17 | 2014-04-23 | 小米科技有限责任公司 | Skin color detection method and skin color detection device |
CN104504383A (en) * | 2015-01-14 | 2015-04-08 | 东南大学 | Human face detecting method based on skin colors and AdaBoost algorithm |
CN105354793A (en) * | 2015-11-25 | 2016-02-24 | 小米科技有限责任公司 | Facial image processing method and device |
-
2016
- 2016-03-23 CN CN201610171922.8A patent/CN105844242A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103106386A (en) * | 2011-11-10 | 2013-05-15 | 华为技术有限公司 | Dynamic self-adaption skin color segmentation method and device |
CN103745193A (en) * | 2013-12-17 | 2014-04-23 | 小米科技有限责任公司 | Skin color detection method and skin color detection device |
CN104504383A (en) * | 2015-01-14 | 2015-04-08 | 东南大学 | Human face detecting method based on skin colors and AdaBoost algorithm |
CN105354793A (en) * | 2015-11-25 | 2016-02-24 | 小米科技有限责任公司 | Facial image processing method and device |
Non-Patent Citations (1)
Title |
---|
汤晓乐: ""基于亮度的肤色检测"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106388781A (en) * | 2016-09-29 | 2017-02-15 | 深圳可思美科技有限公司 | Method for detecting skin colors and pigmentation situation of skin |
CN106846421A (en) * | 2017-02-14 | 2017-06-13 | 深圳可思美科技有限公司 | A kind of skin color detection method and device |
CN106952313A (en) * | 2017-03-21 | 2017-07-14 | 北京工商大学 | Skin complexion evaluation method based on HSI and Lab blend color models |
CN107507128A (en) * | 2017-08-08 | 2017-12-22 | 北京小米移动软件有限公司 | Image processing method and equipment |
CN107507128B (en) * | 2017-08-08 | 2021-02-09 | 北京小米移动软件有限公司 | Image processing method and apparatus |
CN107798314A (en) * | 2017-11-22 | 2018-03-13 | 北京小米移动软件有限公司 | Skin color detection method and device |
CN108939230B (en) * | 2018-05-31 | 2020-10-16 | 李洪均 | Gymnasium oxygen generation equipment, gymnasium oxygen supply system, and oxygen supply method and device |
CN108939230A (en) * | 2018-05-31 | 2018-12-07 | 李洪均 | Gymnasium oxygen generating plant, gymnasium oxygen system, method for supplying oxygen and device |
CN112233064B (en) * | 2018-07-16 | 2022-05-20 | 荣耀终端有限公司 | Pigment detection method and electronic equipment |
CN112233064A (en) * | 2018-07-16 | 2021-01-15 | 华为技术有限公司 | Pigment detection method and electronic equipment |
US11847798B2 (en) | 2018-07-16 | 2023-12-19 | Honor Device Co., Ltd. | Pigment detection method and electronic device |
CN111241889A (en) * | 2018-11-29 | 2020-06-05 | 华为技术有限公司 | Method and device for detecting and evaluating black eye |
US11779264B2 (en) | 2018-11-29 | 2023-10-10 | Honor Device Co., Ltd. | Dark circle detection and evaluation method and apparatus |
CN111027353A (en) * | 2019-02-18 | 2020-04-17 | 广东小天才科技有限公司 | Search content extraction method and electronic equipment |
CN110363088A (en) * | 2019-06-12 | 2019-10-22 | 南京理工大学 | Adaptive scytitis method for detecting area based on multi-feature fusion |
CN110363088B (en) * | 2019-06-12 | 2022-09-13 | 南京理工大学 | Self-adaptive skin inflammation area detection method based on multi-feature fusion |
WO2021016896A1 (en) * | 2019-07-30 | 2021-02-04 | 深圳市大疆创新科技有限公司 | Image processing method, system and device, and movable platform and storage medium |
CN111259744A (en) * | 2020-01-09 | 2020-06-09 | 五邑大学 | Face detection method and device based on skin model and SVM classifier |
CN111259744B (en) * | 2020-01-09 | 2023-06-16 | 五邑大学 | Face detection method and device based on skin model and SVM classifier |
CN111466882A (en) * | 2020-04-23 | 2020-07-31 | 上海祉云医疗科技有限公司 | Intelligent traditional Chinese medicine hand diagnosis analysis system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105844242A (en) | Method for detecting skin color in image | |
US10372226B2 (en) | Visual language for human computer interfaces | |
CN106682601B (en) | A kind of driver's violation call detection method based on multidimensional information Fusion Features | |
US20110274314A1 (en) | Real-time clothing recognition in surveillance videos | |
CN103942539B (en) | A kind of oval accurate high efficiency extraction of head part and masking method for detecting human face | |
US20030174869A1 (en) | Image processing apparatus, image processing method, program and recording medium | |
CN112232332B (en) | Non-contact palm detection method based on video sequence | |
CN105844245A (en) | Fake face detecting method and system for realizing same | |
CN105205437B (en) | Side face detection method and device based on contouring head verifying | |
CN106650606A (en) | Matching and processing method for face image and face image model construction system | |
Radu et al. | A robust sclera segmentation algorithm | |
CN110866932A (en) | Multi-channel tongue edge detection device and method and storage medium | |
CN101996317B (en) | Method and device for identifying markers in human body | |
CN108256497A (en) | A kind of method of video image processing and device | |
CN105825168A (en) | Golden snub-nosed monkey face detection and tracking algorithm based on S-TLD | |
CN105426816A (en) | Method and device of processing face images | |
CN107659799A (en) | Camera device, image processing method and storage medium | |
CN109359577A (en) | A kind of Complex Background number detection system based on machine learning | |
CN106909883A (en) | A kind of modularization hand region detection method and device based on ROS | |
CN104598914A (en) | Skin color detecting method and device | |
CN114092572A (en) | Clothing color analysis method, system, storage medium and computer equipment | |
Yusuf et al. | Human face detection using skin color segmentation and watershed algorithm | |
CN109214367A (en) | A kind of method for detecting human face of view-based access control model attention mechanism | |
Supriyanti et al. | Detecting pupil and iris under uncontrolled illumination using fixed-Hough circle transform | |
Youlian et al. | Face detection method using template feature and skin color feature in rgb color space |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160810 |
|
WD01 | Invention patent application deemed withdrawn after publication |