CN108021881A - A kind of skin color segmentation method, apparatus and storage medium - Google Patents

A kind of skin color segmentation method, apparatus and storage medium Download PDF

Info

Publication number
CN108021881A
CN108021881A CN201711249162.9A CN201711249162A CN108021881A CN 108021881 A CN108021881 A CN 108021881A CN 201711249162 A CN201711249162 A CN 201711249162A CN 108021881 A CN108021881 A CN 108021881A
Authority
CN
China
Prior art keywords
scatter diagram
skin
split
image
colour
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
CN201711249162.9A
Other languages
Chinese (zh)
Other versions
CN108021881B (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.)
Tencent Cyber Tianjin Co Ltd
Original Assignee
Tencent Cyber Tianjin 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 Tencent Cyber Tianjin Co Ltd filed Critical Tencent Cyber Tianjin Co Ltd
Priority to CN201711249162.9A priority Critical patent/CN108021881B/en
Publication of CN108021881A publication Critical patent/CN108021881A/en
Application granted granted Critical
Publication of CN108021881B publication Critical patent/CN108021881B/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/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • 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/161Detection; Localisation; Normalisation
    • G06V40/164Detection; Localisation; Normalisation using holistic features

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention discloses a kind of skin color segmentation method, apparatus and storage medium;The embodiment of the present invention can be respectively under default multicolour space, for Image Rendering scatter diagram to be split, then, scatter diagram under each color space is analyzed, and the scatter diagram feature obtained based on analysis, at least one colour of skin decision algorithm is selected from preset algorithm set, skin color segmentation is carried out to the image to be split;The program can improve the accuracy of identification, and improve skin color segmentation effect.

Description

A kind of skin color segmentation method, apparatus and storage medium
Technical field
The present invention relates to field of communication technology, and in particular to a kind of skin color segmentation method, apparatus and storage medium.
Background technology
In recognition of face and other some image procossings applications, skin color segmentation is wherein particularly important one Point.Existing skin color segmentation scheme, generally all can by whole pixels of traversing graph picture, then, individual element point analysis its Color judges with the similitude of the colour of skin.For example by taking wherein some pixel as an example, it is former three can specifically to obtain the pixel Three color components under color (RGB, Red, Green and Blue) color space, Euclidean is calculated according to three color components Distance (the poor quadratic sum for calculating three colors and skin tone value), if the Euclidean distance is less than predetermined threshold value, it is determined that the picture Element is skin, if the Euclidean distance is higher than predetermined threshold value, it is determined that the pixel is not skin, and so on, travel through the image All pixels after, corresponding partitioning into skin figure can be exported.
In the research and practice process to the prior art, it was found by the inventors of the present invention that due in the background of image very It is possible that with object similar in the colour of skin, therefore, if predetermined threshold value sets not high enough, the point on these objects is easily true It is set to skin, and if predetermined threshold value heightened, the skin None- identified in some figures can be caused to come out again, so, it is existing The identification accuracy of scheme is relatively low, and segmentation effect is simultaneously bad.
The content of the invention
The embodiment of the present invention provides a kind of skin color segmentation method, apparatus and storage medium, can improve the accuracy of identification, Improve skin color segmentation effect.
The embodiment of the present invention provides a kind of skin color segmentation method, it is characterised in that including:
Obtain image to be split;
It is the Image Rendering scatter diagram to be split respectively under default multicolour space;
Scatter diagram under each color space is analyzed, obtains scatter diagram feature;
Based on the scatter diagram feature, at least one colour of skin decision algorithm is selected from preset algorithm set;
Skin color segmentation is carried out to the image to be split according to the colour of skin decision algorithm of selection.
The embodiment of the present invention also provides a kind of skin color segmentation device, including:
Acquiring unit, for obtaining image to be split;
Drawing unit, under default multicolour space, being respectively the Image Rendering scatter diagram to be split;
Analytic unit, for analyzing the scatter diagram under each color space, obtains scatter diagram feature;
Selecting unit, for based on the scatter diagram feature, selecting at least one colour of skin to judge from preset algorithm set Algorithm;
Cutting unit, skin color segmentation is carried out for the colour of skin decision algorithm according to selection to the image to be split.
The embodiment of the present invention also provides a kind of storage medium, and the storage medium is stored with a plurality of instruction, and described instruction is fitted Loaded in processor, to perform the step in any skin color segmentation method provided in an embodiment of the present invention.
The embodiment of the present invention can be Image Rendering scatter diagram to be split, so respectively under default multicolour space Afterwards, the scatter diagram under each color space is analyzed, and the scatter diagram feature obtained based on analysis, from preset algorithm set The middle at least one colour of skin decision algorithm of selection, skin color segmentation is carried out to the image to be split;Due to the program may be referred to it is more The scatter diagram of a color space, carrys out the colour of skin similarity relation in comprehensive analysis image to be split, and flexibly the selection colour of skin is sentenced accordingly Determine algorithm, be based only on accordingly, with respect to the prior art for the scheme of particular color space and single colour of skin decision algorithm, Can have more accurate screening and resolution capability, substantially increase the accuracy of identification, and improve skin color segmentation effect.
Brief description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 a are the schematic diagram of a scenario of skin color segmentation method provided in an embodiment of the present invention;
Fig. 1 b are the flow diagrams of skin color segmentation method provided in an embodiment of the present invention;
Fig. 2 a are another flow diagrams of skin color segmentation method provided in an embodiment of the present invention;
Fig. 2 b are skin color segmentation effect diagrams in the embodiment of the present invention;
Fig. 3 a are the structure diagrams of skin color segmentation device provided in an embodiment of the present invention;
Fig. 3 b are another structure diagrams of skin color segmentation device provided in an embodiment of the present invention;
Fig. 4 is the structure diagram of the network equipment provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, the every other implementation that those skilled in the art are obtained without creative efforts Example, belongs to the scope of protection of the invention.
The embodiment of the present invention provides a kind of skin color segmentation method, apparatus and storage medium.
Wherein, which can specifically be integrated in the network equipment, such as the equipment such as terminal or server.
For example, by taking the skin color segmentation device integrates in the network device as an example, referring to Fig. 1 a, the network equipment is treated getting , can be respectively under default multicolour space, such as respectively in RGB, YCbCr, Lab, HSV and CMYK etc. after segmentation figure picture Under color space, for the Image Rendering scatter diagram to be split, and to scatter diagram (such as the scatterplot of RGB under each color space The scatter diagram of figure, the scatter diagram of YCbCr, the scatter diagram of Lab, the scatter diagram of HSV and CMYK) analyzed, obtain scatter diagram spy Sign, then, based on the scatter diagram feature, selects at least one colour of skin decision algorithm, according to selection from preset algorithm set Colour of skin decision algorithm carries out skin color segmentation to the image to be split.Such as if scatter diagram is characterized as " circle ", selection " circle The corresponding colour of skin decision algorithm of shape " comes, and the similarity of each pixel and the colour of skin in the image to be split is calculated, if scatterplot is special Levy as " parallelogram ", then select " parallelogram " corresponding colour of skin decision algorithm, calculate every in the image to be split Similarity of a pixel and the colour of skin, etc., then, according to the similarity measure gray value, and should according to gray value generation Segmentation figure is as corresponding skin color segmentation gray-scale map.
It is described in detail individually below.It should be noted that the order of following embodiments is not as preferable to embodiment Limit.
Embodiment one,
The embodiment of the present invention will be described from the angle of skin color segmentation device, which can specifically integrate In the network equipment, such as the equipment such as terminal or server, the terminal can include mobile phone, tablet computer, laptop and/ Or the equipment such as personal computer (PC, Personal Computer).
A kind of skin color segmentation method, including:Image to be split is obtained, respectively under default multicolour space, for this Image Rendering scatter diagram to be split, analyzes the scatter diagram under each color space, obtains scatter diagram feature, is dissipated based on this Point diagram feature, selects at least one colour of skin decision algorithm from preset algorithm set, according to the colour of skin decision algorithm of selection to this Image to be split carries out skin color segmentation.
As shown in Figure 1 b, the idiographic flow of the skin color segmentation method can be as follows:
101st, image to be split is obtained.
For example, specifically image to be split can be read from local (i.e. skin color segmentation device), alternatively, receiving other equipment hair The image to be split sent.
Wherein, the form of the image to be split can include bitmap (BMP, BitMaP), Joint Photographic Experts Group (JPEG, Joint Photographic Experts Group), label image file format (TIFF, Tag Image File Format), RAW (a kind of nondestructive compression type) and PC exchange (PCX, Personal Computer Exchange) etc..
102nd, respectively under default multicolour space, for the Image Rendering scatter diagram to be split.For example, specifically can be with It is as follows:
(1) pixel in the image to be split is sorted out.
Recognition of face and human bioequivalence are carried out to the image to be split for example, specifically seeing and can be based on deep learning model, Recognition result is obtained, the pixel in the image to be split is divided into by default multiple classifications according to the recognition result.
Wherein, which can include convolutional neural networks (CNN, Convolutional Neural Networks), depth belief network (DBN, Deep Belief Network), recurrent neural network (RNN, Recurrent Neural Network), recurrent neural tensor network (RNTN, Recursive Neural Tensor Network), Yi Jisheng Into confrontation network (GAN, Generative Adversarial Networks), etc..
Wherein, which can be configured according to the demand of practical application, such as, it can be divided into by face The pixel (excluding eyes and mouth) for the skin on face that detection obtains, the pixel of the human body obtained from human testing are (no Containing face) and the image to be split in pixel in addition to human body and face, that is, background, etc..Wherein, in order to Description is convenient, in embodiments of the present invention, the pixel of the skin on face that will be obtained by Face datection (exclude eyes and Mouth) it is known as face pixel, it is classified as face pixel classification;The pixel (being free of face) of the human body obtained from human testing claims For human body pixel point, human body pixel point classification is classified as;Pixel in the image to be split in addition to human body and face is known as Background pixel point, is classified as background pixel point classification.
If being divided into face pixel classification, human body pixel point classification and background pixel point classification, step is " according to the knowledge Pixel in the image to be split is divided into default multiple classifications by other result " be specially:
Pixel in the image to be split is divided into by face pixel classification, human body pixel point according to the recognition result Classification and background pixel point classification, etc..
It should be noted that above three classification is only example, it should be appreciated that can also be by other division sides Formula, details are not described herein.
(2) according to categorization results, scatter diagram is drawn under default multicolour space respectively.
For example, all pixels point in the image to be split can be specifically respectively mapped to preset according to categorization results Multicolour space in, drawn, obtained each according to distribution of color under the multicolour space according to mapping result Scatter diagram under color space.
Such as with the default multicolour space specifically include three primary colors color space (RGB, Red, Green, Blue), YCbCr (is usually used in a kind of color space in digital photographic systems, Y is exactly so-called lumen (luminance), table Show the concentration of light and to be non-linear, using gamma-corrected (gamma correction) coded treatment, CB and CR then for blueness and Red concentration excursion amount composition), (Lab, L represent brightness (Luminosity) to color model, and a is represented from carmetta to green Scope, b represent from yellow to blueness scope), hexagonal pyramid model (HSV, Hue, Saturation, Value) and printing Color mode (CMYK, wherein, C represents that cyan Cyan, M represents that carmetta Magenta, Y represents that yellow Yellow, K represent black Black exemplified by), then at this time, step " by all pixels point in the image to be split, is respectively mapped to pre- according to categorization results If multicolour space in, drawn, obtained each according to distribution of color under the multicolour space according to mapping result Scatter diagram under a color space " specifically can be as follows:
Can by all pixels point in the image to be split, according to categorization results be respectively mapped to RGB, YCbCr, Lab, In the color spaces such as HSV and CMYK, then, according to the mapping result in RGB, drawn, obtained under RGB according to distribution of color Scatter diagram;According to the mapping result in YCbCr, drawn according to distribution of color, obtain the scatter diagram under YCbCr;According to In the mapping result of Lab, drawn according to distribution of color, obtain the scatter diagram under Lab;According to the mapping result in HSV, press Drawn according to distribution of color, obtain the scatter diagram under HSV;And according to the mapping result in CMYK, according to distribution of color into Row is drawn, and obtains the scatter diagram under CMYK.
Wherein, the mode of mapping can have a variety of, such as, all kinds of components in each color space can be carried out two-by-two After combination, make to quantify mapping respectively, then, the obtained color value of mapping will be quantified and be mapped to default matrix, such as 256 × On 256 matrix, then by all pixels point in the image to be split, according to categorization results, counted on the matrix, just It can obtain the mapping result in respective color space, etc..
103rd, the scatter diagram under each color space is analyzed, obtains scatter diagram feature.
It is for instance possible to use default computer vision algorithms make carries out basic geometry to the scatter diagram under each color space Form fit, the scatter diagram feature of each scatter diagram is determined according to fitting result.
Wherein, which can be configured according to the demand of practical application, such as, can be OpenCV (a kind of cross-platform computer vision algorithm) etc..And basic geometry can then include circular, parallelogram and triangle The geometries such as shape.
By taking basic geometry is specially circular, parallelogram and triangle as an example, if fitting result is approximately " circle ", then the scatter diagram be characterized as " circle ";If fitting result is approximately " parallelogram ", which is characterized as " parallelogram ";If fitting result is approximately " triangle ", which is characterized as " triangle ", and so on, etc..
Optionally, due to the scatter diagram under some color spaces in most cases, the distribution of its scatterplot all more divides Dissipate, it is difficult to be fitted, therefore, in order to reduce unnecessary computing cost, improve treatment effeciency, carrying out basic geometry Before fitting, scatter diagram can first be screened, i.e., it is " empty to each color using default computer vision algorithms make in step Between under scatter diagram carry out basic geometry fitting " before, which can also include:
The scatter diagram under each color space is screened according to default screening conditions, is obtained under each color space Scatter diagram after screening.
Then at this time, step " carries out the scatter diagram under each color space using default computer vision algorithms make basic Geometry is fitted " it is specifically as follows:Using default computer vision algorithms make, to scatterplot after the screening under each color space Figure carries out basic geometry fitting.
Wherein, which can be configured according to the demand of practical application, such as, under YCbCr color spaces, It can not perform an analysis with the relevant each scatter diagram of Y-component, and for example, under Lab color spaces, L analyses are relevant each scattered Point diagram can not also perform an analysis, and under hsv color space, the relevant scatter diagram of H components can be only analyzed, similarly, in CMYK Color space, can only analyze relevant scatter diagram of C components, etc..
104th, based on the scatter diagram feature, at least one colour of skin decision algorithm is selected from preset algorithm set.
For example, can specifically obtain preset configuration information, which preserves scatter diagram feature and the colour of skin judges to calculate The one-to-one relationship of method, is the corresponding skin of each scatter diagram feature selecting from preset algorithm set according to the correspondence Color decision algorithm.
Wherein, which can be configured according to the demand of practical application, such as, it can be wrapped in the algorithm set Include the colour of skin decision algorithm corresponding to " circle ", the colour of skin decision algorithm corresponding to " parallelogram " and " triangle " institute Corresponding colour of skin decision algorithm, etc..
105th, skin color segmentation is carried out to the image to be split according to the colour of skin decision algorithm of selection, for example, specifically can be as Under:
(1) similarity of each pixel and the colour of skin in the image to be split is calculated according to the colour of skin decision algorithm of selection.
For example, the threshold value in the colour of skin decision algorithm of selection can be specifically configured according to the scatter diagram feature, will The colour of skin decision algorithm of selection and the threshold value set are passed to the piece member tinter of preset pattern routine interface as variable element In, the texture mapping processing of the graphic package interface is carried out to the image to be split, by the piece member tinter to texture mapping Image to be split after processing carries out texture sampling, and each pixel and the colour of skin in the image to be split are calculated according to sampled result Similarity.
Wherein, graphic package interface can be configured according to the demand of practical application, such as, it is specifically as follows open figure Shape storehouse (OpenGL, Open Graphics Library).
(2) according to the similarity measure gray value, and the segmentation figure is generated as corresponding skin color segmentation according to the gray value Gray-scale map.
Wherein, due to the colour of skin decision algorithm of selection may have it is a variety of, for the part in the image to be split For pixel, multiple corresponding similarities may be there are and (use a kind of colour of skin decision algorithm, corresponding one can be obtained Kind similarity measure result), therefore, this multiple similarity and the functional relation of gray value can be pre-established, then, based on this Functional relation, according to the similarity measure gray value.
For example can set when this multiple similarity is above preset value, gray value is 0% (black), otherwise, when this When having any one similarity to be less than the preset value in multiple similarities, then gray value is 100% (black), etc., optionally, Other values are may be set to be, are not being repeated herein.
From the foregoing, it will be observed that the present embodiment can be Image Rendering scatterplot to be split respectively under default multicolour space Figure, then, analyzes the scatter diagram under each color space, and the scatter diagram feature obtained based on analysis, from pre- imputation At least one colour of skin decision algorithm is selected in method set, skin color segmentation is carried out to the image to be split;Since the program can be with With reference to the scatter diagram of multiple color spaces, come the colour of skin similarity relation in comprehensive analysis image to be split, and flexibly selection accordingly Colour of skin decision algorithm, the scheme of particular color space and single colour of skin decision algorithm is based only on accordingly, with respect to the prior art For, can have more accurate screening and resolution capability, substantially increase the accuracy of identification, and improve skin color segmentation Effect.
Embodiment two,
According to the described method of preceding embodiment, citing is described in further detail below.
In the present embodiment, will be illustrated so that the skin color segmentation device is specifically integrated in the network equipment as an example, the network Equipment can be specifically the equipment such as terminal or server.
As shown in Figure 2 a, a kind of skin color segmentation method, idiographic flow can be as follows:
201st, the network equipment obtains image to be split.
For example, specifically image to be split can be read from local (i.e. the network equipment), sent alternatively, receiving other equipment Image to be split.
Wherein, the form of the image to be split can be including BMP, JPEG, TIFF, RAW and PCX etc..
202nd, the network equipment is based on deep learning model and carries out recognition of face and human bioequivalence to the image to be split, obtains Recognition result.
For example, the network equipment can be based on deep learning model carries out recognition of face to the image to be split, face is obtained On pixel (including glasses and mouth), and human bioequivalence is carried out to the image to be split based on deep learning model, obtained Pixel (being free of face) of human body, etc..
Wherein, which can include CNN, DBN, RNN, RNTN and GAN, etc..
203rd, the pixel in the image to be split is divided into default multiple classes by the network equipment according to the recognition result Not, step 204 is then performed.
Wherein, which can be configured according to the demand of practical application, such as, if being divided into face pixel Three kinds of point, human body pixel point and background pixel point classifications, then at this time, the network equipment can be to be split by this according to the recognition result Pixel in image is divided into face pixel classification, human body pixel point classification and background pixel point classification, wherein, these three The definition of classification can be as follows:
(1) face pixel classification;
Face pixel classification, refers to the pixel of the skin on the face that is obtained by Face datection, that is, eliminates The pixel on face in addition to eyes and mouth, in embodiments of the present invention, is also known as A classes point.
(2) human body pixel point classification;
Human body pixel point classification, the pixel (being free of face) for the human body for referring to being obtained by human testing, in the present invention In embodiment, it is also known as B classes point.
(3) background pixel point classification;
Background pixel point classification, refers to the pixel in addition to human body pixel point and face pixel in the image to be split Point, in embodiments of the present invention, is also known as C classes point.
It should be noted that above three classification is only example, it should be appreciated that can also be by other division sides Formula, details are not described herein.
204th, all pixels point in the image to be split is respectively mapped to default by the network equipment according to categorization results In multicolour space, drawn according to mapping result under the multicolour space according to distribution of color, obtain each color Scatter diagram under color space.
For example, after all kinds of components in each color space can specifically be carried out combination of two by the network equipment, make respectively Quantify mapping, the color value that quantization mapping obtains is mapped to default matrix, then, on the matrix, according to categorization results Pixel all in the image to be split is counted (different classes of pixel corresponds to different colours value) respectively, and root Result (i.e. mapping result) draws out distribution of color figure according to statistics, can obtain the scatter diagram under each color space.
It will be carried out below by taking the default multicolour space specifically includes RGB, YCbCr, Lab, HSV and CMYK as an example Illustrate, specifically can be as follows:
(1)RGB;
Since for color space RGB, it mainly includes red (R), green (G) and blue (B) three Essential colour, R, G and B of varying strength are overlapped, can obtain other colors, such as blue or green, yellow and fuchsin, etc., therefore, can be with Combination of two is carried out using R, G and B in color space RGB as component, such as, R × G, R × B and G × B, etc. Deng.
(2)YCbCr;
In color space YCbCr, Y refers to luminance component, and Cb refers to chroma blue component, and Cr then refers to red color Component.YCgCr is the improvement of YCbCr, it further provides component " Cg ", and Cg is using green component G's and brightness Y Difference, it should be noted that, in embodiments of the present invention, color space YCbCr includes YCgCr, therefore, when carrying out component combination, It is also conceivable to component " Cg ".That is, Y, Cb, Cr and Cg in color space YCbCr can be carried out two-by-two, such as, Y × Cb, Y × Cr, Y × Cg, Cb × Cr, Cb × Cg and Cr × Cg.
(3)Lab;
Color space Lab is sensation of the people to color, the numerical value in Lab the people of twenty-twenty vision is described it can be seen that it is all Color.In Lab, L refers to brightness (Luminosity), its value range is 0 to 100;A is represented from carmetta to green Scope, b represent the scope from yellow to blueness.Therefore, can be using L, a and b in Lab as component, and carry out two-by-two Combination, such as, L × a, L × b and a × b.
(4)HSV;
In color space HSV, mainly include three parameters, tone (H), saturation degree (S) and lightness (V), therefore, can be with These three parameters H, S and V are subjected to combination of two respectively, such as, H × S, H × V and S × V.
(5)CMYK;
A kind of set color pattern used when CMYK is colored printing, it utilizes the three primary colors colour mixture principle of colorant, plus black Color ink, amounts to four kinds of blend of colors superpositions, is formed so-called " full-color printing ".Wherein, four kinds of standard colors are:C is cyan (Cyan), M is magenta (Magenta), and also known as " carmetta ", Y is Mount Huang (Yellow), and K is positioning registering color (Key Plate (black)), refer mainly to black.Therefore, combination of two can be carried out using C, M, Y and K as component, obtained:C×M、C × Y, C × K, M × Y, M × K and Y × K.
Understood by experiment, in above-mentioned component combination, the scatter diagram of some component combinations is more scattered, and reference value is not Height, such as, under Lab color spaces, since L * component is little to distinguishing " being skin " effect, accordingly it is also possible to not examine Consider, similarly, under YCbCr color spaces, can not also consider K points without considering Y-component, and under color space CMYK Amount, etc..Therefore, optionally, in order to improve mapping effect, and the consumption to computing resource is reduced, it is possible to use only wherein Part component combination, for example, with reference to table one.
Table one:
Color space Syntagmatic 1 Syntagmatic 2 Syntagmatic 3
RGB R×G R×B G×B
YCbCr Cb×Cr Cb×Cg Cr×Cg
Lab L×a L×b a×b
HSV H×S H×V S×V
CMYK C×M C×Y M×Y
Can according to the component combination of above-mentioned each color space, than the component combination of each color space as shown in Table 1, Each color space is made respectively to quantify mapping, the color value that quantization mapping obtains is mapped to default matrix, for example map Into 256 × 256 matrix, then, on the matrix, according to categorization results respectively to pixel all in the image to be split Point is counted, and draws out distribution of color figure according to statistical result (i.e. mapping result), can be obtained under each color space Scatter diagram.For example, by taking the matrix for mapping to 256 × 256 as an example, then specifically can be as follows:
For color space RGB, specifically component combination R × G, R × B and G × B can be made to quantify mapping, and will Quantify the color value that mapping obtains to map in 256 × 256 matrix, it is then, right respectively according to categorization results on the matrix All pixels are counted in the image to be split, and draw out distribution of color figure according to statistical result, can obtain RGB Under scatter diagram.
For color space YCbCr, component combination Cb × Cr, Cb × Cg and Cr × Cg can specifically be reflected as quantization Penetrate, and the color value that quantization mapping is obtained is mapped in 256 × 256 matrix, then, on the matrix, is tied according to sorting out Fruit respectively counts pixel all in the image to be split, and draws out distribution of color figure according to statistical result, just It can obtain the scatter diagram under YCbCr.
For color space Lab, specifically component combination L × a, L × b and a × b can be made to quantify mapping, and will Quantify the color value that mapping obtains to map in 256 × 256 matrix, it is then, right respectively according to categorization results on the matrix All pixels are counted in the image to be split, and draw out distribution of color figure according to statistical result, can obtain Lab Under scatter diagram.
For color space HSV, specifically component combination H × S, H × V and S × V can be made to quantify mapping, and will Quantify the color value that mapping obtains to map in 256 × 256 matrix, it is then, right respectively according to categorization results on the matrix All pixels are counted in the image to be split, and draw out distribution of color figure according to statistical result, can obtain HSV Under scatter diagram.
For color space CMYK, specifically component combination C × M, C × Y and M × Y can be made to quantify mapping, and will Quantify the color value that mapping obtains to map in 256 × 256 matrix, it is then, right respectively according to categorization results on the matrix All pixels are counted in the image to be split, and draw out distribution of color figure according to statistical result, can be obtained Scatter diagram under CMYK.
It should be noted that wherein, different classes of pixel corresponds to different colours value, such as, it can be represented with redness 255 A classes point, green degree 128 represent B class points, and blue degree 128 represents C class points, etc.;So can using the color component of pixel as Coordinate, using the classification of pixel as value, to draw out distribution of color figure.Optionally, table can also be distinguished with other colourities Show A classes point, B classes point and C classes point, details are not described herein.
205th, the network equipment screens the scatter diagram under each color space according to default screening conditions, obtains each Scatter diagram after screening under color space.
Wherein, which can be configured according to the demand of practical application, such as, under YCbCr color spaces, It can not perform an analysis with the relevant each scatter diagram of Y-component, and for example, under Lab color spaces, L analyses are relevant each scattered Point diagram can not also perform an analysis, and under hsv color space, the relevant scatter diagram of H components can be only analyzed, similarly, in CMYK Color space, can only analyze relevant scatter diagram of C components (C components have good filter capacity), etc..
It should be noted that if in step 204, only depict the scatter diagram of part component combination, such as, do not paint Under YCbCr color spaces processed, if the relevant each scatter diagram of Y-component, then at this time it is also possible to not to YCbCr color spaces Under scatter diagram screened, other color spaces are similar, and details are not described herein.
206th, the network equipment uses default computer vision algorithms make, to scatter diagram after the screening under each color space into The basic geometry fitting of row, the scatter diagram feature of each scatter diagram is determined according to fitting result.
Wherein, which can be configured according to the demand of practical application, such as, can be OpenCV Deng.And basic geometry can then include the geometries such as circular, parallelogram and triangle.
By taking basic geometry is specially circular, parallelogram and triangle as an example, if fitting result is approximately " circle ", then the scatter diagram be characterized as " circle ";If fitting result is approximately " parallelogram ", which is characterized as " parallelogram ";If fitting result is approximately " triangle ", which is characterized as " triangle ", and so on, etc..
It should be noted that the cvPointPolygonTest functions in OpenCV algorithms can be used, to judge some picture Whether vegetarian refreshments is in the basic geometry that step 206 is fitted, than such as whether in " circle ", if positioned at " parallel four In side shape ", etc., if after all screenings in scatter diagram, which is respectively positioned in the basic geometry being fitted, then It is considered that the pixel is skin, therefore, different scatter diagram features (i.e. basic geometry) can be directed to, set corresponding Colour of skin decision algorithm judge whether pixel is skin.It is as follows referring specifically to step 207~209:
207th, the network equipment is based on the scatter diagram feature, selects at least one colour of skin to judge to calculate from preset algorithm set Method.
For example, the network equipment can specifically obtain preset configuration information, which preserves scatter diagram feature and skin The one-to-one relationship of color decision algorithm, is each scatter diagram feature from preset algorithm set according to the correspondence then Select corresponding colour of skin decision algorithm.
Wherein, which can be configured according to the demand of practical application, such as, it can be wrapped in the algorithm set Include the colour of skin decision algorithm corresponding to " circle ", the colour of skin decision algorithm corresponding to " parallelogram " and " triangle " institute Corresponding colour of skin decision algorithm, etc.;These colour of skin decision algorithms can be specifically configured according to the demand of practical application, This is repeated no more.
208th, the network equipment calculates each pixel and the colour of skin in the image to be split according to the colour of skin decision algorithm of selection Similarity.For example, specifically can be as follows:
(1) network equipment can specifically set the threshold value in the colour of skin decision algorithm of selection according to the scatter diagram feature Put.
For example if scatter diagram is characterized as " circle ", rule can be set according to the threshold value of " circle " to " circle " institute Threshold value in corresponding colour of skin decision algorithm is configured;And if scatter diagram is characterized as " parallelogram ", can basis The threshold value of " parallelogram " sets rule to be configured the threshold value in the colour of skin decision algorithm corresponding to " parallelogram ", And so on, etc..
Wherein, the setting rule of threshold value can be depending on the progress of the demand of practical application, and details are not described herein.
(2) colour of skin decision algorithm of selection and the threshold value set are passed to default figure by the network equipment as variable element In the piece member tinter of shape routine interface.
Wherein, graphic package interface can be configured according to the demand of practical application, such as, it is specifically as follows OpenGL Deng.
(3) network equipment carries out the image to be split the texture mapping processing of the graphic package interface.
For example if in step (2), using OpenGL, then at this time, the image to be split can specifically be inputted OpenGL, to carry out texture mapping processing.
(4) network equipment carries out texture sampling by the piece member tinter to the image to be split after texture mapping processing.
(5) network equipment calculates the similarity of each pixel and the colour of skin in the image to be split according to sampled result.
209th, the network equipment generates the segmentation figure as corresponding according to the similarity measure gray value, and according to the gray value Skin color segmentation gray-scale map.
Wherein, due to the colour of skin decision algorithm of selection may have it is a variety of, for the part in the image to be split For pixel, multiple corresponding similarities may be there are and (use a kind of colour of skin decision algorithm, corresponding one can be obtained Kind similarity measure result), therefore, this multiple similarity and the functional relation of gray value can be pre-established, then, based on this Functional relation, according to the similarity measure gray value.
For example can set when this multiple similarity is above preset value, gray value is 0% (black), otherwise, when this When having any one similarity to be less than the preset value in multiple similarities, then gray value is 100% (black), etc., optionally, Other values are may be set to be, are not being repeated herein.
For example, with reference to Fig. 2 b, wherein, left figure is image to be split, and right figure is the segmentation figure as corresponding skin color segmentation ash Degree figure, in the skin color segmentation gray-scale map, white portion (gray value is 0% (black)) is skin, and (gray value is black portions 100% (black)) it is non-skin part.
From the foregoing, it will be observed that the present embodiment can be Image Rendering scatterplot to be split respectively under default multicolour space Figure, then, analyzes the scatter diagram under each color space, and the scatter diagram feature obtained based on analysis, from pre- imputation At least one colour of skin decision algorithm is selected in method set, skin color segmentation is carried out to the image to be split;Since the program can be with With reference to the scatter diagram of multiple color spaces, come the colour of skin similarity relation in comprehensive analysis image to be split, and flexibly selection accordingly Colour of skin decision algorithm, the scheme of particular color space and single colour of skin decision algorithm is based only on accordingly, with respect to the prior art For, can have more accurate screening and resolution capability, substantially increase the accuracy of identification, and improve skin color segmentation Effect.
Embodiment three,
In order to preferably implement above method, the embodiment of the present invention also provides a kind of skin color segmentation device, the skin color segmentation Device can be specifically integrated in the network equipment, such as the equipment such as terminal or server, which can include mobile phone, tablet electricity The equipment such as brain, laptop and/or PC.
For example, as shown in Figure 3a, which can include acquiring unit 301, drawing unit 302, analysis list Member 303, selecting unit 304 and cutting unit 305, it is as follows:
(1) acquiring unit 301;
Acquiring unit 301, for obtaining image to be split.
For example, acquiring unit 301, specifically can be used for reading image to be split from local (i.e. the network equipment), alternatively, Receive the image to be split that other equipment is sent.
Wherein, the form of the image to be split can be including BMP, JPEG, TIFF, RAW and PCX etc..
(2) drawing unit 302;
Drawing unit 302, for respectively under default multicolour space, for the Image Rendering scatter diagram to be split.
For example, the drawing unit 302 can include classification subelement and draw subelement, it is as follows:
Classification subelement, can be used for being sorted out the pixel in the image to be split.
Such as the classification subelement, it specifically can be used for carrying out face to the image to be split based on deep learning model Identification and human bioequivalence, obtain recognition result, are divided into the pixel in the image to be split according to the recognition result default Classification, for example be divided into face pixel classification, human body pixel point classification and background pixel point classification.
Wherein, which can be including CNN, DBN, RNN, RNTN and GAN etc., and default classification is then It can be configured according to the demand of practical application, refer to embodiment of the method above, details are not described herein.
Subelement is drawn, can be used for, according to categorization results, drawing scatter diagram under default multicolour space respectively.
For example, the drafting subelement, specifically can be used for all pixels point in the image to be split, tied according to sorting out Fruit is respectively mapped in default multicolour space, according to mapping result under the multicolour space according to distribution of color into Row is drawn, and obtains the scatter diagram under each color space.
Wherein, the default multicolour space specifically can including RGB, YCbCr, Lab, HSV and CMYK etc. color it is empty Between, embodiment of the method above is for details, reference can be made to, details are not described herein.
(3) analytic unit 303;
Analytic unit 303, for analyzing the scatter diagram under each color space, obtains scatter diagram feature.
For example, the analytic unit 303, specifically can be used for using default computer vision algorithms make to each color space Under scatter diagram carry out basic geometry fitting, the scatter diagram feature of each scatter diagram is determined according to fitting result.
Wherein, which can be configured according to the demand of practical application, such as, can be OpenCV Deng.And basic geometry can then include the geometries such as circular, parallelogram and triangle.
Optionally, due to the scatter diagram under some color spaces in most cases, the distribution of its scatterplot all more divides Dissipate, it is difficult to be fitted, therefore, in order to reduce unnecessary computing cost, improve treatment effeciency, carrying out basic geometry Before fitting, scatter diagram can first be screened, i.e., as shown in Figure 3b, which can also include screening unit 306, it is as follows:
The screening unit 306, can be used for sieving the scatter diagram under each color space according to default screening conditions Choosing, obtains scatter diagram after the screening under each color space.
Then at this time, the analytic unit 303, specifically can be used for using default computer vision algorithms make, to each color Scatter diagram carries out basic geometry fitting after screening under space.
Wherein, which can be configured according to the demand of practical application, such as, under YCbCr color spaces, It can not perform an analysis with the relevant each scatter diagram of Y-component, and for example, under Lab color spaces, L analyses are relevant each scattered Point diagram can not also perform an analysis, and under hsv color space, the relevant scatter diagram of H components can be only analyzed, similarly, in CMYK Color space, can only analyze relevant scatter diagram of C components, etc..
(4) selecting unit 304;
Selecting unit 304, for based on the scatter diagram feature, selecting at least one colour of skin to judge from preset algorithm set Algorithm;
For example, the selection unit 304, specifically can be used for obtaining preset configuration information, which preserves scatterplot The one-to-one relationship of figure feature and colour of skin decision algorithm, is each scatterplot from preset algorithm set according to the correspondence The corresponding colour of skin decision algorithm of figure feature selecting.
Wherein, which can be configured according to the demand of practical application, such as, it can be wrapped in the algorithm set Include the colour of skin decision algorithm corresponding to " circle ", the colour of skin decision algorithm corresponding to " parallelogram " and " triangle " institute Corresponding colour of skin decision algorithm, etc.;These colour of skin decision algorithms can be specifically configured according to the demand of practical application, This is repeated no more.
(5) cutting unit 305;
Cutting unit 305, skin color segmentation is carried out for the colour of skin decision algorithm according to selection to the image to be split.
For example, the cutting unit 305 can include computation subunit and generation subelement, it is as follows:
The computation subunit, for according to the colour of skin decision algorithm of selection calculate in the image to be split each pixel with The similarity of the colour of skin, according to the similarity measure gray value.
Such as the computation subunit, specifically it can be used for according to the scatter diagram feature in the colour of skin decision algorithm of selection Threshold value be configured;The colour of skin decision algorithm of selection and the threshold value set are passed to preset pattern journey as variable element In the piece member tinter of sequence interface;The texture mapping processing of the graphic package interface is carried out to the image to be split;Pass through the piece First tinter carries out texture sampling to the image to be split after texture mapping processing;The image to be split is calculated according to sampled result In the similarity of each pixel and the colour of skin.
Subelement is generated, for generating the segmentation figure as corresponding skin color segmentation gray-scale map according to the gray value.
Wherein, graphic package interface can be configured according to the demand of practical application, such as, it is specifically as follows OpenGL Deng.
It when it is implemented, above unit can be realized as independent entity, can also be combined, be made Realized for same or several entities, the specific implementation of above unit can be found in embodiment of the method above, herein not Repeat again.
From the foregoing, it will be observed that the drawing unit 302 in the skin color segmentation device of the present embodiment can be respectively in default plurality of color Be Image Rendering scatter diagram to be split under color space, then, by analytic unit 303 to the scatter diagram under each color space into Row analysis, and the scatter diagram feature obtained by selecting unit 304 based on analysis, select at least one skin from preset algorithm set Color decision algorithm, so that cutting unit 305 carries out skin color segmentation to the image to be split;Since the program may be referred to multiple colors The scatter diagram of color space, carrys out the colour of skin similarity relation in comprehensive analysis image to be split, and flexibly the selection colour of skin judges to calculate accordingly Method, is based only on accordingly, with respect to the prior art for the scheme of particular color space and single colour of skin decision algorithm, can be with With more accurate screening and resolution capability, the accuracy of identification is substantially increased, and improve skin color segmentation effect.
Example IV,
The embodiment of the present invention also provides a kind of network equipment, which can include the equipment such as server or terminal. As shown in figure 4, it illustrates the structure diagram of the network equipment involved by the embodiment of the present invention, specifically:
The network equipment can include one or more than one processing core processor 401, one or more The components such as memory 402, power supply 403 and the input unit 404 of computer-readable recording medium.Those skilled in the art can manage Solve, the network equipment infrastructure shown in Fig. 4 does not form the restriction to the network equipment, can include more more or fewer than illustrating Component, either combines some components or different components arrangement.Wherein:
Processor 401 is the control centre of the network equipment, utilizes various interfaces and connection whole network equipment Various pieces, by running or performing the software program and/or module that are stored in memory 402, and call and are stored in Data in reservoir 402, perform the various functions and processing data of the network equipment, so as to carry out integral monitoring to the network equipment. Optionally, processor 401 may include one or more processing cores;Preferably, processor 401 can integrate application processor and tune Demodulation processor processed, wherein, application processor mainly handles operating system, user interface and application program etc., and modulatedemodulate is mediated Reason device mainly handles wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 401 In.
Memory 402 can be used for storage software program and module, and processor 401 is stored in memory 402 by operation Software program and module, so as to perform various functions application and data processing.Memory 402 can mainly include storage journey Sequence area and storage data field, wherein, storing program area can storage program area, the application program (ratio needed at least one function Such as sound-playing function, image player function) etc.;Storage data field can be stored uses created number according to the network equipment According to etc..In addition, memory 402 can include high-speed random access memory, nonvolatile memory can also be included, such as extremely Few a disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 402 can also wrap Memory Controller is included, to provide access of the processor 401 to memory 402.
The network equipment further includes the power supply 403 to all parts power supply, it is preferred that power supply 403 can pass through power management System and processor 401 are logically contiguous, so as to realize management charging, electric discharge and power managed etc. by power-supply management system Function.Power supply 403 can also include one or more direct current or AC power, recharging system, power failure monitor The random component such as circuit, power supply changeover device or inverter, power supply status indicator.
The network equipment may also include input unit 404, which can be used for the numeral or character for receiving input Information, and produce keyboard, mouse, operation lever, optics or the trace ball signal related with user setting and function control Input.
Although being not shown, the network equipment can also be including display unit etc., and details are not described herein.Specifically in the present embodiment In, the processor 401 in the network equipment can correspond to the process of one or more application program according to following instruction Executable file be loaded into memory 402, and the application program being stored in memory 402 is run by processor 401, It is as follows so as to fulfill various functions:
Image to be split is obtained, it is right for the Image Rendering scatter diagram to be split respectively under default multicolour space Scatter diagram under each color space is analyzed, and obtains scatter diagram feature, based on the scatter diagram feature, from preset algorithm set The middle at least one colour of skin decision algorithm of selection, skin color segmentation is carried out according to the colour of skin decision algorithm of selection to the image to be split.
For example, can specifically be based on deep learning model carries out recognition of face and human bioequivalence to the image to be split, obtain To recognition result, then, the pixel in the image to be split is divided into by face pixel classification, people according to the recognition result Body image vegetarian refreshments classification and background pixel point classification, and according to categorization results, draw dissipate under default multicolour space respectively Point diagram, subsequently, basic geometry is carried out using default computer vision algorithms make to the scatter diagram under each color space Fitting, the scatter diagram feature of each scatter diagram is determined according to fitting result.
Wherein, which can be including CNN, DBN, RNN, RNTN and GAN etc..Basic geometry is then It can include the geometries such as circular, parallelogram and triangle.And computer vision algorithms make can then be answered according to actual Demand is configured, such as, can be OpenCV etc..
Optionally, due to the scatter diagram under some color spaces in most cases, the distribution of its scatterplot all more divides Dissipate, it is difficult to be fitted, therefore, in order to reduce unnecessary computing cost, improve treatment effeciency, carrying out basic geometry Before fitting, scatter diagram can first be screened, i.e., processor 401 can also run the application being stored in memory 402 Program, so as to fulfill following function:
The scatter diagram under each color space is screened according to default screening conditions, is obtained under each color space Scatter diagram after screening.
If being screened to scatter diagram, subsequently when the basic geometry of progress is fitted, can use Default computer vision algorithms make, carries out basic geometry fitting to scatter diagram after the screening under each color space, refers to Embodiment above.
The specific implementation of each operation can be found in embodiment above above, and details are not described herein.
From the foregoing, it will be observed that the network equipment of the present embodiment can be figure to be split respectively under default multicolour space As drawing scatter diagram, then, the scatter diagram under each color space is analyzed, and it is special based on the scatter diagram that analysis obtains Sign, selects at least one colour of skin decision algorithm from preset algorithm set, and skin color segmentation is carried out to the image to be split;Due to The program may be referred to the scatter diagram of multiple color spaces, carry out the colour of skin similarity relation in comprehensive analysis image to be split, and according to This flexibly selects colour of skin decision algorithm, is based only on particular color space accordingly, with respect to the prior art and the single colour of skin judges For the scheme of algorithm, can have more accurate screening and resolution capability, substantially increase the accuracy of identification, and improve Skin color segmentation effect.
Embodiment five,
It will appreciated by the skilled person that all or part of step in the various methods of above-described embodiment can be with Completed by instructing, or control relevant hardware to complete by instructing, which can be stored in one and computer-readable deposit In storage media, and loaded and performed by processor.
For this reason, the embodiment of the present invention provides a kind of storage medium, wherein being stored with a plurality of instruction, which can be processed Device is loaded, to perform the step in the transfer method for any virtual resource that the embodiment of the present invention is provided.For example, should Instruction can perform following steps:
Image to be split is obtained, it is right for the Image Rendering scatter diagram to be split respectively under default multicolour space Scatter diagram under each color space is analyzed, and obtains scatter diagram feature, based on the scatter diagram feature, from preset algorithm set The middle at least one colour of skin decision algorithm of selection, skin color segmentation is carried out according to the colour of skin decision algorithm of selection to the image to be split.
For example, can specifically be based on deep learning model carries out recognition of face and human bioequivalence to the image to be split, obtain To recognition result, then, the pixel in the image to be split is divided into by face pixel classification, people according to the recognition result Body image vegetarian refreshments classification and background pixel point classification, and according to categorization results, draw dissipate under default multicolour space respectively Point diagram, subsequently, basic geometry is carried out using default computer vision algorithms make to the scatter diagram under each color space Fitting, the scatter diagram feature of each scatter diagram is determined according to fitting result.
Wherein, which can be including CNN, DBN, RNN, RNTN and GAN etc..Basic geometry is then It can include the geometries such as circular, parallelogram and triangle.And computer vision algorithms make can then be answered according to actual Demand is configured, such as, can be OpenCV etc..
Optionally, due to the scatter diagram under some color spaces in most cases, the distribution of its scatterplot all more divides Dissipate, it is difficult to be fitted, therefore, in order to reduce unnecessary computing cost, improve treatment effeciency, carrying out basic geometry Before fitting, scatter diagram can first be screened, i.e. the instruction can also carry out following steps:
The scatter diagram under each color space is screened according to default screening conditions, is obtained under each color space Scatter diagram after screening.
If being screened to scatter diagram, subsequently when the basic geometry of progress is fitted, can use Default computer vision algorithms make, basic geometry fitting is carried out to scatter diagram after the screening under each color space.
The specific implementation of each operation can be found in embodiment above above, and details are not described herein.
Wherein, which can include:Read-only storage (ROM, Read Only Memory), random access memory Body (RAM, Random Access Memory), disk or CD etc..
By the instruction stored in the storage medium, any colour of skin point that the embodiment of the present invention is provided can be performed Step in segmentation method, it is thereby achieved that achieved by any skin color segmentation method that the embodiment of the present invention is provided Beneficial effect, refers to embodiment above, details are not described herein.
A kind of skin color segmentation method, apparatus and storage medium provided above the embodiment of the present invention has carried out detailed Jie Continue, specific case used herein is set forth the principle of the present invention and embodiment, and the explanation of above example is only It is the method and its core concept for being used to help understand the present invention;Meanwhile for those skilled in the art, according to the present invention's Thought, there will be changes in specific embodiments and applications, in conclusion this specification content should not be construed as Limitation of the present invention.

Claims (19)

  1. A kind of 1. skin color segmentation method, it is characterised in that including:
    Obtain image to be split;
    It is the Image Rendering scatter diagram to be split respectively under default multicolour space;
    Scatter diagram under each color space is analyzed, obtains scatter diagram feature;
    Based on the scatter diagram feature, at least one colour of skin decision algorithm is selected from preset algorithm set;
    Skin color segmentation is carried out to the image to be split according to the colour of skin decision algorithm of selection.
  2. 2. according to the method described in claim 1, it is characterized in that, described respectively under default multicolour space, for institute Image Rendering scatter diagram to be split is stated, including:
    Pixel in the image to be split is sorted out;
    According to categorization results, scatter diagram is drawn under default multicolour space respectively.
  3. 3. according to the method described in claim 2, it is characterized in that, the pixel by the image to be split is returned Class, including:
    Recognition of face and human bioequivalence are carried out to the image to be split based on deep learning model, obtain recognition result;
    Pixel in the image to be split is divided into by face pixel classification, human body pixel point according to the recognition result Classification and background pixel point classification.
  4. 4. according to the method described in claim 2, it is characterized in that, described according to categorization results, respectively in default plurality of color Scatter diagram is drawn under color space, including:
    By all pixels point in the image to be split, default multicolour space is respectively mapped to according to categorization results In;
    Drawn, obtained under each color space according to distribution of color under the multicolour space according to mapping result Scatter diagram.
  5. 5. method according to any one of claims 1 to 4, it is characterised in that the scatterplot under each color space Figure is analyzed, and obtains scatter diagram feature, including:
    Basic geometry fitting is carried out to the scatter diagram under each color space using default computer vision algorithms make;
    The scatter diagram feature of each scatter diagram is determined according to fitting result.
  6. 6. according to the method described in claim 5, it is characterized in that, described use default computer vision algorithms make to each color Before scatter diagram under color space carries out basic geometry fitting, further include:
    The scatter diagram under each color space is screened according to default screening conditions, obtains the screening under each color space Scatter diagram afterwards;
    It is described that basic geometry fitting is carried out to the scatter diagram under each color space using default computer vision algorithms make, Specially:Using default computer vision algorithms make, basic geometric form is carried out to scatter diagram after the screening under each color space Shape is fitted.
  7. 7. method according to any one of claims 1 to 4, it is characterised in that it is described to be based on the scatter diagram feature, from pre- If at least one colour of skin decision algorithm is selected in algorithm set, including:
    Preset configuration information is obtained, the configuration information preserves scatter diagram feature and the one-to-one corresponding of colour of skin decision algorithm closes System;
    It is the corresponding colour of skin decision algorithm of each scatter diagram feature selecting from preset algorithm set according to the correspondence.
  8. 8. method according to any one of claims 1 to 4, it is characterised in that the colour of skin decision algorithm according to selection Skin color segmentation is carried out to the image to be split, including:
    The similarity of each pixel and the colour of skin in the image to be split is calculated according to the colour of skin decision algorithm of selection;
    According to the similarity measure gray value;
    The segmentation figure is generated as corresponding skin color segmentation gray-scale map according to the gray value.
  9. 9. according to the method described in claim 8, it is characterized in that, described treat according to calculating the colour of skin decision algorithm of selection The similarity of each pixel and the colour of skin in segmentation figure picture, including:
    The threshold value in the colour of skin decision algorithm of selection is configured according to the scatter diagram feature;
    The piece member of preset pattern routine interface is passed to using the colour of skin decision algorithm of selection and the threshold value set as variable element In tinter;
    The texture mapping that the graphic package interface is carried out to the image to be split is handled;
    Texture sampling is carried out to the image to be split after texture mapping processing by described first tinter;
    The similarity of each pixel and the colour of skin in the image to be split is calculated according to sampled result.
  10. A kind of 10. skin color segmentation device, it is characterised in that including:
    Acquiring unit, for obtaining image to be split;
    Drawing unit, under default multicolour space, being respectively the Image Rendering scatter diagram to be split;
    Analytic unit, for analyzing the scatter diagram under each color space, obtains scatter diagram feature;
    Selecting unit, for based on the scatter diagram feature, at least one colour of skin decision algorithm to be selected from preset algorithm set;
    Cutting unit, skin color segmentation is carried out for the colour of skin decision algorithm according to selection to the image to be split.
  11. 11. device according to claim 10, it is characterised in that the drawing unit includes classification subelement and draws son Unit;
    Classification subelement, for the pixel in the image to be split to be sorted out;
    Subelement is drawn, for according to categorization results, drawing scatter diagram under default multicolour space respectively.
  12. 12. according to the devices described in claim 11, it is characterised in that
    The classification subelement, specifically for carrying out recognition of face and human body to the image to be split based on deep learning model Identification, obtains recognition result, the pixel in the image to be split is divided into face pixel according to the recognition result Classification, human body pixel point classification and background pixel point classification.
  13. 13. according to the devices described in claim 11, it is characterised in that
    The drafting subelement, specifically for by all pixels point in the image to be split, being reflected respectively according to categorization results It is incident upon in default multicolour space, is painted according to mapping result under the multicolour space according to distribution of color System, obtains the scatter diagram under each color space.
  14. 14. according to claim 10 to 13 any one of them device, it is characterised in that
    The analytic unit, specifically for being carried out using default computer vision algorithms make to the scatter diagram under each color space Basic geometry fitting, the scatter diagram feature of each scatter diagram is determined according to fitting result.
  15. 15. device according to claim 14, it is characterised in that further include screening unit;
    The screening unit, for being screened according to default screening conditions to the scatter diagram under each color space, obtains each Scatter diagram after screening under a color space;
    The analytic unit, specifically for using default computer vision algorithms make, to being dissipated after the screening under each color space Point diagram carries out basic geometry fitting.
  16. 16. according to claim 10 to 13 any one of them device, it is characterised in that
    The selecting unit, specifically for obtaining preset configuration information, the configuration information preserves scatter diagram feature and the colour of skin The one-to-one relationship of decision algorithm, is each scatter diagram feature selecting from preset algorithm set according to the correspondence Corresponding colour of skin decision algorithm.
  17. 17. according to claim 10 to 13 any one of them device, it is characterised in that the cutting unit includes calculating son list Member and generation subelement;
    The computation subunit, for according to the colour of skin decision algorithm of selection calculate in the image to be split each pixel with The similarity of the colour of skin, according to the similarity measure gray value;
    Subelement is generated, for generating the segmentation figure as corresponding skin color segmentation gray-scale map according to the gray value.
  18. 18. device according to claim 17, it is characterised in that the computation subunit, is specifically used for:
    The threshold value in the colour of skin decision algorithm of selection is configured according to the scatter diagram feature;
    The piece member of preset pattern routine interface is passed to using the colour of skin decision algorithm of selection and the threshold value set as variable element In tinter;
    The texture mapping that the graphic package interface is carried out to the image to be split is handled;
    Texture sampling is carried out to the image to be split after texture mapping processing by described first tinter;
    The similarity of each pixel and the colour of skin in the image to be split is calculated according to sampled result.
  19. 19. a kind of storage medium, it is characterised in that the storage medium is stored with a plurality of instruction, and described instruction is suitable for processor Loaded, the step in 1 to 9 any one of them skin color segmentation method is required with perform claim.
CN201711249162.9A 2017-12-01 2017-12-01 Skin color segmentation method, device and storage medium Active CN108021881B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711249162.9A CN108021881B (en) 2017-12-01 2017-12-01 Skin color segmentation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711249162.9A CN108021881B (en) 2017-12-01 2017-12-01 Skin color segmentation method, device and storage medium

Publications (2)

Publication Number Publication Date
CN108021881A true CN108021881A (en) 2018-05-11
CN108021881B CN108021881B (en) 2023-09-01

Family

ID=62078027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711249162.9A Active CN108021881B (en) 2017-12-01 2017-12-01 Skin color segmentation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN108021881B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647786A (en) * 2018-07-10 2018-10-12 电子科技大学 The rotating machinery on-line fault monitoring method of neural network is fought based on depth convolution
CN108922619A (en) * 2018-07-11 2018-11-30 江苏师范大学 A kind of RdR scatter plot recognition methods based on sparse core leading role
CN109377509A (en) * 2018-09-26 2019-02-22 深圳前海达闼云端智能科技有限公司 Method, apparatus, storage medium and the equipment of image, semantic segmentation mark
CN109446977A (en) * 2018-10-25 2019-03-08 平安科技(深圳)有限公司 Image processing method, device, storage medium and terminal based on recognition of face
CN113947606A (en) * 2021-09-26 2022-01-18 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN115331286A (en) * 2022-07-29 2022-11-11 中国兵器工业信息中心 Content safety detection system based on deep learning
CN116597038A (en) * 2023-05-22 2023-08-15 怀化学院 Intelligent color matching method and system based on big data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102324020A (en) * 2011-09-02 2012-01-18 北京新媒传信科技有限公司 The recognition methods of area of skin color of human body and device
CN103390151A (en) * 2012-05-08 2013-11-13 展讯通信(上海)有限公司 Face detection method and device
CN104156915A (en) * 2014-07-23 2014-11-19 小米科技有限责任公司 Skin color adjusting method and device
CN104504734A (en) * 2014-09-16 2015-04-08 浙江工业大学 Image color transferring method based on semantics
CN104680551A (en) * 2013-11-29 2015-06-03 展讯通信(天津)有限公司 Tracking method and device based on skin color detection
CN105405143A (en) * 2015-11-13 2016-03-16 华中师范大学 Gesture segmentation method and system based on global expectation-maximization algorithm
CN106485222A (en) * 2016-10-10 2017-03-08 上海电机学院 A kind of method for detecting human face being layered based on the colour of skin
CN107077828A (en) * 2014-11-25 2017-08-18 英特尔公司 Size to color lookup table is compressed

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102324020A (en) * 2011-09-02 2012-01-18 北京新媒传信科技有限公司 The recognition methods of area of skin color of human body and device
CN103390151A (en) * 2012-05-08 2013-11-13 展讯通信(上海)有限公司 Face detection method and device
CN104680551A (en) * 2013-11-29 2015-06-03 展讯通信(天津)有限公司 Tracking method and device based on skin color detection
CN104156915A (en) * 2014-07-23 2014-11-19 小米科技有限责任公司 Skin color adjusting method and device
CN104504734A (en) * 2014-09-16 2015-04-08 浙江工业大学 Image color transferring method based on semantics
CN107077828A (en) * 2014-11-25 2017-08-18 英特尔公司 Size to color lookup table is compressed
CN105405143A (en) * 2015-11-13 2016-03-16 华中师范大学 Gesture segmentation method and system based on global expectation-maximization algorithm
CN106485222A (en) * 2016-10-10 2017-03-08 上海电机学院 A kind of method for detecting human face being layered based on the colour of skin

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647786A (en) * 2018-07-10 2018-10-12 电子科技大学 The rotating machinery on-line fault monitoring method of neural network is fought based on depth convolution
CN108647786B (en) * 2018-07-10 2021-11-30 电子科技大学 Rotary machine on-line fault monitoring method based on deep convolution countermeasure neural network
CN108922619A (en) * 2018-07-11 2018-11-30 江苏师范大学 A kind of RdR scatter plot recognition methods based on sparse core leading role
CN109377509A (en) * 2018-09-26 2019-02-22 深圳前海达闼云端智能科技有限公司 Method, apparatus, storage medium and the equipment of image, semantic segmentation mark
CN109446977A (en) * 2018-10-25 2019-03-08 平安科技(深圳)有限公司 Image processing method, device, storage medium and terminal based on recognition of face
CN113947606A (en) * 2021-09-26 2022-01-18 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113947606B (en) * 2021-09-26 2024-03-26 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium
CN115331286A (en) * 2022-07-29 2022-11-11 中国兵器工业信息中心 Content safety detection system based on deep learning
CN116597038A (en) * 2023-05-22 2023-08-15 怀化学院 Intelligent color matching method and system based on big data
CN116597038B (en) * 2023-05-22 2024-02-06 怀化学院 Intelligent color matching method and system based on big data

Also Published As

Publication number Publication date
CN108021881B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN108021881A (en) A kind of skin color segmentation method, apparatus and storage medium
CN105893925A (en) Human hand detection method based on complexion and device
US20080069444A1 (en) Image mask generation
CN105122306B (en) Region segmentation method and check device
CN106951869B (en) A kind of living body verification method and equipment
CN103914699A (en) Automatic lip gloss image enhancement method based on color space
CN111864896B (en) Power load monitoring method and system
CN109636825A (en) Seal graphics dividing method, device and computer readable storage medium
CN109635825A (en) Vehicle attribute detection method, device and storage medium
CN108875759B (en) Image processing method and device and server
CN105913460A (en) Skin color detection method and device
CN104000593A (en) Color card and skin test method and system
Ansari et al. Significance of color spaces and their selection for image processing: a survey
CN107301421A (en) The recognition methods of vehicle color and device
CN115082400A (en) Image processing method and device, computer equipment and readable storage medium
JP2021189527A5 (en)
US8131077B2 (en) Systems and methods for segmenting an image based on perceptual information
CN111160194A (en) Static gesture image recognition method based on multi-feature fusion
US20120087576A1 (en) Image processing device
CN108510483A (en) A kind of calculating using VLAD codings and SVM generates color image tamper detection method
US8971619B2 (en) Method and a device for extracting color features
CN102163277B (en) Area-based complexion dividing method
CN114463168A (en) Data desensitization processing method and device and electronic equipment
Yuan et al. Color image quality assessment with multi deep convolutional networks
CN108600746B (en) The eclipsed detection method of Color image of visual, system and device

Legal Events

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