WO2019056986A1 - 肤色检测方法、装置及存储介质 - Google Patents

肤色检测方法、装置及存储介质 Download PDF

Info

Publication number
WO2019056986A1
WO2019056986A1 PCT/CN2018/105682 CN2018105682W WO2019056986A1 WO 2019056986 A1 WO2019056986 A1 WO 2019056986A1 CN 2018105682 W CN2018105682 W CN 2018105682W WO 2019056986 A1 WO2019056986 A1 WO 2019056986A1
Authority
WO
WIPO (PCT)
Prior art keywords
skin color
pixel
value
distance
image
Prior art date
Application number
PCT/CN2018/105682
Other languages
English (en)
French (fr)
Inventor
杜凌霄
Original Assignee
广州市百果园信息技术有限公司
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 广州市百果园信息技术有限公司 filed Critical 广州市百果园信息技术有限公司
Priority to EP18859472.5A priority Critical patent/EP3678056B1/en
Priority to US16/647,246 priority patent/US11080894B2/en
Priority to RU2020113491A priority patent/RU2738202C1/ru
Priority to SG11202002485WA priority patent/SG11202002485WA/en
Publication of WO2019056986A1 publication Critical patent/WO2019056986A1/zh

Links

Images

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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J3/00Spectrometry; Spectrophotometry; Monochromators; Measuring colours
    • G01J3/46Measurement of colour; Colour measuring devices, e.g. colorimeters
    • G01J3/50Measurement of colour; Colour measuring devices, e.g. colorimeters using electric radiation detectors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

Definitions

  • the present application relates to the field of image processing technologies, and in particular, to a skin color detecting method, apparatus, and storage medium.
  • Skin color detection mainly refers to the process of selecting the corresponding color range in the image as the skin color according to the inherent color of the skin, that is, the process of selecting the pixel points of the area where the skin is located in the image. Among them, the pixel of the area where the skin color is located is also called the skin color point.
  • skin color detection is performed in an image taken in an indoor environment, a natural light environment, a yellow light environment, or a backlight environment.
  • the skin color detection can be performed in two ways. The first type: a large number of skin color images can be collected, and the pixel values corresponding to the pixel points in the collected skin color image are counted, and the statistically obtained pixel values are substituted into the Bayeux. The formula calculates the probability that the pixel corresponding to the pixel value is the skin color point.
  • the second type is: counting the pixel value corresponding to the pixel point in the skin color image, and when the pixel value is in the preset range, determining that the pixel point corresponding to the pixel value is a skin color point, when the pixel value is not within the preset range , determining that the pixel point corresponding to the pixel value is not a skin color point.
  • the illumination conditions of the pixel points corresponding to the pixel values need to remain unchanged, and therefore, through Bayesian
  • the probability calculated by the formula does not apply to skin tones in all lighting conditions.
  • the pixel values corresponding to some skin color points tend to fluctuate on both sides of the preset range. Therefore, the results obtained by the above second method are not continuous, and may cause the same skin color.
  • the detection results obtained under different illumination conditions are different, and the accuracy of detecting skin color in moving images is low. For example, in the video, due to the illumination, the pixel values of some skin color points tend to fluctuate on both sides of the preset range, so that one frame detection on the same skin color point is the skin color, and the next frame is detected as not the skin color.
  • the embodiment of the present application provides a skin color detecting method, device and storage medium.
  • the technical solution is as follows:
  • a method for skin color detection comprising: determining a pixel value corresponding to each pixel point in a target image to be subjected to skin color detection in YUV (Luminance Chrominance) a chrominance signal value in the domain; searching for a skin color probability value corresponding to the chrominance signal value from the stored skin color index matrix based on the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain;
  • the skin color index matrix is generated by processing the skin color image under various illumination conditions, wherein the skin color probability value refers to a probability that the pixel point is a skin color point; and based on the chromaticity of each pixel point in the target image
  • the skin color probability value corresponding to the signal value is used for skin color detection.
  • an apparatus for detecting a skin color comprising: a first determining module, determining that a pixel value corresponding to each pixel point in a target image to be subjected to skin color detection is within a YUV domain a chrominance signal value; a search module, configured to search for a skin color probability value corresponding to the chrominance signal value from the stored skin color index matrix based on the chrominance signal value of the pixel value corresponding to the pixel value in the YUV domain;
  • the skin color index matrix is generated by processing a skin color image under various illumination conditions, wherein the skin color probability value refers to a probability that the pixel point is a skin color point; and the detecting module is configured to be based on the target image The skin color probability value corresponding to the chrominance signal value of each pixel is detected by the skin color.
  • a skin tone detecting apparatus comprising a processor, a memory, and program code stored on the memory and executable on the processor, the processor
  • the method described in the first aspect above is implemented when the program code is executed.
  • a computer readable storage medium having stored thereon instructions that, when executed by a processor, implement the steps of any of the methods of the first aspect described above .
  • the probability of determining the pixel point in the target image as the skin color point through the skin color index matrix can be adapted to various illuminations.
  • the condition avoids the problem that the detection result is inaccurate due to different illumination conditions, and the problem that the detection result is not continuous does not occur, the accuracy of the skin color detection is improved, and the subsequent processing of the skin color point in the image is facilitated.
  • FIG. 1 is a flowchart of a method for detecting skin color according to an embodiment of the present application
  • FIG. 2 is a flow chart of another method for detecting skin color according to an embodiment of the present application.
  • FIG. 3A is a schematic structural diagram of a skin color detecting device according to an embodiment of the present application.
  • FIG. 3B is a schematic structural diagram of another skin color detecting device according to an embodiment of the present application.
  • FIG. 3C is a schematic structural diagram of a generating module 305 according to an embodiment of the present application.
  • FIG. 3D is a schematic structural diagram of a third determining module 307 according to an embodiment of the present application.
  • skin color detection is more and more widely used in daily life. In practical applications, skin color detection can be applied to various fields. Next, the application scenarios are illustrated.
  • the skin color detection can be used to determine which pixel points in the image are skin color points.
  • the area formed by the determined skin color points serves as a skin area, thereby brightening and whitening the skin area, thereby achieving a beauty effect.
  • the skin color detection determines which pixel points are the skin color points through the skin color detection, and the area formed by the determined skin color points is used as the skin area.
  • face detection is performed on the skin area, thereby performing face recognition more quickly and efficiently.
  • gesture recognition When the smart TV completes the functions of selection confirmation, switching page, zooming, and rotating by gestures, it is usually determined by skin color detection to determine which pixel points are skin color points to determine the skin area corresponding to the skin color point in the image. Furthermore, static or dynamic gesture detection is performed on the skin area to quickly complete gesture recognition, and the effect of controlling the smart TV with gestures is achieved.
  • the embodiments of the present application may be applied to the foregoing three application scenarios. In the actual application, the application may be applied to other application scenarios.
  • FIG. 1 is a flowchart of a method for detecting skin color according to an embodiment of the present application. Referring to Figure 1, the method includes the following steps:
  • Step 101 Determine, for each pixel in the target image to be subjected to skin color detection, a chrominance signal value of a pixel value corresponding to the pixel point in the YUV domain.
  • Step 102 Search for a skin color probability value corresponding to the chrominance signal value from the stored skin color index matrix based on the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain.
  • the skin color index matrix is generated by processing the skin color image under various illumination conditions, and the skin color probability value refers to the probability that the pixel point is the skin color point.
  • Step 103 Perform skin color detection based on the skin color probability value corresponding to the chrominance signal value of each pixel point in the target image.
  • the skin color index matrix is generated by processing the skin color image under various illumination conditions, the probability that the pixel point in the target image is the skin color point is determined by the skin color index matrix, which can adapt to various illumination conditions and avoid different illumination conditions.
  • the problem that the detection result is inaccurate, and the problem that the detection result is discontinuous does not occur, the accuracy of the skin color detection is improved, and the subsequent processing of the skin color point in the image is facilitated.
  • the pixel value corresponding to the pixel value in the YUV region is used to search for the skin color probability value corresponding to the chrominance signal value from the stored skin color index matrix, and further includes:
  • the distance matrix is obtained by distance transformation based on pixel values of each pixel in the binary image
  • the skin color index matrix is determined based on the distance matrix.
  • generating a binary image based on the chrominance signal value of the pixel value of each pixel in the collected skin image in the YUV domain including:
  • the skin color index matrix is determined based on the distance matrix, including:
  • a skin color index matrix is generated based on skin color probability values corresponding to each distance in the distance matrix.
  • determining a skin color probability value corresponding to each distance in the distance matrix based on the distance matrix and the maximum distance value including:
  • the skin color probability value corresponding to each distance in the distance matrix is determined according to the following formula:
  • SkinValue is the skin color probability value corresponding to each distance in the distance matrix
  • dis is the distance in the distance matrix
  • disThres is the preset distance threshold
  • maxdis is the maximum distance value in the distance matrix
  • generating a skin color index matrix based on skin color probability values corresponding to each distance in the distance matrix including:
  • the skin color probability value corresponding to each distance in the distance matrix is rounded, and based on the rounded skin color probability value, the skin color index matrix is generated according to the arrangement of the distance matrix.
  • FIG. 2 is a flow chart showing a method of skin color detection according to an exemplary embodiment. The embodiment of the present application will be discussed in conjunction with FIG. 2 for the embodiment shown in FIG. Referring to Figure 2, the method includes the following steps:
  • the skin color index matrix may be first generated according to the following steps 201-204.
  • Step 201 Acquire an image carrying a skin color point under various lighting conditions.
  • an image of a skin color point under different illumination conditions such as an indoor environment, a natural light environment, a yellow light environment, and a backlight environment, can be collected.
  • Step 202 Generate a binary image based on the chrominance signal values of the pixel values of each skin color point in the image of the collected skin color points in the YUV domain.
  • the YUV field is used to indicate that the color space is a color coding method adopted by the European television system, and is a PAL (Phase Alteration Line, Par) and SECAM (Sequentiel Couleur A Memoire).
  • the color space used by the TV system In a modern color television system, a three-tube color camera or a color CCD (Charge-coupled Device) camera is usually used for image acquisition, and then the obtained color image signals are subjected to color separation and separately amplified and corrected to obtain RGB (red).
  • Green blue, red, green and blue image and then through the matrix conversion circuit to obtain the luminance signal Y and two chrominance signals B-Y (ie U), R-Y (ie V), and finally the transmitter will have three brightness and chrominance
  • the signals are encoded separately and sent out on the same channel.
  • the representation of this color is to use the YUV domain to represent the color space.
  • the importance of using the YUV domain to represent the color space is that its luminance signal Y and chrominance signals U, V are separated.
  • the binary image refers to an image in which each pixel included in the image can only be black or white, and the color has no intermediate transition.
  • the pixel value of the black pixel is 0, and the pixel value of the white pixel is 255.
  • the pixel value of the pixel having a pixel value of 255 is reset to 1 in the binary image, and the pixel value of the pixel having the pixel value of 0 remains unchanged, that is, each included in the binary image
  • the pixel value corresponding to each pixel can only be 1 or 0.
  • the implementation process of generating a binary image may be: generating a chrominance signal value image, chroma
  • the pixel values of the pixel points in the signal value image are arranged in a YUV domain according to a preset direction from small to large; based on the chrominance signal value of the pixel value of each pixel in the collected skin color image in the YUV domain, Determining a probability that each pixel point in the chroma signal value image is a skin color point; setting a pixel value of a pixel point whose probability in the chroma signal value image is greater than or equal to a preset pixel threshold is set to 1, and the chroma signal value is in the image A pixel value of a pixel whose probability is less than a preset pixel threshold is set to 0 to obtain a binary image.
  • the preset direction refers to the arrangement direction of the chrominance signals, and may be set in advance.
  • the preset direction may be that the value of the chrominance signal U is arranged in a direction from left to right, and the value of the chrominance signal V is from bottom to bottom. Arrange in the direction of the top.
  • the preset pixel threshold may be set in advance to determine whether a pixel value is a pixel value corresponding to a skin color point, for example, the preset pixel threshold may be 0.8.
  • the chrominance signal value image is generated by arranging the chrominance signal values of the pixel values in the YUV domain from small to large according to the preset direction, and the chrominance signals of the pixel values of the pixel points in the YUV domain are included.
  • the value is a value between 0 and 255, so the generated chroma signal value image is a 256*256 size image, and the binary image generated based on the chroma signal value image is also a 256*256 size image.
  • the value of the chrominance signal U is taken as the horizontal axis, and the values of the chrominance signal U are sequentially arranged from 0 to 255 in the direction from left to right, and the value of the chrominance signal V is taken as the vertical axis.
  • the upward direction sequentially aligns the values of the chrominance signals V from 0 to 255, thereby generating a chrominance signal value image.
  • 100 skin color images are acquired, and the number of corresponding pixel points of each pair of chrominance signal values in 100 skin color images in the chrominance signal value image is determined, assuming a pair of chrominance signal values 5, 10, and another pair.
  • the chrominance signal values are 8, 12.
  • the chrominance signal value in the image of the chrominance signal value is 5, the pixel corresponding to the pixel point is 0.8, and the chrominance signal value is 8, 12
  • the probability that the pixel is a skin color point is 0.6.
  • the pixel value of the pixel corresponding to the chrominance signal value of 5, 10 can be set to 1, and since 0.6 is less than 0.7, the chrominance signal value can be set to 8.
  • the pixel value of the pixel corresponding to 12 is set to 0.
  • Step 203 Obtain a distance matrix by distance transformation based on pixel values of each pixel in the binary image.
  • the distance transformation is a transformation for a binary image.
  • a binary image it can be considered that only the target pixel point and the background pixel point are included, the pixel value of the target pixel point is 1, and the pixel value of the background pixel point is 0.
  • a distance between each pixel in the binary image and a pixel having the closest pixel value of 1 is determined, and a distance matrix is generated based on the determined distance.
  • the distance value of the pixel point whose pixel value is 1 in the distance matrix is 0, and the distance value of the pixel point which is closer to the pixel point with the pixel value of 1 is smaller.
  • each pixel is calculated to be the closest pixel value to the pixel value of 1 the distance:
  • d is the distance between each pixel and the pixel with the closest pixel value of 1
  • (x, y) is the coordinates of the pixel
  • (x 0 , y 0 ) is the closest to the pixel.
  • the above formula is a continuous function, and the distance between each pixel obtained by the above formula and the pixel with the nearest pixel value of 1 is also continuous, that is, based on the pixel point.
  • the coordinates, the coordinates of the pixel with the pixel value closest to the pixel value, and the distance between each pixel and the nearest pixel value of 1 can draw a smooth continuous curve, continuous on the curve.
  • the point represents the distance between each pixel and the closest pixel value with a pixel value of 1. Therefore, the distance values in the distance matrix are continuous values.
  • Step 204 Determine a skin color index matrix based on the distance matrix.
  • the skin color index matrix is generated by processing the skin color image under various illumination conditions, and the skin color probability value refers to the probability that the pixel point is the skin color point.
  • the implementation process of determining the skin color index matrix based on the distance matrix may be: determining a maximum distance value in the distance matrix; determining a skin color probability value corresponding to each distance in the distance matrix based on the distance matrix and the maximum distance value; The skin color probability value corresponding to each distance generates a skin color index matrix.
  • the implementation process of determining the skin color probability value corresponding to each distance in the distance matrix based on the distance matrix and the maximum distance value may be: determining the skin color probability corresponding to each distance in the distance matrix according to the distance matrix and the maximum distance value according to the following formula value:
  • SkinValue is the skin color probability value corresponding to each distance in the distance matrix
  • dis is the distance in the distance matrix
  • disThres is the preset distance threshold
  • maxdis is the maximum distance value in the distance matrix.
  • the preset distance threshold may adjust the magnitude of the change of the skin color probability value in the skin index matrix. The smaller the preset distance threshold is, the smaller the amplitude of the skin color probability value changes. The larger the preset distance threshold is, the larger the skin color probability value changes. .
  • the value is multiplied by the value 255, just in order to put the calculation result into a 256*256 matrix, which is convenient for searching. In practical applications, it can also be multiplied by the value 255, and only one between 0 and 1 is obtained.
  • the value which is the probability that a pixel is a point of skin color. And based on the distance matrix and the maximum distance value, determining the skin color probability value corresponding to each distance in the distance matrix can also be implemented by other formulas, which is not limited in this application.
  • the implementation process of generating the skin color index matrix based on the skin color probability values corresponding to each distance in the distance matrix may be: generating a skin color index matrix according to the arrangement of the distance matrix based on the skin color probability values corresponding to each distance in the distance matrix; Or the skin color probability value corresponding to each distance in the distance matrix is rounded, and the skin color index matrix is generated according to the arrangement of the distance matrix based on the rounded skin color probability value.
  • the skin color probability value corresponding to each distance in the determined distance matrix may be a floating point type value.
  • the skin color probability value may be directly generated according to the arrangement of the distance matrix, in this manner.
  • the generated skin index matrix has higher accuracy when detecting skin color, but since the skin color probability value in the skin color index matrix in this manner is a floating point type value, the value is only a probability that the pixel point is a skin color point.
  • the pixel is determined to be a skin color point, and the data of the floating point type is inconvenient to calculate, so the skin color probability value corresponding to each distance in the distance matrix can also be rounded, based on the rounding
  • the skin color probability value is generated according to the arrangement of the distance matrix.
  • the skin color probability value in the skin color index matrix is also a continuous value.
  • the skin color probability value is 0, the pixel corresponding to the chrominance signal value may not be the skin color point, and the skin color probability value is 255, the pixel corresponding to the chrominance signal value must be the skin color point, the skin color probability A value between 0 and 255 represents the probability that the pixel corresponding to the chrominance signal value is a skin color point.
  • the skin color probability values in the obtained skin color index matrix are also continuous.
  • the skin color probability value obtained by continuously changing the pixel values of adjacent frames due to light causes or the like also continuously changes, and the jump caused by using the threshold value does not occur, thereby improving the accuracy of the skin color detection.
  • the following steps 205-207 can be implemented.
  • Step 205 Determine, for each pixel in the target image to be subjected to skin color detection, a chrominance signal value of a pixel value corresponding to the pixel point in the YUV domain.
  • the skin color in the image needs to be detected in many scenes, that is, the pixel points in the region where the skin is located are selected in the image. Since the skin color is to be detected, it is necessary to determine whether the pixel point in the image is a skin color point. Therefore, each pixel point in the target image for performing skin color detection can be determined, and the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain is determined, wherein the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain is color The value of the degree signal U, V.
  • the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain is determined. That is, the value of the chrominance signals U, V in the YUV domain in which the pixel value corresponding to the pixel point in the target image is determined. If the target image to be detected by the skin color is an image in the RGB domain, the image in the RGB domain needs to be first converted into an image in the YUV domain, and then the color value of the pixel value corresponding to the pixel in the YUV domain is determined from the image in the YUV domain. The value of the signals U, V.
  • the target image to be subjected to skin color detection is an image in the YUV domain
  • the target image to be subjected to skin color detection includes 3 pixel points
  • the pixel values corresponding to the 3 pixel points are three pairs of chrominance signal values in the YUV domain. They are 5, 10, 8, 12, 9, and 14, respectively.
  • Step 206 Search for a skin color probability value corresponding to the chrominance signal value from the stored skin color index matrix based on the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain.
  • the pixel value corresponding to one pixel point in the target image to be subjected to skin color detection has a chrominance signal value of 5, 10 in the YUV domain, and the chrominance signal value of the pixel value from the stored skin color index matrix is 5, 10
  • the corresponding skin color probability value is 0.8, that is, the probability that the pixel value of the pixel value is 5, 10 corresponds to the skin color point is 0.8.
  • Step 207 Perform skin color detection based on the skin color probability value corresponding to the chrominance signal value of each pixel point in the target image.
  • the pixel point when it is determined that the pixel point satisfies the preset skin color condition based on the found skin color probability value, the pixel point is determined to be a skin color point.
  • the preset skin color condition may be preset according to different requirements.
  • the preset skin color condition may be whether the skin color probability value found by the chrominance signal value in the YUV domain based on the pixel value of the pixel point is greater than a preset value.
  • the preset skin condition is whether the skin color probability value found by the chrominance signal value in the YUV domain based on the pixel value of the pixel point is greater than 0.7, and for the target image to be subjected to skin color detection, it is assumed that the pixel point in the target image passes the skin color index
  • the matrix finds that the pixel value of the pixel has a skin color probability value corresponding to 0.8 in the YUV domain, and since 0.8 is greater than 0.7, the pixel is determined to be a skin color point.
  • the skin color probability value corresponding to the chrominance signal value of the pixel value of the pixel in the YUV domain is searched. At this time, each pixel point in the target image determines a probability value, and The target image is overall brightened.
  • the skin color probability value corresponding to the chrominance signal value of the pixel value of the pixel in the YUV domain is determined, and each pixel in the processed target image is also determined correspondingly.
  • a probability value wherein a probability value corresponding to each pixel point in the processed target image is averaged with a probability value corresponding to each pixel point in the target image before processing, and then the probability value is greater than a preset value.
  • the pixel is determined to be a skin color point.
  • a rectangular frame is used to divide the target image to be subjected to skin color detection into a plurality of rectangular regions, and the color of each pixel point in each rectangular region in the YUV region is determined.
  • a skin color probability value corresponding to the degree signal value, and then averaging the skin color probability values of the pixel points in the rectangular area as a probability that the pixel point in the area is a skin color point, when the probability is greater than a preset value,
  • the pixels in the area are all determined to be skin color points.
  • the second possible implementation manner is to apply the skin color probability value corresponding to the chrominance signal value of each pixel in the target image to a specific application scenario to achieve the purpose of skin color detection.
  • all the pixel points in the target image may be processed to obtain the first processed image, and then the skin color corresponding to the chrominance signal value of each pixel point in the target image is obtained.
  • the probability value is obtained by mixing the pixel value of the pixel in the target image with the pixel value of the pixel in the first processed image to obtain a processed pixel value, and generating a final processed image based on the pixel value, and finally processing In the image, only the skin color points are processed correspondingly, thereby achieving the purpose of skin color detection.
  • the target image when it is required to brighten a skin color point in the target image, all the pixels in the target image are first brightened to obtain a processed image, and then the target image is based on the skin color probability value in the skin color index matrix.
  • the pixel value of the pixel is mixed with the pixel value of the pixel in the processed image to obtain the pixel value of the pixel in the image after the final brightening of the skin color.
  • the pixel value of each pixel point in the target image is first increased by 30 to obtain a processed image. Then, in the skin index matrix, the probability that the pixel value of each pixel in the target image is the skin color point is found.
  • a pair of chrominance signal values of one pixel in the target image are 120, 110
  • a pair of chrominance signal values of the pixel in the processed image are 150, 140
  • the pair of chrominances are found in the skin index matrix. If the probability that the pixel point corresponding to the signal value is the skin color point is 0.9, the pair of chrominance signal values 120 and 110 in the target image are respectively multiplied by 0.1 to obtain another pair of chrominance signal values 12 and 11, and then processed.
  • the chrominance signal values 150, 140 of the pixel in the image are respectively multiplied by 0.9 to obtain another pair of chrominance signal values 135, 126, and the chrominance signal values 12, 11 are corresponding to the chrominance signal values 135, 126.
  • Adding, the final chrominance signal value of the pixel is obtained as 147, 137, and based on the chrominance signal values 147, 137, the final image after brightening the skin color is generated, and the image after the lightening of the skin color is only in the target image. The skin color points were highlighted.
  • the skin color can be detected by determining whether the pixel is a skin color point.
  • the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain may be determined, and then the color in the YUV domain based on the pixel value corresponding to the pixel point.
  • the degree signal value is used to search for the skin color probability value corresponding to the chrominance signal value from the stored skin color index matrix, and the skin color detection is performed based on the skin color probability value corresponding to the chrominance signal value of each pixel point in the target image.
  • the chrominance signal value of the pixel can be used to quickly find the probability that the pixel is the skin color from the skin index matrix, which is convenient for scenes with high real-time requirements such as video beauty. application.
  • the generated skin color index matrix is obtained by continuous distance transformation, the skin color probability values in the obtained skin color index matrix are also continuous.
  • the skin color probability value obtained by continuously changing the pixel values of adjacent frames due to light causes or the like also continuously changes, and the jump caused by using the threshold does not occur.
  • the skin color index matrix is generated by processing the skin color image under various illumination conditions, the probability that the pixel point in the target image is the skin color point is determined by the skin color index matrix, which can adapt to various illumination conditions and avoid different
  • the problem of inaccurate detection results caused by the illumination condition improves the accuracy of skin color detection, and facilitates subsequent processing of skin color points in the image.
  • FIG. 3A is a schematic structural diagram of a skin color detecting device according to an embodiment of the present application.
  • the device includes a first determining module 301, a lookup module 302, and a second determining module 303.
  • the first determining module 301 is configured to determine, for each pixel in the target image to be subjected to skin color detection, a chrominance signal value of a pixel value corresponding to the pixel point in the YUV domain.
  • the searching module 302 is configured to search for a skin color probability value corresponding to the chrominance signal value from the stored skin color index matrix based on the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain.
  • the skin color index matrix is generated by processing the skin color image under various illumination conditions, and the skin color probability value refers to the probability that the pixel point is the skin color point.
  • the detecting module 303 is configured to perform skin color detection based on the skin color probability value corresponding to the chrominance signal value of each pixel point in the target image.
  • the apparatus further includes:
  • the acquisition module 304 is configured to collect images carrying skin color points under various lighting conditions.
  • the generating module 305 is configured to generate a binary image based on the chrominance signal values of the pixel values of each skin color point in the acquired image of the skin color point in the YUV domain.
  • the transform module 306 is configured to obtain a distance matrix by distance transform based on pixel values of each pixel in the binary image.
  • the second determining module 307 is configured to determine a skin color index matrix based on the distance matrix.
  • the generating module 305 includes:
  • the first generation sub-module 3051 is configured to generate a chrominance signal value image, and the chrominance signal values of the pixel values of the pixel points in the chrominance signal value image are arranged in a preset direction from small to large.
  • the first determining sub-module 3052 is configured to determine, according to the chrominance signal value of the pixel value of each pixel in the collected skin color image in the YUV domain, a probability that each pixel in the chrominance signal value image is a skin color point.
  • the setting sub-module 3053 is configured to set a pixel value of a pixel point whose probability in the chrominance signal value image is greater than or equal to a preset pixel threshold to 1 and a pixel in the chrominance signal value image whose probability is less than a preset pixel threshold The value is set to 0 to get a binary image.
  • the second determining module 307 includes:
  • the second determining sub-module 3071 is configured to determine a maximum distance value in the distance matrix.
  • the third determining sub-module 3072 is configured to determine a skin color probability value corresponding to each distance in the distance matrix based on the distance matrix and the maximum distance value.
  • the second generation sub-module 3073 is configured to generate a skin color index matrix based on skin color probability values corresponding to each distance in the distance matrix.
  • the third determining submodule 3072 is configured to:
  • the skin color probability value corresponding to each distance in the distance matrix is determined according to the following formula:
  • SkinValue is the skin color probability value corresponding to each distance in the distance matrix
  • dis is the distance in the distance matrix
  • disThres is the preset distance threshold
  • maxdis is the maximum distance value in the distance matrix
  • the second generation submodule 3073 is configured to:
  • the skin color probability value corresponding to each distance in the distance matrix is rounded, and based on the rounded skin color probability value, the skin color index matrix is generated according to the arrangement of the distance matrix.
  • the skin color can be detected by determining whether the pixel is a skin color point.
  • the chrominance signal value of the pixel value corresponding to the pixel point in the YUV domain may be determined, and then the color in the YUV domain based on the pixel value corresponding to the pixel point.
  • the degree signal value is used to search for the skin color probability value corresponding to the chrominance signal value from the stored skin color index matrix, and the skin color detection is performed based on the skin color probability value corresponding to the chrominance signal value of each pixel point in the target image.
  • the chrominance signal value of the pixel can be used to quickly find the probability that the pixel is the skin color from the skin index matrix, which is convenient for scenes with high real-time requirements such as video beauty. application.
  • the generated skin color index matrix is obtained by continuous distance transformation, the skin color probability values in the obtained skin color index matrix are also continuous.
  • the skin color probability value obtained by continuously changing the pixel values of adjacent frames due to light causes or the like also continuously changes, and the jump caused by using the threshold does not occur.
  • the skin color index matrix is generated by processing the skin color image under various illumination conditions, the probability that the pixel point in the target image is the skin color point is determined by the skin color index matrix, which can adapt to various illumination conditions and avoid different
  • the problem of inaccurate detection results caused by the illumination condition improves the accuracy of skin color detection, and facilitates subsequent processing of skin color points in the image.
  • the device for detecting the skin color in the above embodiment is only exemplified by the division of the above functional modules. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above.
  • the device for detecting skin color according to the above embodiment is the same as the method for detecting the skin color. The specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • non-transitory computer readable storage medium comprising instructions, such as a memory comprising instructions executable by a processor of the apparatus to perform the above method.
  • the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • the method of the embodiment shown in Fig. 1 or Fig. 2 can be implemented when the instructions in the computer readable storage medium are executed by the processor of the apparatus.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)). )Wait.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a digital versatile disc (DVD)
  • DVD digital versatile disc
  • SSD solid state disk

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

一种肤色检测方法、装置及存储介质,属于图像处理技术领域。所述方法包括:对待进行肤色检测的目标图像中的每个像素点,确定像素点对应的像素值在YUV域内的色度信号值(101);基于像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找色度信号值对应的肤色概率值(102);其中,肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,肤色概率值是指像素点为肤色点的概率;基于目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测(103)。通过肤色索引矩阵,确定目标图像中的像素点为肤色点的概率,进而进行肤色检测,避免了不同光照条件造成检测结果不准确的问题,提高了肤色检测的准确率。

Description

肤色检测方法、装置及存储介质 技术领域
本申请涉及图像处理技术领域,特别涉及一种肤色检测方法、装置及存储介质。
背景技术
随着图像处理技术的快速发展,肤色检测作为图像处理中比较重要的技术在日常生活中的应用越来越广泛。肤色检测主要是指根据皮肤的固有色彩在图像中选取相对应的颜色范围作为皮肤颜色,也即是在图像中选取皮肤所在区域的像素点的过程。其中,肤色所在区域的像素点也称为肤色点。
通常情况下,可能需要从各种光线条件下拍摄得到的图像中进行肤色检测。例如,在室内环境、自然光环境、黄光环境或者逆光环境中拍摄得到的图像中进行肤色检测。在相关技术中可以通过两种方式进行肤色检测,第一种:可以采集大量的肤色图像,对采集到的肤色图像中的像素点对应的像素值进行统计,将统计得到的像素值代入贝叶斯公式,计算得出该像素值对应的像素点为肤色点的概率。第二种:统计肤色图像中的像素点对应的像素值,当该像素值处于预设范围内时,确定该像素值对应的像素点为肤色点,当该像素值不处于预设范围内时,确定该像素值对应的像素点不是肤色点。
然而,在上述第一种方式中,由于贝叶斯公式的计算量很大,且通过贝叶斯公式进行计算时,像素值对应的像素点的光照条件需保持不变,因此通过贝叶斯公式计算出的概率不能适用于所有光照条件下的肤色图像。在上述第二种方式中,由于光照的原因,一些肤色点对应的像素值往往在预设范围的两边波动,因此通过上述第二种方式检测得到的结果不是连续的,可能会造成同一个肤色点在不同光照条件下得到的检测结果不相同,在动态图像中检测肤色的准确度较低。例如,在视频中由于光照的原因,一些肤色点的像素值往往在预设范围的两边波动,因此就会造成同一个肤色点上一帧检测是肤色,下一帧又检测出来不是肤色。
发明内容
为了解决相关技术中肤色检测得到的结果不能适用于所有光照条件及肤色检测得到的结果不连续的问题,本申请实施例提供了一种肤色检测方法、装置及存储介质。所述技术方案如下:
根据本申请实施例的第一方面,提供一种肤色检测的方法,所述方法包括: 确定待进行肤色检测的目标图像中的每个像素点对应的像素值在YUV(Luminance Chrominance,亮度色度)域内的色度信号值;基于所述像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找所述色度信号值对应的肤色概率值;其中,所述肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,所述肤色概率值是指所述像素点为肤色点的概率;基于所述目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。
根据本申请实施例的第二方面,提供一种肤色检测的装置,所述装置包括:第一确定模块,确定待进行肤色检测的目标图像中的每个像素点对应的像素值在YUV域内的色度信号值;查找模块,用于基于所述像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找所述色度信号值对应的肤色概率值;其中,所述肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,所述肤色概率值是指所述像素点为肤色点的概率;检测模块,用于基于所述目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。
根据本申请实施例的第三方面,提供了一种肤色检测装置,所述装置包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序代码,所述处理器执行所述程序代码时实现上述第一方面所述的方法。
根据本申请实施例的第四方面,提供一种计算机可读存储介质,所述存储介质上存储有指令,所述指令被处理器执行时实现上述第一方面所述的任一项方法的步骤。
本申请实施例提供的技术方案带来的有益效果是:
在本申请实施例中,由于肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,因此通过肤色索引矩阵确定目标图像中的像素点为肤色点的概率,可以适应各种光照条件,避免了不同光照条件造成检测结果不准确的问题,而且也不会出现检测结果不连续的问题,提高了肤色检测的准确率,便于后续对图像中的肤色点进行各种处理。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种检测肤色的方法流程图;
图2是本申请实施例提供的另一种检测肤色的方法流程图;
图3A是本申请实施例提供的一种肤色检测装置的结构示意图;
图3B是本申请实施例提供的另一种肤色检测装置的结构示意图;
图3C是本申请实施例提供的一种生成模块305的结构示意图;
图3D是本申请实施例提供的一种第三确定模块307的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
为了便于理解,在对本申请实施例进行详细的解释说明之前,先对本申请实施例涉及的应用场景进行介绍。
肤色检测作为图像处理中比较重要的技术在日常生活中的应用越来越广泛,实际应用中,肤色检测可以应用到各个领域,接下来对应用场景进行举例说明。
比如,在图像或视频中,需要对人脸的区域进行提亮和美白,在采集到含有人脸的图像或视频帧后,可以通过肤色检测来确定图像中的哪些像素点为肤色点,将确定的肤色点构成的区域作为皮肤区域,进而对皮肤区域进行提亮和美白,从而达到美颜的效果。
再比如,当通过人脸识别来验证用户身份时,在采集到含有人脸的图像或视频帧后,可以通过肤色检测确定哪些像素点为肤色点,将确定的肤色点构成的区域作为皮肤区域,进而对皮肤区域进行人脸检测,从而更快速、有效的进行人脸识别。
又比如,手势识别。当智能电视通过手势来完成选择确认、切换页面、缩放和旋转等功能时,通常在获取图像后,需要通过肤色检测确定哪些像素点为肤色点,以确定图像中的肤色点对应的皮肤区域,进而对皮肤区域进行静态或动态的手势检测,以快速完成手势识别,达到用手势控制智能电视的效果。
本申请实施例不仅可以应用于上述三种应用场景中,实际应用中,可能还可以应用于其他的应用场景中,在此本申请实施例对其他应用场景不再一一列举。
接下来将结合附图对本申请实施例提供的肤色检测的方法进行详细介绍。
图1是根据本申请实施例提供的一种检测肤色的方法的流程图。参见图1,该方法包括以下步骤:
步骤101:对待进行肤色检测的目标图像中的每个像素点,确定像素点对应的像素值在YUV域内的色度信号值。
步骤102:基于像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找色度信号值对应的肤色概率值。
其中,肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,肤色概率值是指像素点为肤色点的概率。
步骤103:基于目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。
由于肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,因此通过肤色索引矩阵确定目标图像中的像素点为肤色点的概率,可以适应各种光照条件,避免了不同光照条件造成检测结果不准确的问题,而且也不会出现检测结果不连续的问题,提高了肤色检测的准确率,便于后续对图像中的肤色点进行各种处理。
可选地,基于像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找色度信号值对应的肤色概率值之前,还包括:
采集各种光照条件下的携带肤色点的图像;
基于采集到的携带肤色点的图像中每个肤色点的像素值在YUV域内的色度信号值,生成一张二值图像;
基于二值图像中每个像素点的像素值经过距离变换得到距离矩阵;
基于距离矩阵确定肤色索引矩阵。
可选地,基于采集到的肤色图像中每个像素点的像素值在YUV域内的色度信号值,生成一张二值图像,包括:
生成色度信号值图像,色度信号值图像中的像素点的像素值在YUV域内的色度信号值按照预设方向从小到大排列;
基于采集到的肤色图像中每个像素点的像素值在YUV域内的色度信号值,确定色度信号值图像中的每个像素点为肤色点的概率;
将色度信号值图像中概率大于或等于预设像素阈值的像素点的像素值设置为1,将色度信号值图像中概率小于预设像素阈值的像素点的像素值设置为0,得到二值图像。
可选地,基于距离矩阵确定肤色索引矩阵,包括:
确定距离矩阵中的最大距离值;
基于距离矩阵和最大距离值,确定距离矩阵中每个距离对应的肤色概率值;
基于距离矩阵中每个距离对应的肤色概率值生成肤色索引矩阵。
可选地,基于距离矩阵和最大距离值,确定距离矩阵中每个距离对应的肤色概率值,包括:
基于距离矩阵和最大距离值,按照如下公式确定距离矩阵中每个距离对应的肤色概率值:
Figure PCTCN2018105682-appb-000001
其中,在上述公式中,SkinValue为距离矩阵中每个距离对应的肤色概率值,dis为距离矩阵中的距离,disThres为预设距离阈值,maxdis为距离矩阵中的最大距离值。
可选地,基于距离矩阵中每个距离对应的肤色概率值生成肤色索引矩阵,包括:
基于距离矩阵中的每个距离对应的肤色概率值,按照距离矩阵的排列方式生成肤色索引矩阵;或者
将距离矩阵中的每个距离对应的肤色概率值进行取整,基于取整后的肤色概率值,按照距离矩阵的排列方式生成肤色索引矩阵。
上述所有可选技术方案,均可按照任意结合形成本申请的可选实施例,本申请实施例对此不再一一赘述。
图2是根据一示例性实施例示出的一种肤色检测的方法的流程图。本申请实施例将结合图2对图1所示的实施例进行展开论述。参见图2,该方法包括以下步骤:
需要说明的是,实际应用的过程中,在对目标图像进行肤色检测之前,还可以先按照如下步骤201-204生成肤色索引矩阵。
步骤201:采集各种光照条件下的携带肤色点的图像。
由于在实际应用中可能需要对各种光线条件下拍摄得到的图像进行肤色检测,不同的光照条件可能会造成肤色检测结果不相同,因此为了提高肤色检测的准确率,可以采集各种光照条件下的携带肤色点的图像。
例如,可以采集室内环境、自然光环境、黄光环境、逆光环境等不同光照条件下的携带肤色点的图像。
步骤202:基于采集到的携带肤色点的图像中每个肤色点的像素值在YUV域内的色度信号值,生成一张二值图像。
需要说明的是,使用YUV域表示色彩空间是被欧洲电视***所采用的一种颜色编码方法,是PAL(Phase Alteration Line,帕尔制)和SECAM(Sequentiel Couleur A Memoire,塞康制)模拟彩色电视制式采用的颜色空间。在现代彩色电视***中,通常采用三管彩色摄影机或彩色CCD(Charge-coupled Device,电荷耦合元件)摄影机进行取像,然后把取得的彩色图像信号经分色、分别放大校正后得到RGB(red green blue,红绿蓝)图像,再经过矩阵变换电路得到亮度信号Y和两个色度信号B-Y(即U)、R-Y(即V),最后发送端将亮度和色度三个信号分别进行编码,用同一信道发送出去。这种色彩的表示方法就是使用YUV域表示色彩空间,使用YUV域表示色彩空间 的重要性是它的亮度信号Y和色度信号U、V是分离的。
还需要说明的是,二值图像是指图像中包括的每个像素点只能为黑或白,颜色没有中间过渡的图像。在灰度图像中黑色像素点的像素值为0,白色像素点的像素值为255。为了方便表示,在二值图像中将像素值为255的像素点的像素值重新设置为1,像素值为0的像素点的像素值保持不变,也即是,二值图像中包括的每个像素点对应的像素值只能为1或0。
具体地,基于采集到的携带肤色点的图像中每个肤色点的像素值在YUV域内的色度信号值,生成一张二值图像的实现过程可以为:生成色度信号值图像,色度信号值图像中的像素点的像素值在YUV域内的色度信号值按照预设方向从小到大排列;基于采集到的肤色图像中每个像素点的像素值在YUV域内的色度信号值,确定色度信号值图像中的每个像素点为肤色点的概率;将色度信号值图像中概率大于或等于预设像素阈值的像素点的像素值设置为1,将色度信号值图像中概率小于预设像素阈值的像素点的像素值设置为0,得到二值图像。
其中,预设方向是指色度信号的排列方向,可以预先进行设置,如预设方向可以是色度信号U的值按照从左到右的方向排列,色度信号V的值按照从下到上的方向排列。预设像素阈值可以预先进行设置,用来判断一个像素值是否为肤色点对应的像素值,如预设像素阈值可以为0.8。
需要说明的是,由于色度信号值图像是由像素点的像素值在YUV域内的色度信号值按照预设方向从小到大排列生成的,且像素点的像素值在YUV域内的色度信号值为0到255之间的数值,因此生成的色度信号值图像为一幅256*256大小的图像,基于色度信号值图像生成的二值图像也为一幅256*256大小的图像。
例如,将色度信号U的值作为横轴,按照从左至右的方向依次对色度信号U的值从0到255进行排列,并将色度信号V的值作为纵轴,按照从下到上的方向依次对色度信号V的值从0到255进行排列,从而生成得到色度信号值图像。假设采集得到100幅肤色图像,确定色度信号值图像中每对色度信号值在100幅肤色图像中对应的像素点的数量,假设对于一对色度信号值5、10,以及另一对色度信号值8、12,在采集到的100幅肤色图像中,有80张肤色图像中存在色度信号值5、10的像素点为肤色点,有60张肤色图像中存在色度信号值为8、12的像素点为肤色点,此时可以确定色度信号值图像中色度信号值为5、10对应的像素点为肤色点的概率为0.8,色度信号值为8、12对应的像素点为肤色点的概率为0.6。假设预设像素阈值为0.7,由于0.8大于0.7,因此可以将色度信号值为5、10对应的像素点的像素值设置为1,又由于0.6小于0.7, 因此可以将色度信号值为8、12对应的像素点的像素值设置为0。
步骤203:基于二值图像中每个像素点的像素值经过距离变换得到距离矩阵。
其中,距离变换是针对二值图像的一种变换,在一幅二值图像中,可以认为仅仅包括目标像素点和背景像素点,目标像素点的像素值为1,背景像素点的像素值为0。
确定二值图像中每个像素点与距离最近的像素值为1的像素点之间的距离,基于确定的距离,生成距离矩阵。其中,距离矩阵中像素值为1的像素点的距离值为0,距离像素值为1的像素点越近的像素点的距离值越小。
需要说明的是,将二值图像放在一个坐标系中,每个像素点会有对应的坐标值,可以按照如下公式计算得到每个像素点与距离最近的像素值为1的像素点之间的距离:
Figure PCTCN2018105682-appb-000002
其中,d为每个像素点与距离最近的像素值为1的像素点之间的距离,(x,y)为像素点的坐标,(x 0,y 0)为与该像素点距离最近的像素值为1的像素点的坐标。
值得说明的是,上述公式为一连续的函数,通过上述公式得到的每个像素点与距离最近的像素值为1的像素点之间的距离值也是连续的,也即是,基于像素点的坐标、与该像素点距离最近的像素值为1的像素点的坐标及每个像素点与距离最近的像素值为1的像素点之间的距离可以绘制出一条平滑连续的曲线,曲线上连续的点代表每个像素点与距离最近的像素值为1的像素点之间的距离值。因此,距离矩阵中的距离值为连续的数值。
步骤204:基于距离矩阵确定肤色索引矩阵。
其中,肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,肤色概率值是指像素点为肤色点的概率。
具体地,基于距离矩阵确定肤色索引矩阵的实现过程可以为:确定距离矩阵中的最大距离值;基于距离矩阵和最大距离值,确定距离矩阵中每个距离对应的肤色概率值;基于距离矩阵中每个距离对应的肤色概率值生成肤色索引矩阵。
其中,基于距离矩阵和最大距离值,确定距离矩阵中每个距离对应的肤色概率值的实现过程可以为:基于距离矩阵和最大距离值,按照如下公式确定距离矩阵中每个距离对应的肤色概率值:
Figure PCTCN2018105682-appb-000003
其中,在上述公式中,SkinValue为距离矩阵中每个距离对应的肤色概率值,dis为距离矩阵中的距离,disThres为预设距离阈值,maxdis为距离矩阵中的最大距离值。预 设距离阈值可以调节肤色索引矩阵中肤色概率值变化的幅度,该预设距离阈值越小,肤色概率值变化的幅度越小,该预设距离阈值越大,肤色概率值变化的幅度越大。
需要说明的是,上述公式中将
Figure PCTCN2018105682-appb-000004
的值与数值255相乘,只是为了可以将计算结果放入一个256*256的矩阵中,方便查找,在实际应用中,也可以不与数值255相乘,只得到一个0到1之间的数值,将该数值作为一个像素点为肤色点的概率。并且基于距离矩阵和最大距离值,确定距离矩阵中每个距离对应的肤色概率值还可以通过其他的公式实现,本申请对此不做限制。
具体地,基于距离矩阵中每个距离对应的肤色概率值生成肤色索引矩阵的实现过程可以为:基于距离矩阵中的每个距离对应的肤色概率值,按照距离矩阵的排列方式生成肤色索引矩阵;或者将距离矩阵中的每个距离对应的肤色概率值进行取整,基于取整后的肤色概率值,按照距离矩阵的排列方式生成肤色索引矩阵。
需要说明的是,确定的距离矩阵中的每个距离对应的肤色概率值可能为浮点类型的数值,此时可以直接将该肤色概率值按照距离矩阵的排列方式生成肤色索引矩阵,此种方式生成的肤色索引矩阵在对肤色进行检测时准确率更高,但是由于此种方式下的肤色索引矩阵中的肤色概率值为浮点类型的数值,该数值只是代表像素点为肤色点的概率,当该概率符合预设条件时才能确定该像素点为肤色点,浮点类型的数据不方便计算,因此还可以将距离矩阵中的每个距离对应的肤色概率值进行取整,基于取整后的肤色概率值,按照距离矩阵的排列方式生成肤色索引矩阵。
还需要说明的是,由于距离矩阵中的距离值为连续的数值,而肤色索引矩阵是基于距离矩阵确定的,因此肤色索引矩阵中的肤色概率值也为连续的数值。生成的肤色索引矩阵中,肤色概率值为0代表该色度信号值对应的像素点不可能是肤色点,肤色概率值为255代表该色度信号值对应的像素点一定为肤色点,肤色概率值为0到255之间代表该色度信号值对应的像素点为肤色点的概率。
在本申请实施例中,由于生成的肤色索引矩阵是通过有连续性的距离变换得到的,所以得到的肤色索引矩阵中的肤色概率值也是连续的。这样,对于视频帧,由于光线原因等造成的相邻帧像素值的连续变化而得到的肤色概率值也是连续变化的,不会出现使用阈值而造成的跳变,提高了肤色检测的准确率。
在通过上述步骤生成肤色索引矩阵后,当需要对目标图像进行肤色检测时,可以按照如下步骤205-207来实现。
步骤205:对待进行肤色检测的目标图像中的每个像素点,确定像素点对应的像素值在YUV域内的色度信号值。
需要说明的是,在实际应用中,很多场景下都需要对图像中的肤色进行检测,也即是,在图像中选取皮肤所在区域的像素点。由于要对肤色进行检测,就需要判断图像中的像素点是否为肤色点。因此可以对待进行肤色检测的目标图像中的每个像素点,确定像素点对应的像素值在YUV域内的色度信号值,其中,像素点对应的像素值在YUV域内的色度信号值为色度信号U、V的值。
还需要说明的是,如果待进行肤色检测的目标图像为YUV域内的图像,对于待进行肤色检测的目标图像中的每个像素点,确定像素点对应的像素值在YUV域内的色度信号值,也即是,确定目标图像中的像素点对应的像素值在YUV域内的色度信号U、V的值。如果待进行肤色检测的目标图像为RGB域的图像,则需要先将RGB域内的图像转换为YUV域内的图像,然后再从YUV域内的图像中确定像素点对应的像素值在YUV域内的色度信号U、V的值。
例如,待进行肤色检测的目标图像为YUV域内的图像,假设待进行肤色检测的目标图像中包括有3个像素点,该3个像素点对应的像素值在YUV域内的三对色度信号值分别为5、10,8、12,9、14。
步骤206:基于像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找色度信号值对应的肤色概率值。
基于目标图像中的每个像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找色度信号值对应的肤色概率值,该肤色概率值即为该色度信号值对应的像素点为肤色点的概率。
例如,待进行肤色检测的目标图像中的一个像素点对应的像素值在YUV域内的色度信号值为5、10,从存储的肤色索引矩阵中查找像素值的色度信号值为5、10对应的肤色概率值为0.8,也即是,像素值的色度信号值为5、10对应的像素点为肤色点的概率为0.8。
步骤207:基于目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。
需要说明的是,在实际应用中,基于目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测存在如下两种可能的实现方式。当然,在实际应用中,基于目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测可能还存在其他可能的实现方式,本申请对此不做限制。
第一种可能的实现方式,当基于查找到的肤色概率值确定像素点满足预设肤色条件时,确定像素点为肤色点。
其中,预设肤色条件可以根据不同的需求预先进行设置,如预设肤色条件可以是基于像素点的像素值在YUV域内的色度信号值查找到的肤色概率值是否大于预设的数值。
例如,预设肤色条件为基于像素点的像素值在YUV域内的色度信号值查找到的肤色概率值是否大于0.7,对于待进行肤色检测的目标图像,假设目标图像中的像素点通过肤色索引矩阵查找到该像素点的像素值在YUV域内的色度信号值对应的肤色概率值为0.8,由于0.8大于0.7,因此确定该像素点为肤色点。
又例如,对于待进行肤色检测的目标图像,查找像素点的像素值在YUV域内的色度信号值对应的肤色概率值,此时,目标图像中的每个像素点会确定一个概率值,对目标图像整体进行提亮处理,对于处理后的目标图像,确定像素点的像素值在YUV域内的色度信号值对应的肤色概率值,处理后的目标图像中的每个像素点也会对应确定一个概率值,将处理后的目标图像中的每个像素点对应的概率值与处理前的目标图像中的每个像素点对应的概率值取平均值,然后将概率值大于预设的数值的像素点确定为肤色点。
再例如,对于待进行肤色检测的目标图像,使用矩形框,将待进行肤色检测的目标图像划分成多个矩形区域,确定每个矩形区域中的每个像素点的像素值在YUV域内的色度信号值对应的肤色概率值,然后将该矩形区域内的像素点的肤色概率值取平均值作为该区域内的像素点为肤色点的概率,当该概率大于预设的数值时,将该区域内的像素点均确定为肤色点。
第二种可能的实现方式,将目标图像中的每个像素点的色度信号值对应的肤色概率值应用到具体的应用场景中,以达到肤色检测的目的。
当需要对目标图像中的肤色点进行处理时,可以先对目标图像中的所有像素点进行处理,得到第一处理图像,然后基于目标图像中的每个像素点的色度信号值对应的肤色概率值,将目标图像中的像素点的像素值和第一处理图像中的像素点的像素值进行混合处理,得到像素点经过处理后的像素值,基于该像素值生成最终处理图像,最终处理图像中只对肤色点进行了相应的处理,进而达到了肤色检测的目的。
例如,当需要对目标图像中的肤色点进行提亮时,先对目标图像中的所有像素点进行提亮,得到处理后的图像,然后基于肤色索引矩阵中的肤色概率值,将目标图像中的像素点的像素值和处理后的图像中的像素点的像素值进行混合,得到最终提亮肤 色后的图像中的像素点的像素值。假设需要将目标图像中的肤色点的像素值提高30,先将目标图像中每个像素点的像素值提高30,得到处理后的图像。然后在肤色索引矩阵中查找目标图像中每个像素点的像素值为肤色点的概率。
假设目标图像中一个像素点的一对色度信号值为120、110,处理后的图像中该像素点的一对色度信号值为150、140,在肤色索引矩阵中查找到该对色度信号值对应的像素点为肤色点的概率为0.9,则将目标图像中该对色度信号值120、110分别与0.1相乘,得到另一对色度信号值12、11,然后将处理后的图像中该像素点的色度信号值150、140分别与0.9相乘,得到另一对色度信号值135、126,再将色度信号值12、11与色度信号值135、126对应相加,得到该像素点最终的色度信号值为147、137,基于该色度信号值147、137,生成最终的提亮肤色后的图像,该提亮肤色后的图像只对目标图像中的肤色点进行了提亮。
在本申请实施例中,由于每幅图像中都包括有很多个像素点,因此可以通过确定像素点是否为肤色点来对肤色进行检测。当需要对目标图像进行肤色检测时,对于目标图像中的每个像素点,可以确定像素点对应的像素值在YUV域内的色度信号值,进而基于像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找色度信号值对应的肤色概率值,基于目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。由于对于任何一张图像或者视频帧,都可以使用像素点的色度信号值快速从该肤色索引矩阵中查找到该像素点为肤色的概率,便于视频美颜等对于实时性要求很高的场景应用。同时由于生成的肤色索引矩阵是通过有连续性的距离变换得到的,所以得到的肤色索引矩阵中的肤色概率值也是连续的。这样,对于视频帧,由于光线原因等造成的相邻帧像素值的连续变化而得到的肤色概率值也是连续变化的,不会出现使用阈值而造成的跳变。另外,由于肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,因此通过肤色索引矩阵确定目标图像中的像素点为肤色点的概率,可以适应各种光照条件,避免了不同光照条件造成检测结果不准确的问题,提高了肤色检测的准确率,便于后续对图像中的肤色点进行各种处理。
通过上述图1和图2所示的实施例对本申请实施例提供的方法进行详细解释说明之后,接下来对本申请实施例提供的肤色检测装置进行介绍。
图3A是本申请实施例提供的一种肤色检测装置的结构示意图。参见图3A,该设备包括第一确定模块301、查找模块302和第二确定模块303。
第一确定模块301,用于对待进行肤色检测的目标图像中的每个像素点,确定像素点对应的像素值在YUV域内的色度信号值。
查找模块302,用于基于像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找色度信号值对应的肤色概率值。
其中,肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,肤色概率值是指像素点为肤色点的概率。
检测模块303,用于基于目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。
可选地,参见图3B,该装置还包括:
采集模块304,用于采集各种光照条件下的携带肤色点的图像。
生成模块305,用于基于采集到的携带肤色点的图像中每个肤色点的像素值在YUV域内的色度信号值,生成一张二值图像。
变换模块306,用于基于二值图像中每个像素点的像素值经过距离变换得到距离矩阵。
第二确定模块307,用于基于距离矩阵确定肤色索引矩阵。
可选地,参见图3C,生成模块305包括:
第一生成子模块3051,用于生成色度信号值图像,色度信号值图像中的像素点的像素值在YUV域内的色度信号值按照预设方向从小到大排列。
第一确定子模块3052,用于基于采集到的肤色图像中每个像素点的像素值在YUV域内的色度信号值,确定色度信号值图像中的每个像素点为肤色点的概率。
设置子模块3053,用于将色度信号值图像中概率大于或等于预设像素阈值的像素点的像素值设置为1,将色度信号值图像中概率小于预设像素阈值的像素点的像素值设置为0,得到二值图像。
可选地,参见图3D,第二确定模块307包括:
第二确定子模块3071,用于确定距离矩阵中的最大距离值。
第三确定子模块3072,用于基于距离矩阵和最大距离值,确定距离矩阵中每个距离对应的肤色概率值。
第二生成子模块3073,用于基于距离矩阵中每个距离对应的肤色概率值生成肤色索引矩阵。
可选地,第三确定子模块3072用于:
基于距离矩阵和最大距离值,按照如下公式确定距离矩阵中每个距离对应的肤色概率值:
Figure PCTCN2018105682-appb-000005
其中,在上述公式中,SkinValue为距离矩阵中每个距离对应的肤色概率值,dis为距离矩阵中的距离,disThres为预设距离阈值,maxdis为距离矩阵中的最大距离值。
可选地,第二生成子模块3073用于:
基于距离矩阵中的每个距离对应的肤色概率值,按照距离矩阵的排列方式生成肤色索引矩阵;或者
将距离矩阵中的每个距离对应的肤色概率值进行取整,基于取整后的肤色概率值,按照距离矩阵的排列方式生成肤色索引矩阵。
在本申请实施例中,由于每幅图像中都包括有很多个像素点,因此可以通过确定像素点是否为肤色点来对肤色进行检测。当需要对目标图像进行肤色检测时,对于目标图像中的每个像素点,可以确定像素点对应的像素值在YUV域内的色度信号值,进而基于像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找色度信号值对应的肤色概率值,基于目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。由于对于任何一张图像或者视频帧,都可以使用像素点的色度信号值快速从该肤色索引矩阵中查找到该像素点为肤色的概率,便于视频美颜等对于实时性要求很高的场景应用。同时由于生成的肤色索引矩阵是通过有连续性的距离变换得到的,所以得到的肤色索引矩阵中的肤色概率值也是连续的。这样,对于视频帧,由于光线原因等造成的相邻帧像素值的连续变化而得到的肤色概率值也是连续变化的,不会出现使用阈值而造成的跳变。另外,由于肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,因此通过肤色索引矩阵确定目标图像中的像素点为肤色点的概率,可以适应各种光照条件,避免了不同光照条件造成检测结果不准确的问题,提高了肤色检测的准确率,便于后续对图像中的肤色点进行各种处理。
需要说明的是:上述实施例提供的肤色检测的装置在检测肤色时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的肤色检测的装置与肤色检测的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由装置的处理器执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
也即是,该计算机可读存储介质中的指令由装置的处理器执行时,可以实现上述 图1或图2所示实施例的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(Digital Subscriber Line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(Digital Versatile Disc,DVD))、或者半导体介质(例如:固态硬盘(Solid State Disk,SSD))等。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (11)

  1. 一种肤色检测方法,其特征在于,所述方法包括:
    确定待进行肤色检测的目标图像中的每个像素点对应的像素值在亮度色度YUV域内的色度信号值;
    基于所述像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找所述色度信号值对应的肤色概率值;
    其中,所述肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,所述肤色概率值是指所述像素点为肤色点的概率;
    基于所述目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。
  2. 如权利要求1所述的方法,其特征在于,所述基于所述像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找所述色度信号值对应的肤色概率值之前,还包括:
    采集各种光照条件下的携带肤色点的图像;
    基于采集到的携带肤色点的图像中每个肤色点的像素值在YUV域内的色度信号值,生成一张二值图像;
    基于所述二值图像中每个像素点的像素值经过距离变换得到距离矩阵;
    基于所述距离矩阵确定所述肤色索引矩阵。
  3. 如权利要求2所述的方法,其特征在于,所述基于采集到的肤色图像中每个像素点的像素值在YUV域内的色度信号值,生成一张二值图像,包括:
    生成色度信号值图像,所述色度信号值图像中的像素点的像素值在YUV域内的色度信号值按照预设方向从小到大排列;
    基于所述采集到的肤色图像中每个像素点的像素值在YUV域内的色度信号值,确定所述色度信号值图像中的每个像素点为肤色点的概率;
    将所述色度信号值图像中概率大于或等于预设像素阈值的像素点的像素值设置为1,将所述色度信号值图像中概率小于所述预设像素阈值的像素点的像素值设置为0,得到二值图像。
  4. 如权利要求2所述的方法,其特征在于,所述基于所述距离矩阵确定所述肤色索引矩阵,包括:
    确定所述距离矩阵中的最大距离值;
    基于所述距离矩阵和所述最大距离值,确定所述距离矩阵中每个距离对应的肤色概率值;
    基于所述距离矩阵中每个距离对应的肤色概率值生成所述肤色索引矩阵。
  5. 如权利要求4所述的方法,其特征在于,所述基于所述距离矩阵和所述最大距离值,确定所述距离矩阵中每个距离对应的肤色概率值,包括:
    基于所述距离矩阵和所述最大距离值,按照如下公式确定所述距离矩阵中每个距离对应的肤色概率值:
    Figure PCTCN2018105682-appb-100001
    其中,在上述公式中,所述SkinValue为所述距离矩阵中每个距离对应的肤色概率值,所述dis为所述距离矩阵中的距离,所述disThres为预设距离阈值,所述maxdis为所述距离矩阵中的最大距离值。
  6. 如权利要求4或5所述的方法,其特征在于,所述基于所述距离矩阵中每个距离对应的肤色概率值生成所述肤色索引矩阵,包括:
    基于所述距离矩阵中的每个距离对应的肤色概率值,按照所述距离矩阵的排列方式生成所述肤色索引矩阵;或者
    将所述距离矩阵中的每个距离对应的肤色概率值进行取整,基于取整后的肤色概率值,按照所述距离矩阵的排列方式生成所述肤色索引矩阵。
  7. 一种肤色检测装置,其特征在于,所述装置包括:
    第一确定模块,确定待进行肤色检测的目标图像中的每个像素点对应的像素值在亮度色度YUV域内的色度信号值;
    查找模块,用于基于所述像素点对应的像素值在YUV域内的色度信号值,从存储的肤色索引矩阵中查找所述色度信号值对应的肤色概率值;
    其中,所述肤色索引矩阵是对各种光照条件下的肤色图像进行处理后生成得到,所述肤色概率值是指所述像素点为肤色点的概率;
    检测模块,用于基于所述目标图像中的每个像素点的色度信号值对应的肤色概率值进行肤色检测。
  8. 如权利要求7所述的装置,其特征在于,该装置还包括:
    采集模块,用于采集各种光照条件下的图像;
    生成模块,用于基于采集到的图像中每个肤色点的像素值在YUV域内的色度信号值,生成一张二值图像;
    变换模块,用于基于所述二值图像中每个像素点的像素值经过距离变换得到距离矩阵;
    第二确定模块,用于基于所述距离矩阵确定所述肤色索引矩阵。
  9. 如权利要求8所述的装置,其特征在于,所述生成模块包括:
    第一生成子模块,用于生成色度信号值图像,所述色度信号值图像中的像素点的像素值在YUV域内的色度信号值按照预设方向从小到大排列;
    第一确定子模块,用于基于所述采集到的肤色图像中每个像素点的像素值在YUV域内的色度信号值,确定所述色度信号值图像中的每个像素点为肤色点的概率;
    设置子模块,用于将所述色度信号值图像中概率大于或等于预设像素阈值的像素点的像素值设置为1,将所述色度信号值图像中概率小于所述预设像素阈值的像素点的像素值设置为0,得到二值图像。
  10. 一种肤色检测装置,其特征在于,所述装置包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序代码,所述处理器执行所述程序代码时实现权利要求1-6所述的任一项方法的步骤。
  11. 一种计算机可读存储介质,所述存储介质上存储有指令,其特征在于,所述指令被处理器执行时实现权利要求1-6所述的任一项方法的步骤。
PCT/CN2018/105682 2017-09-19 2018-09-14 肤色检测方法、装置及存储介质 WO2019056986A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP18859472.5A EP3678056B1 (en) 2017-09-19 2018-09-14 Skin color detection method and device and storage medium
US16/647,246 US11080894B2 (en) 2017-09-19 2018-09-14 Skin color detection method, skin color detection apparatus, and storage medium
RU2020113491A RU2738202C1 (ru) 2017-09-19 2018-09-14 Способ определения цвета кожи, устройство для определения цвета кожи и носитель данных
SG11202002485WA SG11202002485WA (en) 2017-09-19 2018-09-14 Skin color detection method, skin color detection device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710852345.3 2017-09-19
CN201710852345.3A CN107633252B (zh) 2017-09-19 2017-09-19 肤色检测方法、装置及存储介质

Publications (1)

Publication Number Publication Date
WO2019056986A1 true WO2019056986A1 (zh) 2019-03-28

Family

ID=61102106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/105682 WO2019056986A1 (zh) 2017-09-19 2018-09-14 肤色检测方法、装置及存储介质

Country Status (6)

Country Link
US (1) US11080894B2 (zh)
EP (1) EP3678056B1 (zh)
CN (1) CN107633252B (zh)
RU (1) RU2738202C1 (zh)
SG (1) SG11202002485WA (zh)
WO (1) WO2019056986A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI787113B (zh) * 2021-05-31 2022-12-11 大陸商深圳市商湯科技有限公司 圖像處理方法、裝置、處理器、電子設備及儲存媒體

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107633252B (zh) * 2017-09-19 2020-04-21 广州市百果园信息技术有限公司 肤色检测方法、装置及存储介质
CN109543678B (zh) * 2018-11-14 2023-06-23 深圳大普微电子科技有限公司 敏感图像鉴别方法及装置
WO2021016896A1 (zh) * 2019-07-30 2021-02-04 深圳市大疆创新科技有限公司 图像处理方法、***、设备、可移动平台和存储介质
CN110533732B (zh) * 2019-09-04 2021-11-26 厦门美图之家科技有限公司 图像中肤色的识别方法、装置、电子设备及存储介质
CN111127363B (zh) * 2019-12-26 2024-01-23 Tcl华星光电技术有限公司 改善超广视角的图像处理方法、图像处理装置及存储介质
CN112686965A (zh) * 2020-12-25 2021-04-20 百果园技术(新加坡)有限公司 一种肤色检测方法、装置、移动终端和存储介质
CN112801997B (zh) * 2021-02-05 2023-06-06 抖音视界有限公司 图像增强质量评估方法、装置、电子设备及存储介质
CN113888543B (zh) * 2021-08-20 2024-03-19 北京达佳互联信息技术有限公司 肤色分割方法、装置、电子设备及存储介质
CN114582003B (zh) * 2022-04-24 2022-07-29 慕思健康睡眠股份有限公司 一种基于云计算服务的睡眠健康管理***

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521607A (zh) * 2011-11-30 2012-06-27 西安交通大学 高斯框架下近似最优肤色检测方法
US20170154238A1 (en) * 2015-11-26 2017-06-01 Le Holdings (Beijing) Co., Ltd. Method and electronic device for skin color detection
CN106845455A (zh) * 2017-03-01 2017-06-13 中国科学院上海高等研究院 基于肤色检测的图像处理方法、***及服务器
CN107633252A (zh) * 2017-09-19 2018-01-26 广州市百果园信息技术有限公司 肤色检测方法、装置及存储介质

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004246424A (ja) * 2003-02-10 2004-09-02 Masahide Kaneko 肌色領域の抽出方法
US7440593B1 (en) * 2003-06-26 2008-10-21 Fotonation Vision Limited Method of improving orientation and color balance of digital images using face detection information
US8154612B2 (en) * 2005-08-18 2012-04-10 Qualcomm Incorporated Systems, methods, and apparatus for image processing, for color classification, and for skin color detection
US7728904B2 (en) * 2005-11-08 2010-06-01 Qualcomm Incorporated Skin color prioritized automatic focus control via sensor-dependent skin color detection
EP2045775A4 (en) * 2006-07-25 2017-01-18 Nikon Corporation Image processing method, image processing program, and image processing device
KR100957716B1 (ko) * 2008-10-07 2010-05-12 한국 한의학 연구원 가변 피부색 모델을 이용한 피부색 영역 검출 방법
US8582875B2 (en) * 2008-10-23 2013-11-12 University Of Ulster Method for skin tone detection
US20100158363A1 (en) * 2008-12-19 2010-06-24 Qualcomm Incorporated System and method to detect skin color in an image
US8385638B2 (en) * 2009-01-05 2013-02-26 Apple Inc. Detecting skin tone in images
CN101482923B (zh) * 2009-01-19 2012-05-23 刘云 视频监控中人体目标的检测与性别识别方法
CN102096823A (zh) * 2011-02-12 2011-06-15 厦门大学 基于高斯模型和最小均方差的人脸检测方法
CN102779268B (zh) * 2012-02-06 2015-04-22 西南科技大学 基于方向运动历史图及竞争机制的手挥运动方向判定方法
CN103745193B (zh) * 2013-12-17 2019-08-06 小米科技有限责任公司 一种肤色检测方法及装置
CN104156915A (zh) * 2014-07-23 2014-11-19 小米科技有限责任公司 肤色调整方法和装置
CN105913460A (zh) * 2015-11-26 2016-08-31 乐视致新电子科技(天津)有限公司 一种肤色检测方法及装置
CN106529432B (zh) * 2016-11-01 2019-05-07 山东大学 一种深度融合显著性检测与先验知识的手部区域分割方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521607A (zh) * 2011-11-30 2012-06-27 西安交通大学 高斯框架下近似最优肤色检测方法
US20170154238A1 (en) * 2015-11-26 2017-06-01 Le Holdings (Beijing) Co., Ltd. Method and electronic device for skin color detection
CN106845455A (zh) * 2017-03-01 2017-06-13 中国科学院上海高等研究院 基于肤色检测的图像处理方法、***及服务器
CN107633252A (zh) * 2017-09-19 2018-01-26 广州市百果园信息技术有限公司 肤色检测方法、装置及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI787113B (zh) * 2021-05-31 2022-12-11 大陸商深圳市商湯科技有限公司 圖像處理方法、裝置、處理器、電子設備及儲存媒體

Also Published As

Publication number Publication date
EP3678056B1 (en) 2023-09-06
EP3678056A4 (en) 2020-10-28
RU2738202C1 (ru) 2020-12-09
SG11202002485WA (en) 2020-04-29
US20200258260A1 (en) 2020-08-13
EP3678056A1 (en) 2020-07-08
CN107633252B (zh) 2020-04-21
CN107633252A (zh) 2018-01-26
US11080894B2 (en) 2021-08-03

Similar Documents

Publication Publication Date Title
WO2019056986A1 (zh) 肤色检测方法、装置及存储介质
US10503956B2 (en) Identifying video content via color-based fingerprint matching
WO2019148912A1 (zh) 一种图像处理方法、装置、电子设备及存储介质
US10812767B2 (en) White balance processing method, electronic device and computer readable storage medium
US20150243048A1 (en) System, method, and computer program product for performing one-dimesional searches in two-dimensional images
US10325354B2 (en) Depth assisted auto white balance
JP6615917B2 (ja) 実時間ビデオエンハンスメント方法、端末及び非一時的コンピュータ可読記憶媒体
US20170289434A1 (en) Method and system for image processing to detect salient objects in image
RU2496250C1 (ru) Устройство и способ обработки изображения
WO2021114684A1 (zh) 图像处理方法、装置、计算设备和存储介质
KR101985880B1 (ko) 디스플레이 장치 및 이의 제어 방법
WO2019000793A1 (zh) 直播中打码方法及装置、电子设备及存储介质
WO2022121893A1 (zh) 图像处理方法、装置、计算机设备和存储介质
JP6934240B2 (ja) 画像処理装置
CN111491149A (zh) 基于高清视频的实时抠像方法、装置、设备及存储介质
WO2020119454A1 (zh) 一种对图像进行颜色还原的方法和装置
US7796827B2 (en) Face enhancement in a digital video
CN113868457A (zh) 一种基于图像聚档的图像处理方法及相关装置
US11202045B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
CN116614716A (zh) 图像处理方法、图像处理装置、存储介质及电子设备
TWI404408B (zh) 影像處理裝置及影像處理方法
CN114390266B (zh) 一种图像白平衡处理方法、设备及计算机可读存储介质
JP2011134019A (ja) 画像処理装置及びその制御方法
KR101131109B1 (ko) 센서 특성을 고려한 화이트 검출에 의한 자동 화이트밸런스 설정방법
WO2022032666A1 (zh) 处理图像的方法和相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18859472

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018859472

Country of ref document: EP

Effective date: 20200331