WO2018082388A1 - Dispositif et procédé de détection de couleur de peau, et terminal - Google Patents

Dispositif et procédé de détection de couleur de peau, et terminal Download PDF

Info

Publication number
WO2018082388A1
WO2018082388A1 PCT/CN2017/099869 CN2017099869W WO2018082388A1 WO 2018082388 A1 WO2018082388 A1 WO 2018082388A1 CN 2017099869 W CN2017099869 W CN 2017099869W WO 2018082388 A1 WO2018082388 A1 WO 2018082388A1
Authority
WO
WIPO (PCT)
Prior art keywords
skin color
current frame
lookup table
frame picture
color lookup
Prior art date
Application number
PCT/CN2017/099869
Other languages
English (en)
Chinese (zh)
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 华为技术有限公司
Publication of WO2018082388A1 publication Critical patent/WO2018082388A1/fr

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
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching
    • 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

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a skin color detecting method, device, and terminal.
  • more and more smart phones, tablets and other terminals have video beauty functions, which enable users to add skin, skin whitening and other beauty effects to the faces of the video during video calls and video recording.
  • a video with better visual effects Adding a beauty effect to a face first needs to recognize the face area in the picture, and then recognize the skin color area in the face area. Generally, only the skin color area is added to the skin color area, and the non-skin color area (such as eyes and eyebrows is reserved). The authenticity of etc. is not beautified.
  • the existing video skin color detection scheme mainly includes the scheme 1: detecting the face information of the current frame picture of the video, and obtaining the approximate contour of the face region according to the Active Shape Model (ASM) algorithm, and estimating the face according to the contour area.
  • the skin area avoiding some potentially misleading areas (such as eyes, eyebrows and lip areas), based on the estimated skin color area of the face, based on the pre-set skin threshold empirical parameters, the estimated skin color of the face
  • the region performs threshold segmentation to uniformly select a certain number of skin color seeds in different skin color regions. Based on the selected seed points, the spread and detection of the surrounding connected areas are performed, so that all connected skin color regions can be detected.
  • Scheme 2 obtaining a face region from a grayscale image of a current frame image of the video, calculating a histogram of the face region, and finding an approximate valley point of the histogram, by using the approximate valley point to the skin color region in the face region and The non-skin area is divided.
  • the skin color detection result is discrete, and a visual jump occurs.
  • the embodiment of the invention provides a skin color detecting method, device and terminal, which can effectively ensure the continuity of skin color detection results when performing skin color detection on a video.
  • a first aspect of the embodiments of the present invention provides a skin color detecting method, including:
  • the terminal acquires a video to be detected by the skin color, obtains a current frame image of the video, performs face recognition on the current frame image by using an ASM algorithm, determines a skin color lookup table of the current frame image according to the recognition result, and searches according to the skin color of the current frame image.
  • the skin color lookup table accumulated by the historical frame picture before the picture and the current frame picture can obtain the target skin color lookup table with continuous skin color values, and use the target skin color lookup table to detect the skin color of the current frame picture, so that when the skin color is detected for the video, Effectively guarantees the continuity of skin color detection results.
  • the terminal may perform weighted average on the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture to obtain a target skin color lookup table with continuous skin color values, and implement the current frame.
  • Automatic learning of skin color values in the skin color lookup table of the picture, and skin color values in the skin color lookup table accumulated for the history frame picture Automatic forgetting, so that when the skin color detection is performed on the video using the target skin color lookup table, continuous skin color detection results can be obtained.
  • the manner in which the terminal determines the skin color lookup table of the current frame picture according to the recognition result may be: if the terminal recognizes the face, the terminal determines the face area of the current frame picture according to the first skin color lookup table of the first template picture set.
  • the skin color lookup table further determines the skin color lookup table of the current frame picture according to the skin color lookup table of the face area and the second skin color lookup table of the second template picture set.
  • the first template picture set includes a number of template pictures that is larger than the number of template pictures included in the second template picture set, and the first skin color lookup table with a wider coverage is used to first determine the skin color lookup table of the face area, that is, the determined person.
  • the skin color area in the face area can effectively detect the non-skin color part of the face area.
  • the terminal If the terminal does not recognize the face, the terminal directly determines the skin color lookup table of the current frame picture according to the second skin color lookup table, so that the skin color detecting capability is still provided without recognizing the face.
  • the terminal may perform filtering and filtering on the current frame image that is detected by the skin color, obtain a mask image, and beautify the current frame image to obtain a beautified current frame image, and then use the mask image to view the current frame image and The landscaping of the current frame image is fused, so that the visual hopping phenomenon can be eliminated when the video is processed according to the continuous skin color detection result, and a good video beauty effect is provided.
  • a second aspect of the embodiments of the present invention provides a skin color detecting device, including:
  • the obtaining module is configured to acquire a current frame picture of the video for performing skin color detection.
  • a determining module configured to perform face recognition on the current frame picture to determine a skin color lookup table of the current frame picture.
  • the determining module identifies the human face, determining, according to the first skin color lookup table of the first template picture set, a skin color lookup table of the face area of the current frame picture, and then according to the skin color lookup table of the face area and the second A second skin color lookup table of the template picture set, determining a skin color lookup table of the current frame picture.
  • the number of template pictures included in the first template picture set is greater than the number of template pictures included in the second template picture set.
  • the skin color lookup table of the current frame picture is determined according to the second skin color lookup table.
  • the determining module is further configured to determine the target skin color lookup table according to the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture.
  • the determining module performs weighted averaging on the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture to obtain a target skin color lookup table.
  • the detection module is further configured to perform skin color detection on the current frame picture by using the target skin color lookup table, so that the continuity of the skin color detection result can be effectively ensured when the skin color is detected.
  • the device further includes:
  • the filtering module is configured to perform a guide filtering on the current frame image that is detected by the skin color to obtain a mask image.
  • the beautification module is used to beautify the current frame picture to obtain a picture frame of the current frame that has been beautified.
  • the video can be visually processed to eliminate the visual jump phenomenon and provide a good video beauty effect.
  • a third aspect of the embodiments of the present invention provides a terminal, including: a processor and a memory, where the processor and the memory are connected by a bus, the memory stores executable program code, and the processor is configured to call executable program code in the memory to execute The skin color detecting method described in any one of the above first aspects.
  • the current frame picture of the video for detecting the skin color is obtained, and the current frame picture is subjected to face recognition to determine a skin color lookup table of the current frame picture, and according to the skin color lookup table of the current frame picture and the current a skin color lookup table accumulated by the history frame picture before the frame picture, determining a target skin color lookup table with continuous skin color values, thereby performing skin color detection on the current frame picture by using the target skin color lookup table, thereby performing skin color detection on the video Effectively guarantees the continuity of skin color detection results.
  • FIG. 1 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • FIG. 2 is a schematic flow chart of a first embodiment of a skin color detecting method according to an embodiment of the present invention
  • FIG. 3 is a schematic flow chart of a second embodiment of a skin color detecting method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a skin color calibration method according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a skin color detecting device according to an embodiment of the present invention.
  • the terminal described in the embodiment of the present invention may specifically include, but is not limited to, a smart phone, a tablet computer, a digital camera, a mobile Internet device (MID), and the like.
  • a smart phone a tablet computer
  • a digital camera a digital camera
  • a mobile Internet device MID
  • FIG. 1 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal described in this embodiment includes a processor 101, a memory 102, an output device 103, and an input device 104.
  • the processor 101 is connected to the memory 102, the output device 103, and the input device 104 via a bus.
  • the processor 101 may be a baseband processor, a baseband chip, a digital signal processor (DSP), or a system on chip (SOC) including a baseband processor and an application processor.
  • the above memory 102 is a memory device of the terminal for storing programs and data. It can be understood that the memory 102 herein may be a high-speed RAM memory, or may be a non-volatile memory, such as at least one disk memory; optionally, at least one of the processors 101 may be located away from the foregoing processor 101.
  • the output device 103 described above can be a display.
  • the input device 104 may be a touch panel, a camera, a microphone, or the like.
  • the memory 102 is configured to store a set of program codes, and the processor 101 calls the program code stored in the memory 102 to perform the following operations:
  • the processor 101 acquires a video to be subjected to skin color detection, and acquires a current frame picture of the video.
  • the processor 101 performs face recognition on the current frame picture to obtain a face recognition result, and determines a skin color lookup table of the current frame picture according to the face recognition result.
  • the skin color lookup table that is, the 3D lookup table, stores the correspondence between the pixel values of the pixels and the skin color values, and the pixel values are red, green, blue, and RGB values, and the structure of the skin color lookup table may be a subscript. For the pixel value, the content corresponding to the subscript is the skin color value.
  • the skin color lookup table can determine whether a pixel is a skin color. For any pixel, the pixel value is obtained, the skin color value corresponding to the pixel value is queried from the skin color lookup table, and the skin color value corresponding to the skin color and the non skin color according to the predetermined skin color value is used. The situation determines if the pixel is skin tone.
  • the processor 101 performs face recognition on the current frame picture, and if the face is recognized, determines a skin color lookup table of the face area of the current frame picture according to the first skin color lookup table of the first template picture set, and then according to the a skin color lookup table of the face area and a second skin color lookup table of the second template picture set, determining a skin color lookup table of the current frame picture; if no face is recognized, the skin color of the current frame picture may be directly determined by the second skin color lookup table Lookup table.
  • the number of template pictures included in the first template picture set is greater than the number of template pictures included in the second template picture set.
  • the processor 101 determines a target skin color lookup table for performing skin color detection on the current frame picture according to the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture.
  • the processor 101 performs skin color detection on the current frame picture using the target skin color lookup table.
  • the processor 101 obtains a pixel value for each pixel in the current frame picture, and queries the skin color value corresponding to the pixel value from the target skin color lookup table, and then according to the preset skin color value and the skin color and the non-skin color. Corresponding to the situation can determine whether each pixel is skin color. Alternatively, the processor 101 may determine, from the target skin color lookup table, a target pixel value corresponding to the skin color corresponding to the skin color value, determine a pixel whose pixel value is the target pixel value as the skin color, and determine other pixels as the non-skin color.
  • the processor 101 performs direction filtering on the current frame image that is detected by the skin color to obtain a mask image, and performs beautification processing on the current frame image to obtain a beautified current frame image, and then uses the mask image to view the current frame image and The merging of the current frame picture is fused.
  • the mask image is used as the mask image.
  • the role of the mask is to convert different grayscale values into different transparency, and apply to the layer where it is located, so that the transparency of different parts of the layer changes accordingly.
  • white is completely opaque and gray is translucent.
  • Fusion is a blend of transparency to get the overlay of two images.
  • the processor 101, the memory device 102, the output device 103, and the input device 104 described in the embodiments of the present invention may perform the first embodiment and the second embodiment of the skin color detecting method provided by the embodiment of the present invention.
  • the implementation of the described terminal can also implement the implementation of the skin color detecting device described in the skin color detecting device provided by the embodiment of the present invention, and details are not described herein again.
  • the terminal acquires a current frame image of the video for detecting the skin color, and performs a human image on the current frame image. Face recognition, determining a skin color lookup table of the current frame picture, and determining a target skin color lookup table with continuous skin color values according to the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture Therefore, the skin color detection is performed on the current frame picture by using the target skin color lookup table, so that the continuity of the skin color detection result can be effectively ensured when the skin color is detected.
  • FIG. 2 is a schematic flowchart diagram of a first embodiment of a skin color detecting method according to an embodiment of the present invention.
  • the skin color detecting method described in this embodiment includes the following steps:
  • the terminal acquires a current frame picture of the video that performs skin color detection.
  • the terminal acquires a video to be detected by the skin color, and acquires a current frame picture of the video.
  • the terminal performs face recognition on the current frame picture to determine a skin color lookup table of the current frame picture.
  • the skin color lookup table that is, the 3D lookup table, stores the correspondence between the pixel value of the pixel and the skin color value, and the pixel value is the RGB value.
  • the structure of the skin color lookup table may be a subscript as a pixel value, and the content corresponding to the subscript is the skin color. value.
  • the skin color lookup table can determine whether a pixel is a skin color. For any pixel, the pixel value is obtained, the skin color value corresponding to the pixel value is queried from the skin color lookup table, and the skin color value corresponding to the skin color and the non skin color according to the predetermined skin color value is used. The case determines whether the pixel is a skin color.
  • the skin color value may have a first value and a second value, and the pixel value corresponding to the pixel value is the skin color of the first value, and the skin color value corresponding to the pixel value is the second value.
  • the pixels are not skin tones.
  • Each skin color lookup table may be initialized to a state in which all pixels are non-skinned, that is, the skin color value is null or the second value.
  • the RGB depth is 8 bits, the skin color value is 1 for skin color, and the skin color value is 0 for non-skin color.
  • the pixel value ranges from 0 to 16777215 (2 24 -1).
  • the skin color lookup table may be specifically as shown in Table 1.
  • the pixel value and the skin color value corresponding to the pixel value are stored.
  • the pixel value is m. s, when the corresponding skin color value is 1, the pixel whose pixel value is m or s is the skin color, and when the pixel value is 0, n, 2 24 -1, the corresponding skin color value is 0, indicating that the pixel value is 0 or
  • the pixels of n or 2 24 -1 are non-skin.
  • the specific manner in which the terminal performs face recognition on the current frame picture to determine the skin color lookup table of the current frame picture may include, but is not limited to:
  • Manner 1 Detect the face information of the current frame picture, obtain the approximate outline of the face area according to the ASM algorithm, estimate the skin area of the face according to the outline area, and avoid some potentially misleading areas (such as eyes, eyebrows and lip areas).
  • the skin color region of the estimated face is subjected to threshold segmentation according to the skin threshold empirical parameter set in advance, and a certain number of skin color seeds are uniformly selected in different skin color regions.
  • the selected seed point the spread and detection of the surrounding connected area are performed, so that all connected skin color regions can be detected, and the pixel values of each pixel in all connected skin color regions can be corresponding to the skin color lookup table of the current frame picture.
  • the skin color value is set to the first value, thereby determining the skin color lookup table of the current frame picture.
  • Manner 2 obtaining a face region from the grayscale image of the current frame picture, calculating a histogram of the face region, and finding an approximate valley point of the histogram, and the skin color region and the non-face region in the face region are obtained by the approximate valley point Skin color area is divided, face will be The pixel value of each pixel in the skin color region in the region is set to a first value in the skin color lookup table of the current frame image, thereby determining the skin color lookup table of the current frame image.
  • the terminal determines, according to the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture, to determine the target skin color lookup table.
  • the terminal performs skin color detection on the current frame picture by using the target skin color lookup table.
  • the skin color lookup table realizes automatic learning of skin color values in the skin color lookup table of the current frame picture, and automatic forgetting of skin color values in the skin color lookup table accumulated for the history frame picture.
  • the first value may take 255
  • the second value may take 0.
  • the skin color value in the skin color lookup table of the current frame picture is discrete, and is 255 (skin tone) or 0 (non-skin tone), weighted.
  • the skin color values in the target skin lookup table are continuous with a range of [0, 255].
  • the terminal acquires the pixel value of each pixel in the current frame picture, and queries the skin color value corresponding to the pixel value of each pixel from the target skin color lookup table of the current frame picture, and the pixel corresponding to the pixel value corresponding to the pixel value is determined to be the skin color.
  • a pixel whose skin color value is 0 corresponding to a pixel value is determined to be non-skin tone, and a skin color value other than 0 and 255 is a skin color value, and the higher the confidence level, the closer the corresponding pixel is to the skin color, thereby accurately
  • the skin color area of the current frame picture is detected. It can be seen that the skin color detection of each frame of the video is performed by using the skin color lookup table with continuous skin color values, so that the detection result of the skin color detection of the video is continuous.
  • the terminal acquires a current frame picture of the video for detecting the skin color, performs face recognition on the current frame picture, determines a skin color lookup table of the current frame picture, and performs a skin color lookup table according to the current frame picture and a skin color lookup table accumulated by the history frame picture before the current frame picture, determining a target skin color lookup table with continuous skin color values, thereby performing skin color detection on the current frame picture by using the target skin color lookup table, thereby performing skin color detection on the video , can effectively ensure the continuity of skin color detection results.
  • FIG. 3 is a schematic flowchart diagram of a second embodiment of a skin color detecting method according to an embodiment of the present invention.
  • the skin color detecting method described in this embodiment includes the following steps:
  • the terminal acquires a current frame picture of a video for performing skin color detection.
  • the terminal may separately perform skin color calibration on the two template picture sets (ie, the first template picture set and the second template picture set) to obtain two skin color lookup tables (ie, the first skin color lookup table and the first
  • the second skin tone lookup table, the first skin tone lookup table and the second skin tone lookup table are used for skin color detection of the video.
  • the first skin color lookup table corresponds to the first template picture set
  • the second skin color lookup table corresponds to the second template picture set
  • the terminal performs skin color calibration on the first template picture set and the second template picture set respectively to obtain the first skin color lookup table.
  • the specific steps of the second skin color lookup table can be as follows:
  • the skin color area in the template picture is selected by selecting a frame, as shown in the rectangular selection box in FIG. 4, and the rectangle is selected by using different areas in the template picture.
  • Frame the box to select the skin color area (such as face, neck, arms, hands, legs, etc.).
  • For each picture area selected in the selected box obtain the total number of pixels included in the selected image area of the selected frame.
  • the pixel value of each pixel in order to facilitate interpolation of pixels in the current frame picture to obtain a skin color detection result of continuous skin color values, each of the selected image areas included in the selected frame
  • the pixel value of one pixel loses the precision of the preset number of bits. In this embodiment, the loss of the 3-bit precision is taken as an example.
  • the pixel value is increased by 4, and then the right bit is shifted by 3 bits, and the number of pixels corresponding to each pixel value in the selected picture area is counted. Determining, in all the template images included in the first template picture set, the corresponding pixel number is greater than or equal to a first target pixel value of a preset proportion (for example, 1%) of the total number of pixels, it being understood that the first target pixel value is specific Includes multiple pixel values.
  • a preset proportion for example, 1%) of the total number of pixels
  • the pixel whose pixel value is the first target pixel value is regarded as the skin color
  • the pixel whose pixel value is the other pixel value is regarded as the non-skin color
  • the skin color value corresponding to the first target pixel value in the first skin color lookup table is set as the first value.
  • the skin color value corresponding to the pixel value other than the first target pixel value in the first skin color lookup table is set to the second value (ie, non-skin tone), thereby completing the determination of the first skin color lookup table.
  • the skin color value may be set for the skin color lookup table of each template image included in the first template picture set, and then the skin color lookup table of each template picture is superimposed to obtain
  • the first skin color lookup table may be: for each template image included in the first template picture set, determining that the corresponding pixel number is greater than or equal to a preset ratio (for example, 1%) of the total number of pixels, and The skin color value corresponding to the first target pixel value in the skin color lookup table of the template picture is set to a first value, and the skin color value corresponding to the pixel value other than the first target pixel value is set to a second value, and finally each template is
  • the skin color lookup table of the picture is superimposed, which may be a method of taking a union, that is, for the same pixel value, as long as the skin color value in the skin color lookup table of one template picture is the first value, the first template picture set is The corresponding skin color value in the first skin color lookup table is set to a first
  • the determination of the second skin color lookup table of the second template picture set can be completed in the same manner as described above.
  • the difference between the first template picture set and the second template picture set is that the number of template pictures included in the first template picture set is greater than the number of template pictures included in the second template picture set, that is, the coverage of the first template picture set. More broadly, skin color scaling can be performed on more pixel values than the second template image set.
  • the first template picture set may specifically include a local picture captured by the terminal under a specific camera parameter, and a picture on the Internet.
  • the second template picture set may specifically include only the local picture captured by the terminal under the specific picture parameter.
  • the specific photo parameters corresponding to the first template picture set may be multi-color temperature, automatic exposure (AE), automatic white balance (AWB), etc., in order to capture pictures at various color temperatures, without missing detection
  • the specific photo parameters corresponding to the second template picture set may be normal color temperature, AE, AWB, etc., in order to capture pictures under normal color temperature, without the principle of false detection.
  • the skin color area of the face is larger and representative than the other parts of the human body
  • the first template picture set and the second template picture set include
  • the template image may be a picture including at least a human face.
  • the terminal performs face recognition on the current frame picture. If the face is recognized, determining a skin color lookup table of the face area of the current frame picture according to the first skin color lookup table of the first template picture set.
  • determining, according to the first skin color lookup table, the skin color lookup table of the face region including: acquiring pixel values of each pixel in the face region, for each The pixel value of the pixel also loses the 3-bit precision.
  • the skin color value corresponding to the pixel value after the pixel precision is lost for each pixel in the face region is queried, if the skin color value corresponding to the first pixel value is the first A value, the pixel whose pixel value is the first pixel value after the loss of the 3-bit precision is the skin color, and the skin color value corresponding to the first pixel value in the skin color lookup table of the face region is also set to the first value, for the loss of 3 bits.
  • the corresponding skin color value is the pixel value of the second value
  • the corresponding skin color value in the skin color lookup table of the face area is also set to the second value, and the first skin color lookup table with wider coverage is used first.
  • the skin color lookup table of the area that is, the skin color area in the face area, can effectively detect non-skinned parts in the face area, such as eyes, lips, glasses, eyebrows, etc., and can also avoid deviation of face recognition ( For example, if the recognized face area is larger than the actual area, the skin color is falsely detected.
  • the terminal determines a skin color lookup table of the current frame picture according to the skin color lookup table of the face area and the second skin color lookup table of the second template picture set.
  • the skin color lookup table and the second skin color lookup table of the determined face region are determined by taking a union, and the skin color lookup table of the current frame image is determined, including: a skin color lookup table of the face region and the second In the skin color lookup table, if the skin color value corresponding to the same pixel value has a first value or a first value, the same pixel value may be set to the corresponding skin color value in the skin color lookup table of the current frame picture.
  • the skin color value corresponding to the same pixel value is the second value in the skin color lookup table and the second skin color lookup table of the face region, the same pixel value corresponds to the skin color lookup table of the current frame image
  • the skin color value is set to the second value, and the skin color lookup table of the current frame picture is determined by the first skin color lookup table, the second skin color lookup table, and the face recognition, which can greatly reduce the missed detection rate and the false detection rate.
  • the terminal may directly determine the skin color lookup table of the current frame picture according to the second skin color lookup table with a smaller coverage, including: acquiring the current frame.
  • the pixel value of each pixel in the picture is used to query the skin color value corresponding to the pixel value of each pixel in the current frame picture from the second skin color lookup table, and if the skin color value corresponding to the second pixel value is the first value, the pixel value
  • the pixel of the second pixel value is the skin color
  • the skin color value corresponding to the second pixel value in the skin color lookup table of the current frame picture is also set to the first value
  • the pixel value of the second value is The corresponding skin color value in the skin color lookup table of the current frame picture is also set to the second value.
  • the second skin color lookup table is determined according to the principle that the terminal does not detect by mistake, and the second skin color lookup table has better skin color detection capability when the photographing parameter is normal color temperature, AE, AWB. It is possible to make the skin color detecting ability still available in the case where the face is not recognized from the current frame picture.
  • the terminal determines, according to the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture, to determine the target skin color lookup table.
  • the terminal performs skin color detection on the current frame picture by using the target skin color lookup table.
  • the terminal acquires the pixel value of each pixel in the current frame image, and the pixel value of each pixel also loses 3 digits of precision. From the target skin color lookup table, the pixel value corresponding to each pixel is lost by 3 digits. The skin color value so that the skin color area of the current frame picture can be accurately detected.
  • the terminal may also interpolate each pixel in the current frame picture by using the target skin color lookup table to obtain a skin color detection result with continuous skin color values.
  • the tetrahedral linear interpolation is performed on each pixel in the current frame picture.
  • the steps of linear interpolation of the tetrahedron are as follows: 8 on the R/G/B three axes respectively.
  • the entire color space is divided into 32768 uniform small cubes (the cube side length is 8), and each uniform cube is divided into six tetrahedrons without any overlap except for the surface overlap according to a specific rule.
  • the skin color lookup table of the current frame picture the skin color values of the four vertices can be known, and the skin color value of the pixel can be inserted by linear interpolation.
  • the terminal performs direction filtering on the current frame image that is detected by the skin color to obtain a mask image.
  • the steering filter has two inputs, one is the input graph p, one is the steering graph I, and one has an output q.
  • p is an interpolation result
  • I is a grayscale image or a single-channel image of the input image (ie, the current frame image)
  • q is an optimized skin color detection result map.
  • the steering filtering is based on the local linear model.
  • the image is considered to be a two-dimensional function, and the analytical expression cannot be written. Therefore, it is assumed that the input (direction map) of the function and the output satisfy the linear relationship in a window as follows:
  • the calculation step of the output q can be as follows:
  • the function of fmean is the average value of window pixels with radius 20, and the role of e is to make the divisor not 0, e The smaller the value, the better.
  • the terminal performs beautification processing on the current frame picture to obtain a picture frame of the current frame that is beautified.
  • the terminal uses the mask image to merge the current frame image with the beautified current frame image.
  • is the mask image
  • image 1 is the current frame image
  • image 2 is the landscaping current frame image
  • result is the final processing result
  • the terminal acquires a current frame image of the video for detecting the skin color, and determines a skin color lookup table of the face region of the current frame image according to the first skin color lookup table of the first template image set, according to the skin color of the face region.
  • Finding a second skin color lookup table of the table and the second template picture set determining a skin color lookup table of the current frame picture, determining a skin color according to the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture
  • the target skin color lookup table with continuous values is used to detect the skin color of the current frame image by using the target skin color lookup table, and the current frame image detected by the skin color is guided and filtered to obtain a mask image, and the current frame image is beautified to obtain a beautified
  • the current frame image is merged with the current frame image and the beautified current frame image by using the mask image, so that when the skin color is detected, the continuity of the skin color detection result can be effectively ensured, and then the video is detected according to the continuous skin color detection result. It can eliminate visual jumps when making beauty treatments, providing good The beauty of video effects.
  • FIG. 5 is a schematic structural diagram of a skin color detecting device according to an embodiment of the present invention.
  • the skin color detecting device described in this embodiment includes:
  • the obtaining module 501 is configured to acquire a current frame picture of the video for performing skin color detection.
  • the determining module 502 is configured to perform face recognition on the current frame picture to determine a skin color lookup table of the current frame picture.
  • the determining module 502 identifies the human face, determining, according to the first skin color lookup table of the first template picture set, a skin color lookup table of the face area of the current frame picture, and then according to the skin color lookup table of the face area and the first A second skin color lookup table of the second template picture set, determining a skin color lookup table of the current frame picture.
  • the number of template pictures included in the first template picture set is greater than the number of template pictures included in the second template picture set.
  • the determining module 502 determines the skin color lookup table of the current frame picture according to the second skin color lookup table if the human face is not recognized.
  • the determining module 502 is further configured to determine the target skin color lookup table according to the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture.
  • the determining module 502 performs weighted averaging on the skin color lookup table of the current frame picture and the skin color lookup table accumulated by the historical frame picture before the current frame picture to obtain a target skin color lookup table.
  • the detecting module 503 is further configured to perform skin color detection on the current frame picture by using the target skin color lookup table.
  • the device further includes:
  • the filtering module 504 is configured to perform a guide filtering on the current frame image that is detected by the skin color to obtain a mask image.
  • the beautification module 505 is configured to beautify the current frame picture to obtain a beautified current frame picture.
  • the fusion module 506 is configured to fuse the current frame image and the beautified current frame image by using the mask image.
  • the terminal acquires a current frame picture of the video for detecting the skin color, performs face recognition on the current frame picture, determines a skin color lookup table of the current frame picture, and performs a skin color lookup table according to the current frame picture and a skin color lookup table accumulated by the history frame picture before the current frame picture, determining a target skin color lookup table with continuous skin color values, thereby performing skin color detection on the current frame picture by using the target skin color lookup table, thereby performing skin color detection on the video , can effectively ensure the continuity of skin color detection results.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

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

Abstract

Selon un mode de réalisation, la présente invention concerne un dispositif et un procédé de détection de la couleur de peau, et un terminal. Le procédé consiste : à acquérir une image de trame actuelle d'une vidéo où une détection de la couleur de peau doit être réalisée ; à réaliser une reconnaissance faciale sur l'image de trame actuelle en vue de déterminer une table de consultation de la couleur de peau de l'image de trame actuelle ; conformément à la table de consultation de la couleur de peau de l'image de trame actuelle et des tables de consultation de la couleur de peau accumulées par des images de trame historiques avant l'image de trame actuelle, à déterminer une table de consultation de la couleur de peau cible ; et à utiliser la table de consultation de la couleur de peau cible en vue de réaliser une détection de la couleur de peau sur l'image de trame actuelle. Le mode de réalisation de la présente invention permet, lorsque la détection de la couleur de peau est réalisée sur une vidéo, d'assurer efficacement la continuité des résultats de détection de la couleur de peau.
PCT/CN2017/099869 2016-11-02 2017-08-31 Dispositif et procédé de détection de couleur de peau, et terminal WO2018082388A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610950691.0 2016-11-02
CN201610950691.0A CN106570472B (zh) 2016-11-02 2016-11-02 一种肤色检测方法、装置及终端

Publications (1)

Publication Number Publication Date
WO2018082388A1 true WO2018082388A1 (fr) 2018-05-11

Family

ID=58534924

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099869 WO2018082388A1 (fr) 2016-11-02 2017-08-31 Dispositif et procédé de détection de couleur de peau, et terminal

Country Status (2)

Country Link
CN (1) CN106570472B (fr)
WO (1) WO2018082388A1 (fr)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124862A (zh) * 2019-12-24 2020-05-08 北京安兔兔科技有限公司 智能设备性能测试方法、装置及智能设备
CN111815653A (zh) * 2020-07-08 2020-10-23 深圳市梦网视讯有限公司 一种人脸与身体肤色区域的分割方法、系统和设备

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106570472B (zh) * 2016-11-02 2019-11-05 华为技术有限公司 一种肤色检测方法、装置及终端
CN106570909B (zh) * 2016-11-02 2020-01-17 华为技术有限公司 一种肤色检测方法、装置及终端
CN107424117B (zh) * 2017-07-17 2021-03-30 Oppo广东移动通信有限公司 图像美颜方法、装置、计算机可读存储介质和计算机设备
CN108765503B (zh) * 2018-05-21 2020-11-13 深圳市梦网科技发展有限公司 一种肤色检测方法、装置及终端
WO2020015147A1 (fr) * 2018-07-16 2020-01-23 华为技术有限公司 Procédé de détection de peau et dispositif électronique
CN109089158B (zh) * 2018-07-24 2020-04-28 四川长虹电器股份有限公司 用于智能电视的人脸画质参数处理系统及其实现方法
CN111861872B (zh) * 2020-07-20 2024-07-16 广州市百果园信息技术有限公司 图像换脸方法、视频换脸方法、装置、设备和存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040017930A1 (en) * 2002-07-19 2004-01-29 Samsung Electronics Co., Ltd. System and method for detecting and tracking a plurality of faces in real time by integrating visual ques
CN102968623A (zh) * 2012-12-07 2013-03-13 上海电机学院 肤色检测系统及方法
CN103106386A (zh) * 2011-11-10 2013-05-15 华为技术有限公司 动态自适应肤色分割方法和装置
CN103455790A (zh) * 2013-06-24 2013-12-18 厦门美图网科技有限公司 一种基于肤色模型的皮肤识别方法
CN104392211A (zh) * 2014-11-12 2015-03-04 厦门美图网科技有限公司 一种基于显著性检测的皮肤识别方法
CN104598914A (zh) * 2013-10-31 2015-05-06 展讯通信(天津)有限公司 一种肤色检测的方法及装置
CN106570472A (zh) * 2016-11-02 2017-04-19 华为技术有限公司 一种肤色检测方法、装置及终端

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338377A (ja) * 2005-06-02 2006-12-14 Fujifilm Holdings Corp 画像補正方法および装置並びにプログラム
CN101299242B (zh) * 2008-06-13 2010-08-25 腾讯科技(深圳)有限公司 一种人体肤色检测中阈值的确定方法及装置
CN101448085B (zh) * 2008-12-26 2013-08-21 北京中星微电子有限公司 一种支持人脸检测的摄像处理方法和系统
CN105224917B (zh) * 2015-09-10 2019-06-21 成都品果科技有限公司 一种利用颜色空间创建肤色概率图的方法和系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040017930A1 (en) * 2002-07-19 2004-01-29 Samsung Electronics Co., Ltd. System and method for detecting and tracking a plurality of faces in real time by integrating visual ques
CN103106386A (zh) * 2011-11-10 2013-05-15 华为技术有限公司 动态自适应肤色分割方法和装置
CN102968623A (zh) * 2012-12-07 2013-03-13 上海电机学院 肤色检测系统及方法
CN103455790A (zh) * 2013-06-24 2013-12-18 厦门美图网科技有限公司 一种基于肤色模型的皮肤识别方法
CN104598914A (zh) * 2013-10-31 2015-05-06 展讯通信(天津)有限公司 一种肤色检测的方法及装置
CN104392211A (zh) * 2014-11-12 2015-03-04 厦门美图网科技有限公司 一种基于显著性检测的皮肤识别方法
CN106570472A (zh) * 2016-11-02 2017-04-19 华为技术有限公司 一种肤色检测方法、装置及终端

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124862A (zh) * 2019-12-24 2020-05-08 北京安兔兔科技有限公司 智能设备性能测试方法、装置及智能设备
CN111124862B (zh) * 2019-12-24 2024-01-30 北京安兔兔科技有限公司 智能设备性能测试方法、装置及智能设备
CN111815653A (zh) * 2020-07-08 2020-10-23 深圳市梦网视讯有限公司 一种人脸与身体肤色区域的分割方法、系统和设备
CN111815653B (zh) * 2020-07-08 2024-01-30 深圳市梦网视讯有限公司 一种人脸与身体肤色区域的分割方法、系统和设备

Also Published As

Publication number Publication date
CN106570472B (zh) 2019-11-05
CN106570472A (zh) 2017-04-19

Similar Documents

Publication Publication Date Title
WO2018082388A1 (fr) Dispositif et procédé de détection de couleur de peau, et terminal
WO2018082389A1 (fr) Procédé et appareil de détection de couleur de peau, et terminal
JP7027537B2 (ja) 画像処理方法および装置、電子機器、ならびにコンピュータ可読記憶媒体
Emberton et al. Underwater image and video dehazing with pure haze region segmentation
US9569854B2 (en) Image processing method and apparatus
CN107771336B (zh) 基于颜色分布的图像中的特征检测和掩模
Lai et al. Single-image dehazing via optimal transmission map under scene priors
WO2021022983A1 (fr) Appareil et procédé de traitement d'images, dispositif électronique et support d'enregistrement lisible par ordinateur
CN105243371A (zh) 一种人脸美颜程度的检测方法、系统及拍摄终端
WO2018068420A1 (fr) Procédé et appareil de traitement d'images
CN111402170B (zh) 图像增强方法、装置、终端及计算机可读存储介质
US20140079319A1 (en) Methods for enhancing images and apparatuses using the same
CN106981078B (zh) 视线校正方法、装置、智能会议终端及存储介质
CN110781770B (zh) 基于人脸识别的活体检测方法、装置及设备
CN107622480A (zh) 一种Kinect深度图像增强方法
CN113301320B (zh) 图像信息处理方法、装置和电子设备
CN111127476A (zh) 一种图像处理方法、装置、设备及存储介质
CN108447068A (zh) 三元图自动生成方法及利用该三元图的前景提取方法
WO2017173578A1 (fr) Procédé et dispositif d'amélioration d'image
US12067658B1 (en) Method, apparatus and device for automatically making up portrait lips, storage medium and program product
CN107564085B (zh) 图像扭曲处理方法、装置、计算设备及计算机存储介质
KR20110021500A (ko) 이동객체의 실시간 추적과 거리 측정 방법 및 그 장치
CN114372931A (zh) 一种目标对象虚化方法、装置、存储介质及电子设备
US20190205689A1 (en) Method and device for processing image, electronic device and medium
JP6754717B2 (ja) 物体候補領域推定装置、物体候補領域推定方法、及び物体候補領域推定プログラム

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: 17868191

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17868191

Country of ref document: EP

Kind code of ref document: A1