WO2020062532A1 - 人脸图像的处理方法及装置、电子设备和存储介质 - Google Patents

人脸图像的处理方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2020062532A1
WO2020062532A1 PCT/CN2018/117498 CN2018117498W WO2020062532A1 WO 2020062532 A1 WO2020062532 A1 WO 2020062532A1 CN 2018117498 W CN2018117498 W CN 2018117498W WO 2020062532 A1 WO2020062532 A1 WO 2020062532A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
apple muscle
vector
determining
face image
Prior art date
Application number
PCT/CN2018/117498
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 SG11201913734TA priority Critical patent/SG11201913734TA/en
Priority to JP2019571734A priority patent/JP6923682B2/ja
Priority to US16/729,427 priority patent/US11341768B2/en
Publication of WO2020062532A1 publication Critical patent/WO2020062532A1/zh
Priority to US17/696,223 priority patent/US11734804B2/en
Priority to US17/696,240 priority patent/US11741583B2/en

Links

Images

Classifications

    • G06T5/77
    • 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/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • G06T5/70
    • 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
    • G06V10/56Extraction of image or video features relating to colour
    • 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/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • 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
    • G06T2207/30201Face

Definitions

  • the present disclosure relates to the field of computer vision technology, and in particular, to a method and an apparatus for processing a face image, an electronic device, and a storage medium.
  • the plump apple muscles soften the lines of the face and disperse the high part of the cheekbones, making people more affinity when they laugh. How to accurately fill the apple muscles in the face image to make the apple muscles in the face image full and natural is an urgent problem.
  • the embodiment of the present disclosure provides a technical solution for processing a face image.
  • a method for processing a face image including: obtaining a face key point and a face deflection angle in the face image; and according to the face key point and the person Face deflection angle to determine the apple muscle center in the face image; determine the apple muscle area in the face image according to the key points of the face and the apple muscle center; and color the apple muscle area Fill processing.
  • determining the apple muscle center in the face image according to the face key point and the face deflection angle includes: performing interpolation processing on the face key point to determine The estimated position of the apple muscle center in the face image; and the estimated position of the apple muscle center is adjusted according to the face deflection angle to obtain the apple muscle center in the face image.
  • determining the apple muscle region in the face image according to the key points of the face and the apple muscle center includes: connecting the key points of the face to obtain the person. A polygon corresponding to a key point of the face; determining the largest circle in the polygon with the center of the apple muscle as a circle center as the outer contour circle of the apple muscle in the face image; determining the outer contour circle based on the outer contour circle of the apple muscle The apple muscle area in the face image is described.
  • determining an apple muscle area in the face image according to the apple muscle outer contour circle includes: using a contour line of the face in the human face image to the apple muscle outside The contour circle is adjusted to obtain an apple muscle region in the face image.
  • adjusting an outer contour circle of the apple muscle by using a contour line of a face in the face image to obtain an apple muscle region in the face image includes: Sampling a face contour line in a face image to obtain sampling points on the face contour line; sampling the outer contour circle of the apple muscle to obtain sampling points on the outer contour circle of the apple muscle; and Curve fitting is performed on the sampling points on the contour line of the face and the sampling points on the outer contour circle of the apple muscle to obtain the apple muscle region in the face image.
  • performing color filling processing on the apple muscle region includes: separately determining a first target pixel corresponding to each pixel in the apple muscle region, wherein the first target corresponding to the pixel A pixel is on a line connecting the center of the apple muscle with the pixel; and the pixel value of each pixel is updated to the pixel value of the corresponding first target pixel, respectively.
  • respectively determining the first target pixels corresponding to each pixel in the apple muscle region includes: determining the first target pixels corresponding to each pixel in the apple muscle region according to the apple muscle filling strength coefficient. A target pixel.
  • separately determining the first target pixels corresponding to each pixel in the apple muscle region includes: using a downward convex function with a second derivative constant greater than 0 to separately determine the A first target pixel corresponding to each pixel.
  • performing color filling processing on the apple muscle region includes: determining a first reference point in the face image; and a vector that points the center of the apple muscle to the first reference point. Determined as the first reference vector; and according to the first reference vector, the second target pixel corresponding to each pixel in the apple muscle region is determined, wherein the second target pixel corresponding to the pixel points to the vector of the pixel The direction is the same as that of the first reference vector; the pixel values of the respective pixels are updated to the pixel values of the corresponding second target pixels, respectively.
  • the distance between the first reference point and the key point of the nose tip is greater than the distance between the center of the apple muscle and the key point of the nose tip.
  • determining the second target pixels corresponding to each pixel in the apple muscle region according to the first reference vector includes: determining the center between the apple muscle and the apple muscle region. A first distance between the first pixels of; a first coefficient is determined according to a radius of an outer contour circle of the apple muscle, a modulus of the first distance, and the first reference vector; and a first coefficient is determined according to the first pixel, the first A coefficient and the first reference vector determine a second target pixel corresponding to the first pixel.
  • determining a first coefficient according to a radius of an apple muscle outer contour circle, a modulus of the first distance, and the reference vector includes: calculating a square of a radius of the apple muscle outer contour circle A first difference from the square of the first distance; adding the first difference to the square of the modulus of the first reference vector to obtain a first sum; calculating the first difference and the The ratio of the first sum is obtained to obtain the first coefficient.
  • determining the second target pixel corresponding to the first pixel according to the first pixel, the first coefficient, and the first reference vector includes: pointing the first reference pixel to Determining a vector of the first pixel as a first pixel vector; calculating a first product of the first coefficient and the first reference vector; calculating a difference between the first pixel vector and the first product to obtain the A second target pixel vector corresponding to the first pixel; and a second target pixel corresponding to the first pixel is determined according to a position of the first reference pixel and a second target pixel vector corresponding to the first pixel.
  • performing color filling processing on the apple muscle region includes: determining a second reference point in the face image; and a vector that points the center of the apple muscle to the second reference point. Determined as the second reference vector; and according to the second reference vector, a third target pixel corresponding to each pixel in the apple muscle region is determined, wherein the third target pixel corresponding to the pixel points to the vector of the pixel The direction is the same as that of the second reference vector; the pixel values of the respective pixels are updated to the pixel values of the corresponding third target pixels, respectively.
  • the second reference point is on a line connecting the center of the apple muscle with a key point of the lower eyelid.
  • determining a third target pixel corresponding to each pixel in the apple muscle region according to the second reference vector includes: determining a difference between the apple muscle center and the apple muscle region. A second distance between the second pixels of the pixel; determining a second coefficient according to the radius of the outer contour circle of the apple muscle, the second distance, and the modulus of the second reference vector; and according to the second pixel, the first pixel, A second coefficient and the second reference vector determine a third target pixel corresponding to the second pixel.
  • determining a second coefficient according to a radius of an apple muscle outer contour circle, a modulus of the second distance, and the second reference vector includes: calculating a radius of the apple muscle outer contour circle A second difference between the square of the second distance and the square of the second distance; adding the second difference to the square of the modulus of the second reference vector to obtain a second sum; calculating the second difference And a ratio of the second sum to obtain the second coefficient.
  • determining a third target pixel corresponding to the second pixel according to the second pixel, the second coefficient, and the second reference vector includes: pointing the second reference pixel to Determining a vector of the second pixel as a second pixel vector; calculating a second product of the second coefficient and the second reference vector; calculating a difference between the second pixel vector and the second product to obtain the second pixel vector A third target pixel vector corresponding to the second pixel; and a third target pixel corresponding to the second pixel is determined according to a position of the second reference pixel and a third target pixel vector corresponding to the second pixel.
  • performing color filling processing on the apple muscle region includes: separately determining a first target pixel corresponding to each pixel in the apple muscle region, wherein the first target corresponding to the pixel A pixel is on a line connecting the center of the apple muscle and the pixel; updating the pixel value of each pixel to the pixel value of a corresponding first target pixel; determining a first reference point in the face image, The distance between the first reference point and the key point of the nose is greater than the distance between the center of the apple muscle and the key point of the nose; the vector of the apple muscle center pointing to the first reference point is determined as the first reference vector; The first reference vector determines a second target pixel corresponding to each pixel in the apple muscle region, wherein a second target pixel corresponding to the pixel points to a vector of the pixel and the first reference vector The directions are the same; the pixel values of the respective pixels are updated to the pixel values of the corresponding second target pixels; a second reference point in the face image is determined
  • a device for processing a face image including: an obtaining module configured to obtain a face key point and a face deflection angle in the face image; a first determining module, configured To determine the apple muscle center in the face image according to the face key point and the face deflection angle; a second determination module configured to determine according to the face key point and the apple muscle center An apple muscle region in the face image; a filling module configured to perform color filling processing on the apple muscle region.
  • the first determination module includes: a first determination submodule configured to perform interpolation processing on key points of the face to determine an estimated position of an apple muscle center in the face image
  • An adjustment submodule configured to adjust an estimated position of the apple muscle center according to the face deflection angle to obtain the apple muscle center in the face image.
  • the second determination module includes: a connected sub-module configured to connect the key points of the face to obtain a polygon corresponding to the key points of the face; a second determination sub-module configured to In order to determine the largest circle with the center of the apple muscle in the polygon as the circle of the outer contour of the apple muscle in the face image; a third determination submodule configured to be based on the circle of the outer contour of the apple muscle, Determining an apple muscle region in the face image.
  • the third determining sub-module is configured to adjust the outer contour circle of the apple muscle by using a contour line of the face in the face image to obtain the Apple muscle area.
  • the third determining submodule includes: a first sampling unit configured to sample a face contour line in the face image to obtain a sample on the face contour line Points; a second sampling unit configured to sample the outer contour circle of the apple muscle to obtain sampling points on the outer contour circle of the apple muscle; a curve fitting unit configured to sample the contour line of the face The points and the sampling points on the outer contour circle of the apple muscle are subjected to curve fitting to obtain an apple muscle region in the face image.
  • the filling module includes: a fourth determining submodule configured to respectively determine a first target pixel corresponding to each pixel in the apple muscle region, wherein the first corresponding pixel to the pixel The target pixel is on the line connecting the center of the apple muscle with the pixel; a first update submodule is configured to update the pixel value of each pixel to the pixel value of the corresponding first target pixel, respectively.
  • the fourth determining sub-module is configured to: according to an apple muscle filling strength coefficient, respectively determine a first target pixel corresponding to each pixel in the apple muscle region.
  • the fourth determination sub-module is configured to: determine a first target pixel corresponding to each pixel in the apple muscle region by using a convex function with a second derivative constant greater than 0.
  • the filling module includes a fifth determination sub-module configured to determine a first reference point in the face image, and a sixth determination sub-module configured to center the apple muscle A vector pointing to the first reference point is determined as a first reference vector; a seventh determination submodule is configured to determine, according to the first reference vector, a second target pixel corresponding to each pixel in the apple muscle region, Wherein, the vector of the second target pixel corresponding to the pixel that points to the pixel is the same as the direction of the first reference vector; the second update submodule is configured to update the pixel value of each pixel to the corresponding first Pixel values of two target pixels.
  • the distance between the first reference point and the key point of the nose tip is greater than the distance between the center of the apple muscle and the key point of the nose tip.
  • the seventh determining submodule includes: a first determining unit configured to determine a first distance between the apple muscle center and a first pixel in the apple muscle region; A second determining unit is configured to determine a first coefficient according to a radius of an outer contour circle of the apple muscle, a modulus of the first distance, and the first reference vector; a third determining unit is configured to determine a first coefficient according to the first pixel, the The first coefficient and the first reference vector are used to determine a second target pixel corresponding to the first pixel.
  • the second determination unit includes: a first calculation subunit configured to calculate a first difference between a square of a radius of the outer contour circle of the apple muscle and a square of the first distance A second calculation subunit configured to add the first difference and the square of the modulus of the first reference vector to obtain a first sum; a third calculation subunit configured to calculate the first difference A ratio of the value to the first sum to obtain the first coefficient.
  • the third determining unit includes: a first determining subunit configured to determine a vector of a first reference pixel pointing to the first pixel as a first pixel vector; a fourth calculating subunit Is configured to calculate a first product of the first coefficient and the first reference vector; a fifth calculation subunit is configured to calculate a difference between the first pixel vector and the first product to obtain the first pixel A corresponding second target pixel vector; a second determining subunit configured to determine a second corresponding to the first pixel according to a position of the first reference pixel and a second target pixel vector corresponding to the first pixel The target pixel.
  • the filling module includes: an eighth determining sub-module configured to determine a second reference point in the face image; a ninth determining sub-module configured to center the apple muscle A vector pointing to the second reference point is determined as a second reference vector; a tenth determination sub-module is configured to determine a third target pixel corresponding to each pixel in the apple muscle region according to the second reference vector, Wherein, the vector of the third target pixel corresponding to the pixel that points to the pixel is the same as the direction of the second reference vector; the third update submodule is configured to update the pixel value of each pixel to the corresponding first Pixel values of three target pixels.
  • the second reference point is on a line connecting the center of the apple muscle with a key point of the lower eyelid.
  • the tenth determination sub-module includes: a fourth determination unit configured to determine a second distance between the apple muscle center and a second pixel in the apple muscle region; A five determination unit is configured to determine a second coefficient according to a radius of the outer contour circle of the apple muscle, a modulus of the second distance, and the second reference vector; and a sixth determination unit is configured to according to the second pixel, the The second coefficient and the second reference vector determine a third target pixel corresponding to the second pixel.
  • the fifth determination unit includes: a sixth calculation subunit configured to calculate a second difference between a square of a radius of the outer contour circle of the apple muscle and a square of the second distance A seventh calculation sub-unit configured to add the second difference and the square of the modulus of the second reference vector to obtain a second sum; an eighth calculation sub-unit configured to calculate the second difference A ratio of the value to the second sum to obtain the second coefficient.
  • the sixth determining unit includes: a third determining subunit configured to determine a vector in which a second reference pixel points to the second pixel as a second pixel vector; a ninth calculating subunit Is configured to calculate a second product of the second coefficient and the second reference vector; a tenth calculation subunit is configured to calculate a difference between the second pixel vector and the second product to obtain the second pixel A corresponding third target pixel vector; a fourth determining subunit configured to determine a third corresponding to the second pixel according to a position of the second reference pixel and a third target pixel vector corresponding to the second pixel The target pixel.
  • the filling module includes: a fourth determining submodule configured to respectively determine a first target pixel corresponding to each pixel in the apple muscle region, wherein the first corresponding pixel to the pixel The target pixel is on the line connecting the center of the apple muscle with the pixel; a first update submodule configured to update the pixel value of each pixel to the corresponding pixel value of the first target pixel; a fifth determiner A module configured to determine a first reference point in the face image, wherein a distance between the first reference point and a key point of the nose tip is greater than a distance between the center of the apple muscle and a key point of the nose tip; a sixth determining submodule, Configured to determine a vector of the apple muscle center pointing to the first reference point as a first reference vector; a seventh determination submodule configured to separately determine each of the apple muscle regions according to the first reference vector A second target pixel corresponding to the pixel, wherein the vector of the second target pixel corresponding to the pixel
  • an electronic device including: a processor and a memory for storing processor-executable instructions; wherein, when the processor is used to run the computer program, execute the foregoing person Face image processing method.
  • a computer-readable storage medium having computer program instructions stored thereon, the computer program instructions realizing the above-mentioned method for processing a face image when executed by a processor.
  • the apple muscle center in the face image is determined according to the face key point and the face deflection angle by acquiring the face key points and the face deflection angle in the face image. And the apple muscle center, determine the apple muscle area in the face image, and perform color filling processing on the apple muscle area, thereby accurately positioning the apple muscle area, and perform apple muscle filling processing based on the accurately positioned apple muscle area to make the filling The effect is more natural.
  • FIG. 1 is a schematic flowchart of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 2a shows a schematic diagram of a face image before color filling processing is performed on an apple muscle region in a face image processing method according to an embodiment of the present disclosure.
  • FIG. 2b is a schematic diagram of a face image after color filling processing is performed on an apple muscle region in a face image processing method according to an embodiment of the present disclosure.
  • FIG. 3 illustrates an exemplary flowchart of step S12 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 4 illustrates an exemplary flowchart of step S13 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 5 shows a schematic diagram of an outer contour circle of an apple muscle in a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 6 shows an example of adjusting an outer contour circle of an apple muscle by using a face contour line in the face image in a method for processing a face image according to an embodiment of the present disclosure to obtain an apple muscle region in the face image Schematic flow diagram.
  • FIG. 7 illustrates an exemplary flowchart of step S14 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of step S141 in a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 9 illustrates an exemplary flowchart of step S14 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 10 illustrates an exemplary flowchart of step S145 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 11 illustrates an apple muscle center O, a first reference point M1, a first pixel P2, a second target pixel P2 ′ corresponding to the first pixel, and an apple muscle outer contour circle in a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 12 shows an exemplary flowchart of step S1452 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 13 shows an exemplary flowchart of step S1453 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 14 shows an exemplary flowchart of step S14 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 15 illustrates an exemplary flowchart of step S149 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 16 illustrates an apple muscle center O, a second reference point M2, a second pixel P3, a third target pixel P3 ′ corresponding to the second pixel, and an apple muscle outer contour circle in a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 17 shows an exemplary flowchart of step S1492 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 18 shows an exemplary flowchart of step S1493 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 19 illustrates an exemplary flowchart of step S14 of a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 20 is a schematic structural diagram of a face image processing apparatus according to an embodiment of the present disclosure.
  • FIG. 21 illustrates an exemplary structure diagram of a face image processing apparatus according to an embodiment of the present disclosure.
  • Fig. 22 is a schematic structural diagram of an electronic device 800 according to an exemplary embodiment.
  • Fig. 23 is a schematic structural diagram of an electronic device 1900 according to an exemplary embodiment.
  • exemplary means “serving as an example, embodiment, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
  • FIG. 1 is a schematic flowchart of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 1, the method includes steps S11 to S14.
  • step S11 the key points of the face and the deflection angle of the face are acquired.
  • the face key points may include at least one of an eye key point, a nose key point, a mouth key point, a face key point, and a face contour key point.
  • the deflection angle of the human face may represent the deflection angle of the human face relative to the front face.
  • the face deflection angle may be 0; when the face is deflected to the left relative to the front face, the face deflection angle may be equal to the angle between the deflected face and the front face; when When the human face is deflected to the right relative to the positive face, the absolute value of the human face deflection angle may be equal to the angle between the deflected human face and the positive face, and the human face deflection angle is a negative number.
  • step S12 the apple muscle center in the face image is determined according to the key points of the face and the face deflection angle.
  • the apple muscle center in the face image may be determined according to the eye key point, the nose key point, and the face key point among the key points of the face, and the face deflection angle.
  • the embodiment of the present disclosure determines the apple muscle center in the face image by combining the key points of the face and the deflection angle of the face, which can improve the accuracy of the determined apple muscle center, thereby improving the accuracy of the determined apple muscle region.
  • the apple muscle can also be referred to as the "risorius", which refers to an inverted triangle-shaped tissue at two centimeters below the eyes. When smiling or making an expression, it will swell slightly due to the compression of facial muscles. It looks like a round and shiny apple, also known as "Apple Muscle.”
  • step S13 the apple muscle region in the face image is determined according to the key points of the face and the apple muscle center.
  • the apple muscle region in the face image may be determined according to the key points of the human face of the apple muscle, so as to reduce the calculation amount for determining the apple muscle region.
  • step S14 a color filling process is performed on the apple muscle area.
  • one or both of the circular convex lens deformation method and the circular liquefaction deformation method can be used to color fill the apple muscle area to achieve fullness of the apple muscle and highlight the contour line of the apple muscle. Effect.
  • FIG. 2a shows a schematic diagram of a face image before color filling processing is performed on an apple muscle region in a face image processing method according to an embodiment of the present disclosure.
  • FIG. 2b is a schematic diagram of a face image after color filling processing is performed on an apple muscle region in a face image processing method according to an embodiment of the present disclosure.
  • the embodiment of the present disclosure determines the apple muscle center in the face image by acquiring the face key points and the face deflection angle in the face image, and determines the apple muscle center in the face image according to the face key points and the face deflection angle. Center, determine the apple muscle area in the face image, and color fill the apple muscle area, thereby accurately positioning the apple muscle area, and perform apple muscle filling processing based on the accurately positioned apple muscle area to make the filling effect more natural .
  • FIG. 3 illustrates an exemplary flowchart of step S12 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 3, step 12 may include steps S121 and S122.
  • step S121 the key points of the face are interpolated to determine the estimated position of the apple muscle center in the face image.
  • the center of the apple muscle is usually located 2 cm to 3 cm below the eye.
  • the estimated position of the apple muscle center in the face image can be determined. For example, an eye key point, a nose key point, and a face key point can be used for interpolation to obtain the estimated position of the apple muscle center in the face image.
  • step S122 the estimated position of the apple muscle center is adjusted according to the deflection angle of the face to obtain the apple muscle center in the face image.
  • the estimated position of the apple muscle center may not be adjusted, and the estimated position of the apple muscle center may be directly used as the apple muscle center in the face image. If the face deflection angle is not 0, the estimated position of the apple muscle center is adjusted according to the face deflection angle to obtain the apple muscle center in the face image.
  • FIG. 4 illustrates an exemplary flowchart of step S13 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 4, step 13 may include steps S131 to S133.
  • step S131 the key points of the face are connected to obtain a polygon corresponding to the key points of the face.
  • part of the facial contour key points, part of the nose key points, and part of the eye key points among the key points of the face can be connected to obtain the polygons corresponding to the key points of the face.
  • the key point of the eye may refer to the key point of the lower eyelid.
  • step S132 the largest circle with the center of the apple muscle in the polygon as the center is determined as the circle of the outer contour of the apple muscle in the face image.
  • the center of the apple muscle is taken as the center of the circle, and the circle is drawn with the polygon as the boundary to obtain the apple muscle outer contour circle in the face image.
  • FIG. 5 is a schematic diagram showing a contour circle of an apple muscle in a method for processing a face image according to an embodiment of the present disclosure.
  • the apple muscle outer contour circle in the face image includes C 1 and C 2 .
  • step S133 the apple muscle area in the face image is determined according to the outer contour of the apple muscle.
  • determining the apple muscle region in the face image according to the apple muscle outer contour circle includes: determining the region where the apple muscle outer contour circle is located as the apple muscle region in the face image.
  • determining the apple muscle area in the face image according to the outer contour circle of the apple muscle includes: adjusting the outer contour circle of the apple muscle by using the contour line of the face in the face image, The apple muscle area in the face image is obtained.
  • the contour line of the apple muscle may be used to constrain the outer contour circle of the apple muscle to limit the apple muscle area to the facial contour range.
  • the contour line of the outer contour of the apple muscle can be adjusted by using the contour lines of the face below the eyes and above the corners of the mouth to obtain the apple muscle region in the face image.
  • FIG. 6 shows an example of adjusting an outer contour circle of an apple muscle by using a face contour line in the face image in a method for processing a face image according to an embodiment of the present disclosure to obtain an apple muscle region in the face image Schematic flow diagram.
  • adjusting the outer contour circle of the apple muscle by using the contour lines of the face in the face image to obtain the apple muscle region in the face image may include steps S1331 to S1333.
  • step S1331 the facial contour lines in the face image are sampled to obtain sampling points on the facial contour lines.
  • the contour lines of the face below the eyes and above the corners of the mouth may be sampled to obtain the sampling points on the contour lines of the face.
  • step S1332 the outer contour circle of the apple muscle is sampled to obtain sampling points on the outer contour circle of the apple muscle.
  • step S1333 curve fitting is performed on the sampling points on the contour line of the face and the sampling points on the outer contour circle of the apple muscle to obtain the apple muscle region in the face image.
  • the Catmull-Rom fitting method can be used to curve fit the sampling points on the contour line of the face and the sampling points on the contour circle of the apple muscle to obtain the apple in the face image. Muscle area.
  • FIG. 7 illustrates an exemplary flowchart of step S14 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 7, step S14 may include steps S141 and S142.
  • step S141 a first target pixel corresponding to each pixel in the apple muscle region is determined, wherein the first target pixel corresponding to the pixel is on a line connecting the center of the apple muscle with the pixel.
  • the determining the first target pixels corresponding to each pixel in the apple muscle region includes: determining the first target corresponding to each pixel in the apple muscle region according to the apple muscle filling strength coefficient. Pixels.
  • the apple muscle filling strength coefficient can be customized by the user. Apple muscle filling strength coefficient indicates the degree of apple muscle deformation. For example, the larger the coefficient of filling strength of the apple muscle, the greater the degree of deformation of the apple muscle; the smaller the coefficient of filling strength of the apple muscle, the less the degree of deformation of the apple muscle.
  • respectively determining the first target pixels corresponding to each pixel in the apple muscle region includes: using a downward convex function with a second derivative constant greater than 0 to determine each pixel in the apple muscle region correspondingly.
  • the range of deformation can be limited to the apple muscle area, and the changes in the apple muscle area are continuous.
  • the effect of diffusing pixels in the apple muscle region along the radial direction can be achieved.
  • FIG. 8 is a schematic diagram of step S141 in a method for processing a face image according to an embodiment of the present disclosure. 8, takes the pixel so the pixels P 1 P 1 'of the pixel values, can reach the pixel P 1' moves to the effect of the pixel P 1.
  • step S142 the pixel value of each pixel is updated to the pixel value of the corresponding first target pixel.
  • the pixel P 1 updates the value of the pixel is the pixel P 1 'of the pixel value, i.e., the pixel P 1' of the pixel value as the pixel value of the pixel P 1.
  • Figs. 7 and 8 use a circular convex lens deformation method to change the density distribution of pixels in the apple muscle area.
  • the deformation effect is that the pixels in the center of the apple muscle area diffuse outward in a radial direction, thereby filling the apple muscle , To achieve the full effect of apple muscle.
  • the deformation in this example is constrained by the apple muscle area and the apple muscle center.
  • FIG. 9 illustrates an exemplary flowchart of step S14 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 9, step S14 may include steps S143 to S146.
  • step S143 a first reference point in the face image is determined.
  • the distance between the first reference point and the key point of the nose tip is greater than the distance between the center of the apple muscle and the key point of the nose tip. That is, in this implementation, the first reference point is closer to the face contour than the center of the apple muscle.
  • the first reference point is outside the apple muscle region.
  • the distance between the center of the apple muscle and the first reference point is the radius of the outer contour circle of the apple muscle. Times.
  • the first reference point in the face image is M 1 .
  • step S144 the vector of the apple muscle center pointing to the first reference point is determined as the first reference vector.
  • the apple muscle center is O
  • a vector indicating that the first reference pixel points to the center of the apple muscle, and the first reference point is M 1
  • a vector indicating that the first reference pixel points to the first reference point then the first reference vector can be expressed as
  • the first reference pixel may be an origin of a coordinate axis.
  • step S145 a second target pixel corresponding to each pixel in the apple muscle region is determined according to the first reference vector, wherein the vector corresponding to the pixel and the second target pixel pointing to the pixel is the same as the direction of the first reference vector.
  • step S146 the pixel value of each pixel is updated to the pixel value of the corresponding second target pixel.
  • Apple muscle region corresponding to the pixel P 2 of the second target pixel is a pixel P 2 '
  • P may be the pixel value of the pixel 2 of the pixel P 2 is updated to' the pixel value, i.e. the pixel value of the pixel P 2 'as The pixel value of the pixel P 2 .
  • the example shown in Figure 9 uses a circular liquefaction deformation method to change the density distribution of pixels in the apple muscle area.
  • the deformation effect is that the pixels in the apple muscle area diffuse along a uniform direction, thereby filling the apple muscle and highlighting the contour of the apple muscle. Line to achieve full and three-dimensional effects of apple muscle.
  • the deformation range in the example shown in FIG. 9 is determined by the joint constraint of the apple muscle region and the apple muscle center.
  • FIG. 10 illustrates an exemplary flowchart of step S145 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 10, step S145 may include steps S1451 to S1453.
  • step S1451 a first distance between the center of the apple muscle and the first pixel in the apple muscle region is determined.
  • the apple muscle center is O
  • the first pixel in the apple muscle area is P 2 .
  • a vector indicating that the first reference pixel points to the center of the apple muscle A vector indicating that the first reference pixel points to the first pixel, then the first distance between the center of the apple muscle and the first pixel in the apple muscle region can be expressed as
  • the first coefficient is determined according to the radius of the apple muscle outer contour circle, the first distance, and the modulus of the first reference vector.
  • the radius of the outer contour circle of the apple muscle is R
  • the first distance is The modulus of the first reference vector is The first coefficient is ⁇ 1 .
  • step S1453 a second target pixel corresponding to the first pixel is determined according to the first pixel, the first coefficient, and the first reference vector.
  • FIG. 11 illustrates an apple muscle center O, a first reference point M 1 , a first pixel P 2 , a second target pixel P 2 ′ corresponding to the first pixel, and an apple muscle in a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 12 shows an exemplary flowchart of step S1452 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 12, step S1452 may include steps S14521 to S14523.
  • step S14521 a first difference between the square of the radius of the outer contour circle of the apple muscle and the square of the first distance is calculated.
  • step S14522 the first difference is added to the square of the modulus of the first reference vector to obtain a first sum.
  • the first sum is equal to
  • step S14523 a ratio of the first difference value to the first sum is calculated to obtain a first coefficient.
  • the first coefficient For example, the first coefficient
  • FIG. 13 shows an exemplary flowchart of step S1453 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 13, step S1453 may include steps S14531 to S14534.
  • step S14531 a vector in which the first reference pixel points to the first pixel is determined as a first pixel vector.
  • the first pixel vector can be expressed as
  • step S14532 a first product of the first coefficient and the first reference vector is calculated.
  • the first product of the first coefficient and the first reference vector is
  • step S14533 the difference between the first pixel vector and the first product is calculated to obtain a second target pixel vector corresponding to the first pixel.
  • step S14534 the second target pixel corresponding to the first pixel is determined according to the position of the first reference pixel and the second target pixel vector corresponding to the first pixel.
  • the second target pixel vector corresponding to the first pixel A vector indicating that the first reference pixel refers to the second target pixel P 2 ′. According to the position of the first reference pixel and the second target pixel vector corresponding to the first pixel A second target pixel P 2 ′ corresponding to the first pixel may be determined.
  • FIG. 14 shows an exemplary flowchart of step S14 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 14, step S14 may include steps S147, S148, S149, and S140.
  • step S147 a second reference point in the face image is determined.
  • the distance between the second reference point and the key point of the lower eyelid is smaller than the distance between the center of the apple muscle and the key point of the lower eyelid.
  • the second reference point is outside the apple muscle region.
  • the second reference point is on a line connecting the center of the apple muscle with a key point of the lower eyelid.
  • the second reference point in the face image is M 2 .
  • step S148 the vector of the apple muscle center pointing to the second reference point is determined as the second reference vector.
  • the apple muscle center is O
  • a vector indicating that the second reference pixel points to the center of the apple muscle, and the second reference point is M 2
  • a vector indicating that the second reference pixel points to the second reference point then the second reference vector can be expressed as
  • the second reference pixel may be the origin of the coordinate axis.
  • step S149 a third target pixel corresponding to each pixel in the apple muscle region is determined according to the second reference vector, wherein the vector of the third target pixel corresponding to the pixel pointing to the pixel is the same as the direction of the second reference vector.
  • step S140 the pixel value of each pixel is updated to the pixel value of the corresponding third target pixel.
  • the pixel value of pixel P 3 may be updated to a pixel P 3' of the pixel values, i.e. the pixel value of pixel P 3 'as The pixel value of the pixel P 3 .
  • the example shown in FIG. 14 uses a circular liquefaction method to raise the position of the apple muscle to achieve the overall lifting of the apple muscle, which can give more vitality to the face.
  • the deformation range of this example is determined by the joint constraint of the apple muscle area and the apple muscle center.
  • FIG. 15 illustrates an exemplary flowchart of step S149 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 15, step S149 may include steps S1491 to S1493.
  • step S1491 a second distance between the center of the apple muscle and a second pixel in the apple muscle region is determined.
  • the apple muscle center is O
  • the second pixel in the apple muscle area is P 3 .
  • a vector indicating that the second reference pixel points to the center of the apple muscle, A vector indicating that the second reference pixel points to the second pixel, then the second distance between the center of the apple muscle and the second pixel in the apple muscle area can be expressed as
  • step S1492 the second coefficient is determined according to the radius of the outer contour circle of the apple muscle, the second distance, and the modulus of the second reference vector.
  • the radius of the outer contour circle of the apple muscle is R
  • the second distance is The modulus of the second reference vector is The second coefficient is ⁇ 2 .
  • step S1493 a third target pixel corresponding to the second pixel is determined according to the second pixel, the second coefficient, and the second reference vector.
  • FIG. 16 illustrates an apple muscle center O, a second reference point M 2 , a second pixel P 3 , a third target pixel P 3 ′ corresponding to the second pixel, and an apple muscle in a method for processing a face image according to an embodiment of the present disclosure.
  • FIG. 17 shows an exemplary flowchart of step S1492 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 17, step S1492 may include steps S14921 to S14923.
  • step S14921 a second difference between the square of the radius of the apple muscle outer contour circle and the square of the second distance is calculated.
  • the second difference is equal to
  • step S14922 the second difference is added to the square of the modulus of the second reference vector to obtain a second sum.
  • the second sum is equal to
  • step S14923 the ratio of the second difference and the second sum is calculated to obtain a second coefficient.
  • the second coefficient is the second coefficient
  • FIG. 18 shows an exemplary flowchart of step S1493 of a method for processing a face image according to an embodiment of the present disclosure. As shown in FIG. 18, step S1493 may include steps S14931 to S14934.
  • step S14931 a vector in which the second reference pixel points to the second pixel is determined as a second pixel vector.
  • the second pixel vector can be expressed as
  • step S14932 a second product of the second coefficient and the second reference vector is calculated.
  • the second product of the second coefficient and the second reference vector is
  • step S14933 the difference between the second pixel vector and the second product is calculated to obtain a third target pixel vector corresponding to the second pixel.
  • the third target pixel vector corresponding to the second pixel For example, the third target pixel vector corresponding to the second pixel
  • the third target pixel corresponding to the second pixel is determined according to the position of the second reference pixel and the third target pixel vector corresponding to the second pixel.
  • the third target pixel vector corresponding to the second pixel A vector indicating that the second reference pixel refers to the third target pixel P 3 ′.
  • the position of the second reference pixel and the third target pixel vector corresponding to the second pixel A third target pixel P 3 ′ corresponding to the second pixel may be determined.
  • step S14 may include steps S141 and S142, steps S143 to S146, and steps S147 to S140 in this order.
  • step S14 may include steps S141 and S142, and steps S147 to S140 in this order.
  • step S14 may include steps S141 and S142, steps S147 to S140, and steps S143 to S146 in this order.
  • step S14 may include steps S143 to S146, steps S141 and S142, and steps S147 to S140 in this order.
  • step S14 is described above in the above implementation manner, those skilled in the art can understand that the embodiments of the present disclosure should not be limited to this.
  • a person skilled in the art may flexibly set the specific implementation manner of step S14 according to the actual application scenario requirements and / or personal preferences, as long as it is based on one of the first group of steps, the second group of steps, and the third group of steps, two or Three sets of steps can be used to achieve this.
  • the first group of steps represents steps S141 and S142
  • the second group of steps represents steps S143 to S146
  • the third group of steps represents steps S147 to S140.
  • FIG. 19 shows an exemplary flowchart of step S14 of a method for processing a face image according to an embodiment of the present disclosure.
  • step S14 may include steps S141 to S140.
  • steps S141 to S140 For a description of each step, refer to the foregoing, and will not be repeated here.
  • step S141 a first target pixel corresponding to each pixel in the apple muscle region is determined, wherein the first target pixel corresponding to the pixel is on a line connecting the center of the apple muscle with the pixel.
  • step S142 the pixel value of each pixel is updated to the pixel value of the corresponding first target pixel.
  • step S143 a first reference point in the face image is determined.
  • step S144 the vector of the apple muscle center pointing to the first reference point is determined as the first reference vector.
  • step S145 a second target pixel corresponding to each pixel in the apple muscle region is determined according to the first reference vector, wherein the vector of the second target pixel corresponding to the pixel that points to the pixel is the same as the direction of the first reference vector.
  • step S146 the pixel value of each pixel is updated to the pixel value of the corresponding second target pixel.
  • step S147 a second reference point in the face image is determined.
  • step S148 the vector of the apple muscle center pointing to the second reference point is determined as the second reference vector.
  • step S149 a third target pixel corresponding to each pixel in the apple muscle region is determined according to the second reference vector, wherein the vector of the third target pixel corresponding to the pixel pointing to the pixel is the same as the direction of the second reference vector.
  • step S140 the pixel value of each pixel is updated to the pixel value of the corresponding third target pixel.
  • the apple muscle filling method used in the embodiments of the present disclosure only adopts the deformation method, and hardly changes the light and shadow distribution on the face, so the apple muscle filling effect is more natural.
  • the embodiments of the present disclosure also provide a face image processing device, an electronic device, a computer-readable storage medium, and a program.
  • a face image processing device an electronic device, a computer-readable storage medium, and a program.
  • the foregoing can be used to implement any one of the face image processing methods provided by the present disclosure, corresponding technical solutions, and The description and corresponding records in the method section will not be repeated here.
  • FIG. 20 is a schematic structural diagram of a face image processing apparatus according to an embodiment of the present disclosure.
  • the device includes: an acquisition module 21 configured to acquire a face key point and a face deflection angle in a face image; a first determination module 22 configured to be based on a face key point and a face deflection angle To determine the apple muscle center in the face image; the second determination module 23 is configured to determine the apple muscle area in the face image according to the key points of the face and the apple muscle center; the filling module 24 is configured to perform apple muscle The area is color filled.
  • FIG. 21 illustrates an exemplary structure diagram of a face image processing apparatus according to an embodiment of the present disclosure. As shown in Figure 21:
  • the first determination module 22 includes: a first determination sub-module 221 configured to perform interpolation processing on a key point of a face to determine an estimated position of an apple muscle center in the face image; an adjuster Module 222 is configured to adjust the estimated position of the apple muscle center according to the deflection angle of the face to obtain the apple muscle center in the face image.
  • the second determining module 23 includes: a connecting sub-module 231 configured to connect key points of the face to obtain a polygon corresponding to the key points of the face; and a second determining sub-module 232 configured to connect the polygon The largest circle with the center of the apple muscle as the center is determined as the outer contour circle of the apple muscle in the face image; the third determination submodule 233 is configured to determine the apple muscle in the facial image based on the outer contour circle of the apple muscle. region.
  • the third determining sub-module 233 is configured to adjust an outer contour circle of the apple muscle by using a contour line of the face in the face image to obtain an apple muscle region in the face image.
  • the third determining sub-module 233 includes: a first sampling unit configured to sample the contour lines of the face in the face image to obtain sampling points on the contour lines of the face; and The sampling unit is configured to sample the outer contour circle of the apple muscle to obtain sampling points on the outer contour circle of the apple muscle; the curve fitting unit is configured to sample the sampling points on the contour line of the face and the outer contour circle of the apple muscle. The points are subjected to curve fitting to obtain the apple muscle region in the face image.
  • the filling module 24 includes a fourth determination submodule 241 configured to determine first target pixels corresponding to each pixel in the apple muscle region, respectively, where the first target pixel corresponding to the pixel is in the apple The line between the muscle center and the pixel; the first update sub-module 242 is configured to update the pixel value of each pixel to the pixel value of the corresponding first target pixel, respectively.
  • the fourth determination sub-module 241 is configured to determine the first target pixels corresponding to each pixel in the apple muscle area according to the apple muscle filling strength coefficient, respectively.
  • the fourth determining sub-module 241 is configured to: use a convex function with a second derivative constant greater than 0 to respectively determine the first target pixels corresponding to each pixel in the apple muscle region.
  • the filling module 24 includes: a fifth determination submodule 243 configured to determine a first reference point in the face image; and a sixth determination submodule 244 configured to point the center of the apple muscle to the third A vector of a reference point is determined as a first reference vector; a seventh determination sub-module 245 is configured to respectively determine a second target pixel corresponding to each pixel in the apple muscle region according to the first reference vector, wherein the pixel corresponds to the second target pixel The vector of the target pixel pointing to the pixel is the same as the direction of the first reference vector; the second update submodule 246 is configured to update the pixel value of each pixel to the pixel value of the corresponding second target pixel, respectively.
  • the distance between the first reference point and the key point of the nose tip is greater than the distance between the center of the apple muscle and the key point of the nose tip.
  • the seventh determination sub-module 245 includes: a first determination unit configured to determine a first distance between the apple muscle center and a first pixel in the apple muscle region; a second determination unit configured to A first coefficient is determined according to a radius of the outer contour circle of the apple muscle, a first distance, and a modulus of a first reference vector; a third determination unit is configured to determine a first based on the first pixel, the first coefficient, and the first reference vector A second target pixel corresponding to the pixel.
  • the second determination unit includes: a first calculation subunit configured to calculate a first difference between a square of a radius of the outer contour circle of the apple muscle and a square of the first distance; a second calculation subunit , Configured to add the first difference to the square of the modulus of the first reference vector to obtain a first sum; a third calculation subunit configured to calculate a ratio of the first difference to the first sum to obtain a first sum coefficient.
  • the third determining unit includes: a first determining subunit configured to determine a vector in which the first reference pixel points to the first pixel as a first pixel vector; and a fourth calculating subunit configured to calculate A first product of a first coefficient and a first reference vector; a fifth calculation subunit configured to calculate a difference between the first pixel vector and the first product to obtain a second target pixel vector corresponding to the first pixel; a second determinant A unit configured to determine a second target pixel corresponding to the first pixel according to a position of the first reference pixel and a second target pixel vector corresponding to the first pixel.
  • the filling module 24 includes: an eighth determination sub-module 247 configured to determine a second reference point in the face image; and a ninth determination sub-module 248 configured to point the center of the apple muscle to the third The vector of the two reference points is determined as the second reference vector; the tenth determination sub-module 249 is configured to determine the third target pixel corresponding to each pixel in the apple muscle region according to the second reference vector, wherein the pixel corresponds to the third target pixel The vector of the target pixel pointing to the pixel is the same as the direction of the second reference vector; the third update sub-module 240 is configured to update the pixel value of each pixel to the pixel value of the corresponding third target pixel.
  • the second reference point is on a line connecting the center of the apple muscle with a key point of the lower eyelid.
  • the tenth determination submodule 249 includes a fourth determination unit configured to determine a second distance between the center of the apple muscle and a second pixel in the apple muscle region; a fifth determination unit configured to A second coefficient is determined according to the radius of the outer contour circle of the apple muscle, a second distance, and a modulus of a second reference vector; a sixth determination unit is configured to determine a second based on the second pixel, the second coefficient, and the second reference vector A third target pixel corresponding to the pixel.
  • the fifth determination unit includes: a sixth calculation subunit configured to calculate a second difference between a square of a radius of the outer contour circle of the apple muscle and a square of the second distance; a seventh calculation subunit , Configured to add the second difference to the square of the modulus of the second reference vector to obtain a second sum; an eighth calculation subunit configured to calculate a ratio of the second difference to the second sum to obtain a second coefficient.
  • the sixth determination unit includes: a third determination subunit configured to determine a vector in which the second reference pixel points to the second pixel as a second pixel vector; and a ninth calculation subunit configured to calculate A second product of the second coefficient and the second reference vector; a tenth calculation subunit configured to calculate a difference between the second pixel vector and the second product to obtain a third target pixel vector corresponding to the second pixel; a fourth determinant A unit configured to determine a third target pixel corresponding to the second pixel according to a position of the second reference pixel and a third target pixel vector corresponding to the second pixel.
  • the filling module 24 includes a fourth determination submodule 241 configured to determine first target pixels corresponding to each pixel in the apple muscle region, respectively, where the first target pixel corresponding to the pixel is in the apple The line between the muscle center and the pixel; the first update submodule 242 is configured to update the pixel value of each pixel to the pixel value of the corresponding first target pixel; the fifth determination submodule 243 is configured to determine the face A first reference point in the image; a sixth determination sub-module 244 configured to determine a vector of the apple muscle center pointing to the first reference point as the first reference vector; a seventh determination sub-module 245 configured to be based on the first reference vector, A second target pixel corresponding to each pixel in the apple muscle region is determined, wherein a vector corresponding to the second target pixel corresponding to the pixel and the direction of the first reference vector is the same; the second update submodule 246 is configured to The pixel values of the pixels are respectively updated to the pixel
  • the embodiment of the present disclosure determines the apple muscle center in the face image by acquiring the face key points and the face deflection angle in the face image, and determines the apple muscle center in the face image according to the face key points and the face deflection angle. Center, determine the apple muscle area in the face image, and color fill the apple muscle area, thereby accurately positioning the apple muscle area, and perform apple muscle filling processing based on the accurately positioned apple muscle area to make the filling effect more natural .
  • An embodiment of the present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which are implemented by the processor when the computer program instructions are executed by the processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure further provides an electronic device including: a processor and a memory for storing processor-executable instructions; wherein, when the processor is used to run the computer program, the method of the embodiment of the present disclosure is performed.
  • the electronic device may be provided as a terminal, a server, or other forms of devices.
  • Fig. 22 is a schematic structural diagram of an electronic device 800 according to an exemplary embodiment.
  • the electronic device 800 may be a terminal such as a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the method described above.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operation at the electronic device 800. Examples of such data include instructions for any application or method for operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 804 may be implemented by any type of volatile or non-volatile storage devices, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), Programming read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM Programming read-only memory
  • PROM programmable read-only memory
  • ROM read-only memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • the power component 806 provides power to various components of the electronic device 800.
  • the power component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user.
  • the screen may include a liquid crystal display (LCD, Liquid Crystal Display) and a touch panel (TP, Touch Panel). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or slide action, but also detect duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and / or input audio signals.
  • the audio component 810 includes a microphone (MIC).
  • the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the peripheral interface module may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
  • the sensor component 814 includes one or more sensors for providing various aspects of the state evaluation of the electronic device 800.
  • the sensor component 814 may detect the on / off state of the electronic device 800, and the relative positioning of the components, such as the display and keypad of the electronic device 800.
  • the sensor component 814 may also detect the electronic device 800 or an electronic device 800.
  • the position of the component changes, the presence or absence of the user's contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • the sensor component 814 may further include a light sensor, such as a complementary metal oxide semiconductor (CMOS, Complementary Metal Oxide, Semiconductor) or a charge coupled device (CCD, Charge Coupled Device) image sensor, for use in imaging applications.
  • CMOS complementary metal oxide semiconductor
  • CCD Charge Coupled Device
  • the sensor component 814 may further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 may access a wireless network based on a communication standard, such as wireless fidelity (WiFi), 2G or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • NFC near field communication
  • the NFC module can be based on radio frequency identification (RFID, Radio Frequency Identification) technology, infrared data association (IrDA, Infrared Data Association) technology, ultra wideband (UWB, Ultra Wideband) technology, Bluetooth (BT, Blue Tooth) technology and other Technology to achieve.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wideband
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASIC, Application Specific Integrated Circuit), digital signal processors (DSP, Digital Signal Processing), digital signal processing devices (DSPD), Programmable logic device (PLD, Programmable Logic Device), Field Programmable Gate Array (FPGA, Field-Programmable Gate Array), controller, microcontroller, microprocessor or other electronic components are used to implement the above method.
  • ASIC Application-specific integrated circuits
  • DSP Digital Signal Processing
  • DSPD digital signal processing devices
  • PLD Programmable logic device
  • FPGA Field Programmable Gate Array
  • controller microcontroller, microprocessor or other electronic components are used to implement the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, and the computer program instructions may be executed by the processor 820 of the electronic device 800 to complete the above method.
  • Fig. 23 is a schematic structural diagram of an electronic device 1900 according to an exemplary embodiment.
  • the electronic device 1900 may be provided as a server.
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932, for storing instructions executable by the processing component 1922, such as an application program.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the method described above.
  • the electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OSXTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
  • a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the above method.
  • Embodiments of the present disclosure may be systems, methods, and / or computer program products.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions for causing a processor to implement various aspects of embodiments of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electric storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM, Random Access Memory), read-only memory (ROM, Read-Only Memory), Erasable Programmable Read Only Memory (EPROM or Flash), Static Random Access Memory (SRAM, Static Random Access Memory), Portable Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD), Memory Stick, A floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove, on which instructions are stored, and any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or Flash Erasable Programmable Read Only Memory
  • SRAM Static Random Access Memory
  • CD-ROM Portable Compact Disc Read Only Memory
  • DVD Digital Versatile Disc
  • Memory Stick A floppy disk
  • a mechanical encoding device such as a punch card or a raised structure in a groove, on which instructions are stored, and any suitable combination of the fore
  • Computer-readable storage media used herein are not to be interpreted as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or via electrical wires Electrical signal transmitted.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers.
  • the network adapter card or network interface in each computing / processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device .
  • Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Smalltalk, C ++, and the like—and conventional procedural programming languages—such as the "C" language or similar programming languages.
  • Computer-readable program instructions may be executed entirely on a user's computer, partly on a user's computer, as a stand-alone software package, partly on a user's computer, partly on a remote computer, or entirely on a remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through the Internet using an Internet service provider) connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), can be personalized by using state information of computer-readable program instructions.
  • FPGA field-programmable gate array
  • PDA programmable logic array
  • the electronic circuit can Computer-readable program instructions are executed to implement various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, or other programmable data processing device, thereby producing a machine such that when executed by a processor of a computer or other programmable data processing device , Means for implementing the functions / actions specified in one or more blocks in the flowcharts and / or block diagrams.
  • These computer-readable program instructions may also be stored in a computer-readable storage medium, and these instructions cause a computer, a programmable data processing apparatus, and / or other devices to work in a specific manner. Therefore, a computer-readable medium storing instructions includes: An article of manufacture that includes instructions to implement various aspects of the functions / acts specified in one or more blocks in the flowcharts and / or block diagrams.
  • Computer-readable program instructions can also be loaded onto a computer, other programmable data processing device, or other device, so that a series of operating steps can be performed on the computer, other programmable data processing device, or other device to produce a computer-implemented process , So that the instructions executed on the computer, other programmable data processing apparatus, or other equipment can implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of an instruction, which contains one or more components for implementing a specified logical function.
  • Executable instructions may also occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or action. , Or it can be implemented with a combination of dedicated hardware and computer instructions.

Landscapes

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

Abstract

一种人脸图像的处理方法及装置、电子设备和存储介质。所述方法包括:获取人脸图像中的人脸关键点和人脸偏转角度(S11);根据所述人脸关键点和所述人脸偏转角度,确定所述人脸图像中的苹果肌中心(S12);根据所述人脸关键点和所述苹果肌中心,确定所述人脸图像中的苹果肌区域(S13);对所述苹果肌区域进行颜色填充处理(S14)。上述方法能够准确地定位苹果肌区域,基于准确定位的苹果肌区域进行苹果肌填充处理,使填充效果更自然。

Description

人脸图像的处理方法及装置、电子设备和存储介质
相关申请的交叉引用
本申请基于申请号为201811141270.9、申请日为2018年9月28日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。
技术领域
本公开涉及计算机视觉技术领域,尤其涉及一种人脸图像的处理方法及装置、电子设备和存储介质。
背景技术
饱满的苹果肌使脸部的线条变得柔和,分散颧骨过高的部位,让人在笑的时候更富有亲和力。如何准确地对人脸图像进行苹果肌填充,使人脸图像中的苹果肌饱满且自然,是亟待解决的问题。
发明内容
本公开实施例提出了一种人脸图像的处理技术方案。
根据本公开实施例的第一方面,提供了一种人脸图像的处理方法,包括:获取人脸图像中的人脸关键点和人脸偏转角度;根据所述人脸关键点和所述人脸偏转角度,确定所述人脸图像中的苹果肌中心;根据所述人脸关键点和所述苹果肌中心,确定所述人脸图像中的苹果肌区域;对所述苹果肌区域进行颜色填充处理。
在一种可能的实现方式中,根据所述人脸关键点和所述人脸偏转角度,确定所述人脸图像中的苹果肌中心,包括:对所述人脸关键点进行插值处理,确定所述人脸图像中的苹果肌中心的估计位置;根据所述人脸偏转角度,对所述苹果肌中心的估计位置进行调整,得到所述人脸图像中的苹果肌中心。
在一种可能的实现方式中,根据所述人脸关键点和所述苹果肌中心,确定所述人脸图像中的苹果肌区域,包括:将所述人脸关键点相连,得到所述人脸关键点对应的多边形;将所述多边形中以所述苹果肌中心为圆心的最大的圆确定为所述人脸图像中的苹果肌外轮廓圆;根据所述苹果肌外轮廓圆,确定所述人脸图像中的苹果肌区域。
在一种可能的实现方式中,根据所述苹果肌外轮廓圆,确定所述人脸图像中的苹果肌区域,包括:采用所述人脸图像中的脸部轮廓线对所述苹果肌外轮廓圆进行调整,得到所述人脸图像中的苹果肌区域。
在一种可能的实现方式中,采用所述人脸图像中的脸部轮廓线对所述苹果肌外轮廓圆进行调整,得到所述人脸图像中的苹果肌区域,包括:对所述人脸图像中的脸部轮廓线进行采样,得到所述脸部轮廓线上的采样点;对所述苹果肌外轮廓圆进行采样,得到所述苹果肌外轮廓圆上的采样点;对所述脸部轮廓线上的采样点和所述苹果肌外轮廓圆 上的采样点进行曲线拟合,得到所述人脸图像中的苹果肌区域。
在一种可能的实现方式中,对所述苹果肌区域进行颜色填充处理,包括:分别确定所述苹果肌区域中的各个像素对应的第一目标像素,其中,所述像素对应的第一目标像素在所述苹果肌中心与所述像素的连线上;将所述各个像素的像素值分别更新为对应的第一目标像素的像素值。
在一种可能的实现方式中,分别确定所述苹果肌区域中的各个像素对应的第一目标像素,包括:根据苹果肌填充力度系数,分别确定所述苹果肌区域中的各个像素对应的第一目标像素。
在一种可能的实现方式中,分别确定所述苹果肌区域中的各个像素对应的第一目标像素,包括:采用二阶导数恒大于0的下凸函数,分别确定所述苹果肌区域中的各个像素对应的第一目标像素。
在一种可能的实现方式中,对所述苹果肌区域进行颜色填充处理,包括:确定所述人脸图像中的第一参考点;将所述苹果肌中心指向所述第一参考点的向量确定为第一参考向量;根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,其中,所述像素对应的第二目标像素指向所述像素的向量与所述第一参考向量的方向相同;将所述各个像素的像素值分别更新为对应的第二目标像素的像素值。
在一种可能的实现方式中,所述第一参考点与鼻尖关键点的距离大于所述苹果肌中心与鼻尖关键点的距离。
在一种可能的实现方式中,根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,包括:确定所述苹果肌中心与所述苹果肌区域中的第一像素之间的第一距离;根据苹果肌外轮廓圆的半径、所述第一距离和所述第一参考向量的模,确定第一系数;根据所述第一像素、所述第一系数和所述第一参考向量,确定所述第一像素对应的第二目标像素。
在一种可能的实现方式中,根据苹果肌外轮廓圆的半径、所述第一距离和所述参考向量的模,确定第一系数,包括:计算所述苹果肌外轮廓圆的半径的平方与所述第一距离的平方的第一差值;将所述第一差值与所述第一参考向量的模的平方相加,得到第一加和;计算所述第一差值与所述第一加和的比值,得到所述第一系数。
在一种可能的实现方式中,根据所述第一像素、所述第一系数和所述第一参考向量,确定所述第一像素对应的第二目标像素,包括:将第一参考像素指向所述第一像素的向量确定为第一像素向量;计算所述第一系数与所述第一参考向量的第一乘积;计算所述第一像素向量与第一乘积的差值,得到所述第一像素对应的第二目标像素向量;根据所述第一参考像素的位置,以及所述第一像素对应的第二目标像素向量,确定所述第一像素对应的第二目标像素。
在一种可能的实现方式中,对所述苹果肌区域进行颜色填充处理,包括:确定所述人脸图像中的第二参考点;将所述苹果肌中心指向所述第二参考点的向量确定为第二参考向量;根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,其中,所述像素对应的第三目标像素指向所述像素的向量与所述第二参考向量的方向相同;将所述各个像素的像素值分别更新为对应的第三目标像素的像素值。
在一种可能的实现方式中,所述第二参考点在所述苹果肌中心与下眼皮关键点的连线上。
在一种可能的实现方式中,根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,包括:确定所述苹果肌中心与所述苹果肌区域中的第二像素之间的第二距离;根据苹果肌外轮廓圆的半径、所述第二距离和所述第二参考向量的模,确定第二系数;根据所述第二像素、所述第二系数和所述第二参考向量,确定所 述第二像素对应的第三目标像素。
在一种可能的实现方式中,根据苹果肌外轮廓圆的半径、所述第二距离和所述第二参考向量的模,确定第二系数,包括:计算所述苹果肌外轮廓圆的半径的平方与所述第二距离的平方的第二差值;将所述第二差值与所述第二参考向量的模的平方相加,得到第二加和;计算所述第二差值与所述第二加和的比值,得到所述第二系数。
在一种可能的实现方式中,根据所述第二像素、所述第二系数和所述第二参考向量,确定所述第二像素对应的第三目标像素,包括:将第二参考像素指向所述第二像素的向量确定为第二像素向量;计算所述第二系数与所述第二参考向量的第二乘积;计算所述第二像素向量与第二乘积的差值,得到所述第二像素对应的第三目标像素向量;根据所述第二参考像素的位置,以及所述第二像素对应的第三目标像素向量,确定所述第二像素对应的第三目标像素。
在一种可能的实现方式中,对所述苹果肌区域进行颜色填充处理,包括:分别确定所述苹果肌区域中的各个像素对应的第一目标像素,其中,所述像素对应的第一目标像素在所述苹果肌中心与所述像素的连线上;将所述各个像素的像素值分别更新为对应的第一目标像素的像素值;确定所述人脸图像中的第一参考点,其中,所述第一参考点与鼻尖关键点的距离大于所述苹果肌中心与鼻尖关键点的距离;将所述苹果肌中心指向所述第一参考点的向量确定为第一参考向量;根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,其中,所述像素对应的第二目标像素指向所述像素的向量与所述第一参考向量的方向相同;将所述各个像素的像素值分别更新为对应的第二目标像素的像素值;确定所述人脸图像中的第二参考点,其中,所述第二参考点在所述苹果肌中心与下眼皮关键点的连线上;将所述苹果肌中心指向所述第二参考点的向量确定为第二参考向量;根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,其中,所述像素对应的第三目标像素指向所述像素的向量与所述第二参考向量的方向相同;将所述各个像素的像素值分别更新为对应的第三目标像素的像素值。
根据本公开实施例的第二方面,提供了一种人脸图像的处理装置,包括:获取模块,配置为获取人脸图像中的人脸关键点和人脸偏转角度;第一确定模块,配置为根据所述人脸关键点和所述人脸偏转角度,确定所述人脸图像中的苹果肌中心;第二确定模块,配置为根据所述人脸关键点和所述苹果肌中心,确定所述人脸图像中的苹果肌区域;填充模块,配置为对所述苹果肌区域进行颜色填充处理。
在一种可能的实现方式中,所述第一确定模块包括:第一确定子模块,配置为对所述人脸关键点进行插值处理,确定所述人脸图像中的苹果肌中心的估计位置;调整子模块,配置为根据所述人脸偏转角度,对所述苹果肌中心的估计位置进行调整,得到所述人脸图像中的苹果肌中心。
在一种可能的实现方式中,所述第二确定模块包括:相连子模块,配置为将所述人脸关键点相连,得到所述人脸关键点对应的多边形;第二确定子模块,配置为将所述多边形中以所述苹果肌中心为圆心的最大的圆确定为所述人脸图像中的苹果肌外轮廓圆;第三确定子模块,配置为根据所述苹果肌外轮廓圆,确定所述人脸图像中的苹果肌区域。
在一种可能的实现方式中,所述第三确定子模块配置为:采用所述人脸图像中的脸部轮廓线对所述苹果肌外轮廓圆进行调整,得到所述人脸图像中的苹果肌区域。
在一种可能的实现方式中,所述第三确定子模块包括:第一采样单元,配置为对所述人脸图像中的脸部轮廓线进行采样,得到所述脸部轮廓线上的采样点;第二采样单元,配置为对所述苹果肌外轮廓圆进行采样,得到所述苹果肌外轮廓圆上的采样点;曲线拟合单元,配置为对所述脸部轮廓线上的采样点和所述苹果肌外轮廓圆上的采样点进行曲 线拟合,得到所述人脸图像中的苹果肌区域。
在一种可能的实现方式中,所述填充模块包括:第四确定子模块,配置为分别确定所述苹果肌区域中的各个像素对应的第一目标像素,其中,所述像素对应的第一目标像素在所述苹果肌中心与所述像素的连线上;第一更新子模块,配置为将所述各个像素的像素值分别更新为对应的第一目标像素的像素值。
在一种可能的实现方式中,所述第四确定子模块配置为:根据苹果肌填充力度系数,分别确定所述苹果肌区域中的各个像素对应的第一目标像素。
在一种可能的实现方式中,所述第四确定子模块配置为:采用二阶导数恒大于0的下凸函数,分别确定所述苹果肌区域中的各个像素对应的第一目标像素。
在一种可能的实现方式中,所述填充模块包括:第五确定子模块,配置为确定所述人脸图像中的第一参考点;第六确定子模块,配置为将所述苹果肌中心指向所述第一参考点的向量确定为第一参考向量;第七确定子模块,配置为根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,其中,所述像素对应的第二目标像素指向所述像素的向量与所述第一参考向量的方向相同;第二更新子模块,配置为将所述各个像素的像素值分别更新为对应的第二目标像素的像素值。
在一种可能的实现方式中,所述第一参考点与鼻尖关键点的距离大于所述苹果肌中心与鼻尖关键点的距离。
在一种可能的实现方式中,所述第七确定子模块包括:第一确定单元,配置为确定所述苹果肌中心与所述苹果肌区域中的第一像素之间的第一距离;第二确定单元,配置为根据苹果肌外轮廓圆的半径、所述第一距离和所述第一参考向量的模,确定第一系数;第三确定单元,配置为根据所述第一像素、所述第一系数和所述第一参考向量,确定所述第一像素对应的第二目标像素。
在一种可能的实现方式中,所述第二确定单元包括:第一计算子单元,配置为计算所述苹果肌外轮廓圆的半径的平方与所述第一距离的平方的第一差值;第二计算子单元,配置为将所述第一差值与所述第一参考向量的模的平方相加,得到第一加和;第三计算子单元,配置为计算所述第一差值与所述第一加和的比值,得到所述第一系数。
在一种可能的实现方式中,所述第三确定单元包括:第一确定子单元,配置为将第一参考像素指向所述第一像素的向量确定为第一像素向量;第四计算子单元,配置为计算所述第一系数与所述第一参考向量的第一乘积;第五计算子单元,配置为计算所述第一像素向量与第一乘积的差值,得到所述第一像素对应的第二目标像素向量;第二确定子单元,配置为根据所述第一参考像素的位置,以及所述第一像素对应的第二目标像素向量,确定所述第一像素对应的第二目标像素。
在一种可能的实现方式中,所述填充模块包括:第八确定子模块,配置为确定所述人脸图像中的第二参考点;第九确定子模块,配置为将所述苹果肌中心指向所述第二参考点的向量确定为第二参考向量;第十确定子模块,配置为根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,其中,所述像素对应的第三目标像素指向所述像素的向量与所述第二参考向量的方向相同;第三更新子模块,配置为将所述各个像素的像素值分别更新为对应的第三目标像素的像素值。
在一种可能的实现方式中,所述第二参考点在所述苹果肌中心与下眼皮关键点的连线上。
在一种可能的实现方式中,所述第十确定子模块包括:第四确定单元,配置为确定所述苹果肌中心与所述苹果肌区域中的第二像素之间的第二距离;第五确定单元,配置为根据苹果肌外轮廓圆的半径、所述第二距离和所述第二参考向量的模,确定第二系数;第六确定单元,配置为根据所述第二像素、所述第二系数和所述第二参考向量,确定所 述第二像素对应的第三目标像素。
在一种可能的实现方式中,所述第五确定单元包括:第六计算子单元,配置为计算所述苹果肌外轮廓圆的半径的平方与所述第二距离的平方的第二差值;第七计算子单元,配置为将所述第二差值与所述第二参考向量的模的平方相加,得到第二加和;第八计算子单元,配置为计算所述第二差值与所述第二加和的比值,得到所述第二系数。
在一种可能的实现方式中,所述第六确定单元包括:第三确定子单元,配置为将第二参考像素指向所述第二像素的向量确定为第二像素向量;第九计算子单元,配置为计算所述第二系数与所述第二参考向量的第二乘积;第十计算子单元,配置为计算所述第二像素向量与第二乘积的差值,得到所述第二像素对应的第三目标像素向量;第四确定子单元,配置为根据所述第二参考像素的位置,以及所述第二像素对应的第三目标像素向量,确定所述第二像素对应的第三目标像素。
在一种可能的实现方式中,所述填充模块包括:第四确定子模块,配置为分别确定所述苹果肌区域中的各个像素对应的第一目标像素,其中,所述像素对应的第一目标像素在所述苹果肌中心与所述像素的连线上;第一更新子模块,配置为将所述各个像素的像素值分别更新为对应的第一目标像素的像素值;第五确定子模块,配置为确定所述人脸图像中的第一参考点,其中,所述第一参考点与鼻尖关键点的距离大于所述苹果肌中心与鼻尖关键点的距离;第六确定子模块,配置为将所述苹果肌中心指向所述第一参考点的向量确定为第一参考向量;第七确定子模块,配置为根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,其中,所述像素对应的第二目标像素指向所述像素的向量与所述第一参考向量的方向相同;第二更新子模块,配置为将所述各个像素的像素值分别更新为对应的第二目标像素的像素值;第八确定子模块,配置为确定所述人脸图像中的第二参考点,其中,所述第二参考点在所述苹果肌中心与下眼皮关键点的连线上;第九确定子模块,配置为将所述苹果肌中心指向所述第二参考点的向量确定为第二参考向量;第十确定子模块,配置为根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,其中,所述像素对应的第三目标像素指向所述像素的向量与所述第二参考向量的方向相同;第三更新子模块,配置为将所述各个像素的像素值分别更新为对应的第三目标像素的像素值。
根据本公开实施例的第三方面,提供了一种电子设备,包括:处理器和用于存储处理器可执行指令的存储器;其中,所述处理器用于运行所述计算机程序时,执行上述人脸图像的处理方法。
根据本公开实施例的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述人脸图像的处理方法。
在本公开实施例中,通过获取人脸图像中的人脸关键点和人脸偏转角度,根据人脸关键点和人脸偏转角度,确定人脸图像中的苹果肌中心,根据人脸关键点和苹果肌中心,确定人脸图像中的苹果肌区域,并对苹果肌区域进行颜色填充处理,由此能够准确地定位苹果肌区域,基于准确定位的苹果肌区域进行苹果肌填充处理,使填充效果更自然。
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本公开的示例性实施例、特征和方面,并且用于解释本公开的原理。
图1示出根据本公开实施例的人脸图像的处理方法的流程示意图。
图2a示出根据本公开实施例的人脸图像的处理方法中对苹果肌区域进行颜色填充处理前的人脸图像的示意图。
图2b示出根据本公开实施例的人脸图像的处理方法中对苹果肌区域进行颜色填充处理后的人脸图像的示意图。
图3示出根据本公开实施例的人脸图像的处理方法步骤S12的一示例性的流程示意图。
图4示出根据本公开实施例的人脸图像的处理方法步骤S13的一示例性的流程示意图。
图5示出根据本公开实施例的人脸图像的处理方法中苹果肌外轮廓圆的示意图。
图6示出根据本公开实施例的人脸图像的处理方法中采用该人脸图像中的脸部轮廓线对苹果肌外轮廓圆进行调整,得到该人脸图像中的苹果肌区域的一示例性的流程示意图。
图7示出根据本公开实施例的人脸图像的处理方法步骤S14的一示例性的流程示意图。
图8示出根据本公开实施例的人脸图像的处理方法中步骤S141的示意图。
图9示出根据本公开实施例的人脸图像的处理方法步骤S14的一示例性的流程示意图。
图10示出根据本公开实施例的人脸图像的处理方法步骤S145的一示例性的流程示意图。
图11示出根据本公开实施例的人脸图像的处理方法中苹果肌中心O、第一参考点M1、第一像素P2、第一像素对应的第二目标像素P2’以及苹果肌外轮廓圆的半径R的示意图。
图12示出根据本公开实施例的人脸图像的处理方法步骤S1452的一示例性的流程示意图。
图13示出根据本公开实施例的人脸图像的处理方法步骤S1453的一示例性的流程示意图。
图14示出根据本公开实施例的人脸图像的处理方法步骤S14的一示例性的流程示意图。
图15示出根据本公开实施例的人脸图像的处理方法步骤S149的一示例性的流程示意图。
图16示出根据本公开实施例的人脸图像的处理方法中苹果肌中心O、第二参考点M2、第二像素P3、第二像素对应的第三目标像素P3’以及苹果肌外轮廓圆的半径R的示意图。
图17示出根据本公开实施例的人脸图像的处理方法步骤S1492的一示例性的流程示意图。
图18示出根据本公开实施例的人脸图像的处理方法步骤S1493的一示例性的流程示意图。
图19示出根据本公开实施例的人脸图像的处理方法步骤S14的一示例性的流程示意图。
图20示出根据本公开实施例的人脸图像的处理装置的结构示意图。
图21示出根据本公开实施例的人脸图像的处理装置的一示例性的结构示意图。
图22是根据一示例性实施例示出的一种电子设备800的结构示意图。
图23是根据一示例性实施例示出的一种电子设备1900的结构示意图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
另外,为了更好的说明本公开实施例,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
图1示出根据本公开实施例的人脸图像的处理方法的流程示意图。如图1所示,该方法包括步骤S11至步骤S14。
在步骤S11中,获取人脸图像中的人脸关键点和人脸偏转角度。
在一种可能的实现方式中,人脸关键点可以包括眼睛关键点、鼻子关键点、嘴巴关键点、脸部关键点和脸部轮廓关键点等中的至少一种。
在一种可能的实现方式中,人脸偏转角度可以表示人脸相对于正脸的偏转角度。例如,当人脸为正脸时,人脸偏转角度可以为0;当人脸相对于正脸向左偏转时,人脸偏转角度可以等于偏转的人脸与正脸之间的夹角;当人脸相对于正脸向右偏转时,人脸偏转角度的绝对值可以等于偏转的人脸与正脸的夹角,且人脸偏转角度为负数。
在步骤S12中,根据人脸关键点和人脸偏转角度,确定该人脸图像中的苹果肌中心。
在一种可能的实现方式中,可以根据人脸关键点中的眼睛关键点、鼻子关键点和脸部关键点,以及人脸偏转角度,确定该人脸图像中的苹果肌中心。
本公开实施例结合人脸关键点和人脸偏转角度确定人脸图像中的苹果肌中心,能够提高所确定的苹果肌中心的准确度,从而能够提高所确定的苹果肌区域的准确度。
本公开实施例中,苹果肌又可称为笑肌(Risorius),指的是眼睛下方二公分处呈倒三角状的组织,微笑或做表情时会因为脸部肌肉的挤压而稍稍隆起,看起来就像圆润有光泽的苹果,又名“苹果肌”。
在步骤S13中,根据人脸关键点和苹果肌中心,确定该人脸图像中的苹果肌区域。
在本公开实施例中,可以根据苹果肌中心和部分的人脸关键点来确定人脸图像中的苹果肌区域,以降低确定苹果肌区域的计算量。
在步骤S14中,对苹果肌区域进行颜色填充处理。
在一种可能的实现方式中,可以通过圆形凸透镜变形方法和圆形液化变形方法中的一种或两种方法,对苹果肌区域进行颜色填充处理,达到苹果肌饱满和突出苹果肌轮廓线的效果。
图2a示出根据本公开实施例的人脸图像的处理方法中对苹果肌区域进行颜色填充处理前的人脸图像的示意图。图2b示出根据本公开实施例的人脸图像的处理方法中对苹果肌区域进行颜色填充处理后的人脸图像的示意图。
本公开实施例通过获取人脸图像中的人脸关键点和人脸偏转角度,根据人脸关键点和人脸偏转角度,确定人脸图像中的苹果肌中心,根据人脸关键点和苹果肌中心,确定人脸图像中的苹果肌区域,并对苹果肌区域进行颜色填充处理,由此能够准确地定位苹果肌区域,基于准确定位的苹果肌区域进行苹果肌填充处理,使填充效果更自然。
图3示出根据本公开实施例的人脸图像的处理方法步骤S12的一示例性的流程示意图。如图3所示,步骤12可以包括步骤S121和步骤S122。
在步骤S121中,对人脸关键点进行插值处理,确定该人脸图像中的苹果肌中心的估计位置。
在本公开实施例中,苹果肌中心通常位于眼睛下方2厘米至3厘米的位置。利用人脸关键点进行插值,可以确定该人脸图像中的苹果肌中心的估计位置。例如,可以利用眼睛关键点、鼻子关键点和脸部关键点进行插值,得到该人脸图像中的苹果肌中心的估计位置。
在步骤S122中,根据人脸偏转角度,对苹果肌中心的估计位置进行调整,得到该人脸图像中的苹果肌中心。
在本公开实施例中,若人脸偏转角度为0,则可以无需对苹果肌中心的估计位置进行调整,而直接将苹果肌中心的估计位置作为该人脸图像中的苹果肌中心。若人脸偏转角度不为0,则根据人脸偏转角度对苹果肌中心的估计位置进行调整,得到该人脸图像中的苹果肌中心。
图4示出根据本公开实施例的人脸图像的处理方法步骤S13的一示例性的流程示意图。如图4所示,步骤13可以包括步骤S131至步骤S133。
在步骤S131中,将人脸关键点相连,得到人脸关键点对应的多边形。
在一种可能的实现方式中,可以将人脸关键点中的部分脸部轮廓关键点、部分鼻子关键点和部分眼睛关键点相连,得到这些人脸关键点对应的多边形。其中,眼睛关键点可以指下眼皮处的关键点。
在步骤S132中,将多边形中以苹果肌中心为圆心的最大的圆确定为该人脸图像中的苹果肌外轮廓圆。
在本公开实施例中,以苹果肌中心为圆心,以该多边形为界限画圆,得到该人脸图像中的苹果肌外轮廓圆。
图5示出根据本公开实施例的人脸图像的处理方法中苹果肌外轮廓圆的示意图。在图5所示的示例中,人脸图像中的苹果肌外轮廓圆包括C 1和C 2
在步骤S133中,根据苹果肌外轮廓圆,确定该人脸图像中的苹果肌区域。
在一种可能的实现方式中,根据苹果肌外轮廓圆,确定该人脸图像中的苹果肌区域,包括:将苹果肌外轮廓圆所在区域确定为人脸图像中的苹果肌区域。
在另一种可能的实现方式中,根据苹果肌外轮廓圆,确定该人脸图像中的苹果肌区域,包括:采用该人脸图像中的脸部轮廓线对苹果肌外轮廓圆进行调整,得到该人脸图像中的苹果肌区域。在该实现方式中,可以采用该人脸图像中的脸部轮廓线对苹果肌外轮廓圆进行约束,以将苹果肌区域限制在脸部轮廓范围内。在该实现方式中,可以利用眼睛以下、嘴角以上部分的脸部轮廓线对苹果肌外轮廓圆进行调整,得到该人脸图像中的苹果肌区域。
图6示出根据本公开实施例的人脸图像的处理方法中采用该人脸图像中的脸部轮廓线对苹果肌外轮廓圆进行调整,得到该人脸图像中的苹果肌区域的一示例性的流程示意图。如图6所示,采用该人脸图像中的脸部轮廓线对苹果肌外轮廓圆进行调整,得到该人脸图像中的苹果肌区域,可以包括步骤S1331至步骤S1333。
在步骤S1331中,对该人脸图像中的脸部轮廓线进行采样,得到脸部轮廓线上的采样点。
在一种可能的实现方式中,可以对眼睛以下、嘴角以上部分的脸部轮廓线进行采样,得到脸部轮廓线上的采样点。
在步骤S1332中,对苹果肌外轮廓圆进行采样,得到苹果肌外轮廓圆上的采样点。
在步骤S1333中,对脸部轮廓线上的采样点和苹果肌外轮廓圆上的采样点进行曲线拟合,得到该人脸图像中的苹果肌区域。
在一种可能的实现方式中,可以采用Catmull-Rom拟合方法,对脸部轮廓线上的采样点和苹果肌外轮廓圆上的采样点进行曲线拟合,得到该人脸图像中的苹果肌区域。
图7示出根据本公开实施例的人脸图像的处理方法步骤S14的一示例性的流程示意图。如图7所示,步骤S14可以包括步骤S141和步骤S142。
在步骤S141中,分别确定苹果肌区域中的各个像素对应的第一目标像素,其中,像素对应的第一目标像素在苹果肌中心与像素的连线上。
在一种可能的实现方式中,所述分别确定苹果肌区域中的各个像素对应的第一目标像素,包括:根据苹果肌填充力度系数,分别确定苹果肌区域中的各个像素对应的第一目标像素。其中,苹果肌填充力度系数可以由用户自定义。苹果肌填充力度系数表示苹果肌变形的程度。例如,苹果肌填充力度系数越大,则苹果肌变形的程度越大;苹果肌填充力度系数越小,则苹果肌变形的程度越小。
在一种可能的实现方式中,分别确定苹果肌区域中的各个像素对应的第一目标像素,包括:采用二阶导数恒大于0的下凸函数,分别确定苹果肌区域中的各个像素对应的第一目标像素。例如,该函数为y=1-sx 2
Figure PCTCN2018117498-appb-000001
其中,P 1表示苹果肌区域中的某一像素,
Figure PCTCN2018117498-appb-000002
表示苹果肌中心与该像素之间的距离,P 1′表示该像素对应的第一目标像素,
Figure PCTCN2018117498-appb-000003
表示苹果肌中心与该第一目标像素之间的距离,s表示苹果肌填充力度系数。其中,x的取值范围为[0,1]。采用该函数,可以将变形的范围限制在苹果肌区域内,且在苹果肌区域内的变化是连续的。通过采用二阶导数恒大于0的下凸函数,能够达到苹果肌区域内的像素沿着半径方向向外扩散的效果。
图8示出根据本公开实施例的人脸图像的处理方法中步骤S141的示意图。如图8所示,令像素P 1取像素P 1’的像素值,可以达到将像素P 1’移动到像素P 1的效果。
在步骤S142中,将各个像素的像素值分别更新为对应的第一目标像素的像素值。
在图8所示的示例中,将像素P 1的像素值更新为像素P 1’的像素值,即,将像素P 1’的像素值作为像素P 1的像素值。
图7和图8所示的示例通过利用圆形凸透镜变形方法改变苹果肌区域内像素点的密度分布,变形效果是苹果肌区域中心的像素沿着半径方向向外扩散,由此进行苹果肌填充,达到苹果肌饱满的效果。该示例中的变形由苹果肌区域和苹果肌中心共同约束。
图9示出根据本公开实施例的人脸图像的处理方法步骤S14的一示例性的流程示意图。如图9所示,步骤S14可以包括步骤S143至步骤S146。
在步骤S143中,确定该人脸图像中的第一参考点。
在一种可能的实现方式中,第一参考点与鼻尖关键点的距离大于苹果肌中心与鼻尖关键点的距离。即,在该实现方式中,第一参考点比苹果肌中心更接近脸部轮廓。
在一种可能的实现方式中,第一参考点在苹果肌区域外。例如,苹果肌中心与第一参考点之间的距离是苹果肌外轮廓圆的半径的
Figure PCTCN2018117498-appb-000004
倍。例如,该人脸图像中的第一参考点为M 1
在步骤S144中,将苹果肌中心指向第一参考点的向量确定为第一参考向量。
例如,苹果肌中心为O,
Figure PCTCN2018117498-appb-000005
表示第一参考像素指向苹果肌中心的向量,第一参考点为M 1
Figure PCTCN2018117498-appb-000006
表示第一参考像素指向第一参考点的向量,则第一参考向量可以表示为
Figure PCTCN2018117498-appb-000007
其中,第一参考像素可以为坐标轴的原点。
在步骤S145中,根据第一参考向量,分别确定苹果肌区域中的各个像素对应的第二目标像素,其中,像素对应的第二目标像素指向该像素的向量与第一参考向量的方向 相同。
在步骤S146中,将各个像素的像素值分别更新为对应的第二目标像素的像素值。
例如,苹果肌区域中的像素P 2对应的第二目标像素为像素P 2′,则可以将像素P 2的像素值更新为像素P 2′的像素值,即将像素P 2′的像素值作为像素P 2的像素值。
图9所示的示例通过圆形液化变形方法改变苹果肌区域内像素点的密度分布,变形效果是苹果肌区域内的像素沿着一个统一的方向扩散,由此填充苹果肌,突出苹果肌轮廓线,达到苹果肌饱满和立体的效果。图9所示的示例中的变形范围由苹果肌区域和苹果肌中心共同约束确定。
图10示出根据本公开实施例的人脸图像的处理方法步骤S145的一示例性的流程示意图。如图10所示,步骤S145可以包括步骤S1451至步骤S1453。
在步骤S1451中,确定苹果肌中心与苹果肌区域中的第一像素之间的第一距离。
例如,苹果肌中心为O,苹果肌区域中的第一像素为P 2
Figure PCTCN2018117498-appb-000008
表示第一参考像素指向苹果肌中心的向量,
Figure PCTCN2018117498-appb-000009
表示第一参考像素指向第一像素的向量,则苹果肌中心与苹果肌区域中的第一像素之间的第一距离可以表示为
Figure PCTCN2018117498-appb-000010
在步骤S1452中,根据苹果肌外轮廓圆的半径、第一距离和第一参考向量的模,确定第一系数。例如,苹果肌外轮廓圆的半径为R,第一距离为
Figure PCTCN2018117498-appb-000011
第一参考向量的模为
Figure PCTCN2018117498-appb-000012
第一系数为α 1
在步骤S1453中,根据第一像素、第一系数和第一参考向量,确定第一像素对应的第二目标像素。
图11示出根据本公开实施例的人脸图像的处理方法中苹果肌中心O、第一参考点M 1、第一像素P 2、第一像素对应的第二目标像素P 2’以及苹果肌外轮廓圆的半径R的示意图。
图12示出根据本公开实施例的人脸图像的处理方法步骤S1452的一示例性的流程示意图。如图12所示,步骤S1452可以包括步骤S14521至步骤S14523。
在步骤S14521中,计算苹果肌外轮廓圆的半径的平方与第一距离的平方的第一差值例如,第一差值等于
Figure PCTCN2018117498-appb-000013
在步骤S14522中,将第一差值与第一参考向量的模的平方相加,得到第一加和。
例如,第一和等于
Figure PCTCN2018117498-appb-000014
在步骤S14523中,计算第一差值与第一加和的比值,得到第一系数。
例如,第一系数
Figure PCTCN2018117498-appb-000015
图13示出根据本公开实施例的人脸图像的处理方法步骤S1453的一示例性的流程示意图。如图13所示,步骤S1453可以包括步骤S14531至步骤S14534。
在步骤S14531中,将第一参考像素指向第一像素的向量确定为第一像素向量。
例如,第一像素向量可以表示为
Figure PCTCN2018117498-appb-000016
在步骤S14532中,计算第一系数与第一参考向量的第一乘积。
例如,第一系数与第一参考向量的第一乘积为
Figure PCTCN2018117498-appb-000017
在步骤S14533中,计算第一像素向量与第一乘积的差值,得到第一像素对应的第 二目标像素向量。
例如,第一像素对应的第二目标像素向量
Figure PCTCN2018117498-appb-000018
在步骤S14534中,根据第一参考像素的位置,以及第一像素对应的第二目标像素向量,确定第一像素对应的第二目标像素。
其中,第一像素对应的第二目标像素向量
Figure PCTCN2018117498-appb-000019
表示第一参考像素指第二目标像素P 2′的向量。根据第一参考像素的位置,以及第一像素对应的第二目标像素向量
Figure PCTCN2018117498-appb-000020
可以确定第一像素对应的第二目标像素P 2′。
图14示出根据本公开实施例的人脸图像的处理方法步骤S14的一示例性的流程示意图。如图14所示,步骤S14可以包括步骤S147、步骤S148、步骤S149和步骤S140。
在步骤S147中,确定该人脸图像中的第二参考点。
在一种可能的实现方式中,第二参考点与下眼皮关键点的距离小于苹果肌中心与下眼皮关键点的距离。
在一种可能的实现方式中,第二参考点在苹果肌区域外。
在一种可能的实现方式中,第二参考点在苹果肌中心与下眼皮关键点的连线上。
例如,该人脸图像中的第二参考点为M 2
在步骤S148中,将苹果肌中心指向第二参考点的向量确定为第二参考向量。
例如,苹果肌中心为O,
Figure PCTCN2018117498-appb-000021
表示第二参考像素指向苹果肌中心的向量,第二参考点为M 2
Figure PCTCN2018117498-appb-000022
表示第二参考像素指向第二参考点的向量,则第二参考向量可以表示为
Figure PCTCN2018117498-appb-000023
其中,第二参考像素可以为坐标轴的原点。
在步骤S149中,根据第二参考向量,分别确定苹果肌区域中的各个像素对应的第三目标像素,其中,像素对应的第三目标像素指向该像素的向量与第二参考向量的方向相同。
在步骤S140中,将各个像素的像素值分别更新为对应的第三目标像素的像素值。
例如,苹果肌区域中的像素P 3对应的第三目标像素为像素P 3′,则可以将像素P 3的像素值更新为像素P 3′的像素值,即将像素P 3′的像素值作为像素P 3的像素值。
图14所示的示例通过圆形液化变形方法来提升苹果肌位置,达到苹果肌整体提升,能够赋予脸部更多活力。该示例的变形范围由苹果肌区域和苹果肌中心共同约束确定。
图15示出根据本公开实施例的人脸图像的处理方法步骤S149的一示例性的流程示意图。如图15所示,步骤S149可以包括步骤S1491至步骤S1493。
在步骤S1491中,确定苹果肌中心与苹果肌区域中的第二像素之间的第二距离。
例如,苹果肌中心为O,苹果肌区域中的第二像素为P 3
Figure PCTCN2018117498-appb-000024
表示第二参考像素指向苹果肌中心的向量,
Figure PCTCN2018117498-appb-000025
表示第二参考像素指向第二像素的向量,则苹果肌中心与苹果肌区域中的第二像素之间的第二距离可以表示为
Figure PCTCN2018117498-appb-000026
在步骤S1492中,根据苹果肌外轮廓圆的半径、第二距离和第二参考向量的模,确定第二系数。
例如,苹果肌外轮廓圆的半径为R,第二距离为
Figure PCTCN2018117498-appb-000027
第二参考向量的模为
Figure PCTCN2018117498-appb-000028
第二系数为α 2
在步骤S1493中,根据第二像素、第二系数和第二参考向量,确定第二像素对应的第三目标像素。
图16示出根据本公开实施例的人脸图像的处理方法中苹果肌中心O、第二参考点M 2、第二像素P 3、第二像素对应的第三目标像素P 3’以及苹果肌外轮廓圆的半径R的示意图。
图17示出根据本公开实施例的人脸图像的处理方法步骤S1492的一示例性的流程示意图。如图17所示,步骤S1492可以包括步骤S14921至步骤S14923。
在步骤S14921中,计算苹果肌外轮廓圆的半径的平方与第二距离的平方的第二差值。例如,第二差值等于
Figure PCTCN2018117498-appb-000029
在步骤S14922中,将第二差值与第二参考向量的模的平方相加,得到第二加和。
例如,第二加和等于
Figure PCTCN2018117498-appb-000030
在步骤S14923中,计算第二差值与第二加和的比值,得到第二系数。
例如,第二系数
Figure PCTCN2018117498-appb-000031
图18示出根据本公开实施例的人脸图像的处理方法步骤S1493的一示例性的流程示意图。如图18所示,步骤S1493可以包括步骤S14931至步骤S14934。
在步骤S14931中,将第二参考像素指向第二像素的向量确定为第二像素向量。
例如,第二像素向量可以表示为
Figure PCTCN2018117498-appb-000032
在步骤S14932中,计算第二系数与第二参考向量的第二乘积。
例如,第二系数与第二参考向量的第二乘积为
Figure PCTCN2018117498-appb-000033
在步骤S14933中,计算第二像素向量与第二乘积的差值,得到第二像素对应的第三目标像素向量。例如,第二像素对应的第三目标像素向量
Figure PCTCN2018117498-appb-000034
在步骤S14934中,根据第二参考像素的位置,以及第二像素对应的第三目标像素向量,确定第二像素对应的第三目标像素。其中,第二像素对应的第三目标像素向量
Figure PCTCN2018117498-appb-000035
表示第二参考像素指第三目标像素P 3′的向量。根据第二参考像素的位置,以及第二像素对应的第三目标像素向量
Figure PCTCN2018117498-appb-000036
可以确定第二像素对应的第三目标像素P 3′。
在一种可能的实现方式中,步骤S14可以依次包括步骤S141和步骤S142,步骤S143至步骤S146,以及步骤S147至步骤S140。
在另一种可能的实现方式中,步骤S14可以依次包括步骤S141和步骤S142,以及步骤S147至步骤S140。
在另一种可能的实现方式中,步骤S14可以依次包括步骤S141和步骤S142,步骤S147至步骤S140,以及步骤S143至步骤S146。
在另一种可能的实现方式中,步骤S14可以依次包括步骤S143至步骤S146,步骤S141和步骤S142,以及步骤S147至步骤S140。
需要说明的是,尽管以以上实现方式介绍了步骤S14如上,但本领域技术人员能够理解,本公开实施例应不限于此。本领域技术人员可以根据实际应用场景需求和/或个人喜好灵活设置步骤S14的具体实现方式,只要是根据步骤第一组步骤、第二组步骤和第三组步骤中的一组、两组或三组步骤来实现即可。其中,第一组步骤表示步骤S141和步骤S142,第二组步骤表示步骤S143至步骤S146,第三组步骤表示步骤S147至步骤S140。
图19示出根据本公开实施例的人脸图像的处理方法步骤S14的一示例性的流程示 意图。如图19所示,步骤S14可以包括步骤S141至步骤S140。对各步骤的描述参见上文,在此不再赘述。
在步骤S141中,分别确定苹果肌区域中的各个像素对应的第一目标像素,其中,像素对应的第一目标像素在苹果肌中心与像素的连线上。
在步骤S142中,将各个像素的像素值分别更新为对应的第一目标像素的像素值。
在步骤S143中,确定人脸图像中的第一参考点。
在步骤S144中,将苹果肌中心指向第一参考点的向量确定为第一参考向量。
在步骤S145中,根据第一参考向量,分别确定苹果肌区域中的各个像素对应的第二目标像素,其中,像素对应的第二目标像素指向像素的向量与第一参考向量的方向相同。
在步骤S146中,将各个像素的像素值分别更新为对应的第二目标像素的像素值。
在步骤S147中,确定人脸图像中的第二参考点。
在步骤S148中,将苹果肌中心指向第二参考点的向量确定为第二参考向量。
在步骤S149中,根据第二参考向量,分别确定苹果肌区域中的各个像素对应的第三目标像素,其中,像素对应的第三目标像素指向像素的向量与第二参考向量的方向相同。
在步骤S140中,将各个像素的像素值分别更新为对应的第三目标像素的像素值。
本公开实施例采用的苹果肌填充方法只采用变形方法,几乎不改变脸部的光影分布,因此苹果肌填充效果更自然。
可以理解,本公开实施例提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
此外,本公开实施例还提供了人脸图像的处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种人脸图像的处理方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图20示出根据本公开实施例的人脸图像的处理装置的结构示意图。如图20所示,该装置包括:获取模块21,配置为获取人脸图像中的人脸关键点和人脸偏转角度;第一确定模块22,配置为根据人脸关键点和人脸偏转角度,确定该人脸图像中的苹果肌中心;第二确定模块23,配置为根据人脸关键点和苹果肌中心,确定该人脸图像中的苹果肌区域;填充模块24,配置为对苹果肌区域进行颜色填充处理。
图21示出根据本公开实施例的人脸图像的处理装置的一示例性的结构示意图。如图21所示:
在一种可能的实现方式中,第一确定模块22包括:第一确定子模块221,配置为对人脸关键点进行插值处理,确定该人脸图像中的苹果肌中心的估计位置;调整子模块222,配置为根据人脸偏转角度,对苹果肌中心的估计位置进行调整,得到该人脸图像中的苹果肌中心。
在一种可能的实现方式中,第二确定模块23包括:相连子模块231,配置为将人脸关键点相连,得到人脸关键点对应的多边形;第二确定子模块232,配置为将多边形中以苹果肌中心为圆心的最大的圆确定为该人脸图像中的苹果肌外轮廓圆;第三确定子模块233,配置为根据苹果肌外轮廓圆,确定该人脸图像中的苹果肌区域。
在一种可能的实现方式中,第三确定子模块233配置为:采用该人脸图像中的脸部轮廓线对苹果肌外轮廓圆进行调整,得到该人脸图像中的苹果肌区域。
在一种可能的实现方式中,第三确定子模块233包括:第一采样单元,配置为对该人脸图像中的脸部轮廓线进行采样,得到脸部轮廓线上的采样点;第二采样单元,配置为对苹果肌外轮廓圆进行采样,得到苹果肌外轮廓圆上的采样点;曲线拟合单元,配置 为对脸部轮廓线上的采样点和苹果肌外轮廓圆上的采样点进行曲线拟合,得到该人脸图像中的苹果肌区域。
在一种可能的实现方式中,填充模块24包括:第四确定子模块241,配置为分别确定苹果肌区域中的各个像素对应的第一目标像素,其中,像素对应的第一目标像素在苹果肌中心与像素的连线上;第一更新子模块242,配置为将各个像素的像素值分别更新为对应的第一目标像素的像素值。
在一种可能的实现方式中,第四确定子模块241配置为:根据苹果肌填充力度系数,分别确定苹果肌区域中的各个像素对应的第一目标像素。
在一种可能的实现方式中,第四确定子模块241配置为:采用二阶导数恒大于0的下凸函数,分别确定苹果肌区域中的各个像素对应的第一目标像素。
在一种可能的实现方式中,填充模块24包括:第五确定子模块243,配置为确定该人脸图像中的第一参考点;第六确定子模块244,配置为将苹果肌中心指向第一参考点的向量确定为第一参考向量;第七确定子模块245,配置为根据第一参考向量,分别确定苹果肌区域中的各个像素对应的第二目标像素,其中,像素对应的第二目标像素指向该像素的向量与第一参考向量的方向相同;第二更新子模块246,配置为将各个像素的像素值分别更新为对应的第二目标像素的像素值。
在一种可能的实现方式中,第一参考点与鼻尖关键点的距离大于苹果肌中心与鼻尖关键点的距离。
在一种可能的实现方式中,第七确定子模块245包括:第一确定单元,配置为确定苹果肌中心与苹果肌区域中的第一像素之间的第一距离;第二确定单元,配置为根据苹果肌外轮廓圆的半径、第一距离和第一参考向量的模,确定第一系数;第三确定单元,配置为根据第一像素、第一系数和第一参考向量,确定第一像素对应的第二目标像素。
在一种可能的实现方式中,第二确定单元包括:第一计算子单元,配置为计算苹果肌外轮廓圆的半径的平方与第一距离的平方的第一差值;第二计算子单元,配置为将第一差值与第一参考向量的模的平方相加,得到第一加和;第三计算子单元,配置为计算第一差值与第一加和的比值,得到第一系数。
在一种可能的实现方式中,第三确定单元包括:第一确定子单元,配置为将第一参考像素指向第一像素的向量确定为第一像素向量;第四计算子单元,配置为计算第一系数与第一参考向量的第一乘积;第五计算子单元,配置为计算第一像素向量与第一乘积的差值,得到第一像素对应的第二目标像素向量;第二确定子单元,配置为根据第一参考像素的位置,以及第一像素对应的第二目标像素向量,确定第一像素对应的第二目标像素。
在一种可能的实现方式中,填充模块24包括:第八确定子模块247,配置为确定该人脸图像中的第二参考点;第九确定子模块248,配置为将苹果肌中心指向第二参考点的向量确定为第二参考向量;第十确定子模块249,配置为根据第二参考向量,分别确定苹果肌区域中的各个像素对应的第三目标像素,其中,像素对应的第三目标像素指向该像素的向量与第二参考向量的方向相同;第三更新子模块240,配置为将各个像素的像素值分别更新为对应的第三目标像素的像素值。
在一种可能的实现方式中,第二参考点在苹果肌中心与下眼皮关键点的连线上。
在一种可能的实现方式中,第十确定子模块249包括:第四确定单元,配置为确定苹果肌中心与苹果肌区域中的第二像素之间的第二距离;第五确定单元,配置为根据苹果肌外轮廓圆的半径、第二距离和第二参考向量的模,确定第二系数;第六确定单元,配置为根据第二像素、第二系数和第二参考向量,确定第二像素对应的第三目标像素。
在一种可能的实现方式中,第五确定单元包括:第六计算子单元,配置为计算苹果 肌外轮廓圆的半径的平方与第二距离的平方的第二差值;第七计算子单元,配置为将第二差值与第二参考向量的模的平方相加,得到第二加和;第八计算子单元,配置为计算第二差值与第二加和的比值,得到第二系数。
在一种可能的实现方式中,第六确定单元包括:第三确定子单元,配置为将第二参考像素指向第二像素的向量确定为第二像素向量;第九计算子单元,配置为计算第二系数与第二参考向量的第二乘积;第十计算子单元,配置为计算第二像素向量与第二乘积的差值,得到第二像素对应的第三目标像素向量;第四确定子单元,配置为根据第二参考像素的位置,以及第二像素对应的第三目标像素向量,确定第二像素对应的第三目标像素。
在一种可能的实现方式中,填充模块24包括:第四确定子模块241,配置为分别确定苹果肌区域中的各个像素对应的第一目标像素,其中,像素对应的第一目标像素在苹果肌中心与像素的连线上;第一更新子模块242,配置为将各个像素的像素值分别更新为对应的第一目标像素的像素值;第五确定子模块243,配置为确定该人脸图像中的第一参考点;第六确定子模块244,配置为将苹果肌中心指向第一参考点的向量确定为第一参考向量;第七确定子模块245,配置为根据第一参考向量,分别确定苹果肌区域中的各个像素对应的第二目标像素,其中,像素对应的第二目标像素指向该像素的向量与第一参考向量的方向相同;第二更新子模块246,配置为将各个像素的像素值分别更新为对应的第二目标像素的像素值;第八确定子模块247,配置为确定该人脸图像中的第二参考点;第九确定子模块248,配置为将苹果肌中心指向第二参考点的向量确定为第二参考向量;第十确定子模块249,配置为根据第二参考向量,分别确定苹果肌区域中的各个像素对应的第三目标像素,其中,像素对应的第三目标像素指向该像素的向量与第二参考向量的方向相同;第三更新子模块240,配置为将各个像素的像素值分别更新为对应的第三目标像素的像素值。
本公开实施例通过获取人脸图像中的人脸关键点和人脸偏转角度,根据人脸关键点和人脸偏转角度,确定人脸图像中的苹果肌中心,根据人脸关键点和苹果肌中心,确定人脸图像中的苹果肌区域,并对苹果肌区域进行颜色填充处理,由此能够准确地定位苹果肌区域,基于准确定位的苹果肌区域进行苹果肌填充处理,使填充效果更自然。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器和用于存储处理器可执行指令的存储器;其中,所述处理器用于运行所述计算机程序时,执行本公开实施例上述的方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图22是根据一示例性实施例示出的一种电子设备800的结构示意图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图22,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD,Liquid Crystal Display)和触摸面板(TP,Touch Panel)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(CMOS,Complementary Metal Oxide Semiconductor)或电荷耦合器件(CCD,Charge Coupled Device)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线保真(WiFi),2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID,Radio Frequency Identification)技术,红外数据协会(IrDA,Infrared Data Association)技术,超宽带(UWB,Ultra Wideband)技术,蓝牙(BT,Blue Tooth)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、数字信号处理器(DSP,Digital Signal Processing)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD,Programmable Logic Device)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图23是根据一示例性实施例示出的一种电子设备1900的结构示意图。例如,电子设备1900可以被提供为一服务器。参照图23,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开实施例可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开实施例的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM,Random Access Memory)、只读存储器(ROM,Read-Only Memory)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM,Static Random Access Memory)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸 如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (40)

  1. 一种人脸图像的处理方法,包括:
    获取人脸图像中的人脸关键点和人脸偏转角度;
    根据所述人脸关键点和所述人脸偏转角度,确定所述人脸图像中的苹果肌中心;
    根据所述人脸关键点和所述苹果肌中心,确定所述人脸图像中的苹果肌区域;
    对所述苹果肌区域进行颜色填充处理。
  2. 根据权利要求1所述的方法,其中,所述根据所述人脸关键点和所述人脸偏转角度,确定所述人脸图像中的苹果肌中心,包括:
    对所述人脸关键点进行插值处理,确定所述人脸图像中的苹果肌中心的估计位置;
    根据所述人脸偏转角度,对所述苹果肌中心的估计位置进行调整,得到所述人脸图像中的苹果肌中心。
  3. 根据权利要求1或2所述的方法,其中,所述根据所述人脸关键点和所述苹果肌中心,确定所述人脸图像中的苹果肌区域,包括:
    将所述人脸关键点相连,得到所述人脸关键点对应的多边形;
    将所述多边形中以所述苹果肌中心为圆心的最大的圆确定为所述人脸图像中的苹果肌外轮廓圆;
    根据所述苹果肌外轮廓圆,确定所述人脸图像中的苹果肌区域。
  4. 根据权利要求3所述的方法,其中,所述根据所述苹果肌外轮廓圆,确定所述人脸图像中的苹果肌区域,包括:
    采用所述人脸图像中的脸部轮廓线对所述苹果肌外轮廓圆进行调整,得到所述人脸图像中的苹果肌区域。
  5. 根据权利要求4所述的方法,其中,所述采用所述人脸图像中的脸部轮廓线对所述苹果肌外轮廓圆进行调整,得到所述人脸图像中的苹果肌区域,包括:
    对所述人脸图像中的脸部轮廓线进行采样,得到所述脸部轮廓线上的采样点;
    对所述苹果肌外轮廓圆进行采样,得到所述苹果肌外轮廓圆上的采样点;
    对所述脸部轮廓线上的采样点和所述苹果肌外轮廓圆上的采样点进行曲线拟合,得到所述人脸图像中的苹果肌区域。
  6. 根据权利要求1至5中任意一项所述的方法,其中,所述对所述苹果肌区域进行颜色填充处理,包括:
    分别确定所述苹果肌区域中的各个像素对应的第一目标像素,其中,所述像素对应的第一目标像素在所述苹果肌中心与所述像素的连线上;
    将所述各个像素的像素值分别更新为对应的第一目标像素的像素值。
  7. 根据权利要求6所述的方法,其中,所述分别确定所述苹果肌区域中的各个像素对应的第一目标像素,包括:
    根据苹果肌填充力度系数,分别确定所述苹果肌区域中的各个像素对应的第一目标像素。
  8. 根据权利要求6或7所述的方法,其中,所述分别确定所述苹果肌区域中的各个像素对应的第一目标像素,包括:
    采用二阶导数恒大于0的下凸函数,分别确定所述苹果肌区域中的各个像素对应的第一目标像素。
  9. 根据权利要求1至8中任意一项所述的方法,其中,所述对所述苹果肌区域进行颜色填充处理,包括:
    确定所述人脸图像中的第一参考点;
    将所述苹果肌中心指向所述第一参考点的向量确定为第一参考向量;
    根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,其中,所述像素对应的第二目标像素指向所述像素的向量与所述第一参考向量的方向相同;
    将所述各个像素的像素值分别更新为对应的第二目标像素的像素值。
  10. 根据权利要求9所述的方法,其中,所述第一参考点与鼻尖关键点的距离大于所述苹果肌中心与鼻尖关键点的距离。
  11. 根据权利要求9或10所述的方法,其中,所述根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,包括:
    确定所述苹果肌中心与所述苹果肌区域中的第一像素之间的第一距离;
    根据苹果肌外轮廓圆的半径、所述第一距离和所述第一参考向量的模,确定第一系数;
    根据所述第一像素、所述第一系数和所述第一参考向量,确定所述第一像素对应的第二目标像素。
  12. 根据权利要求11所述的方法,其中,所述根据苹果肌外轮廓圆的半径、所述第一距离和所述参考向量的模,确定第一系数,包括:
    计算所述苹果肌外轮廓圆的半径的平方与所述第一距离的平方的第一差值;
    将所述第一差值与所述第一参考向量的模的平方相加,得到第一加和;
    计算所述第一差值与所述第一加和的比值,得到所述第一系数。
  13. 根据权利要求11或12所述的方法,其中,所述根据所述第一像素、所述第一系数和所述第一参考向量,确定所述第一像素对应的第二目标像素,包括:
    将第一参考像素指向所述第一像素的向量确定为第一像素向量;
    计算所述第一系数与所述第一参考向量的第一乘积;
    计算所述第一像素向量与第一乘积的差值,得到所述第一像素对应的第二目标像素向量;
    根据所述第一参考像素的位置,以及所述第一像素对应的第二目标像素向量,确定所述第一像素对应的第二目标像素。
  14. 根据权利要求1至13中任意一项所述的方法,其中,所述对所述苹果肌区域进行颜色填充处理,包括:
    确定所述人脸图像中的第二参考点;
    将所述苹果肌中心指向所述第二参考点的向量确定为第二参考向量;
    根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,其中,所述像素对应的第三目标像素指向所述像素的向量与所述第二参考向量的方向相同;
    将所述各个像素的像素值分别更新为对应的第三目标像素的像素值。
  15. 根据权利要求14所述的方法,其中,所述第二参考点在所述苹果肌中心与下眼皮关键点的连线上。
  16. 根据权利要求14或15所述的方法,其中,所述根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,包括:
    确定所述苹果肌中心与所述苹果肌区域中的第二像素之间的第二距离;
    根据苹果肌外轮廓圆的半径、所述第二距离和所述第二参考向量的模,确定第二系数;
    根据所述第二像素、所述第二系数和所述第二参考向量,确定所述第二像素对应的 第三目标像素。
  17. 根据权利要求16所述的方法,其中,所述根据苹果肌外轮廓圆的半径、所述第二距离和所述第二参考向量的模,确定第二系数,包括:
    计算所述苹果肌外轮廓圆的半径的平方与所述第二距离的平方的第二差值;
    将所述第二差值与所述第二参考向量的模的平方相加,得到第二加和;
    计算所述第二差值与所述第二加和的比值,得到所述第二系数。
  18. 根据权利要求16或17所述的方法,其中,所述根据所述第二像素、所述第二系数和所述第二参考向量,确定所述第二像素对应的第三目标像素,包括:
    将第二参考像素指向所述第二像素的向量确定为第二像素向量;
    计算所述第二系数与所述第二参考向量的第二乘积;
    计算所述第二像素向量与第二乘积的差值,得到所述第二像素对应的第三目标像素向量;
    根据所述第二参考像素的位置,以及所述第二像素对应的第三目标像素向量,确定所述第二像素对应的第三目标像素。
  19. 根据权利要求1至5中任意一项所述的方法,其中,所述对所述苹果肌区域进行颜色填充处理,包括:
    分别确定所述苹果肌区域中的各个像素对应的第一目标像素,其中,所述像素对应的第一目标像素在所述苹果肌中心与所述像素的连线上;
    将所述各个像素的像素值分别更新为对应的第一目标像素的像素值;
    确定所述人脸图像中的第一参考点,其中,所述第一参考点与鼻尖关键点的距离大于所述苹果肌中心与鼻尖关键点的距离;
    将所述苹果肌中心指向所述第一参考点的向量确定为第一参考向量;
    根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,其中,所述像素对应的第二目标像素指向所述像素的向量与所述第一参考向量的方向相同;
    将所述各个像素的像素值分别更新为对应的第二目标像素的像素值;
    确定所述人脸图像中的第二参考点,其中,所述第二参考点在所述苹果肌中心与下眼皮关键点的连线上;
    将所述苹果肌中心指向所述第二参考点的向量确定为第二参考向量;
    根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,其中,所述像素对应的第三目标像素指向所述像素的向量与所述第二参考向量的方向相同;
    将所述各个像素的像素值分别更新为对应的第三目标像素的像素值。
  20. 一种人脸图像的处理装置,包括:
    获取模块,配置为获取人脸图像中的人脸关键点和人脸偏转角度;
    第一确定模块,配置为根据所述人脸关键点和所述人脸偏转角度,确定所述人脸图像中的苹果肌中心;
    第二确定模块,配置为根据所述人脸关键点和所述苹果肌中心,确定所述人脸图像中的苹果肌区域;
    填充模块,配置为对所述苹果肌区域进行颜色填充处理。
  21. 根据权利要求20所述的装置,其中,所述第一确定模块包括:
    第一确定子模块,配置为对所述人脸关键点进行插值处理,确定所述人脸图像中的苹果肌中心的估计位置;
    调整子模块,配置为根据所述人脸偏转角度,对所述苹果肌中心的估计位置进行调 整,得到所述人脸图像中的苹果肌中心。
  22. 根据权利要求20或21所述的装置,其中,所述第二确定模块包括:
    相连子模块,配置为将所述人脸关键点相连,得到所述人脸关键点对应的多边形;
    第二确定子模块,配置为将所述多边形中以所述苹果肌中心为圆心的最大的圆确定为所述人脸图像中的苹果肌外轮廓圆;
    第三确定子模块,配置为根据所述苹果肌外轮廓圆,确定所述人脸图像中的苹果肌区域。
  23. 根据权利要求22所述的装置,其中,所述第三确定子模块配置为:
    采用所述人脸图像中的脸部轮廓线对所述苹果肌外轮廓圆进行调整,得到所述人脸图像中的苹果肌区域。
  24. 根据权利要求23所述的装置,其中,所述第三确定子模块包括:
    第一采样单元,配置为对所述人脸图像中的脸部轮廓线进行采样,得到所述脸部轮廓线上的采样点;
    第二采样单元,配置为对所述苹果肌外轮廓圆进行采样,得到所述苹果肌外轮廓圆上的采样点;
    曲线拟合单元,配置为对所述脸部轮廓线上的采样点和所述苹果肌外轮廓圆上的采样点进行曲线拟合,得到所述人脸图像中的苹果肌区域。
  25. 根据权利要求20至24中任意一项所述的装置,其中,所述填充模块包括:
    第四确定子模块,配置为分别确定所述苹果肌区域中的各个像素对应的第一目标像素,其中,所述像素对应的第一目标像素在所述苹果肌中心与所述像素的连线上;
    第一更新子模块,配置为将所述各个像素的像素值分别更新为对应的第一目标像素的像素值。
  26. 根据权利要求25所述的装置,其中,所述第四确定子模块配置为:
    根据苹果肌填充力度系数,分别确定所述苹果肌区域中的各个像素对应的第一目标像素。
  27. 根据权利要求25或26所述的装置,其中,所述第四确定子模块配置为:
    采用二阶导数恒大于0的下凸函数,分别确定所述苹果肌区域中的各个像素对应的第一目标像素。
  28. 根据权利要求20至27中任意一项所述的装置,其中,所述填充模块包括:
    第五确定子模块,配置为确定所述人脸图像中的第一参考点;
    第六确定子模块,配置为将所述苹果肌中心指向所述第一参考点的向量确定为第一参考向量;
    第七确定子模块,配置为根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,其中,所述像素对应的第二目标像素指向所述像素的向量与所述第一参考向量的方向相同;
    第二更新子模块,配置为将所述各个像素的像素值分别更新为对应的第二目标像素的像素值。
  29. 根据权利要求28所述的装置,其中,所述第一参考点与鼻尖关键点的距离大于所述苹果肌中心与鼻尖关键点的距离。
  30. 根据权利要求28或29所述的装置,其中,所述第七确定子模块包括:
    第一确定单元,配置为确定所述苹果肌中心与所述苹果肌区域中的第一像素之间的第一距离;
    第二确定单元,配置为根据苹果肌外轮廓圆的半径、所述第一距离和所述第一参考向量的模,确定第一系数;
    第三确定单元,配置为根据所述第一像素、所述第一系数和所述第一参考向量,确定所述第一像素对应的第二目标像素。
  31. 根据权利要求30所述的装置,其中,所述第二确定单元包括:
    第一计算子单元,配置为计算所述苹果肌外轮廓圆的半径的平方与所述第一距离的平方的第一差值;
    第二计算子单元,配置为将所述第一差值与所述第一参考向量的模的平方相加,得到第一加和;
    第三计算子单元,配置为计算所述第一差值与所述第一加和的比值,得到所述第一系数。
  32. 根据权利要求30或31所述的装置,其中,所述第三确定单元包括:
    第一确定子单元,配置为将第一参考像素指向所述第一像素的向量确定为第一像素向量;
    第四计算子单元,配置为计算所述第一系数与所述第一参考向量的第一乘积;
    第五计算子单元,配置为计算所述第一像素向量与第一乘积的差值,得到所述第一像素对应的第二目标像素向量;
    第二确定子单元,配置为根据所述第一参考像素的位置,以及所述第一像素对应的第二目标像素向量,确定所述第一像素对应的第二目标像素。
  33. 根据权利要求20至32中任意一项所述的装置,其中,所述填充模块包括:
    第八确定子模块,配置为确定所述人脸图像中的第二参考点;
    第九确定子模块,配置为将所述苹果肌中心指向所述第二参考点的向量确定为第二参考向量;
    第十确定子模块,配置为根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,其中,所述像素对应的第三目标像素指向所述像素的向量与所述第二参考向量的方向相同;
    第三更新子模块,配置为将所述各个像素的像素值分别更新为对应的第三目标像素的像素值。
  34. 根据权利要求33所述的装置,其中,所述第二参考点在所述苹果肌中心与下眼皮关键点的连线上。
  35. 根据权利要求33或34所述的装置,其中,所述第十确定子模块包括:
    第四确定单元,配置为确定所述苹果肌中心与所述苹果肌区域中的第二像素之间的第二距离;
    第五确定单元,配置为根据苹果肌外轮廓圆的半径、所述第二距离和所述第二参考向量的模,确定第二系数;
    第六确定单元,配置为根据所述第二像素、所述第二系数和所述第二参考向量,确定所述第二像素对应的第三目标像素。
  36. 根据权利要求35所述的装置,其中,所述第五确定单元包括:
    第六计算子单元,配置为计算所述苹果肌外轮廓圆的半径的平方与所述第二距离的平方的第二差值;
    第七计算子单元,配置为将所述第二差值与所述第二参考向量的模的平方相加,得到第二加和;
    第八计算子单元,配置为计算所述第二差值与所述第二加和的比值,得到所述第二系数。
  37. 根据权利要求35或36所述的装置,其中,所述第六确定单元包括:
    第三确定子单元,配置为将第二参考像素指向所述第二像素的向量确定为第二像素 向量;
    第九计算子单元,配置为计算所述第二系数与所述第二参考向量的第二乘积;
    第十计算子单元,配置为计算所述第二像素向量与第二乘积的差值,得到所述第二像素对应的第三目标像素向量;
    第四确定子单元,配置为根据所述第二参考像素的位置,以及所述第二像素对应的第三目标像素向量,确定所述第二像素对应的第三目标像素。
  38. 根据权利要求20至24中任意一项所述的装置,其中,所述填充模块包括:
    第四确定子模块,配置为分别确定所述苹果肌区域中的各个像素对应的第一目标像素,其中,所述像素对应的第一目标像素在所述苹果肌中心与所述像素的连线上;
    第一更新子模块,配置为将所述各个像素的像素值分别更新为对应的第一目标像素的像素值;
    第五确定子模块,配置为确定所述人脸图像中的第一参考点,其中,所述第一参考点与鼻尖关键点的距离大于所述苹果肌中心与鼻尖关键点的距离;
    第六确定子模块,配置为将所述苹果肌中心指向所述第一参考点的向量确定为第一参考向量;
    第七确定子模块,配置为根据所述第一参考向量,分别确定所述苹果肌区域中的各个像素对应的第二目标像素,其中,所述像素对应的第二目标像素指向所述像素的向量与所述第一参考向量的方向相同;
    第二更新子模块,配置为将所述各个像素的像素值分别更新为对应的第二目标像素的像素值;
    第八确定子模块,配置为确定所述人脸图像中的第二参考点,其中,所述第二参考点在所述苹果肌中心与下眼皮关键点的连线上;
    第九确定子模块,配置为将所述苹果肌中心指向所述第二参考点的向量确定为第二参考向量;
    第十确定子模块,配置为根据所述第二参考向量,分别确定所述苹果肌区域中的各个像素对应的第三目标像素,其中,所述像素对应的第三目标像素指向所述像素的向量与所述第二参考向量的方向相同;
    第三更新子模块,配置为将所述各个像素的像素值分别更新为对应的第三目标像素的像素值。
  39. 一种电子设备,包括:处理器和用于存储处理器可执行指令的存储器;
    其中,所述处理器用于运行所述计算机程序时,执行权利要求1至19中任意一项所述的方法。
  40. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至19中任意一项所述的方法。
PCT/CN2018/117498 2018-09-28 2018-11-26 人脸图像的处理方法及装置、电子设备和存储介质 WO2020062532A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
SG11201913734TA SG11201913734TA (en) 2018-09-28 2018-11-26 Face image processing method and apparatuse, electronic device, and storage medium
JP2019571734A JP6923682B2 (ja) 2018-09-28 2018-11-26 顔画像の処理方法および装置、電子機器ならびに記憶媒体
US16/729,427 US11341768B2 (en) 2018-09-28 2019-12-29 Face image processing method and apparatus, electronic device, and storage medium
US17/696,223 US11734804B2 (en) 2018-09-28 2022-03-16 Face image processing method and apparatus, electronic device, and storage medium
US17/696,240 US11741583B2 (en) 2018-09-28 2022-03-16 Face image processing method and apparatus, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811141270.9A CN109446912B (zh) 2018-09-28 2018-09-28 人脸图像的处理方法及装置、电子设备和存储介质
CN201811141270.9 2018-09-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/729,427 Continuation US11341768B2 (en) 2018-09-28 2019-12-29 Face image processing method and apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020062532A1 true WO2020062532A1 (zh) 2020-04-02

Family

ID=65544695

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/117498 WO2020062532A1 (zh) 2018-09-28 2018-11-26 人脸图像的处理方法及装置、电子设备和存储介质

Country Status (6)

Country Link
US (3) US11341768B2 (zh)
JP (1) JP6923682B2 (zh)
CN (1) CN109446912B (zh)
SG (1) SG11201913734TA (zh)
TW (1) TWI718631B (zh)
WO (1) WO2020062532A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116109479A (zh) * 2023-04-17 2023-05-12 广州趣丸网络科技有限公司 虚拟形象的面部调整方法、装置、计算机设备和存储介质
CN117095450A (zh) * 2023-10-20 2023-11-21 武汉大学人民医院(湖北省人民医院) 一种基于图像的眼干程度评估系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108230331A (zh) * 2017-09-30 2018-06-29 深圳市商汤科技有限公司 图像处理方法和装置、电子设备、计算机存储介质
CN109446912B (zh) * 2018-09-28 2021-04-09 北京市商汤科技开发有限公司 人脸图像的处理方法及装置、电子设备和存储介质
CN110288551B (zh) * 2019-06-29 2021-11-09 北京字节跳动网络技术有限公司 视频美化方法、装置及电子设备
JP7345306B2 (ja) * 2019-07-30 2023-09-15 キヤノン株式会社 画像処理装置、画像処理方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100166331A1 (en) * 2008-12-31 2010-07-01 Altek Corporation Method for beautifying human face in digital image
CN107862274A (zh) * 2017-10-31 2018-03-30 广东欧珀移动通信有限公司 美颜方法、装置、电子设备和计算机可读存储介质
CN108447017A (zh) * 2018-05-31 2018-08-24 Oppo广东移动通信有限公司 人脸虚拟整容方法和装置
CN108550185A (zh) * 2018-05-31 2018-09-18 Oppo广东移动通信有限公司 人脸美化处理方法和装置

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7221809B2 (en) * 2001-12-17 2007-05-22 Genex Technologies, Inc. Face recognition system and method
US8103061B2 (en) * 2006-10-02 2012-01-24 Johnson & Johnson Consumer Companies, Inc. Method and apparatus for identifying facial regions
JP4760999B1 (ja) * 2010-10-29 2011-08-31 オムロン株式会社 画像処理装置、画像処理方法、および制御プログラム
TW201222432A (en) * 2010-11-26 2012-06-01 Inst Information Industry System, device, method, and computer program product for facial defect analysis using angular facial image
TWI545947B (zh) * 2011-04-08 2016-08-11 南昌歐菲光電技術有限公司 具有影像擷取及分析模組之顯示裝置
CN102201061B (zh) * 2011-06-24 2012-10-31 常州锐驰电子科技有限公司 基于多阶层过滤人脸识别的智能安全监控系统及方法
JP5991536B2 (ja) * 2013-02-01 2016-09-14 パナソニックIpマネジメント株式会社 メイクアップ支援装置、メイクアップ支援方法、およびメイクアップ支援プログラム
US9149124B1 (en) * 2013-04-04 2015-10-06 Joseph Savovic Engineered seating system for use in medical lift chairs
CN104599297B (zh) * 2013-10-31 2018-07-10 厦门美图网科技有限公司 一种对人脸自动上腮红的图像处理方法
CN104091162B (zh) * 2014-07-17 2017-06-23 东南大学 基于特征点的三维人脸识别方法
US9589178B2 (en) * 2014-09-12 2017-03-07 Htc Corporation Image processing with facial features
WO2017142143A1 (en) * 2016-02-19 2017-08-24 Samsung Electronics Co., Ltd. Method and apparatus for providing summary information of a video
CN106446781A (zh) * 2016-08-29 2017-02-22 厦门美图之家科技有限公司 一种人脸图像处理方法及装置
CN106682598B (zh) * 2016-12-14 2021-02-19 华南理工大学 一种基于级联回归的多姿态的人脸特征点检测方法
CN108346171B (zh) * 2017-01-25 2021-12-10 斑马智行网络(香港)有限公司 一种图像处理方法、装置、设备和计算机存储介质
CN107958439B (zh) * 2017-11-09 2021-04-27 北京小米移动软件有限公司 图像处理方法及装置
CN109446912B (zh) * 2018-09-28 2021-04-09 北京市商汤科技开发有限公司 人脸图像的处理方法及装置、电子设备和存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100166331A1 (en) * 2008-12-31 2010-07-01 Altek Corporation Method for beautifying human face in digital image
CN107862274A (zh) * 2017-10-31 2018-03-30 广东欧珀移动通信有限公司 美颜方法、装置、电子设备和计算机可读存储介质
CN108447017A (zh) * 2018-05-31 2018-08-24 Oppo广东移动通信有限公司 人脸虚拟整容方法和装置
CN108550185A (zh) * 2018-05-31 2018-09-18 Oppo广东移动通信有限公司 人脸美化处理方法和装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116109479A (zh) * 2023-04-17 2023-05-12 广州趣丸网络科技有限公司 虚拟形象的面部调整方法、装置、计算机设备和存储介质
CN116109479B (zh) * 2023-04-17 2023-07-18 广州趣丸网络科技有限公司 虚拟形象的面部调整方法、装置、计算机设备和存储介质
CN117095450A (zh) * 2023-10-20 2023-11-21 武汉大学人民医院(湖北省人民医院) 一种基于图像的眼干程度评估系统
CN117095450B (zh) * 2023-10-20 2024-01-09 武汉大学人民医院(湖北省人民医院) 一种基于图像的眼干程度评估系统

Also Published As

Publication number Publication date
US11734804B2 (en) 2023-08-22
US20220207910A1 (en) 2022-06-30
US11341768B2 (en) 2022-05-24
TWI718631B (zh) 2021-02-11
US20220207911A1 (en) 2022-06-30
CN109446912A (zh) 2019-03-08
JP6923682B2 (ja) 2021-08-25
CN109446912B (zh) 2021-04-09
US20200193142A1 (en) 2020-06-18
JP2021501924A (ja) 2021-01-21
TW202013316A (zh) 2020-04-01
SG11201913734TA (en) 2020-05-28
US11741583B2 (en) 2023-08-29

Similar Documents

Publication Publication Date Title
WO2020062532A1 (zh) 人脸图像的处理方法及装置、电子设备和存储介质
CN107680033B (zh) 图片处理方法及装置
US10032076B2 (en) Method and device for displaying image
JP6134446B2 (ja) 画像分割方法、画像分割装置、画像分割デバイス、プログラム及び記録媒体
CN107692997B (zh) 心率检测方法及装置
WO2016011747A1 (zh) 肤色调整方法和装置
WO2020155711A1 (zh) 图像生成方法及装置、电子设备和存储介质
WO2020192252A1 (zh) 图像生成方法及装置、电子设备和存储介质
WO2022179025A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN107958439B (zh) 图像处理方法及装置
WO2020007241A1 (zh) 图像处理方法和装置、电子设备以及计算机可读存储介质
CN109377446B (zh) 人脸图像的处理方法及装置、电子设备和存储介质
CN109840939B (zh) 三维重建方法、装置、电子设备及存储介质
CN110889382A (zh) 虚拟形象渲染方法及装置、电子设备和存储介质
CN107341777B (zh) 图片处理方法及装置
CN109325908B (zh) 图像处理方法及装置、电子设备和存储介质
CN111553864A (zh) 图像修复方法及装置、电子设备和存储介质
CN111243011A (zh) 关键点检测方法及装置、电子设备和存储介质
CN112785672B (zh) 图像处理方法及装置、电子设备和存储介质
CN110807769B (zh) 图像显示控制方法及装置
CN111860388A (zh) 图像处理方法及装置、电子设备和存储介质
CN112613447A (zh) 关键点检测方法及装置、电子设备和存储介质
CN112597944A (zh) 关键点检测方法及装置、电子设备和存储介质
KR20210049649A (ko) 얼굴 이미지를 강화하는 방법 및 장치, 전자 기기
CN113744384A (zh) 三维人脸重建方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019571734

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 18935794

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08/07/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18935794

Country of ref document: EP

Kind code of ref document: A1