WO2023142645A1 - Image processing method and apparatus, and electronic device, storage medium and computer program product - Google Patents

Image processing method and apparatus, and electronic device, storage medium and computer program product Download PDF

Info

Publication number
WO2023142645A1
WO2023142645A1 PCT/CN2022/134617 CN2022134617W WO2023142645A1 WO 2023142645 A1 WO2023142645 A1 WO 2023142645A1 CN 2022134617 W CN2022134617 W CN 2022134617W WO 2023142645 A1 WO2023142645 A1 WO 2023142645A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
area
mask image
information
pixel
Prior art date
Application number
PCT/CN2022/134617
Other languages
French (fr)
Chinese (zh)
Inventor
苏柳
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023142645A1 publication Critical patent/WO2023142645A1/en

Links

Images

Classifications

    • G06T5/77
    • G06T3/04
    • 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/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • 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 technology, and in particular to an image processing method, device, electronic equipment, storage medium and computer program product.
  • the beautification of the human face mainly focuses on the whitening of the whole face, the repair of blemishes, the shape adjustment of local organs, and the superimposition of makeup effects. It is still difficult to achieve the desired effect on some detailed makeup processing of local organs.
  • an image processing method including: determining a first mask image and a second mask image of a face image, the first mask image being used to characterize the face image A first part area, the second mask image is used to represent a second part area of the face image, the second part area is at least partially different from the first part area; lip processing information is obtained, and the The lip processing information includes area information and beautification parameter information, the area information is used to indicate the range of the second part area, and the beautification parameter information is used to indicate the beautification parameters of the second part area; according to the Adjusting the range of the second part area in the second mask image according to the area information and the first mask image; according to the beautification parameter information and the adjusted second mask image Beautification processing is performed to obtain a target image in which the color of the second part region is adjusted.
  • the adjusting the range of the second part region in the second mask image according to the region information and the first mask image includes: according to the region information and the first mask image A mask image, performing an image erosion operation on the second mask image to adjust the range of the second part area; during the image erosion process, the distance between the second part area and the first part area At least some of the regions overlap.
  • performing an image erosion operation on the second mask image according to the area information and the first mask image, and adjusting the range of the second part area includes: The first mask image performs image erosion from the first edge to the second edge of the second part area in the second mask image until the adjustment condition corresponding to the area information is satisfied.
  • the adjustment condition corresponding to the area information is that the ratio of the current second part area to the original second part area is the value of the area information.
  • the performing image erosion from the first edge to the second edge of the second part region in the second mask image according to the first mask image includes: using the first mask image The first edge of the second part area begins to determine the target pixel in turn toward the second edge; determine the target area according to the position of the target pixel in the second mask image; determine the target area according to the position of the first mask image in the target area The pixel value of each pixel in the second mask image is used to determine a reference pixel in the second mask image; and the pixel value of the target pixel is updated according to the pixel value of the reference pixel in the second mask image.
  • the determining the reference pixel in the second mask image according to the pixel value of each pixel in the target area in the first mask image includes: acquiring the first mask image A pixel value of each pixel in the target area in the mask image; determining a reference pixel in the second mask image according to a position in the first mask image of a pixel whose pixel value is greater than a pixel threshold.
  • the determining the first mask image of the face image includes: determining a first reference mask image, the first reference mask image is used to characterize the predicted shape of the first part region ; identifying a first part area in the face image; generating a first mask image according to the first part area and the first reference mask image.
  • the determining the second mask image of the face image includes: determining a second reference mask image, and the second reference mask image is used to characterize the edge of the first part region Predicting the shape; identifying a first part area in the face image; generating a second mask image according to the first part area and the second reference mask image.
  • the acquiring lip processing information includes: generating the region information in response to a trigger event for the region adjustment control; generating the region information in response to a trigger event for the color adjustment control the beautification parameter information; and determine the lip processing information according to the area information and the beautification parameter information.
  • the beautification process is performed on the face image according to the beautification parameter information and the adjusted second mask image to obtain the adjusted target of the second part region color
  • the image includes: generating a beautification image according to the beautification parameter information and the adjusted second mask image, the beautification image is an image filled with the color represented by the beautification parameter information in the second part area; performing image fusion on the beautified image and the face image to obtain a target image in which the color of the second part region is adjusted.
  • the image processing method is used to add a lip line beautification effect to the face image, the first part area is a lip area, and the second part area is a lip line area.
  • an image processing apparatus including: an image determination section configured to determine a first mask image and a second mask image of a face image, the first mask image being used for Characterizing a first part region of the human face image, the second mask image is used to characterize a second part region of the human face image, the second part region is at least partially different from the first part region;
  • the information acquisition part is configured to acquire lip processing information, and the lip processing information includes area information and beautification parameter information;
  • the range adjustment part is configured to adjust the lip processing information according to the area information and the first mask image.
  • the color adjustment part is configured to perform beautification processing on the face image according to the beautification parameter information and the adjusted second mask image to obtain the obtained The target image whose color is adjusted for the second part area.
  • the range adjustment part includes: an image erosion subsection configured to perform an image erosion operation on the second mask image according to the region information and the first mask image , adjusting the range of the second part area; during the image erosion process, the second part area overlaps with at least part of the first part area.
  • the image erosion sub-part includes: an image erosion part configured to, according to the first mask image, generate the first edge of the second part region in the second mask image Image erosion is performed toward the second edge until the adjustment condition corresponding to the area information is satisfied.
  • the adjustment condition corresponding to the area information is that the ratio of the current second part area to the original second part area is the value of the area information.
  • the image erosion part includes: a target pixel determination subsection configured to sequentially determine target pixels from the first edge to the second edge of the second part area; the area determination subsection , configured to determine a target area according to the position of the target pixel in the second mask image; a reference pixel determining subsection, configured to determine each pixel in the target area according to the first mask image The pixel value of the second mask image determines the reference pixel in the second mask image; the pixel value updating subsection is configured to update the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image .
  • the reference pixel determination subsection includes: a pixel value acquisition subsection configured to acquire the pixel value of each pixel of the first mask image in the target area; the reference pixel The screening subpart is configured to determine a reference pixel in the second mask image according to the position of the pixel whose pixel value is greater than a pixel threshold in the first mask image.
  • the image determination part includes: a first reference image determination subsection configured to determine a first reference mask image, and the first reference mask image is used to characterize the first Predicting the shape of the part area; the first area identification subsection is configured to identify the first part area in the face image; the first image generation subsection is configured to combine the first part area with the first A first mask image is generated with reference to the mask image.
  • the image determination part includes: a second reference image determination subsection configured to determine a second reference mask image, and the second reference mask image is used to characterize the first The edge prediction shape of the part area; the second area identification subsection is configured to identify the first part area in the face image; the second image generation subsection is configured to combine the first part area with the The second reference mask image generates a second mask image.
  • the information acquisition part includes: an information determination subsection configured to generate the region information in response to a trigger event for the region adjustment control; A trigger event to generate the beautification parameter information; the information generating subpart is configured to determine the lip processing information according to the area information and the beautification parameter information.
  • the color adjustment part includes: a beautification image generating subsection configured to generate a beautification image according to the beautification parameter information and the adjusted second mask image, the beautification image In order to fill the image representing the color of the beautification parameter information in the second part area; the image fusion subsection is configured to perform image fusion on the beautification image and the face image to obtain the second part area The color-adjusted target image.
  • the image processing method is used to add a lip line beautification effect to the face image, the first part area is a lip area, and the second part area is a lip line area.
  • an electronic device including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
  • a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented.
  • a computer program product includes a non-transitory computer storage medium storing a computer program, and the above method is implemented when the computer program is read and executed by a computer.
  • the area that needs to be beautified and edited can be obtained.
  • the beautification process can be used to add a lip line beautification effect to the face image, realizing the precise beautification effect on a specific area of the lips of the face image.
  • FIG. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 2 shows a schematic diagram of a first mask image according to an embodiment of the present disclosure
  • Fig. 3 shows a schematic diagram of a second mask image according to an embodiment of the present disclosure
  • FIG. 4 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 5 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • FIG. 6 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 7 shows a schematic diagram of a lip editing page according to an embodiment of the present disclosure
  • FIG. 8 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • FIG. 9 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • Fig. 10 shows a schematic diagram of adjusting a second part area according to an embodiment of the present disclosure
  • Fig. 11 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 12 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 13 shows a schematic diagram of an image processing device according to an embodiment of the present disclosure
  • Fig. 14 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure
  • Fig. 15 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure.
  • At least one herein means any one of a variety or any combination of at least two of a variety, for example, including at least one of A, B, and C, may mean including from A, B, and Any one or more elements selected from the set formed by C.
  • the image processing method in the embodiment of the present disclosure may be executed by an electronic device such as a terminal device or a server.
  • the terminal device may be user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, Any fixed or mobile terminal such as wearable devices.
  • the server can be a single server or a server cluster composed of multiple servers. Any electronic device can implement the image processing method of the embodiments of the present disclosure by calling the computer-readable instructions stored in the memory by the processor.
  • FIG. 1 shows a flow chart of an image processing method according to an embodiment of the present disclosure.
  • the image processing method of the embodiment of the present disclosure may include the following steps S101 to S104.
  • Step S101 determining a first mask image and a second mask image of a face image.
  • the face image is an image to be beautified, including a face to be processed.
  • the electronic device can collect the face image through a built-in or connected image acquisition device, or collect it through other electronic devices and transmit it to the electronic device currently executing the image processing method for image processing.
  • the electronic device determines the first mask image and the second mask image of the face image.
  • the first mask image is used to represent the first part area of the face image
  • the second mask image is used to represent the second part area of the face image.
  • the second site area is at least partially different from the first site area, for example, the second site area may be within the first site area.
  • the outer edge of the second part area can also coincide with the outer edge of the first part area.
  • the first part area may be the area where all the lips of the face to be processed are located in the face image
  • the second part area may be the edge area of the area where all the lips of the face to be processed are located in the face image.
  • the first mask image and the second mask image may be binary images, the pixel values in the first part area and the second part area are 1, and the pixel values in other areas are 0.
  • Each pixel value in the first mask image and the second mask image can also be a value between 0 and 1, which is used to distinguish the first part area or the second part area from other areas, and to characterize the subsequent image processing process processing intensity.
  • the processing intensity represents the corresponding beautification strength.
  • the pixel value can be beautified by multiplying each pixel value by the beautification parameter N, for example, by using the beautification parameter N to process a pixel value with a pixel value of 1, Pixel values with a pixel value of 0.5 are processed by 0.5 times the beautification parameter N.
  • the electronic device can determine the first part area and the second part area according to the pixel value of each pixel and a preset pixel threshold. Take the preset pixel threshold value of 0.5 as an example for illustration.
  • the positions of the pixels whose pixel values are not less than 0.5 are located in the first part area, and the positions of the pixels whose pixel values are less than 0.5 are located in other areas than the first part area.
  • the pixel values not less than 0.5 are located in the second part area, and the pixel values smaller than 0.5 are located in other areas than the second part area.
  • Fig. 2 shows a schematic diagram of a first mask image according to an embodiment of the disclosure.
  • the first mask image 200 is the same size as the acquired face image, and includes a first region 201 composed of pixels whose pixel values are not less than the pixel threshold, and a first region 201 composed of pixels whose pixel values are less than the pixel threshold.
  • the first area 201 corresponds to the lip position in the face image, that is, the position of the lips representing the face in the face image.
  • the second area 202 corresponds to other positions in the human face image except for the lip position, and represents other positions in the human face image except for the position of the lips of the human face. That is to say, the first area 201 is the first part area represented by the first mask image.
  • Fig. 3 shows a schematic diagram of a second mask image according to an embodiment of the present disclosure.
  • the second mask image 300 is the same size as the acquired face image, and includes a third area 301 composed of pixels whose pixel values are not less than the pixel threshold, and includes pixels whose pixel values are less than the pixel threshold.
  • the third area 301 corresponds to the lip edge position in the face image, that is, the position where the lip line needs to be drawn to represent the lips of the face in the face image.
  • the fourth area 302 corresponds to positions other than lip edge positions in the face image, and represents positions in the face image where lip lines do not need to be drawn. That is to say, the third area 301 is the second part area represented by the second mask image.
  • the second site region has an inner edge 303 and an outer edge 304 .
  • the first mask image and the second mask image may be determined according to a predetermined standard material.
  • FIG. 4 shows a flow chart of an image processing method according to an embodiment of the present disclosure. As shown in FIG. 4 , the process of determining the first mask image of the face image in step S101 may include the following steps S401 to S403.
  • Step S401 Determine a first reference mask image, which is used to characterize the predicted shape of the first part region.
  • Step S402 identifying the first part area in the face image.
  • Step S403 generating a first mask image according to the first part region and the first reference mask image.
  • FIG. 5 shows a flow chart of an image processing method according to an embodiment of the present disclosure.
  • the process of determining the second mask image of the face image in step S101 may include the following steps S501 to S503.
  • Step S501 Determine a second reference mask image, which is used to characterize the edge prediction shape of the first part region.
  • Step S502 identifying the first part area in the face image.
  • Step S503 generating a second mask image according to the first part region and the second reference mask image.
  • the first reference mask image and/or the second reference mask image may be a mask image material preset according to the simulated face, or a mask uploaded by the user according to his or her own needs. Image footage.
  • the first part area is the lip area
  • the second part area is the lip line area
  • the first reference mask image can be the user
  • the second reference mask image may be an image uploaded by the user or generated by the electronic device representing the shape of the lip line.
  • the method of recognizing the face image to obtain the first part area is key point recognition, and the obtained first part area includes a plurality of key position points, such as the position of the corner of the mouth, the position of the upper edge, the position of the lower Edge position and lip bead position etc.
  • the determined first reference mask image and the second reference mask image also include a plurality of key position points, and the first mask can be determined by mapping key position points between the first reference mask image and the first part area image, the second mask image is determined by performing key position point mapping between the second reference mask image and the first part region. Based on the key point mapping, the first mask image and the second mask image determined in the above manner can accurately locate the positions of the first part area and the second part area in the face image.
  • Step S102 acquiring lip treatment information.
  • the lip processing information may include area information and beautification parameter information, the area information is used to indicate the area range of the second part to be beautified in the face image, and the beautification parameter information is used to indicate the face image Beautification parameters of the second part area to be beautified.
  • the beautification parameters may include any parameters for beautifying the lips, such as color, brightness, contrast, and transparency.
  • the lip treatment information can be acquired in any way, such as directly receiving the lip treatment information sent by other electronic devices, or determining with the user through human-computer interaction.
  • Fig. 6 shows a flowchart of an image processing method according to an embodiment of the present disclosure, as shown in Fig. 6 .
  • step S102 may be implemented by the electronic device through steps S601 to S603.
  • Step S601 generating area information in response to a trigger event for the area adjustment control.
  • Step S602 generating beautification parameter information in response to a trigger event for the color adjustment control.
  • Step S603 determining lip processing information according to the area information and beautification parameter information.
  • FIG. 7 shows a schematic diagram of a lip editing page 700 according to an embodiment of the present disclosure.
  • the lip editing page 700 may be displayed by a display device built in or connected to the electronic device.
  • the lip editing page 700 may be sent to the terminal device through the server, and displayed by a display device of the terminal device.
  • the lip editing page 700 includes a color adjustment control 701 and an area adjustment control 702 .
  • the color adjustment control 701 can include a preset color control that can be directly selected by the user through human-computer interaction, and can be dragged or input by the user through human-computer interaction.
  • Autocolor controls R, G, B
  • the electronic device may receive a preset color from among the preset color controls Color 1 to Color 6 that is directly selected by the user by clicking.
  • the RGB value determined by the user within 0 to 255 by inputting or dragging may also be received to obtain the desired color.
  • the color adjustment control 701 further includes an intensity adjustment control (L), which is used to represent the intensity of the color to be adjusted, and the selected value can be between 0 and 1.
  • the beautification parameter information may be determined according to the color and color intensity determined or selected by the user through human-computer interaction.
  • the area adjustment control 702 may include a drag bar that the user can drag to determine a width adjustment ratio through human-computer interaction, and an input box that can input a desired adjustment width ratio.
  • the adjusted width ratio determined by the user may be a numerical value, which is used to represent the ratio of the required width of the second part region to the current second part region.
  • the electronic device can generate area information according to the adjustment width ratio determined by the user through human-computer interaction.
  • the electronic device may generate lip treatment information including area information and beautification parameter information after the user triggers color adjustment control 701 to generate beautification parameter information and triggers area adjustment control 702 to generate area information.
  • the lip editing page 700 can also be used to display the face image 703 (blocking part of the area), and the second part area 704 in the face image 703, which is determined by the electronic device After the lip processing information, the image is beautified according to the lip processing information and displayed to the user in real time. If the user is not satisfied, he can re-determine the new lip treatment information through human-computer interaction.
  • the user can adjust the area information and beautification parameter information according to his own interests, so as to obtain the required lip processing information, and then improve the lip line beautification effect.
  • Step S103 adjusting the range of the second part area in the second mask image according to the area information and the first mask image.
  • the second mask image may be adjusted based on the first mask image and the region information determined by the user, so as to modify the range of the second part region represented in the second mask image.
  • the position of the second part region represented by the second mask image is within the first part region represented by the first mask image.
  • the adjustment process of the second mask image can be realized by image erosion, which is used to shrink or refine objects in the image.
  • Fig. 8 shows a flow chart of an image processing method according to an embodiment of the present disclosure. As shown in Fig. 8, step S103 in Fig. 1 can be updated to step S801, and step S104 can be updated to step S802, which will be shown in conjunction with Fig. 8 Outlined steps are described.
  • Step S801 according to the area information and the first mask image, perform an image erosion operation on the second mask image to adjust the range of the second part area; during the image erosion process, the second part area can be at least the same as the first part area Some areas overlap.
  • both the area information and the first mask image are used to limit the image erosion range.
  • the area information may be used to define the adjusted area width of the second part.
  • the second part area is a continuous area including the first edge and the second edge, and the direction of image erosion may be from the first edge to the second edge.
  • Step S802 according to the first mask image, perform image erosion from the first edge to the second edge of the second part area in the second mask image until the adjustment condition corresponding to the area information is satisfied.
  • the first edge of the second part area (third area 301) is the inner edge 303 located on the inner side, and the second edge of the second part area is the outer edge 303 located on the outer side.
  • Edge 304 is the first edge of the second part area (third area 301) located on the inner side, and the second edge of the second part area is the outer edge 303 located on the outer side.
  • the adjustment condition corresponding to the area information may be that the ratio of the current second part area to the original second part area is the value of the area information.
  • the preset lip edge area can be reduced by adjusting the area information.
  • the preset area width of the second part is 5 mm and the area information is 0.3
  • the width of the second part area obtained after image erosion is 1.5 mm.
  • the first mask image is used to filter out the reference pixels used for image erosion in the second mask image, and then implement the image erosion process based on the filtered reference pixels .
  • the range of the second part area can be adjusted; and according to the first mask image, the second mask image Performing image erosion from the first edge of the second part area in the image to the second edge can improve the consistency between the obtained beautified and edited area outline and the first area outline, thereby improving the lip line beautification effect.
  • Fig. 9 shows a flowchart of an image processing method according to an embodiment of the present disclosure, as shown in Fig. 9 .
  • step S802 the process of performing image erosion from the first edge to the second edge of the second part area in the second mask image according to the first mask image can be updated to steps S901 to S904, which will be performed in conjunction with the steps shown in FIG. 9 illustrate.
  • Step S901 sequentially determine target pixels from the first edge to the second edge of the second part area.
  • Step S902. Determine the target area according to the position of the target pixel in the second mask image.
  • Step S903 determining a reference pixel in the second mask image according to the pixel value of each pixel in the target area in the first mask image.
  • Step S904 updating the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image.
  • the minimum pixel value in each reference pixel may be compared, so as to replace the pixel value of the target pixel with the minimum pixel value in each reference pixel in the second mask image.
  • the selection of the target pixels may be determined in an outward order from the first edge of the second part area position. After the target pixel is replaced each time, a new target pixel can be re-determined in the second part area, and the image erosion is performed again until the image erosion process is completed.
  • the size of the target area may be a predetermined preset size, and after each determination of the target pixel, an area whose center is the target pixel and whose size is the preset size is determined as the corresponding target area.
  • the target area consists of pixels (1, 3), (1, 4), (1, 5), (2, 3 ), (2,4), (2,5), (3,3), (3,4) and (3,5).
  • the reference pixel is obtained by filtering according to the pixel value of each pixel in the target area in the first mask image.
  • the screening method can be implemented based on a preset pixel threshold, that is, the above-mentioned update of the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image can be implemented based on steps S9041 to S9042.
  • Step S9041 obtaining the pixel value of each pixel of the first mask image in the target area
  • Step S9042 determine in the second mask image according to the position of the pixel whose pixel value is greater than the pixel threshold in the first mask image.
  • the target area is 3 ⁇ 3, and the pixel coordinates included are (1, 3), (1, 4), (1, 5), (2, 3), (2 , 4), (2, 5), (3, 3), (3, 4) and (3, 5) as examples for illustration.
  • the coordinates in the first mask image are (1,3), (1,4), (1,5), (2,3), (2,4), (2,5), (3,3) , (3, 4) and (3, 5) are 1, 1, 0.7, 1, 0.8, 0.1, 0.9, 0.2 and 0 respectively, and when the preset pixel threshold is 0.5, the filtered
  • the coordinates of the reference pixels are (1, 3), (1, 4), (1, 5), (2, 3), (2, 4) and (3, 3), respectively.
  • Fig. 10 shows a schematic diagram of adjusting a second part area according to an embodiment of the present disclosure.
  • a target area 1002 at the position of the target area in the first mask image is also obtained.
  • the reference pixels are obtained by screening the pixel values of each pixel in the target area 1002 in the first mask image, and an image erosion area 1003 composed of a plurality of reference pixels in the target area 1001 in the second mask image is obtained.
  • the pixel value in the target pixel is replaced by the minimum value 0 in the image erosion area 1003 .
  • Step S104 Perform beautification processing on the human face image according to the beautification parameter information and the adjusted second mask image to obtain a target image in which the color of the second part region is adjusted.
  • the beautification parameter information in the beautification processing information and the adjusted second mask image in the face image Beautify the second part of the region to obtain the target image.
  • FIG. 11 shows a flowchart of an image processing method according to an embodiment of the present disclosure. As shown in FIG. 11 , step S104 in FIG. 1 can be updated to steps S1101 to S1102 , which will be described in conjunction with the steps shown in FIG. 11 .
  • Step S1101 generate a beautification image according to the beautification parameter information and the adjusted second mask image, the beautification image is an image filled with the color represented by the beautification parameter information in the second part area.
  • the beautified image may be an image with the same size as the face image, wherein only the second part area is filled with the beautification parameter information represented by the intensity of each pixel representing the second part area in the second mask image. color, and set the other areas to be transparent, that is, set the pixel value to 0.
  • Step S1102 performing image fusion on the beautified image and the face image to obtain the target image whose color is adjusted in the second part area.
  • the image fusion manner may be any fusion manner, such as any manner such as multiplication and transparency fusion.
  • the multiplication process is to superimpose the position of the second part region in the beautified image on the position of the second part region in the face image in the form of a slideshow.
  • the following describes the application of the image processing method provided by the embodiment of the present disclosure in an actual scene, taking the lip line beautification image processing scene based on real-time collected face images as an example.
  • FIG. 12 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • the image processing method of the embodiment of the present disclosure may include the following steps S1201 to S1203.
  • Step S1201 according to the texture of the lip line Mask, acquire the image of the part where the lip line needs to be done.
  • Step S1202 perform image erosion processing on the lip line Mask texture according to the input lip line width ratio.
  • the lip line Mask texture (corresponding to the second part area of the second mask image in the above embodiment) is used for texture sampling of the kernel area (the square area surrounding the current pixel), which can be obtained through the full
  • the lip Mask texture (corresponding to the first part area of the first mask image in the above embodiment) determines the pixels that need to be sampled and the pixels that do not need to be sampled in the kernel area.
  • the pixels beyond the lip area in the full lip Mask texture are not sampled, so that the outer circle of the lip line Mask texture does not change, that is, the outer circle of the lip line Mask texture is not corroded, but only The inner ring of the lip mask texture is etched.
  • the minimum value of the sampling result of the entire kernel area is used as the output value of the current pixel, and the pixel value of the current pixel is updated, so as to determine the lip line area where the lip line effect is to be performed (corresponding to the above-mentioned embodiment) The second part area obtained after performing image erosion).
  • Step S1203 based on the lip line intensity selected by the user, fuse the input target color with the original pixel color.
  • the input target color and the original pixel color may be fused by using the multiply blending mode to obtain a lip line effect image (corresponding to the target image in the above embodiment).
  • the lip line Mask texture is used to obtain the image of the part where the lip line needs to be made, and then the image erosion process is performed on the lip line Mask texture to obtain a lip line area with a suitable width; at the same time, based on the lip line strength selected by the user , to blend the target color with the original pixel color to obtain more styles of lip line effect images.
  • the image processing method of the embodiment of the present disclosure may be used to beautify the lips of a human face in a human face image.
  • a face image may be acquired by an electronic device, and the feature points of the face in the face image may be recognized to obtain the lip region of the face.
  • the first mask image representing the position of the human face lip area in the face image is obtained, and according to the preset or user uploaded second reference
  • the mask image and the lip region obtain a second mask image representing the position of the lip edge of the human face in the human face image.
  • the electronic device determines the area information indicating the area where the user wishes to increase the lip line effect and the beautification parameter information indicating the color, intensity and brightness of the lip line that the user wishes to increase through human-computer interaction with the user. Adjust the second mask image according to the area information and the first mask image to determine the final area where the lip line effect needs to be increased, and obtain the lip line effect for beautification according to the beautification parameter information and the adjusted second mask image
  • the beautified image of the area, the beautified image and the face image are multiplied to obtain the face image with the lip line effect after beautification.
  • the embodiment of the present disclosure can identify the first part area and the second part area of the face image, and adjust the second part area based on the area information specified by the user and the first part area, so as to obtain the area that needs to be beautified and perform beautification processing.
  • the effect of precisely beautifying the specific area of the lip of the face image is realized.
  • the present disclosure also provides an image processing device, electronic equipment, computer-readable storage medium, and program, all of which can be used to implement any image processing method provided in the present disclosure.
  • image processing device electronic equipment, computer-readable storage medium, and program, all of which can be used to implement any image processing method provided in the present disclosure.
  • Fig. 13 shows a schematic diagram of an image processing device according to an embodiment of the present disclosure.
  • the image processing apparatus of the embodiment of the present disclosure includes an image determination section 1301 , an information acquisition section 1302 , a range adjustment section 1303 , and a color adjustment section 1304 .
  • the image determining part 1301 is configured to determine a first mask image and a second mask image of the face image, the first mask image is used to characterize the first part region of the face image, and the second mask image The mask image is used to represent a second part region of the human face image, the second part region is at least partially different from the first part region;
  • the information acquiring part 1302 is configured to acquire lip processing information, and the lip processing information includes area information and beautification parameter information;
  • the range adjustment part 1303 is configured to adjust the range of the second part area in the second mask image according to the area information and the first mask image;
  • the color adjustment part 1304 is configured to perform beautification processing on the face image according to the beautification parameter information and the adjusted second mask image, so as to obtain the target image in which the color of the second part region is adjusted.
  • the range adjustment part 1303 includes:
  • the image erosion sub-part is configured to perform an image erosion operation on the second mask image according to the area information and the first mask image, and adjust the range of the second part area; During the process, the second part area overlaps with at least part of the first part area.
  • the image erosion subsection includes:
  • the image erosion part is configured to perform image erosion from the first edge to the second edge of the second part area in the second mask image according to the first mask image until the adjustment corresponding to the area information is satisfied. condition.
  • the adjustment condition corresponding to the area information is that the ratio of the current second part area to the original second part area is the value of the area information.
  • the image erosion part includes:
  • the target pixel determination subsection is configured to sequentially determine target pixels from the first edge to the second edge of the second part area;
  • an area determining subsection configured to determine a target area according to the position of the target pixel in the second mask image
  • a reference pixel determining subsection configured to determine a reference pixel in the second mask image according to a pixel value of each pixel in the target area in the first mask image
  • the pixel value updating subsection is configured to update the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image.
  • the reference pixel determining subsection includes:
  • a pixel value obtaining subsection configured to obtain a pixel value of each pixel of the first mask image in the target area
  • the reference pixel screening subsection is configured to determine a reference pixel in the second mask image according to the position of the pixel whose pixel value is greater than a pixel threshold in the first mask image.
  • the image determining part 1301 includes:
  • the first reference image determination subpart is configured to determine a first reference mask image, the first reference mask image is used to characterize the predicted shape of the first part region;
  • the first area identification subpart is configured to identify a first part area in the face image
  • the first image generating subsection is configured to generate a first mask image according to the first part region and the first reference mask image.
  • the image determining part 1301 includes:
  • the second reference image determination subpart is configured to determine a second reference mask image, the second reference mask image is used to characterize the edge prediction shape of the first part region;
  • the second area identification subpart is configured to identify the first part area in the face image
  • the second image generating subsection is configured to generate a second mask image according to the first part region and the second reference mask image.
  • the information acquiring part 1302 includes:
  • the information determination subpart is configured to generate the area information in response to a trigger event for the area adjustment control; generate the beautification parameter information in response to a trigger event for the color adjustment control;
  • the information generation subpart is configured to determine the lip treatment information according to the area information and the beautification parameter information.
  • the color adjustment part 1304 includes:
  • the beautification image generation subpart is configured to generate a beautification image according to the beautification parameter information and the adjusted second mask image, the beautification image is a representation of filling the beautification parameter information in the second part area color image;
  • the image fusion subpart is configured to perform image fusion on the beautification image and the face image to obtain a target image in which the color of the second part region is adjusted.
  • the image processing method is used to add a lip line beautification effect to the face image, the first part area is a lip area, and the second part area is a lip line area.
  • the functions or parts included in the apparatus provided by the embodiments of the present disclosure may be configured to execute the methods described in the above method embodiments, and for specific implementation, refer to the descriptions of the above method embodiments.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor.
  • Computer readable storage media may be volatile or nonvolatile computer readable storage media.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, where the computer-readable codes are stored in a processor of an electronic device In the case of running in the electronic device, the processor in the electronic device executes the above method.
  • Electronic devices may be provided as terminals, servers, or other forms of devices.
  • FIG. 14 shows a schematic diagram of an electronic device 1400 according to an embodiment of the present disclosure.
  • the electronic device 1400 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
  • electronic device 1400 may include one or more of the following components: processing component 1401, memory 1402, power supply component 1403, multimedia component 1404, audio component 1405, input/output (Input/Ouput, I/O) interface 1406, sensor component 1407, and communication component 1408.
  • the processing component 1401 generally controls the overall operations of the electronic device 1400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 1401 may include one or more processors 1409 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 1401 may include one or more components that facilitate interaction between processing component 1401 and other components. For example, processing component 1401 may include a multimedia portion to facilitate interaction between multimedia component 1404 and processing component 1401 .
  • the memory 1402 is configured to store various types of data to support operations at the electronic device 1400 . Examples of such data include instructions for any application or method operating on the electronic device 1400, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 1402 can be realized by any type of volatile or non-volatile memory device or their combination, such as Static Random-Access Memory (Static Random-Access Memory, SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically -Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), Programmable Read-Only Memory (Programmable read-only memory, PROM), Read Only Memory (Read -Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • Static Random-Access Memory SRAM
  • Electrically Erasable Programmable Read-Only Memory Electrically Erasable Programmable Read-Only Memory (Electrically
  • the power supply component 1403 provides power to various components of the electronic device 1400 .
  • Power components 1403 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 1400 .
  • the multimedia component 1404 includes a screen providing an output interface between the electronic device 1400 and the user.
  • the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a touch panel (Touch Panel, TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action.
  • the multimedia component 1404 includes at least one of the following: a front camera and a rear camera.
  • At least one of the front camera and 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 capability.
  • the audio component 1405 is configured to output and input audio signals, or to output audio signals, or to input audio signals.
  • the audio component 1405 includes a microphone (Microphone, MIC), which is configured to receive external audio signals when the electronic device 1400 is in operation modes, such as calling mode, recording mode and voice recognition mode. Received audio signals may be stored in memory 1402 or sent via communication component 1408 .
  • the audio component 1405 also includes a speaker configured to output audio signals.
  • the I/O interface 1406 provides an interface between the processing component 1401 and the peripheral interface part, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
  • Sensor assembly 1407 includes one or more sensors for providing various aspects of status assessment for electronic device 1400 .
  • the sensor component 1407 can detect the open/closed state of the electronic device 1400, the relative positioning of components, for example, the components are the display and the keypad of the electronic device 1400, the sensor component 1407 can also detect the electronic device 1400 or one of the electronic devices 1400 Changes in position of components, presence or absence of user contact with electronic device 1400 , electronic device 1400 orientation or acceleration/deceleration and temperature changes in electronic device 1400 .
  • the sensor assembly 1407 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • the sensor assembly 1407 may also include an optical sensor, such as a Complementary Metal-Oxide-Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications.
  • CMOS Complementary Metal-Oxide-Semiconductor
  • CCD Charge Coupled Device
  • the sensor component 1407 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 1408 is configured to facilitate wired or wireless communication between the electronic device 1400 and other devices.
  • the electronic device 1400 can access a wireless network based on a communication standard, such as a wireless network (Wireless Network), a second generation mobile communication technology (Second Generation, 2G) or a third generation mobile communication technology (Third Generation, 3G), or their combination.
  • a communication standard such as a wireless network (Wireless Network), a second generation mobile communication technology (Second Generation, 2G) or a third generation mobile communication technology (Third Generation, 3G), or their combination.
  • the communication component 1408 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 1408 also includes a Near Field Communication (NFC) portion to facilitate short-range communication.
  • NFC Near Field Communication
  • the NFC part can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (Infrared Data Association, IrDA) technology, Ultra Wide Band (Ultra Wide Band, UWB) technology, Bluetooth (Bluetooth, BT) technology and other technology to achieve.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth, BT
  • the electronic device 1400 may be implemented by one or more Application Specific Integrated Circuits (Application Specific Integrated Circuit, ASIC), Digital Signal Processor (Digital Signal Processor, DSP), Digital Signal Processing Device (Digital Signal Processing Device , DSPD), Programmable Logic Device (Programmable Logic Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic components to implement the above method.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Device
  • PLD Programmable Logic Device
  • Field Programmable Gate Array Field Programmable Gate Array
  • FPGA Field Programmable Gate Array
  • a non-volatile computer-readable storage medium such as the memory 1402 including computer program instructions, which can be executed by the processor 1409 of the electronic device 1400 to implement the above method.
  • This disclosure relates to the field of computer technology.
  • acquiring the image information of the target object in the real environment and then using various visual correlation algorithms to detect or identify the relevant characteristics, states and attributes of the target object, so as to obtain the image information that matches the specific application.
  • AR effect combining virtual and reality.
  • the target object may involve faces, limbs, gestures, actions, etc. related to the human body, or markers and markers related to objects, or sand tables, display areas or display items related to venues or places.
  • Vision-related algorithms can involve visual positioning, SLAM, 3D reconstruction, image registration, background segmentation, object key point extraction and tracking, object pose or depth detection, etc.
  • Specific applications can not only involve interactive scenes such as guided tours, navigation, explanations, reconstructions, virtual effect overlays and display related to real scenes or objects, but also special effects processing related to people, such as makeup beautification, body beautification, special effect display, virtual Interactive scenarios such as model display.
  • the relevant characteristics, states and attributes of the target object can be detected or identified through the convolutional neural network.
  • the above-mentioned convolutional neural network is a network model obtained by performing model training based on a deep learning framework.
  • FIG. 15 shows a schematic diagram of another electronic device 1500 according to an embodiment of the present disclosure.
  • the electronic device 1500 may be provided as a server.
  • an electronic device 1500 includes a processing component 1501 , and also includes one or more processors, and a memory resource represented by a memory 1502 configured to store instructions executable by the processing component 1501 , such as application programs.
  • An application program stored in memory 1502 may include one or more portions each corresponding to a set of instructions.
  • the processing component 1501 is configured to execute instructions to perform the above method.
  • the electronic device 1500 may also include a power component 1503 configured to perform power management of the electronic device 1500 , a wired or wireless network interface 1504 configured to connect the electronic device 1500 to a network, and an I/O interface 1505 .
  • Electronic device 1500 can operate based on the operating system stored in memory 1502, such as Microsoft server operating system (Windows ServerTM), based on graphical user interface operating system (Mac OS XTM), multi-user multi-process computer operating system (UnixTM), free and An open source Unix-like operating system (LinuxTM), an open source Unix-like operating system (FreeBSDTM), or similar.
  • Microsoft server operating system Windows ServerTM
  • Mac OS XTM based on graphical user interface operating system
  • UnixTM multi-user multi-process computer operating system
  • FreeBSDTM open source Unix-like operating system
  • a non-volatile computer-readable storage medium such as a memory 1502 including computer program instructions, which can be executed by the processing component 1501 of the electronic device 1500 to implement the above method.
  • the present disclosure includes at least one of the following: a system, a method and a computer program product.
  • a computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical 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.
  • Examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, Random-Access Memory (RAM), Read-Only Memory (ROM), erasable Programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM) or flash memory, Static Random-Access Memory (Static Random-Access Memory, SRAM), Portable Compression Disk Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM ), Digital Versatile Disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing.
  • RAM Random-Access Memory
  • ROM Read-Only Memory
  • EPROM erasable Programmable Read-Only Memory
  • flash memory Static Random-Access Memory
  • Static Random-Access Memory SRAM
  • Portable Compression Disk Read-Only Memory Compact Disc Read-Only Memory
  • CD-ROM Compact Disc Read-Only Memory
  • computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as at least one of the Internet, a local area network, a wide area network, and a wireless network .
  • the network may include at least one of: copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers.
  • a network adapter card or a 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 Architectures (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or in the form of one or more source or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • 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 use an Internet service provider to connect via the Internet).
  • electronic circuits such as programmable logic circuits, field programmable gate arrays (Field Programmable Gate Array, FPGA) or programmable logic arrays (Programmable Logic Array, PLA), the electronic circuit can execute computer-readable program instructions, thereby implementing various aspects of the present disclosure.
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause at least one of computers, programmable data processing devices and other devices to work in a specific way, so that the computer-readable The medium then includes an article of manufacture including instructions for implementing various aspects of the functions/acts specified in at least one block in the flowcharts and block diagrams.
  • each block in a flowchart or block diagram may represent a portion, a program segment, or a portion of an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of at least one of the block diagrams and flowcharts, and combinations of blocks of at least one of the block diagrams and flowcharts may be implemented with a dedicated hardware-based computer that performs specified functions or actions. system, or it may be implemented by a combination of special purpose hardware and computer instructions.
  • the computer program product can be specifically realized by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
  • a software development kit Software Development Kit, SDK
  • the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible
  • the inner logic is OK.
  • the products applying the disclosed technical solution have clearly notified the personal information processing rules and obtained the individual's independent consent before processing personal information.
  • the disclosed technical solution involves sensitive personal information the products applying the disclosed technical solution have obtained individual consent before processing sensitive personal information, and at the same time meet the requirement of "express consent". For example, at a personal information collection device such as a camera, a clear and prominent sign is set up to inform that it has entered the scope of personal information collection, and personal information will be collected.
  • the personal information processing rules may include Information such as the information processor, the purpose of personal information processing, the method of processing, and the type of personal information processed.
  • the area that needs to be beautified and edited can be obtained.
  • the beautification process can be used to add a lip line beautification effect to the face image, realizing the precise beautification effect on a specific area of the lips of the face image.

Abstract

The present disclosure relates to an image processing method and apparatus, and an electronic device, a storage medium and a computer program product. The method comprises: determining a first mask image and a second mask image of a facial image, wherein the first mask image and the second mask image are used for representing a first part area and a second part area, respectively, in the facial image, and the second part area is in the first part area; acquiring lip processing information comprising area information and beautification parameter information; adjusting the range of the second part area in the second mask image according to the area information and the first mask image; and beautifying the facial image according to the beautification parameter information and the adjusted second mask image, so as to obtain a target image in which the color of the second part area is adjusted.

Description

图像处理方法、装置、电子设备、存储介质和计算机程序产品Image processing method, device, electronic device, storage medium and computer program product
相关申请的交叉引用Cross References to Related Applications
本公开要求2022年01月28日提交的中国专利申请号为202210106872.0,申请人为北京大甜绵白糖科技有限公司,申请名称为“图像处理方法及装置、电子设备和存储介质”的优先权,该申请的全文以引用的方式并入本公开中。This disclosure claims the priority of the Chinese patent application number 202210106872.0 submitted on January 28, 2022, the applicant is Beijing Datian Mian Baitang Technology Co., Ltd., and the application name is "image processing method and device, electronic equipment and storage medium". The entirety of the application is incorporated by reference into this disclosure.
技术领域technical field
本公开涉及计算机技术领域,尤其涉及一种图像处理方法、装置、电子设备、存储介质和计算机程序产品。The present disclosure relates to the field of computer technology, and in particular to an image processing method, device, electronic equipment, storage medium and computer program product.
背景技术Background technique
目前对于人脸的美化,主要多集中在全脸的美白、瑕疵修复、局部器官的形状调整以及妆容效果叠加等处理,对局部器官的一些细节化的妆容处理,还很难达到理想的效果。At present, the beautification of the human face mainly focuses on the whitening of the whole face, the repair of blemishes, the shape adjustment of local organs, and the superimposition of makeup effects. It is still difficult to achieve the desired effect on some detailed makeup processing of local organs.
发明内容Contents of the invention
根据本公开的一方面,提供了一种图像处理方法,包括:确定人脸图像的第一掩码图像和第二掩码图像,所述第一掩码图像用于表征所述人脸图像的第一部位区域,所述第二掩码图像用于表征所述人脸图像的第二部位区域,所述第二部位区域与所述第一部位区域至少部分不同;获取唇部处理信息,所述唇部处理信息中包括区域信息和美化参数信息,所述区域信息用于指示所述第二部位区域的范围,所述美化参数信息用于指示所述第二部位区域的美化参数;根据所述区域信息和所述第一掩码图像调整所述第二掩码图像中第二部位区域的范围;根据所述美化参数信息和调整后的所述第二掩码图像对所述人脸图像进行美化处理,得到所述第二部位区域颜色被调整的目标图像。According to an aspect of the present disclosure, an image processing method is provided, including: determining a first mask image and a second mask image of a face image, the first mask image being used to characterize the face image A first part area, the second mask image is used to represent a second part area of the face image, the second part area is at least partially different from the first part area; lip processing information is obtained, and the The lip processing information includes area information and beautification parameter information, the area information is used to indicate the range of the second part area, and the beautification parameter information is used to indicate the beautification parameters of the second part area; according to the Adjusting the range of the second part area in the second mask image according to the area information and the first mask image; according to the beautification parameter information and the adjusted second mask image Beautification processing is performed to obtain a target image in which the color of the second part region is adjusted.
在一种可能的实现方式中,所述根据所述区域信息和所述第一掩码图像调整所述第二掩码图像中第二部位区域的范围包括:根据所述区域信息和所述第一掩码图像,对所述第二掩码图像进行图像腐蚀操作,调整所述第二部位区域的范围;在所述图像腐蚀过程中,所述第二部位区域与所述第一部位区域的至少部分区域重合。In a possible implementation manner, the adjusting the range of the second part region in the second mask image according to the region information and the first mask image includes: according to the region information and the first mask image A mask image, performing an image erosion operation on the second mask image to adjust the range of the second part area; during the image erosion process, the distance between the second part area and the first part area At least some of the regions overlap.
在一种可能的实现方式中,所述根据所述区域信息和所述第一掩码图像,对所述第二掩码图像进行图像腐蚀操作,调整所述第二部位区域的范围包括:根据所述第一掩码图像,由所述第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀,直到满足所述区域信息对应的调整条件。In a possible implementation manner, performing an image erosion operation on the second mask image according to the area information and the first mask image, and adjusting the range of the second part area includes: The first mask image performs image erosion from the first edge to the second edge of the second part area in the second mask image until the adjustment condition corresponding to the area information is satisfied.
在一种可能的实现方式中,所述区域信息对应的调整条件为当前第二部位区域与原始第二部位区域的比值为所述区域信息的值。In a possible implementation manner, the adjustment condition corresponding to the area information is that the ratio of the current second part area to the original second part area is the value of the area information.
在一种可能的实现方式中,所述根据所述第一掩码图像,由所述第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀包括:由所述第二部位区域的第一边缘开始向第二边缘依次确定目标像素;根据所述目标像素在所述第二掩码图像中的位置确定目标区域;根据所述第一掩码图像在所述目标区域中每个像素的像素值确定所述第二掩码图像中的参考像素;根据所述第二掩码图像中所述参考像素中的像素值更新所述目标像素的像素值。In a possible implementation manner, the performing image erosion from the first edge to the second edge of the second part region in the second mask image according to the first mask image includes: using the first mask image The first edge of the second part area begins to determine the target pixel in turn toward the second edge; determine the target area according to the position of the target pixel in the second mask image; determine the target area according to the position of the first mask image in the target area The pixel value of each pixel in the second mask image is used to determine a reference pixel in the second mask image; and the pixel value of the target pixel is updated according to the pixel value of the reference pixel in the second mask image.
在一种可能的实现方式中,所述根据所述第一掩码图像在所述目标区域中每个像素的像素值确定所述第二掩码图像中的参考像素包括:获取所述第一掩码图像在所述目标区域中每个像素的像素值;根据所述像素值大于像素阈值的像素在所述第一掩码图像中的位置 在所述第二掩码图像中确定参考像素。In a possible implementation manner, the determining the reference pixel in the second mask image according to the pixel value of each pixel in the target area in the first mask image includes: acquiring the first mask image A pixel value of each pixel in the target area in the mask image; determining a reference pixel in the second mask image according to a position in the first mask image of a pixel whose pixel value is greater than a pixel threshold.
在一种可能的实现方式中,所述确定人脸图像的第一掩码图像包括:确定第一参考掩码图像,所述第一参考掩码图像用于表征所述第一部位区域预测形状;识别所述人脸图像中的第一部位区域;根据所述第一部位区域与所述第一参考掩码图像生成第一掩码图像。In a possible implementation manner, the determining the first mask image of the face image includes: determining a first reference mask image, the first reference mask image is used to characterize the predicted shape of the first part region ; identifying a first part area in the face image; generating a first mask image according to the first part area and the first reference mask image.
在一种可能的实现方式中,所述确定人脸图像的第二掩码图像包括:确定第二参考掩码图像,所述第二参考掩码图像用于表征所述第一部位区域的边缘预测形状;识别所述人脸图像中的第一部位区域;根据所述第一部位区域与所述第二参考掩码图像生成第二掩码图像。In a possible implementation manner, the determining the second mask image of the face image includes: determining a second reference mask image, and the second reference mask image is used to characterize the edge of the first part region Predicting the shape; identifying a first part area in the face image; generating a second mask image according to the first part area and the second reference mask image.
在一种可能的实现方式中,所述获取唇部处理信息包括:响应于针对所述区域调整控件的触发事件,生成所述区域信息;响应于针对所述颜色调整控件的触发事件,生成所述美化参数信息;根据所述区域信息和所述美化参数信息确定所述唇部处理信息。In a possible implementation manner, the acquiring lip processing information includes: generating the region information in response to a trigger event for the region adjustment control; generating the region information in response to a trigger event for the color adjustment control the beautification parameter information; and determine the lip processing information according to the area information and the beautification parameter information.
在一种可能的实现方式中,所述根据所述美化参数信息和调整后的所述第二掩码图像对所述人脸图像进行美化处理,得到所述第二部位区域颜色被调整的目标图像包括:根据所述美化参数信息和调整后的所述第二掩码图像生成美化图像,所述美化图像为在所述第二部位区域中填充所述美化参数信息表征颜色的图像;对所述美化图像与所述人脸图像进行图像融合,得到所述第二部位区域颜色被调整的目标图像。In a possible implementation manner, the beautification process is performed on the face image according to the beautification parameter information and the adjusted second mask image to obtain the adjusted target of the second part region color The image includes: generating a beautification image according to the beautification parameter information and the adjusted second mask image, the beautification image is an image filled with the color represented by the beautification parameter information in the second part area; performing image fusion on the beautified image and the face image to obtain a target image in which the color of the second part region is adjusted.
在一种可能的实现方式中,所述图像处理方法用于为所述人脸图像添加唇线美化效果,所述第一部位区域为唇部区域,所述第二部位区域为唇线区域。In a possible implementation manner, the image processing method is used to add a lip line beautification effect to the face image, the first part area is a lip area, and the second part area is a lip line area.
根据本公开的一方面,提供了一种图像处理装置,包括:图像确定部分,被配置为确定人脸图像的第一掩码图像和第二掩码图像,所述第一掩码图像用于表征所述人脸图像的第一部位区域,所述第二掩码图像用于表征所述人脸图像的第二部位区域,所述第二部位区域与所述第一部位区域至少部分不同;信息获取部分,被配置为获取唇部处理信息,所述唇部处理信息中包括区域信息和美化参数信息;范围调整部分,被配置为根据所述区域信息和所述第一掩码图像调整所述第二掩码图像中第二部位区域的范围;颜色调整部分,被配置为根据所述美化参数信息和调整后的所述第二掩码图像对所述人脸图像进行美化处理,得到所述第二部位区域颜色被调整的目标图像。According to an aspect of the present disclosure, there is provided an image processing apparatus, including: an image determination section configured to determine a first mask image and a second mask image of a face image, the first mask image being used for Characterizing a first part region of the human face image, the second mask image is used to characterize a second part region of the human face image, the second part region is at least partially different from the first part region; The information acquisition part is configured to acquire lip processing information, and the lip processing information includes area information and beautification parameter information; the range adjustment part is configured to adjust the lip processing information according to the area information and the first mask image. The range of the second part area in the second mask image; the color adjustment part is configured to perform beautification processing on the face image according to the beautification parameter information and the adjusted second mask image to obtain the obtained The target image whose color is adjusted for the second part area.
在一种可能的实现方式中,所述范围调整部分包括:图像腐蚀子部分,被配置为根据所述区域信息和所述第一掩码图像,对所述第二掩码图像进行图像腐蚀操作,调整所述第二部位区域的范围;在所述图像腐蚀过程中,所述第二部位区域与所述第一部位区域的至少部分区域重合。In a possible implementation manner, the range adjustment part includes: an image erosion subsection configured to perform an image erosion operation on the second mask image according to the region information and the first mask image , adjusting the range of the second part area; during the image erosion process, the second part area overlaps with at least part of the first part area.
在一种可能的实现方式中,所述图像腐蚀子部分包括:图像腐蚀部分,被配置为根据所述第一掩码图像,由所述第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀,直到满足所述区域信息对应的调整条件。In a possible implementation manner, the image erosion sub-part includes: an image erosion part configured to, according to the first mask image, generate the first edge of the second part region in the second mask image Image erosion is performed toward the second edge until the adjustment condition corresponding to the area information is satisfied.
在一种可能的实现方式中,所述区域信息对应的调整条件为当前第二部位区域与原始第二部位区域的比值为所述区域信息的值。In a possible implementation manner, the adjustment condition corresponding to the area information is that the ratio of the current second part area to the original second part area is the value of the area information.
在一种可能的实现方式中,所述图像腐蚀部分包括:目标像素确定子部分,被配置为由所述第二部位区域的第一边缘开始向第二边缘依次确定目标像素;区域确定子部分,被配置为根据所述目标像素在所述第二掩码图像中的位置确定目标区域;参考像素确定子部分,被配置为根据所述第一掩码图像在所述目标区域中每个像素的像素值确定所述第二掩码图像中的参考像素;像素值更新子部分,被配置为根据所述第二掩码图像中所述参考像素中的像素值更新所述目标像素的像素值。In a possible implementation manner, the image erosion part includes: a target pixel determination subsection configured to sequentially determine target pixels from the first edge to the second edge of the second part area; the area determination subsection , configured to determine a target area according to the position of the target pixel in the second mask image; a reference pixel determining subsection, configured to determine each pixel in the target area according to the first mask image The pixel value of the second mask image determines the reference pixel in the second mask image; the pixel value updating subsection is configured to update the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image .
在一种可能的实现方式中,所述参考像素确定子部分包括:像素值获取子部分,被配置为获取所述第一掩码图像在所述目标区域中每个像素的像素值;参考像素筛选子部分,被配置为根据所述像素值大于像素阈值的像素在所述第一掩码图像中的位置在所述第二掩码图像中确定参考像素。In a possible implementation manner, the reference pixel determination subsection includes: a pixel value acquisition subsection configured to acquire the pixel value of each pixel of the first mask image in the target area; the reference pixel The screening subpart is configured to determine a reference pixel in the second mask image according to the position of the pixel whose pixel value is greater than a pixel threshold in the first mask image.
在一种可能的实现方式中,所述图像确定部分包括:第一参考图像确定子部分,被配置为确定第一参考掩码图像,所述第一参考掩码图像用于表征所述第一部位区域预测形状;第一区域识别子部分,被配置为识别所述人脸图像中的第一部位区域;第一图像生成子部分,被配置为根据所述第一部位区域与所述第一参考掩码图像生成第一掩码图像。In a possible implementation manner, the image determination part includes: a first reference image determination subsection configured to determine a first reference mask image, and the first reference mask image is used to characterize the first Predicting the shape of the part area; the first area identification subsection is configured to identify the first part area in the face image; the first image generation subsection is configured to combine the first part area with the first A first mask image is generated with reference to the mask image.
在一种可能的实现方式中,所述图像确定部分包括:第二参考图像确定子部分,被配置为确定第二参考掩码图像,所述第二参考掩码图像用于表征所述第一部位区域的边缘预测形状;第二区域识别子部分,被配置为识别所述人脸图像中的第一部位区域;第二图像生成子部分,被配置为根据所述第一部位区域与所述第二参考掩码图像生成第二掩码图像。In a possible implementation manner, the image determination part includes: a second reference image determination subsection configured to determine a second reference mask image, and the second reference mask image is used to characterize the first The edge prediction shape of the part area; the second area identification subsection is configured to identify the first part area in the face image; the second image generation subsection is configured to combine the first part area with the The second reference mask image generates a second mask image.
在一种可能的实现方式中,所述信息获取部分包括:信息确定子部分,被配置为响应于针对所述区域调整控件的触发事件,生成所述区域信息;响应于针对所述颜色调整控件的触发事件,生成所述美化参数信息;信息生成子部分,被配置为根据所述区域信息和所述美化参数信息确定所述唇部处理信息。In a possible implementation manner, the information acquisition part includes: an information determination subsection configured to generate the region information in response to a trigger event for the region adjustment control; A trigger event to generate the beautification parameter information; the information generating subpart is configured to determine the lip processing information according to the area information and the beautification parameter information.
在一种可能的实现方式中,所述颜色调整部分包括:美化图像生成子部分,被配置为根据所述美化参数信息和调整后的所述第二掩码图像生成美化图像,所述美化图像为在所述第二部位区域中填充所述美化参数信息表征颜色的图像;图像融合子部分,被配置为对所述美化图像与所述人脸图像进行图像融合,得到所述第二部位区域颜色被调整的目标图像。In a possible implementation manner, the color adjustment part includes: a beautification image generating subsection configured to generate a beautification image according to the beautification parameter information and the adjusted second mask image, the beautification image In order to fill the image representing the color of the beautification parameter information in the second part area; the image fusion subsection is configured to perform image fusion on the beautification image and the face image to obtain the second part area The color-adjusted target image.
在一种可能的实现方式中,所述图像处理方法用于为所述人脸图像添加唇线美化效果,所述第一部位区域为唇部区域,所述第二部位区域为唇线区域。In a possible implementation manner, the image processing method is used to add a lip line beautification effect to the face image, the first part area is a lip area, and the second part area is a lip line area.
根据本公开的一方面,提供了一种电子设备,包括:处理器;被配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。According to an aspect of the present disclosure, there is provided an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。According to one aspect of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented.
根据本公开的一方面,提供了一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机存储介质,所述计算机程序被计算机读取并执行时实现上述方法。According to one aspect of the present disclosure, a computer program product is provided, the computer program product includes a non-transitory computer storage medium storing a computer program, and the above method is implemented when the computer program is read and executed by a computer.
在本公开实施例中,可以通过识别人脸图像的第一部位区域和第二部位区域,并基于用户指定的区域信息和第一部位区域调节第二部位区域,得到需要进行美化编辑的区域进行美化处理。该美化处理过程可以用于为人脸图像添加唇线美化效果,实现了对人脸图像唇部特定区域进行精确美化的效果。In the embodiment of the present disclosure, by identifying the first part area and the second part area of the face image, and adjusting the second part area based on the area information specified by the user and the first part area, the area that needs to be beautified and edited can be obtained. Landscaping. The beautification process can be used to add a lip line beautification effect to the face image, realizing the precise beautification effect on a specific area of the lips of the face image.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.
图1示出根据本公开实施例的一种图像处理方法的流程图;FIG. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图2示出根据本公开实施例的一种第一掩码图像的示意图;Fig. 2 shows a schematic diagram of a first mask image according to an embodiment of the present disclosure;
图3示出根据本公开实施例的一种第二掩码图像的示意图;Fig. 3 shows a schematic diagram of a second mask image according to an embodiment of the present disclosure;
图4示出根据本公开实施例的一种图像处理方法的流程图;FIG. 4 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图5示出根据本公开实施例的一种图像处理方法的流程图;Fig. 5 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图6示出根据本公开实施例的一种图像处理方法的流程图;FIG. 6 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图7示出根据本公开实施例的一种唇部编辑页面的示意图;Fig. 7 shows a schematic diagram of a lip editing page according to an embodiment of the present disclosure;
图8示出根据本公开实施例的一种图像处理方法的流程图;FIG. 8 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图9示出根据本公开实施例的一种图像处理方法的流程图;FIG. 9 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图10示出根据本公开实施例的一种调整第二部位区域的示意图;Fig. 10 shows a schematic diagram of adjusting a second part area according to an embodiment of the present disclosure;
图11示出根据本公开实施例的一种图像处理方法的流程图;Fig. 11 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图12示出根据本公开实施例的一种图像处理方法的流程图;Fig. 12 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图13示出根据本公开实施例的一种图像处理装置的示意图;Fig. 13 shows a schematic diagram of an image processing device according to an embodiment of the present disclosure;
图14示出根据本公开实施例的一种电子设备的示意图;Fig. 14 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure;
图15示出根据本公开实施例的一种电子设备的示意图。Fig. 15 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While various aspects of the embodiments are shown in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.
本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "at least one" herein means any one of a variety or any combination of at least two of a variety, for example, including at least one of A, B, and C, may mean including from A, B, and Any one or more elements selected from the set formed by C.
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的实施细节。本领域技术人员应当理解,没有某些实施细节,本公开同样可以实施。在一些实施例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous implementation details are given in the following specific implementation manners. It will be understood by those skilled in the art that the present disclosure may be practiced without certain of the implementation details. In some embodiments, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the gist of the present disclosure.
在一种可能的实现方式中,本公开实施例的图像处理方法可以由终端设备或服务器等电子设备执行。其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等任意固定或移动终端。服务器可以为单独的服务器或多个服务器组成的服务器集群。任意电子设备均可以通过处理器调用存储器中存储的计算机可读指令的方式来实现本公开实施例的图像处理方法。In a possible implementation manner, the image processing method in the embodiment of the present disclosure may be executed by an electronic device such as a terminal device or a server. Wherein, the terminal device may be user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, Any fixed or mobile terminal such as wearable devices. The server can be a single server or a server cluster composed of multiple servers. Any electronic device can implement the image processing method of the embodiments of the present disclosure by calling the computer-readable instructions stored in the memory by the processor.
图1示出根据本公开实施例的一种图像处理方法的流程图,如图1所示,本公开实施例的图像处理方法可以包括以下步骤S101至S104。FIG. 1 shows a flow chart of an image processing method according to an embodiment of the present disclosure. As shown in FIG. 1 , the image processing method of the embodiment of the present disclosure may include the following steps S101 to S104.
步骤S101、确定人脸图像的第一掩码图像和第二掩码图像。Step S101, determining a first mask image and a second mask image of a face image.
在一种可能的实现方式中,人脸图像为待美化处理的图像,其中包括待处理人脸。电子设备可以通过内置或连接的图像采集装置采集得到人脸图像,或者通过其他电子设备采集后传输至当前执行图像处理方法的电子设备进行图像处理。电子设备在获取人脸图像后确定人脸图像的第一掩码图像和第二掩码图像。其中,第一掩码图像用于表征人脸图像第一部位区域,第二掩码图像用于表征人脸图像的第二部位区域。第二部位区域与第一部位区域至少部分不同,例如,第二部位区域可以在第一部位区域内。第二部位区域的外边缘还可以跟第一部位区域的外边缘重合。例如,第一部位区域可以为人脸图像中待处理人脸的全部嘴唇所在的区域,第二部位区域可以为人脸图像中待处理人脸全部嘴唇所在区域的边缘区域。In a possible implementation manner, the face image is an image to be beautified, including a face to be processed. The electronic device can collect the face image through a built-in or connected image acquisition device, or collect it through other electronic devices and transmit it to the electronic device currently executing the image processing method for image processing. After acquiring the face image, the electronic device determines the first mask image and the second mask image of the face image. Wherein, the first mask image is used to represent the first part area of the face image, and the second mask image is used to represent the second part area of the face image. The second site area is at least partially different from the first site area, for example, the second site area may be within the first site area. The outer edge of the second part area can also coincide with the outer edge of the first part area. For example, the first part area may be the area where all the lips of the face to be processed are located in the face image, and the second part area may be the edge area of the area where all the lips of the face to be processed are located in the face image.
在一种可能的实现方式中,第一掩码图像和第二掩码图像可以为二值图像,第一部位区域和第二部位区域中的像素值为1,其他区域的像素值为0。为了进一步通过不同的处理强度对第一部位区域和第二部位区域中每个像素值进行图像处理,提高图像处理效果。第一掩码图像和第二掩码图像中的每个像素值还可以为0至1中间的值,用于区分第一部位区域或第二部位区域和其他区域,以及表征后续图像处理过程中的处理强度。在本公开 实施例中,处理强度表征对应的美化力度。示例性的,在用于进行图像处理的美化参数为N时,可以通过每个像素值与美化参数N的乘积对像素值进行美化,例如,通过美化参数N处理像素值为1的像素值,通过美化参数N的0.5倍处理像素值为0.5的像素值。电子设备可以通过每个像素的像素值和预设的像素阈值判断第一部位区域和第二部位区域。以预设像素阈值为0.5为例进行说明。第一掩码图像中像素值不小于0.5的像素所在的位置在第一部位区域中,像素值小于0.5的像素所在的位置在第一部位区域以外的其他区域中。第二掩码图像中不小于0.5的像素值所在的位置在第二部位区域中,小于0.5的像素值所在的位置在第二部位区域以外的其他区域中。In a possible implementation manner, the first mask image and the second mask image may be binary images, the pixel values in the first part area and the second part area are 1, and the pixel values in other areas are 0. In order to further perform image processing on each pixel value in the first part area and the second part area by using different processing intensities, so as to improve the image processing effect. Each pixel value in the first mask image and the second mask image can also be a value between 0 and 1, which is used to distinguish the first part area or the second part area from other areas, and to characterize the subsequent image processing process processing intensity. In the embodiment of the present disclosure, the processing intensity represents the corresponding beautification strength. Exemplarily, when the beautification parameter used for image processing is N, the pixel value can be beautified by multiplying each pixel value by the beautification parameter N, for example, by using the beautification parameter N to process a pixel value with a pixel value of 1, Pixel values with a pixel value of 0.5 are processed by 0.5 times the beautification parameter N. The electronic device can determine the first part area and the second part area according to the pixel value of each pixel and a preset pixel threshold. Take the preset pixel threshold value of 0.5 as an example for illustration. In the first mask image, the positions of the pixels whose pixel values are not less than 0.5 are located in the first part area, and the positions of the pixels whose pixel values are less than 0.5 are located in other areas than the first part area. In the second mask image, the pixel values not less than 0.5 are located in the second part area, and the pixel values smaller than 0.5 are located in other areas than the second part area.
图2示出根据本公开实施例的一种第一掩码图像的示意图。如图2所示,第一掩码图像200与获取的人脸图像尺寸相同,其中包括的像素值不小于像素阈值的像素组成的第一区域201,以及包括的像素值小于像素阈值的像素组成的第二区域202。其中,第一区域201对应于人脸图像中的唇部位置,即表征人脸图像中人脸的嘴唇所在的位置。第二区域202对应于人脸图像中的唇部位置以外的其他位置,表征人脸图像中除了人脸的嘴唇所在位置的其他位置。也就是说,第一区域201即为第一掩码图像表征的第一部位区域。Fig. 2 shows a schematic diagram of a first mask image according to an embodiment of the disclosure. As shown in FIG. 2 , the first mask image 200 is the same size as the acquired face image, and includes a first region 201 composed of pixels whose pixel values are not less than the pixel threshold, and a first region 201 composed of pixels whose pixel values are less than the pixel threshold. The second area 202 of . Wherein, the first area 201 corresponds to the lip position in the face image, that is, the position of the lips representing the face in the face image. The second area 202 corresponds to other positions in the human face image except for the lip position, and represents other positions in the human face image except for the position of the lips of the human face. That is to say, the first area 201 is the first part area represented by the first mask image.
图3示出根据本公开实施例的一种第二掩码图像的示意图。如图3所示,第二掩码图像300与获取的人脸图像尺寸相同,其中包括的像素值不小于像素阈值的像素组成的第三区域301,以及包括的像素值小于像素阈值的像素组成的第四区域302。其中,第三区域301对应于人脸图像中的唇部边缘位置,即表征人脸图像中人脸的嘴唇需要绘制唇线的位置。第四区域302对应于人脸图像中的唇部边缘位置以外的其他位置,表征人脸图像中不需要绘制唇线的位置。也就是说,第三区域301即为第二掩码图像表征的第二部位区域。在一种可能的实现方式中,第二部位区域具有内边缘303和外边缘304。Fig. 3 shows a schematic diagram of a second mask image according to an embodiment of the present disclosure. As shown in FIG. 3 , the second mask image 300 is the same size as the acquired face image, and includes a third area 301 composed of pixels whose pixel values are not less than the pixel threshold, and includes pixels whose pixel values are less than the pixel threshold. The fourth region 302 of . Wherein, the third area 301 corresponds to the lip edge position in the face image, that is, the position where the lip line needs to be drawn to represent the lips of the face in the face image. The fourth area 302 corresponds to positions other than lip edge positions in the face image, and represents positions in the face image where lip lines do not need to be drawn. That is to say, the third area 301 is the second part area represented by the second mask image. In a possible implementation manner, the second site region has an inner edge 303 and an outer edge 304 .
在一种可能的实现方式中,第一掩码图像和第二掩码图像可以根据预先确定的标准素材确定。图4示出根据本公开实施例的一种图像处理方法的流程图,如图4所示,步骤S101中人脸图像的第一掩码图像的确定过程可以包括以下步骤S401至S403。In a possible implementation manner, the first mask image and the second mask image may be determined according to a predetermined standard material. FIG. 4 shows a flow chart of an image processing method according to an embodiment of the present disclosure. As shown in FIG. 4 , the process of determining the first mask image of the face image in step S101 may include the following steps S401 to S403.
步骤S401、确定第一参考掩码图像,第一参考掩码图像用于表征第一部位区域预测形状。Step S401. Determine a first reference mask image, which is used to characterize the predicted shape of the first part region.
步骤S402、识别人脸图像中的第一部位区域。Step S402, identifying the first part area in the face image.
步骤S403、根据第一部位区域与第一参考掩码图像生成第一掩码图像。Step S403, generating a first mask image according to the first part region and the first reference mask image.
图5示出根据本公开实施例的一种图像处理方法的流程图,如图5所示,步骤S101中人脸图像的第二掩码图像的确定过程可以包括以下步骤S501至S503。FIG. 5 shows a flow chart of an image processing method according to an embodiment of the present disclosure. As shown in FIG. 5 , the process of determining the second mask image of the face image in step S101 may include the following steps S501 to S503.
步骤S501、确定第二参考掩码图像,第二参考掩码图像用于表征第一部位区域的边缘预测形状。Step S501. Determine a second reference mask image, which is used to characterize the edge prediction shape of the first part region.
步骤S502、识别人脸图像中的第一部位区域。Step S502, identifying the first part area in the face image.
步骤S503、根据第一部位区域与第二参考掩码图像生成第二掩码图像。Step S503, generating a second mask image according to the first part region and the second reference mask image.
在一种可能的实现方式中,第一参考掩码图像和/或第二参考掩码图像可以为根据模拟人脸预先设定的掩码图像素材,或者由用户根据自身需要自行上传的掩码图像素材。在本公开实施例的图像处理方法用于为人脸图像添加唇线美化效果,第一部位区域为唇部区域,第二部位区域为唇线区域的情况下,第一参考掩码图像可以为用户上传的或电子设备生成的表征唇部形状的图像,第二参考掩码图像可以为用户上传的或电子设备生成的表征唇线形状的图像。In a possible implementation manner, the first reference mask image and/or the second reference mask image may be a mask image material preset according to the simulated face, or a mask uploaded by the user according to his or her own needs. Image footage. When the image processing method of the embodiment of the present disclosure is used to add a lip line beautification effect to the face image, the first part area is the lip area, and the second part area is the lip line area, the first reference mask image can be the user The image uploaded or generated by the electronic device representing the shape of the lips, and the second reference mask image may be an image uploaded by the user or generated by the electronic device representing the shape of the lip line.
在一种可能的实现方式中,对人脸图像进行识别得到第一部位区域的方式为关键点识别,得到的第一部位区域中包括多个关键位置点,例如嘴角位置、上边缘位置、下边缘位置以及唇珠位置等。确定的第一参考掩码图像中和第二参考掩码图像中也包括多个关键位置点,可以通过第一参考掩码图像与第一部位区域进行关键位置点映射的方式确定第一掩码图像,通过第二参考掩码图像与第一部位区域进行关键位置点映射的方式确定第二掩码 图像。基于关键点映射,上述方式确定的第一掩码图像和第二掩码图像能够准确的定位人脸图像中第一部位区域和第二部位区域的位置。In a possible implementation manner, the method of recognizing the face image to obtain the first part area is key point recognition, and the obtained first part area includes a plurality of key position points, such as the position of the corner of the mouth, the position of the upper edge, the position of the lower Edge position and lip bead position etc. The determined first reference mask image and the second reference mask image also include a plurality of key position points, and the first mask can be determined by mapping key position points between the first reference mask image and the first part area image, the second mask image is determined by performing key position point mapping between the second reference mask image and the first part region. Based on the key point mapping, the first mask image and the second mask image determined in the above manner can accurately locate the positions of the first part area and the second part area in the face image.
步骤S102、获取唇部处理信息。Step S102, acquiring lip treatment information.
在一种可能的实现方式中,唇部处理信息中可以包括区域信息和美化参数信息,区域信息用于指示人脸图像中待美化的第二部位区域范围,美化参数信息用于指示人脸图像中待美化的第二部位区域的美化参数。美化参数可以包括任意对唇部进行美化的参数,例如颜色、亮度、对比度以及透明度等。唇部处理信息可以通过任意方式获取,例如直接接收其他电子设备发送的唇部处理信息,或者与用户通过人机交互方式确定。In a possible implementation manner, the lip processing information may include area information and beautification parameter information, the area information is used to indicate the area range of the second part to be beautified in the face image, and the beautification parameter information is used to indicate the face image Beautification parameters of the second part area to be beautified. The beautification parameters may include any parameters for beautifying the lips, such as color, brightness, contrast, and transparency. The lip treatment information can be acquired in any way, such as directly receiving the lip treatment information sent by other electronic devices, or determining with the user through human-computer interaction.
图6示出根据本公开实施例的一种图像处理方法的流程图,如图6所示。在一种可能的实现方式中,唇部处理信息通过与用户人机交互的方式确定的应用场景下,步骤S102可以由电子设备通过步骤S601至S603实现。Fig. 6 shows a flowchart of an image processing method according to an embodiment of the present disclosure, as shown in Fig. 6 . In a possible implementation manner, in an application scenario where the lip treatment information is determined through human-computer interaction with the user, step S102 may be implemented by the electronic device through steps S601 to S603.
步骤S601、响应于针对区域调整控件的触发事件,生成区域信息。Step S601 , generating area information in response to a trigger event for the area adjustment control.
步骤S602、响应于针对颜色调整控件的触发事件,生成美化参数信息。Step S602, generating beautification parameter information in response to a trigger event for the color adjustment control.
步骤S603、根据区域信息和美化参数信息确定唇部处理信息。Step S603, determining lip processing information according to the area information and beautification parameter information.
图7示出根据本公开实施例的一种唇部编辑页面700的示意图。在电子设备为终端设备的情况下,唇部编辑页面700可以通过电子设备内置或连接的显示装置显示。在电子设备为服务器的情况下,唇部编辑页面700可以通过服务器发送至终端设备,并通过终端设备的显示装置显示。如图7所示,唇部编辑页面700中包括颜色调整控件701和区域调整控件702。FIG. 7 shows a schematic diagram of a lip editing page 700 according to an embodiment of the present disclosure. In the case that the electronic device is a terminal device, the lip editing page 700 may be displayed by a display device built in or connected to the electronic device. In the case where the electronic device is a server, the lip editing page 700 may be sent to the terminal device through the server, and displayed by a display device of the terminal device. As shown in FIG. 7 , the lip editing page 700 includes a color adjustment control 701 and an area adjustment control 702 .
在一种可能的实现方式中,颜色调整控件701中可以包括能够由用户通过人机交互的方式直接选中预设颜色的预设颜色控件,以及可以由用户通过人机交互的方式拖动或输入颜色值的方式确定颜色的自选颜色控件(R、G、B)。在人机交互过程中,电子设备可以接收用户通过点击的方式直接选中的预设颜色控件颜色1至颜色6中的一个预设颜色。或者,还可以接收用户通过输入或拖动的方式确定在0至255之内的RGB值,得到需要的颜色。In a possible implementation, the color adjustment control 701 can include a preset color control that can be directly selected by the user through human-computer interaction, and can be dragged or input by the user through human-computer interaction. Autocolor controls (R, G, B) that determine the color by the color value. During the human-computer interaction process, the electronic device may receive a preset color from among the preset color controls Color 1 to Color 6 that is directly selected by the user by clicking. Alternatively, the RGB value determined by the user within 0 to 255 by inputting or dragging may also be received to obtain the desired color.
在一种可能的实现方式中,颜色调整控件701中还包括强度调整控件(L),用于表征需要调整的颜色的强度,选值可以在0至1之间。可以根据用户通过人机交互的方式自行确定或选中的颜色和颜色强度确定美化参数信息。In a possible implementation manner, the color adjustment control 701 further includes an intensity adjustment control (L), which is used to represent the intensity of the color to be adjusted, and the selected value can be between 0 and 1. The beautification parameter information may be determined according to the color and color intensity determined or selected by the user through human-computer interaction.
在一种可能的实现方式中,区域调整控件702可以包括用户能够通过人机交互的方式拖动确定调整宽度比例的拖动条,以及能够输入预期调整宽度比例的输入框。在一种可能的实现方式中,用户确定的调整宽度比例可以为一个数值,用于表征需要的第二部位区域的宽度占当前第二部位区域的比例。电子设备可以根据用户通过人机交互确定的调整宽度比例生成区域信息。在一种可能的实现方式中,电子设备可以在用户通过触发颜色调整控件701生成美化参数信息,以及触发区域调整控件702生成区域信息后,生成包括区域信息和美化参数信息的唇部处理信息。In a possible implementation manner, the area adjustment control 702 may include a drag bar that the user can drag to determine a width adjustment ratio through human-computer interaction, and an input box that can input a desired adjustment width ratio. In a possible implementation manner, the adjusted width ratio determined by the user may be a numerical value, which is used to represent the ratio of the required width of the second part region to the current second part region. The electronic device can generate area information according to the adjustment width ratio determined by the user through human-computer interaction. In a possible implementation manner, the electronic device may generate lip treatment information including area information and beautification parameter information after the user triggers color adjustment control 701 to generate beautification parameter information and triggers area adjustment control 702 to generate area information.
在一种可能的实现方式中,唇部编辑页面700中还可以用于显示人脸图像703(对部分区域做遮挡处理),以及人脸图像703中的第二部位区域704,在电子设备确定唇部处理信息后根据唇部处理信息美化图像并实时显示给用户。用户可以在不满意的情况下,通过人机交互的方式重新确定新的唇部处理信息。In a possible implementation, the lip editing page 700 can also be used to display the face image 703 (blocking part of the area), and the second part area 704 in the face image 703, which is determined by the electronic device After the lip processing information, the image is beautified according to the lip processing information and displayed to the user in real time. If the user is not satisfied, he can re-determine the new lip treatment information through human-computer interaction.
在本公开实施例中,由于基于区域调整控件和颜色调整控件,用户可以对区域信息和美化参数信息根据自己的兴趣进行调整,从而获得需要的唇部处理信息,进而提升唇线美化效果。In the embodiment of the present disclosure, based on the area adjustment control and color adjustment control, the user can adjust the area information and beautification parameter information according to his own interests, so as to obtain the required lip processing information, and then improve the lip line beautification effect.
步骤S103、根据所述区域信息和所述第一掩码图像调整所述第二掩码图像中第二部位区域的范围。Step S103, adjusting the range of the second part area in the second mask image according to the area information and the first mask image.
在一种可能的实现方式中,可以基于第一掩码图像和用户确定的区域信息调整第二掩 码图像,以修改第二掩码图像中表征的第二部位区域的范围。在调整前后,第二掩码图像表征的第二部位区域位置均处于第一掩码图像表征的第一部位区域中。第二掩码图像的调整过程可以通过图像腐蚀实现,图像腐蚀用于收缩或细化图像中的对象。In a possible implementation manner, the second mask image may be adjusted based on the first mask image and the region information determined by the user, so as to modify the range of the second part region represented in the second mask image. Before and after the adjustment, the position of the second part region represented by the second mask image is within the first part region represented by the first mask image. The adjustment process of the second mask image can be realized by image erosion, which is used to shrink or refine objects in the image.
图8示出根据本公开实施例的一种图像处理方法的流程图,如图8所示,图1中的步骤S103可以更新为步骤S801,步骤S104可以更新为步骤S802,将结合图8示出的步骤进行说明。Fig. 8 shows a flow chart of an image processing method according to an embodiment of the present disclosure. As shown in Fig. 8, step S103 in Fig. 1 can be updated to step S801, and step S104 can be updated to step S802, which will be shown in conjunction with Fig. 8 Outlined steps are described.
步骤S801、根据区域信息和第一掩码图像,对第二掩码图像进行图像腐蚀操作,调整第二部位区域的范围;在图像腐蚀过程中,第二部位区域可以与第一部位区域的至少部分区域重合。Step S801, according to the area information and the first mask image, perform an image erosion operation on the second mask image to adjust the range of the second part area; during the image erosion process, the second part area can be at least the same as the first part area Some areas overlap.
在一种可能的实现方式中,在图像腐蚀过程中,区域信息和第一掩码图像均用于限定图像腐蚀范围。其中,区域信息可以用于限定调整后的第二部位区域宽度。示例性的,第二部位区域为一个连续的区域,包括第一边缘和第二边缘,图像腐蚀的方向可以为从第一边缘向第二边缘方向腐蚀。In a possible implementation manner, during the image erosion process, both the area information and the first mask image are used to limit the image erosion range. Wherein, the area information may be used to define the adjusted area width of the second part. Exemplarily, the second part area is a continuous area including the first edge and the second edge, and the direction of image erosion may be from the first edge to the second edge.
步骤S802、根据第一掩码图像,由第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀,直到满足区域信息对应的调整条件。Step S802, according to the first mask image, perform image erosion from the first edge to the second edge of the second part area in the second mask image until the adjustment condition corresponding to the area information is satisfied.
在一种可能的实现方式中,如图3所示,第二部位区域(第三区域301)的第一边缘为位于内侧的内边缘303,第二部位区域的第二边缘为位于外侧的外边缘304。In a possible implementation manner, as shown in FIG. 3 , the first edge of the second part area (third area 301) is the inner edge 303 located on the inner side, and the second edge of the second part area is the outer edge 303 located on the outer side. Edge 304.
在一种可能的实现方式中,在区域信息为一个数值的情况下,区域信息对应的调整条件可以为当前第二部位区域与原始第二部位区域的比值为区域信息的值。In a possible implementation manner, when the area information is a numerical value, the adjustment condition corresponding to the area information may be that the ratio of the current second part area to the original second part area is the value of the area information.
也就是说,可以通过调整区域信息缩小预设的嘴唇边缘区域。例如,在预设的第二部位区域宽度为5mm,区域信息为0.3的情况下,图像腐蚀后得到的第二部位区域宽度为1.5mm。That is to say, the preset lip edge area can be reduced by adjusting the area information. For example, in the case where the preset area width of the second part is 5 mm and the area information is 0.3, the width of the second part area obtained after image erosion is 1.5 mm.
在一种可能的实现方式中,在图像腐蚀过程中,第一掩码图像用于筛选出第二掩码图像中用于进行图像腐蚀的参考像素,再根据筛选得到的参考像素实现图像腐蚀过程。In a possible implementation, during the image erosion process, the first mask image is used to filter out the reference pixels used for image erosion in the second mask image, and then implement the image erosion process based on the filtered reference pixels .
在本公开实施例中,由于基于区域和第一掩膜图像,对第二掩码图像进行图像腐蚀操作,可以调整第二部位区域的范围;并且根据第一掩码图像,由第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀,可以提升获得的美化编辑的区域轮廓与第一区域轮廓的一致性,从而提升唇线美化效果。In the embodiment of the present disclosure, since the image erosion operation is performed on the second mask image based on the area and the first mask image, the range of the second part area can be adjusted; and according to the first mask image, the second mask image Performing image erosion from the first edge of the second part area in the image to the second edge can improve the consistency between the obtained beautified and edited area outline and the first area outline, thereby improving the lip line beautification effect.
图9示出根据本公开实施例的一种图像处理方法的流程图,如图9所示。步骤S802根据第一掩码图像,由第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀的过程可以更新为步骤S901至S904,将结合图9示出的步骤进行说明。Fig. 9 shows a flowchart of an image processing method according to an embodiment of the present disclosure, as shown in Fig. 9 . In step S802, the process of performing image erosion from the first edge to the second edge of the second part area in the second mask image according to the first mask image can be updated to steps S901 to S904, which will be performed in conjunction with the steps shown in FIG. 9 illustrate.
步骤S901、由第二部位区域的第一边缘开始向第二边缘依次确定目标像素。Step S901 , sequentially determine target pixels from the first edge to the second edge of the second part area.
步骤S902、根据目标像素在第二掩码图像中的位置确定目标区域。Step S902. Determine the target area according to the position of the target pixel in the second mask image.
步骤S903、根据第一掩码图像在目标区域中每个像素的像素值确定第二掩码图像中的参考像素。Step S903, determining a reference pixel in the second mask image according to the pixel value of each pixel in the target area in the first mask image.
步骤S904、根据第二掩码图像中参考像素中的像素值更新所述目标像素的像素值。Step S904, updating the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image.
在一种可能的实现方式中,可以对比每个参考像素中的最小像素值,以通过第二掩码图像中每个参考像素中的最小像素值,替换目标像素的像素值。In a possible implementation manner, the minimum pixel value in each reference pixel may be compared, so as to replace the pixel value of the target pixel with the minimum pixel value in each reference pixel in the second mask image.
在一种可能的实现方式中,目标像素的选择可以由第二部位区域位置的第一边缘开始向外顺序确定。在每次替换目标像素后,可以在第二部位区域内重新确定一个新的目标像素,再次进行图像腐蚀,直到完成图像腐蚀过程。目标区域的尺寸可以为预先确定的预设尺寸,在每一次确定目标像素后,确定该目标像素为中心、且尺寸为预设尺寸的区域为对应的目标区域。例如,当预设尺寸为3×3,且目标像素的坐标为(2,4)时,目标区域由像素(1,3)、(1,4)、(1,5)、(2,3)、(2,4)、(2,5)、(3,3)、(3,4)和(3,5)组成。In a possible implementation manner, the selection of the target pixels may be determined in an outward order from the first edge of the second part area position. After the target pixel is replaced each time, a new target pixel can be re-determined in the second part area, and the image erosion is performed again until the image erosion process is completed. The size of the target area may be a predetermined preset size, and after each determination of the target pixel, an area whose center is the target pixel and whose size is the preset size is determined as the corresponding target area. For example, when the preset size is 3×3 and the coordinates of the target pixel are (2, 4), the target area consists of pixels (1, 3), (1, 4), (1, 5), (2, 3 ), (2,4), (2,5), (3,3), (3,4) and (3,5).
在一种可能的实现方式中,在确定目标区域后,根据第一掩码图像在目标区域中每个像素的像素值筛选得到参考像素。筛选方式可以基于预设的像素阈值实现,即可以基于步骤S9041至S9042实现上述根据第二掩码图像中参考像素中的像素值更新所述目标像素的像素值。In a possible implementation manner, after the target area is determined, the reference pixel is obtained by filtering according to the pixel value of each pixel in the target area in the first mask image. The screening method can be implemented based on a preset pixel threshold, that is, the above-mentioned update of the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image can be implemented based on steps S9041 to S9042.
步骤S9041、获取第一掩码图像在目标区域中每个像素的像素值;Step S9041, obtaining the pixel value of each pixel of the first mask image in the target area;
步骤S9042、根据像素值大于像素阈值的像素在第一掩码图像中的位置在第二掩码图像中确定。Step S9042, determine in the second mask image according to the position of the pixel whose pixel value is greater than the pixel threshold in the first mask image.
在一种可能的实现方式中,以目标区域为3×3,且包括的像素坐标分别为(1,3)、(1,4)、(1,5)、(2,3)、(2,4)、(2,5)、(3,3)、(3,4)和(3,5)为例进行说明。当第一掩码图像中坐标为(1,3)、(1,4)、(1,5)、(2,3)、(2,4)、(2,5)、(3,3)、(3,4)和(3,5)的像素中的像素值分别为1、1、0.7、1、0.8、0.1、0.9、0.2和0,且预设的像素阈值为0.5时,筛选得到参考像素的坐标分别为(1,3)、(1,4)、(1,5)、(2,3)、(2,4)和(3,3)。当第二掩码图像中在上述参考像素(1,3)、(1,4)、(1,5)、(2,3)、(2,4)和(3,3)中的像素值分别为0.1、0.2、1、0.7、0.8、0和0.9时,获取其中最小值0替换目标像素(2,4)中的像素值0.8。In a possible implementation, the target area is 3×3, and the pixel coordinates included are (1, 3), (1, 4), (1, 5), (2, 3), (2 , 4), (2, 5), (3, 3), (3, 4) and (3, 5) as examples for illustration. When the coordinates in the first mask image are (1,3), (1,4), (1,5), (2,3), (2,4), (2,5), (3,3) , (3, 4) and (3, 5) are 1, 1, 0.7, 1, 0.8, 0.1, 0.9, 0.2 and 0 respectively, and when the preset pixel threshold is 0.5, the filtered The coordinates of the reference pixels are (1, 3), (1, 4), (1, 5), (2, 3), (2, 4) and (3, 3), respectively. When the pixel values in the above reference pixels (1,3), (1,4), (1,5), (2,3), (2,4) and (3,3) in the second mask image When they are 0.1, 0.2, 1, 0.7, 0.8, 0, and 0.9, obtain the minimum value 0 to replace the pixel value 0.8 in the target pixel (2, 4).
图10示出根据本公开实施例的一种调整第二部位区域的示意图。如图10所示,在确定第二掩码图像中当前目标像素为中心的目标区域1001后,还获取第一掩码图像中在目标区域位置的目标区域1002。通过第一掩码图像中目标区域1002中每个像素的像素值筛选得到参考像素,得到第二掩码图像中目标区域1001中多个参考像素组成的图像腐蚀区域1003。通过图像腐蚀区域1003中的最小值0替换目标像素中的像素值。Fig. 10 shows a schematic diagram of adjusting a second part area according to an embodiment of the present disclosure. As shown in FIG. 10 , after determining the target area 1001 centered on the current target pixel in the second mask image, a target area 1002 at the position of the target area in the first mask image is also obtained. The reference pixels are obtained by screening the pixel values of each pixel in the target area 1002 in the first mask image, and an image erosion area 1003 composed of a plurality of reference pixels in the target area 1001 in the second mask image is obtained. The pixel value in the target pixel is replaced by the minimum value 0 in the image erosion area 1003 .
在根据区域信息和第一掩码图像完成图像腐蚀后,得到调整其中表征的第二部位区域后的第二掩码图像。After image erosion is completed according to the region information and the first mask image, a second mask image after adjusting the second part region represented therein is obtained.
步骤S104、根据所述美化参数信息和调整后的所述第二掩码图像对所述人脸图像进行美化处理,得到所述第二部位区域颜色被调整的目标图像。Step S104: Perform beautification processing on the human face image according to the beautification parameter information and the adjusted second mask image to obtain a target image in which the color of the second part region is adjusted.
在一种可能的实现方式中,根据区域信息和第一掩码图像调整第二掩码图像后,根据美化处理信息中的美化参数信息、以及调整后的第二掩码图像对人脸图像中的第二部位区域进行美化处理,得到目标图像。In a possible implementation, after the second mask image is adjusted according to the area information and the first mask image, according to the beautification parameter information in the beautification processing information and the adjusted second mask image in the face image Beautify the second part of the region to obtain the target image.
图11示出根据本公开实施例的一种图像处理方法的流程图,如图11所示,图1中的步骤S104可以更新为步骤S1101至S1102,将结合图11示出的步骤进行说明。FIG. 11 shows a flowchart of an image processing method according to an embodiment of the present disclosure. As shown in FIG. 11 , step S104 in FIG. 1 can be updated to steps S1101 to S1102 , which will be described in conjunction with the steps shown in FIG. 11 .
步骤S1101、根据美化参数信息和调整后的第二掩码图像生成美化图像,美化图像为在第二部位区域中填充美化参数信息表征颜色的图像。Step S1101, generate a beautification image according to the beautification parameter information and the adjusted second mask image, the beautification image is an image filled with the color represented by the beautification parameter information in the second part area.
在一种可能的实现方式中,美化图像可以为与人脸图像尺寸相同的图像,其中仅第二部位区域根据第二掩码图像中表征第二部位区域各像素的强度填充美化参数信息表征的颜色,并将其他区域设置为透明,即像素值设置为0。In a possible implementation, the beautified image may be an image with the same size as the face image, wherein only the second part area is filled with the beautification parameter information represented by the intensity of each pixel representing the second part area in the second mask image. color, and set the other areas to be transparent, that is, set the pixel value to 0.
步骤S1102、对美化图像与人脸图像进行图像融合,得到第二部位区域颜色被调整的目标图像。Step S1102, performing image fusion on the beautified image and the face image to obtain the target image whose color is adjusted in the second part area.
在一种可能的实现方式中,图像融合方式可以为任意融合方式,例如正片叠底以及透明度融合等任意方式。其中,正片叠底的过程为将美化图像中的第二部位区域位置以幻灯片的形式叠放在人脸图像中的第二部位区域位置。In a possible implementation manner, the image fusion manner may be any fusion manner, such as any manner such as multiplication and transparency fusion. Wherein, the multiplication process is to superimpose the position of the second part region in the beautified image on the position of the second part region in the face image in the form of a slideshow.
下面说明本公开实施例提供的图像处理方法在实际场景中的应用,以基于实时采集的人脸图像进行唇线美化图像处理场景为例进行说明。The following describes the application of the image processing method provided by the embodiment of the present disclosure in an actual scene, taking the lip line beautification image processing scene based on real-time collected face images as an example.
图12示出根据本公开实施例的一种图像处理方法的流程图,如图12所示,本公开实施例的图像处理方法可以包括以下步骤S1201至S1203。FIG. 12 shows a flowchart of an image processing method according to an embodiment of the present disclosure. As shown in FIG. 12 , the image processing method of the embodiment of the present disclosure may include the following steps S1201 to S1203.
步骤S1201、根据唇线Mask纹理,获取需要做唇线部位的图像。Step S1201, according to the texture of the lip line Mask, acquire the image of the part where the lip line needs to be done.
步骤S1202、根据输入的唇线线宽比例,对唇线Mask纹理做图像腐蚀处理。Step S1202 , perform image erosion processing on the lip line Mask texture according to the input lip line width ratio.
在一种可能的实现方式中,对唇线Mask纹理(对应上述实施例中的第二掩码图像的第二部位区域)做kernel区域(包围当前像素的正方形区域)的纹理采样,可以通过全嘴唇Mask纹理(对应上述实施例中的第一掩码图像的第一部位区域)判断kernel区域中需要采样的像素和不需要采样的像素。示例性的,对超出全嘴唇Mask纹理中嘴唇区域的像素不做采样处理,可以使唇线Mask纹理的外圈不发生变化,即对唇线Mask纹理的外圈不进行腐蚀处理,而只对唇线Mask纹理的内圈进行腐蚀处理。In a possible implementation, the lip line Mask texture (corresponding to the second part area of the second mask image in the above embodiment) is used for texture sampling of the kernel area (the square area surrounding the current pixel), which can be obtained through the full The lip Mask texture (corresponding to the first part area of the first mask image in the above embodiment) determines the pixels that need to be sampled and the pixels that do not need to be sampled in the kernel area. Exemplarily, the pixels beyond the lip area in the full lip Mask texture are not sampled, so that the outer circle of the lip line Mask texture does not change, that is, the outer circle of the lip line Mask texture is not corroded, but only The inner ring of the lip mask texture is etched.
在一种可能的实现方式中,将整个kernel区域采样结果的最小值作为当前像素的输出值,更新当前像素的像素值,从而确定出要做唇线效果的唇线区域(对应上述实施例中的进行图像腐蚀后得到的第二部位区域)。In a possible implementation, the minimum value of the sampling result of the entire kernel area is used as the output value of the current pixel, and the pixel value of the current pixel is updated, so as to determine the lip line area where the lip line effect is to be performed (corresponding to the above-mentioned embodiment) The second part area obtained after performing image erosion).
步骤S1203、基于用户选择的唇线强度,对输入的目标颜色与原像素颜色进行融合。Step S1203, based on the lip line intensity selected by the user, fuse the input target color with the original pixel color.
在一种可能的实现方式中,可以采用正片叠底的混合模式对输入的目标颜色与原像素颜色(唇线区域)进行融合,得到唇线效果图像(对应上述实施例中的目标图像)。In a possible implementation manner, the input target color and the original pixel color (lip line area) may be fused by using the multiply blending mode to obtain a lip line effect image (corresponding to the target image in the above embodiment).
在本公开实施例中,通过唇线Mask纹理获取需要做唇线的部位的图像,再对唇线Mask纹理做图像腐蚀处理,可以获得宽度合适的唇线区域;同时基于用户选择的唇线强度,将目标颜色与原像素颜色进行融合,可以获得更多样式的唇线效果图像。In the embodiment of the present disclosure, the lip line Mask texture is used to obtain the image of the part where the lip line needs to be made, and then the image erosion process is performed on the lip line Mask texture to obtain a lip line area with a suitable width; at the same time, based on the lip line strength selected by the user , to blend the target color with the original pixel color to obtain more styles of lip line effect images.
本公开实施例的图像处理方法可以用于对人脸图像中人脸的唇部进行美化。例如,可以通过电子设备获取人脸图像,并对人脸图像中人脸进行特征点识别得到人脸的唇部区域。根据预设的或用户上传的第一参考掩码图像与唇部区域得到表征人脸唇部区域在人脸图像中位置的第一掩码图像,并根据预设的或用户上传的第二参考掩码图像与唇部区域得到表征人脸唇部边缘在人脸图像中位置的第二掩码图像。同时,电子设备通过与用户进行人机交互的方式确定指示用户希望增加唇线效果区域的区域信息,以及用于指示用户希望增加的唇线颜色、强度以及亮度等效果的美化参数信息。根据区域信息和第一掩码图像调整第二掩码图像确定最终需要增加唇线效果的区域,并根据美化参数信息和调整后的第二掩码图像得到用于美化该需要增加唇线效果的区域的美化图像,将美化图像与人脸图像进行正片叠底处理得到具有美化后唇线效果的人脸图像。The image processing method of the embodiment of the present disclosure may be used to beautify the lips of a human face in a human face image. For example, a face image may be acquired by an electronic device, and the feature points of the face in the face image may be recognized to obtain the lip region of the face. According to the preset or user uploaded first reference mask image and the lip area, the first mask image representing the position of the human face lip area in the face image is obtained, and according to the preset or user uploaded second reference The mask image and the lip region obtain a second mask image representing the position of the lip edge of the human face in the human face image. At the same time, the electronic device determines the area information indicating the area where the user wishes to increase the lip line effect and the beautification parameter information indicating the color, intensity and brightness of the lip line that the user wishes to increase through human-computer interaction with the user. Adjust the second mask image according to the area information and the first mask image to determine the final area where the lip line effect needs to be increased, and obtain the lip line effect for beautification according to the beautification parameter information and the adjusted second mask image The beautified image of the area, the beautified image and the face image are multiplied to obtain the face image with the lip line effect after beautification.
本公开实施例可以通过识别人脸图像的第一部位区域和第二部位区域,并基于用户指定的区域信息和第一部位区域调节第二部位区域,得到需要进行美化处理的区域进行美化处理。实现了对人脸图像唇部特定区域进行精确美化的效果。The embodiment of the present disclosure can identify the first part area and the second part area of the face image, and adjust the second part area based on the area information specified by the user and the first part area, so as to obtain the area that needs to be beautified and perform beautification processing. The effect of precisely beautifying the specific area of the lip of the face image is realized.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above-mentioned method embodiments mentioned in this disclosure can all be combined with each other to form a combined embodiment without violating the principle and logic. Those skilled in the art can understand that, in the above method in the specific implementation manner, the specific execution order of each step should be determined according to its function and possible internal logic.
此外,本公开还提供了一种图像处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任意一种图像处理方法,相应技术方案和描述,请参见方法部分的相应记载。In addition, the present disclosure also provides an image processing device, electronic equipment, computer-readable storage medium, and program, all of which can be used to implement any image processing method provided in the present disclosure. For corresponding technical solutions and descriptions, please refer to the method section corresponding record.
图13示出根据本公开实施例的一种图像处理装置的示意图。如图13所示,本公开实施例的图像处理装置包括图像确定部分1301、信息获取部分1302、范围调整部分1303和颜色调整部分1304。Fig. 13 shows a schematic diagram of an image processing device according to an embodiment of the present disclosure. As shown in FIG. 13 , the image processing apparatus of the embodiment of the present disclosure includes an image determination section 1301 , an information acquisition section 1302 , a range adjustment section 1303 , and a color adjustment section 1304 .
图像确定部分1301,被配置为确定人脸图像的第一掩码图像和第二掩码图像,所述第一掩码图像用于表征所述人脸图像的第一部位区域,所述第二掩码图像用于表征所述人脸图像的第二部位区域,所述第二部位区域与所述第一部位区域至少部分不同;The image determining part 1301 is configured to determine a first mask image and a second mask image of the face image, the first mask image is used to characterize the first part region of the face image, and the second mask image The mask image is used to represent a second part region of the human face image, the second part region is at least partially different from the first part region;
信息获取部分1302,被配置为获取唇部处理信息,所述唇部处理信息中包括区域信息和美化参数信息;The information acquiring part 1302 is configured to acquire lip processing information, and the lip processing information includes area information and beautification parameter information;
范围调整部分1303,被配置为根据所述区域信息和所述第一掩码图像调整所述第二掩码图像中第二部位区域的范围;The range adjustment part 1303 is configured to adjust the range of the second part area in the second mask image according to the area information and the first mask image;
颜色调整部分1304,被配置为根据所述美化参数信息和调整后的所述第二掩码图像对 所述人脸图像进行美化处理,得到所述第二部位区域颜色被调整的目标图像。The color adjustment part 1304 is configured to perform beautification processing on the face image according to the beautification parameter information and the adjusted second mask image, so as to obtain the target image in which the color of the second part region is adjusted.
在一种可能的实现方式中,所述范围调整部分1303包括:In a possible implementation manner, the range adjustment part 1303 includes:
图像腐蚀子部分,被配置为根据所述区域信息和所述第一掩码图像,对所述第二掩码图像进行图像腐蚀操作,调整所述第二部位区域的范围;在所述图像腐蚀过程中,所述第二部位区域与所述第一部位区域的至少部分区域重合。The image erosion sub-part is configured to perform an image erosion operation on the second mask image according to the area information and the first mask image, and adjust the range of the second part area; During the process, the second part area overlaps with at least part of the first part area.
在一种可能的实现方式中,所述图像腐蚀子部分包括:In a possible implementation manner, the image erosion subsection includes:
图像腐蚀部分,被配置为根据所述第一掩码图像,由所述第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀,直到满足所述区域信息对应的调整条件。The image erosion part is configured to perform image erosion from the first edge to the second edge of the second part area in the second mask image according to the first mask image until the adjustment corresponding to the area information is satisfied. condition.
在一种可能的实现方式中,所述区域信息对应的调整条件为当前第二部位区域与原始第二部位区域的比值为所述区域信息的值。In a possible implementation manner, the adjustment condition corresponding to the area information is that the ratio of the current second part area to the original second part area is the value of the area information.
在一种可能的实现方式中,所述图像腐蚀部分包括:In a possible implementation manner, the image erosion part includes:
目标像素确定子部分,被配置为由所述第二部位区域的第一边缘开始向第二边缘依次确定目标像素;The target pixel determination subsection is configured to sequentially determine target pixels from the first edge to the second edge of the second part area;
区域确定子部分,被配置为根据所述目标像素在所述第二掩码图像中的位置确定目标区域;an area determining subsection configured to determine a target area according to the position of the target pixel in the second mask image;
参考像素确定子部分,被配置为根据所述第一掩码图像在所述目标区域中每个像素的像素值确定所述第二掩码图像中的参考像素;a reference pixel determining subsection configured to determine a reference pixel in the second mask image according to a pixel value of each pixel in the target area in the first mask image;
像素值更新子部分,被配置为根据所述第二掩码图像中所述参考像素中的像素值更新所述目标像素的像素值。The pixel value updating subsection is configured to update the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image.
在一种可能的实现方式中,所述参考像素确定子部分包括:In a possible implementation manner, the reference pixel determining subsection includes:
像素值获取子部分,被配置为获取所述第一掩码图像在所述目标区域中每个像素的像素值;a pixel value obtaining subsection configured to obtain a pixel value of each pixel of the first mask image in the target area;
参考像素筛选子部分,被配置为根据所述像素值大于像素阈值的像素在所述第一掩码图像中的位置在所述第二掩码图像中确定参考像素。The reference pixel screening subsection is configured to determine a reference pixel in the second mask image according to the position of the pixel whose pixel value is greater than a pixel threshold in the first mask image.
在一种可能的实现方式中,所述图像确定部分1301包括:In a possible implementation manner, the image determining part 1301 includes:
第一参考图像确定子部分,被配置为确定第一参考掩码图像,所述第一参考掩码图像用于表征所述第一部位区域预测形状;The first reference image determination subpart is configured to determine a first reference mask image, the first reference mask image is used to characterize the predicted shape of the first part region;
第一区域识别子部分,被配置为识别所述人脸图像中的第一部位区域;The first area identification subpart is configured to identify a first part area in the face image;
第一图像生成子部分,被配置为根据所述第一部位区域与所述第一参考掩码图像生成第一掩码图像。The first image generating subsection is configured to generate a first mask image according to the first part region and the first reference mask image.
在一种可能的实现方式中,所述图像确定部分1301包括:In a possible implementation manner, the image determining part 1301 includes:
第二参考图像确定子部分,被配置为确定第二参考掩码图像,所述第二参考掩码图像用于表征所述第一部位区域的边缘预测形状;The second reference image determination subpart is configured to determine a second reference mask image, the second reference mask image is used to characterize the edge prediction shape of the first part region;
第二区域识别子部分,被配置为识别所述人脸图像中的第一部位区域;The second area identification subpart is configured to identify the first part area in the face image;
第二图像生成子部分,被配置为根据所述第一部位区域与所述第二参考掩码图像生成第二掩码图像。The second image generating subsection is configured to generate a second mask image according to the first part region and the second reference mask image.
在一种可能的实现方式中,所述信息获取部分1302包括:In a possible implementation manner, the information acquiring part 1302 includes:
信息确定子部分,被配置为响应于针对所述区域调整控件的触发事件,生成所述区域信息;响应于针对所述颜色调整控件的触发事件,生成所述美化参数信息;The information determination subpart is configured to generate the area information in response to a trigger event for the area adjustment control; generate the beautification parameter information in response to a trigger event for the color adjustment control;
信息生成子部分,被配置为根据所述区域信息和所述美化参数信息确定所述唇部处理信息。The information generation subpart is configured to determine the lip treatment information according to the area information and the beautification parameter information.
在一种可能的实现方式中,所述颜色调整部分1304包括:In a possible implementation manner, the color adjustment part 1304 includes:
美化图像生成子部分,被配置为根据所述美化参数信息和调整后的所述第二掩码图像生成美化图像,所述美化图像为在所述第二部位区域中填充所述美化参数信息表征颜色的图像;The beautification image generation subpart is configured to generate a beautification image according to the beautification parameter information and the adjusted second mask image, the beautification image is a representation of filling the beautification parameter information in the second part area color image;
图像融合子部分,被配置为对所述美化图像与所述人脸图像进行图像融合,得到所述第二部位区域颜色被调整的目标图像。The image fusion subpart is configured to perform image fusion on the beautification image and the face image to obtain a target image in which the color of the second part region is adjusted.
在一种可能的实现方式中,所述图像处理方法用于为所述人脸图像添加唇线美化效果,所述第一部位区域为唇部区域,所述第二部位区域为唇线区域。In a possible implementation manner, the image processing method is used to add a lip line beautification effect to the face image, the first part area is a lip area, and the second part area is a lip line area.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以被配置为执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述。In some embodiments, the functions or parts included in the apparatus provided by the embodiments of the present disclosure may be configured to execute the methods described in the above method embodiments, and for specific implementation, refer to the descriptions of the above method embodiments.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor. Computer readable storage media may be volatile or nonvolatile computer readable storage media.
本公开实施例还提出一种电子设备,包括:处理器;被配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,在所述计算机可读代码在电子设备的处理器中运行的情况下,所述电子设备中的处理器执行上述方法。An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, where the computer-readable codes are stored in a processor of an electronic device In the case of running in the electronic device, the processor in the electronic device executes the above method.
电子设备可以被提供为终端、服务器或其它形态的设备。Electronic devices may be provided as terminals, servers, or other forms of devices.
图14示出根据本公开实施例的一种电子设备1400的示意图。例如,电子设备1400可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 14 shows a schematic diagram of an electronic device 1400 according to an embodiment of the present disclosure. For example, the electronic device 1400 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
参照图14,电子设备1400可以包括以下一个或多个组件:处理组件1401,存储器1402,电源组件1403,多媒体组件1404,音频组件1405,输入/输出(Input/Ouput,I/O)接口1406,传感器组件1407,以及通信组件1408。Referring to FIG. 14 , electronic device 1400 may include one or more of the following components: processing component 1401, memory 1402, power supply component 1403, multimedia component 1404, audio component 1405, input/output (Input/Ouput, I/O) interface 1406, sensor component 1407, and communication component 1408.
处理组件1401通常控制电子设备1400的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1401可以包括一个或多个处理器1409来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1401可以包括一个或多个部分,便于处理组件1401和其他组件之间的交互。例如,处理组件1401可以包括多媒体部分,以方便多媒体组件1404和处理组件1401之间的交互。The processing component 1401 generally controls the overall operations of the electronic device 1400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1401 may include one or more processors 1409 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 1401 may include one or more components that facilitate interaction between processing component 1401 and other components. For example, processing component 1401 may include a multimedia portion to facilitate interaction between multimedia component 1404 and processing component 1401 .
存储器1402被配置为存储各种类型的数据以支持在电子设备1400的操作。这些数据的示例包括用于在电子设备1400上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1402可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random-Access Memory,SRAM),电可擦除可编程只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM),可编程只读存储器(Programmable read-only memory,PROM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 1402 is configured to store various types of data to support operations at the electronic device 1400 . Examples of such data include instructions for any application or method operating on the electronic device 1400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1402 can be realized by any type of volatile or non-volatile memory device or their combination, such as Static Random-Access Memory (Static Random-Access Memory, SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically -Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), Programmable Read-Only Memory (Programmable read-only memory, PROM), Read Only Memory (Read -Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
电源组件1403为电子设备1400的各种组件提供电力。电源组件1403可以包括电源管理系统,一个或多个电源,及其他与为电子设备1400生成、管理和分配电力相关联的组件。The power supply component 1403 provides power to various components of the electronic device 1400 . Power components 1403 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 1400 .
多媒体组件1404包括在所述电子设备1400和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(Liquid Crystal Display,LCD)和触摸面板(Touch Panel,TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1404包括以下至少之一:前置摄像头和后置摄像头。在电子设备1400处于操作模式,如拍摄模式或视频模式的情况下,前置摄像头和后置摄像头中的至少之一可以接收外部的多媒体数据。每个前置摄像头 和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 1404 includes a screen providing an output interface between the electronic device 1400 and the user. In some embodiments, the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a touch panel (Touch Panel, TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 1404 includes at least one of the following: a front camera and a rear camera. When the electronic device 1400 is in an operation mode, such as a shooting mode or a video mode, at least one of the front camera and 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 capability.
音频组件1405被配置为输出和输入音频信号,或者输出音频信号,或者输入音频信号。例如,音频组件1405包括一个麦克风(Microphone,MIC),当电子设备1400处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被存储在存储器1402或经由通信组件1408发送。在一些实施例中,音频组件1405还包括一个扬声器,被配置为输出音频信号。The audio component 1405 is configured to output and input audio signals, or to output audio signals, or to input audio signals. For example, the audio component 1405 includes a microphone (Microphone, MIC), which is configured to receive external audio signals when the electronic device 1400 is in operation modes, such as calling mode, recording mode and voice recognition mode. Received audio signals may be stored in memory 1402 or sent via communication component 1408 . In some embodiments, the audio component 1405 also includes a speaker configured to output audio signals.
I/O接口1406为处理组件1401和外围接口部分之间提供接口,上述外围接口部分可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 1406 provides an interface between the processing component 1401 and the peripheral interface part, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件1407包括一个或多个传感器,用于为电子设备1400提供各个方面的状态评估。例如,传感器组件1407可以检测到电子设备1400的打开/关闭状态,组件的相对定位,例如所述组件为电子设备1400的显示器和小键盘,传感器组件1407还可以检测电子设备1400或电子设备1400一个组件的位置改变,用户与电子设备1400接触的存在或不存在,电子设备1400方位或加速/减速和电子设备1400的温度变化。传感器组件1407可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1407还可以包括光传感器,如互补金属氧化物半导体(Complementary Metal-Oxide-Semiconductor,CMOS)或电荷耦合装置(Charge Coupled Device,CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1407还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 1407 includes one or more sensors for providing various aspects of status assessment for electronic device 1400 . For example, the sensor component 1407 can detect the open/closed state of the electronic device 1400, the relative positioning of components, for example, the components are the display and the keypad of the electronic device 1400, the sensor component 1407 can also detect the electronic device 1400 or one of the electronic devices 1400 Changes in position of components, presence or absence of user contact with electronic device 1400 , electronic device 1400 orientation or acceleration/deceleration and temperature changes in electronic device 1400 . The sensor assembly 1407 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 1407 may also include an optical sensor, such as a Complementary Metal-Oxide-Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor component 1407 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件1408被配置为便于电子设备1400和其他设备之间有线或无线方式的通信。电子设备1400可以接入基于通信标准的无线网络,如无线网络(Wireless Network),第二代移动通信技术(Second Generation,2G)或第三代移动通信技术(Third Generation,3G),或它们的组合。在一个示例性实施例中,通信组件1408经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1408还包括近场通信(Near Field Communication,NFC)部分,以促进短程通信。例如,在NFC部分可基于射频识别(Radio Frequency Identification,RFID)技术,红外数据协会(Infrared Data Association,IrDA)技术,超宽带(Ultra Wide Band,UWB)技术,蓝牙(Bluetooth,BT)技术和其他技术来实现。The communication component 1408 is configured to facilitate wired or wireless communication between the electronic device 1400 and other devices. The electronic device 1400 can access a wireless network based on a communication standard, such as a wireless network (Wireless Network), a second generation mobile communication technology (Second Generation, 2G) or a third generation mobile communication technology (Third Generation, 3G), or their combination. In an exemplary embodiment, the communication component 1408 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1408 also includes a Near Field Communication (NFC) portion to facilitate short-range communication. For example, the NFC part can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (Infrared Data Association, IrDA) technology, Ultra Wide Band (Ultra Wide Band, UWB) technology, Bluetooth (Bluetooth, BT) technology and other technology to achieve.
在示例性实施例中,电子设备1400可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理设备(Digital Signal Processing Device,DSPD)、可编程逻辑器件(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the electronic device 1400 may be implemented by one or more Application Specific Integrated Circuits (Application Specific Integrated Circuit, ASIC), Digital Signal Processor (Digital Signal Processor, DSP), Digital Signal Processing Device (Digital Signal Processing Device , DSPD), Programmable Logic Device (Programmable Logic Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic components to implement the above method.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1402,上述计算机程序指令可由电子设备1400的处理器1409执行以完成上述方法。In an exemplary embodiment, there is also provided a non-volatile computer-readable storage medium, such as the memory 1402 including computer program instructions, which can be executed by the processor 1409 of the electronic device 1400 to implement the above method.
本公开涉及计算机技术领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的AR效果。示例性的,目标对象可涉及与人体相关的脸部、肢体、手势、动作等,或者与物体相关的标识物、标志物,或者与场馆或场所相关的沙盘、展示区域或展示物品等。视觉相关算法可涉及视觉定位、SLAM、三维重建、图像注册、背景分割、对象的关键点提取及跟踪、对象的位姿或深度检测等。具体应用不仅可以涉及跟真实场景或物品相关的导览、导航、讲解、重建、虚拟效果叠加展示等交互场景,还可以涉及与人相关的特效处理,比如妆容美化、肢体美化、特效展示、虚拟模型展示等交互场景。可通过卷积神经网络,实现对目标对象的相关特征、状态及属性进行检 测或识别处理。上述卷积神经网络是基于深度学习框架进行模型训练而得到的网络模型。This disclosure relates to the field of computer technology. By acquiring the image information of the target object in the real environment, and then using various visual correlation algorithms to detect or identify the relevant characteristics, states and attributes of the target object, so as to obtain the image information that matches the specific application. AR effect combining virtual and reality. Exemplarily, the target object may involve faces, limbs, gestures, actions, etc. related to the human body, or markers and markers related to objects, or sand tables, display areas or display items related to venues or places. Vision-related algorithms can involve visual positioning, SLAM, 3D reconstruction, image registration, background segmentation, object key point extraction and tracking, object pose or depth detection, etc. Specific applications can not only involve interactive scenes such as guided tours, navigation, explanations, reconstructions, virtual effect overlays and display related to real scenes or objects, but also special effects processing related to people, such as makeup beautification, body beautification, special effect display, virtual Interactive scenarios such as model display. The relevant characteristics, states and attributes of the target object can be detected or identified through the convolutional neural network. The above-mentioned convolutional neural network is a network model obtained by performing model training based on a deep learning framework.
图15示出根据本公开实施例的另一种电子设备1500的示意图。例如,电子设备1500可以被提供为一服务器。参照图15,电子设备1500包括处理组件1501,还包括一个或多个处理器,以及由存储器1502所代表的存储器资源,被配置为存储可由处理组件1501执行的指令,例如应用程序。存储器1502中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的部分。此外,处理组件1501被配置为执行指令,以执行上述方法。FIG. 15 shows a schematic diagram of another electronic device 1500 according to an embodiment of the present disclosure. For example, the electronic device 1500 may be provided as a server. Referring to FIG. 15 , an electronic device 1500 includes a processing component 1501 , and also includes one or more processors, and a memory resource represented by a memory 1502 configured to store instructions executable by the processing component 1501 , such as application programs. An application program stored in memory 1502 may include one or more portions each corresponding to a set of instructions. In addition, the processing component 1501 is configured to execute instructions to perform the above method.
电子设备1500还可以包括一个电源组件1503被配置为执行电子设备1500的电源管理,一个有线或无线网络接口1504被配置为将电子设备1500连接到网络,和一个I/O接口1505。电子设备1500可以操作基于存储在存储器1502的操作系统,例如微软服务器操作系统(Windows ServerTM),基于图形用户界面操作系统(Mac OS XTM),多用户多进程的计算机操作系统(UnixTM),自由和开放原代码的类Unix操作系统(LinuxTM),开放原代码的类Unix操作系统(FreeBSDTM)或类似。The electronic device 1500 may also include a power component 1503 configured to perform power management of the electronic device 1500 , a wired or wireless network interface 1504 configured to connect the electronic device 1500 to a network, and an I/O interface 1505 . Electronic device 1500 can operate based on the operating system stored in memory 1502, such as Microsoft server operating system (Windows Server™), based on graphical user interface operating system (Mac OS X™), multi-user multi-process computer operating system (Unix™), free and An open source Unix-like operating system (LinuxTM), an open source Unix-like operating system (FreeBSDTM), or similar.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1502,上述计算机程序指令可由电子设备1500的处理组件1501执行以完成上述方法。In an exemplary embodiment, there is also provided a non-volatile computer-readable storage medium, such as a memory 1502 including computer program instructions, which can be executed by the processing component 1501 of the electronic device 1500 to implement the above method.
本公开包括以下至少之一:是系统、方法和计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure includes at least one of the following: a system, a method and a computer program product. A computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random-Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)或闪存、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Versatile Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but is not limited to, an electrical 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. Examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, Random-Access Memory (RAM), Read-Only Memory (ROM), erasable Programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM) or flash memory, Static Random-Access Memory (Static Random-Access Memory, SRAM), Portable Compression Disk Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM ), Digital Versatile Disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing. As used herein, computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络,例如因特网、局域网、广域网和无线网中的至少之一下载到外部计算机或外部存储设备。网络可以包括以下至少之一:铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as at least one of the Internet, a local area network, a wide area network, and a wireless network . The network may include at least one of: copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers. A network adapter card or a 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 .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architectures,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网 服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing the operations of the present disclosure may be assembly instructions, Instruction Set Architectures (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or in the form of one or more source or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages. Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In cases involving a remote computer, 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 use an Internet service provider to connect via the Internet). In some embodiments, electronic circuits, such as programmable logic circuits, field programmable gate arrays (Field Programmable Gate Array, FPGA) or programmable logic arrays (Programmable Logic Array, PLA), the electronic circuit can execute computer-readable program instructions, thereby implementing various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和框图中的至少之一描述了本公开的各个方面。应当理解,流程图和框图中的至少之一的每个方框,以及流程图和框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to at least one of flowchart illustrations and block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of at least one of the flowchart illustrations and block diagrams, and combinations of blocks in the flowchart illustrations and block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和其他设备中的至少之一以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和框图中的至少一个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause at least one of computers, programmable data processing devices and other devices to work in a specific way, so that the computer-readable The medium then includes an article of manufacture including instructions for implementing various aspects of the functions/acts specified in at least one block in the flowcharts and block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和框图中的至少一个方框中规定的功能/动作。It is also possible to load computer-readable program instructions into a computer, other programmable data processing device, or other equipment, so that a series of operational steps are performed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , so that instructions executed on computers, other programmable data processing devices, or other devices implement the functions/actions specified in at least one block in the flowcharts and block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个部分、程序段或指令的一部分,所述部分、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和流程图中的至少之一的每个方框、以及框图和流程图中至少之一的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a portion, a program segment, or a portion of an instruction that includes one or more Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also to be noted that each block of at least one of the block diagrams and flowcharts, and combinations of blocks of at least one of the block diagrams and flowcharts, may be implemented with a dedicated hardware-based computer that performs specified functions or actions. system, or it may be implemented by a combination of special purpose hardware and computer instructions.
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically realized by means of hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考。The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments, and the same or similar points can be referred to each other.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possible The inner logic is OK.
若本公开技术方案涉及个人信息,应用本公开技术方案的产品在处理个人信息前,已明确告知个人信息处理规则,并取得个人自主同意。若本公开技术方案涉及敏感个人信息,应用本公开技术方案的产品在处理敏感个人信息前,已取得个人单独同意,并且同时满足“明示同意”的要求。例如,在摄像头等个人信息采集装置处,设置明确显著的标识告知已进入个人信息采集范围,将会对个人信息进行采集,若个人自愿进入采集范围即视为同意对其个人信息进行采集;或者在个人信息处理的装置上,利用明显的标识/信息告知个人信息处理规则的情况下,通过弹窗信息或请个人自行上传其个人信息等方式获得个人授权;其中,个人信息处理规则可包括个人信息处理者、个人信息处理目的、处理方式以及处理的个人信息种类等信息。If the disclosed technical solution involves personal information, the products applying the disclosed technical solution have clearly notified the personal information processing rules and obtained the individual's independent consent before processing personal information. If the disclosed technical solution involves sensitive personal information, the products applying the disclosed technical solution have obtained individual consent before processing sensitive personal information, and at the same time meet the requirement of "express consent". For example, at a personal information collection device such as a camera, a clear and prominent sign is set up to inform that it has entered the scope of personal information collection, and personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed to agree to the collection of his personal information; or On the personal information processing device, when the personal information processing rules are informed with obvious signs/information, personal authorization is obtained through pop-up information or by asking individuals to upload their personal information; among them, the personal information processing rules may include Information such as the information processor, the purpose of personal information processing, the method of processing, and the type of personal information processed.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不 限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本公开中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本公开披露的各实施例。Having described various embodiments of the present disclosure above, the foregoing description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and alterations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terminology used in this disclosure is intended to best explain the principle of each embodiment, practical application or improvement of technology in the market, or to enable other ordinary skilled in the art to understand each embodiment disclosed in this disclosure .
工业实用性Industrial Applicability
在本公开实施例中,可以通过识别人脸图像的第一部位区域和第二部位区域,并基于用户指定的区域信息和第一部位区域调节第二部位区域,得到需要进行美化编辑的区域进行美化处理。该美化处理过程可以用于为人脸图像添加唇线美化效果,实现了对人脸图像唇部特定区域进行精确美化的效果。In the embodiment of the present disclosure, by identifying the first part area and the second part area of the face image, and adjusting the second part area based on the area information specified by the user and the first part area, the area that needs to be beautified and edited can be obtained. Landscaping. The beautification process can be used to add a lip line beautification effect to the face image, realizing the precise beautification effect on a specific area of the lips of the face image.

Claims (25)

  1. 一种图像处理方法,所述方法由电子设备执行,所述方法包括:An image processing method, the method is executed by an electronic device, the method comprising:
    确定人脸图像的第一掩码图像和第二掩码图像,所述第一掩码图像用于表征所述人脸图像的第一部位区域,所述第二掩码图像用于表征所述人脸图像的第二部位区域,所述第二部位区域与所述第一部位区域至少部分不同;Determining a first mask image and a second mask image of the face image, the first mask image is used to characterize the first part region of the face image, and the second mask image is used to characterize the a second part area of a human face image, said second part area being at least partially different from said first part area;
    获取唇部处理信息,所述唇部处理信息中包括区域信息和美化参数信息,所述区域信息用于指示所述第二部位区域的范围,所述美化参数信息用于指示所述第二部位区域的美化参数;Obtain lip processing information, the lip processing information includes area information and beautification parameter information, the area information is used to indicate the range of the second part area, and the beautification parameter information is used to indicate the second part Beautification parameters of the area;
    根据所述区域信息和所述第一掩码图像调整所述第二掩码图像中第二部位区域的范围;adjusting the range of the second part region in the second mask image according to the region information and the first mask image;
    根据所述美化参数信息和调整后的所述第二掩码图像对所述人脸图像进行美化处理,得到所述第二部位区域颜色被调整的目标图像。Perform beautification processing on the human face image according to the beautification parameter information and the adjusted second mask image to obtain a target image in which the color of the second part region is adjusted.
  2. 根据权利要求1所述的方法,其中,所述根据所述区域信息和所述第一掩码图像调整所述第二掩码图像中第二部位区域的范围包括:The method according to claim 1, wherein said adjusting the range of the second part region in the second mask image according to the region information and the first mask image comprises:
    根据所述区域信息和所述第一掩码图像,对所述第二掩码图像进行图像腐蚀操作,调整所述第二部位区域的范围;在所述图像腐蚀过程中,所述第二部位区域与所述第一部位区域的至少部分区域重合。According to the area information and the first mask image, perform an image erosion operation on the second mask image to adjust the range of the second part area; during the image erosion process, the second part The region coincides with at least part of the region of the first site.
  3. 根据权利要求2所述的方法,其中,所述根据所述区域信息和所述第一掩码图像,对所述第二掩码图像进行图像腐蚀操作,调整所述第二部位区域的范围包括:The method according to claim 2, wherein the image erosion operation is performed on the second mask image according to the area information and the first mask image, and adjusting the range of the second part area includes :
    根据所述第一掩码图像,由所述第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀,直到满足所述区域信息对应的调整条件。According to the first mask image, performing image erosion from the first edge to the second edge of the second part area in the second mask image until the adjustment condition corresponding to the area information is satisfied.
  4. 根据权利要求3所述的方法,其中,所述区域信息对应的调整条件为当前第二部位区域与原始第二部位区域的比值为所述区域信息的值。The method according to claim 3, wherein the adjustment condition corresponding to the area information is that the ratio of the current second part area to the original second part area is the value of the area information.
  5. 根据权利要求3或4所述的方法,其中,所述根据所述第一掩码图像,由所述第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀包括:The method according to claim 3 or 4, wherein said performing image erosion from the first edge to the second edge of the second part region in the second mask image according to the first mask image comprises:
    由所述第二部位区域的第一边缘开始向第二边缘依次确定目标像素;Determining target pixels sequentially from the first edge of the second part area to the second edge;
    根据所述目标像素在所述第二掩码图像中的位置确定目标区域;determining a target area according to the position of the target pixel in the second mask image;
    根据所述第一掩码图像在所述目标区域中每个像素的像素值确定所述第二掩码图像中的参考像素;determining a reference pixel in the second mask image according to the pixel value of each pixel in the target area in the first mask image;
    根据所述第二掩码图像中所述参考像素中的像素值更新所述目标像素的像素值。updating the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image.
  6. 根据权利要求5所述的方法,其中,所述根据所述第一掩码图像在所述目标区域中每个像素的像素值确定所述第二掩码图像中的参考像素包括:The method according to claim 5, wherein said determining the reference pixel in the second mask image according to the pixel value of each pixel in the target area in the first mask image comprises:
    获取所述第一掩码图像在所述目标区域中每个像素的像素值;Acquiring the pixel value of each pixel of the first mask image in the target area;
    根据所述像素值大于像素阈值的像素在所述第一掩码图像中的位置在所述第二掩码图像中确定参考像素。Determining a reference pixel in the second mask image according to the position of the pixel whose pixel value is greater than a pixel threshold in the first mask image.
  7. 根据权利要求1至6中任意一项所述的方法,其中,所述确定人脸图像的第一掩码图像包括:The method according to any one of claims 1 to 6, wherein said determining the first mask image of the face image comprises:
    确定第一参考掩码图像,所述第一参考掩码图像用于表征所述第一部位区域预测形状;determining a first reference mask image, the first reference mask image being used to characterize the predicted shape of the first part region;
    识别所述人脸图像中的第一部位区域;identifying a first part region in the face image;
    根据所述第一部位区域与所述第一参考掩码图像生成第一掩码图像。A first mask image is generated according to the first part region and the first reference mask image.
  8. 根据权利要求1至7中任意一项所述的方法,其中,所述确定人脸图像的第二掩码图像包括:The method according to any one of claims 1 to 7, wherein said determining the second mask image of the face image comprises:
    确定第二参考掩码图像,所述第二参考掩码图像用于表征所述第一部位区域的边缘预测形状;determining a second reference mask image, the second reference mask image being used to characterize the edge prediction shape of the first part region;
    识别所述人脸图像中的第一部位区域;identifying a first part region in the face image;
    根据所述第一部位区域与所述第二参考掩码图像生成第二掩码图像。A second mask image is generated according to the first part region and the second reference mask image.
  9. 根据权利要求1至8中任意一项所述的方法,其中,所述获取唇部处理信息包括:The method according to any one of claims 1 to 8, wherein said obtaining lip treatment information comprises:
    响应于针对所述区域调整控件的触发事件,生成所述区域信息;generating the area information in response to a trigger event for the area adjustment control;
    响应于针对所述颜色调整控件的触发事件,生成所述美化参数信息;generating the beautification parameter information in response to a trigger event for the color adjustment control;
    根据所述区域信息和所述美化参数信息确定所述唇部处理信息。The lip processing information is determined according to the area information and the beautification parameter information.
  10. 根据权利要求1至9中任意一项所述的方法,其中,所述根据所述美化参数信息和调整后的所述第二掩码图像对所述人脸图像进行美化处理,得到所述第二部位区域颜色被调整的目标图像包括:The method according to any one of claims 1 to 9, wherein the face image is beautified according to the beautification parameter information and the adjusted second mask image to obtain the first The target image whose color is adjusted in the second part area includes:
    根据所述美化参数信息和调整后的所述第二掩码图像生成美化图像,所述美化图像为在所述第二部位区域中填充所述美化参数信息表征颜色的图像;generating a beautification image according to the beautification parameter information and the adjusted second mask image, where the beautification image is an image filled with a color represented by the beautification parameter information in the second part region;
    对所述美化图像与所述人脸图像进行图像融合,得到所述第二部位区域颜色被调整的目标图像。Image fusion is performed on the beautified image and the face image to obtain a target image in which the color of the second part region is adjusted.
  11. 根据权利要求1至10中任意一项所述的方法,其中,所述图像处理方法用于为所述人脸图像添加唇线美化效果,所述第一部位区域为唇部区域,所述第二部位区域为唇线区域。The method according to any one of claims 1 to 10, wherein the image processing method is used to add a lip line beautification effect to the face image, the first part area is a lip area, and the second The second part area is the lip line area.
  12. 一种图像处理装置,所述装置包括:An image processing device, the device comprising:
    图像确定部分,被配置为确定人脸图像的第一掩码图像和第二掩码图像,所述第一掩码图像用于表征所述人脸图像的第一部位区域,所述第二掩码图像用于表征所述人脸图像的第二部位区域,所述第二部位区域与所述第一部位区域至少部分不同;The image determination part is configured to determine a first mask image and a second mask image of the face image, the first mask image is used to characterize the first part area of the face image, and the second mask The code image is used to represent a second part area of the human face image, the second part area is at least partially different from the first part area;
    信息获取部分,被配置为获取唇部处理信息,所述唇部处理信息中包括区域信息和美化参数信息;The information acquisition part is configured to acquire lip processing information, and the lip processing information includes area information and beautification parameter information;
    范围调整部分,被配置为根据所述区域信息和所述第一掩码图像调整所述第二掩码图像中第二部位区域的范围;a range adjustment part configured to adjust the range of the second part region in the second mask image according to the region information and the first mask image;
    颜色调整部分,被配置为根据所述美化参数信息和调整后的所述第二掩码图像对所述人脸图像进行美化处理,得到所述第二部位区域颜色被调整的目标图像。The color adjustment part is configured to perform beautification processing on the human face image according to the beautification parameter information and the adjusted second mask image, so as to obtain a target image in which the color of the second part region is adjusted.
  13. 根据权利要求12所述的装置,其中,所述范围调整部分,还被配置为根据所述区域信息和所述第一掩码图像,对所述第二掩码图像进行图像腐蚀操作,调整所述第二部位区域的范围;在所述图像腐蚀过程中,所述第二部位区域与所述第一部位区域的至少部分区域重合。The device according to claim 12, wherein the range adjustment part is further configured to perform an image erosion operation on the second mask image according to the area information and the first mask image, and adjust the The range of the second part area; during the image erosion process, the second part area overlaps with at least part of the first part area.
  14. 根据权利要求13所述的装置,其中,所述范围调整部分,还被配置为根据所述第一掩码图像,由所述第二掩码图像中第二部位区域的第一边缘向第二边缘进行图像腐蚀,直到满足所述区域信息对应的调整条件。The device according to claim 13, wherein the range adjustment part is further configured to, according to the first mask image, move from the first edge of the second part region in the second mask image to the second Image erosion is performed on the edge until the adjustment condition corresponding to the area information is met.
  15. 根据权利要求14所述的装置,其中,所述区域信息对应的调整条件为当前第二部位区域与原始第二部位区域的比值为所述区域信息的值。The device according to claim 14, wherein the adjustment condition corresponding to the area information is that the ratio of the current second part area to the original second part area is the value of the area information.
  16. 根据权利要求14或15所述的装置,其中,所述范围调整部分,还被配置为由所述第二部位区域的第一边缘开始向第二边缘依次确定目标像素;The device according to claim 14 or 15, wherein the range adjustment part is further configured to sequentially determine target pixels from the first edge to the second edge of the second part area;
    根据所述目标像素在所述第二掩码图像中的位置确定目标区域;determining a target area according to the position of the target pixel in the second mask image;
    根据所述第一掩码图像在所述目标区域中每个像素的像素值确定所述第二掩码图像中的参考像素;determining a reference pixel in the second mask image according to the pixel value of each pixel in the target area in the first mask image;
    根据所述第二掩码图像中所述参考像素中的像素值更新所述目标像素的像素值。updating the pixel value of the target pixel according to the pixel value of the reference pixel in the second mask image.
  17. 根据权利要求16所述的装置,其中,所述范围调整部分,还被配置为获取所述第一掩码图像在所述目标区域中每个像素的像素值;The device according to claim 16, wherein the range adjustment part is further configured to obtain the pixel value of each pixel in the target area of the first mask image;
    根据所述像素值大于像素阈值的像素在所述第一掩码图像中的位置在所述第二掩码图像中确定参考像素。Determining a reference pixel in the second mask image according to the position of the pixel whose pixel value is greater than a pixel threshold in the first mask image.
  18. 根据权利要求12至17任意一项所述的装置,其中,所述图像确定部分,还被配置为确定第一参考掩码图像,所述第一参考掩码图像用于表征所述第一部位区域预测形状;The device according to any one of claims 12 to 17, wherein the image determination part is further configured to determine a first reference mask image, the first reference mask image is used to characterize the first part area prediction shape;
    识别所述人脸图像中的第一部位区域;identifying a first part region in the face image;
    根据所述第一部位区域与所述第一参考掩码图像生成第一掩码图像。A first mask image is generated according to the first part region and the first reference mask image.
  19. 根据权利要求12至18任意一项所述的装置,其中,所述图像确定部分,还被配置为确定第二参考掩码图像,所述第二参考掩码图像用于表征所述第一部位区域的边缘预测形状;The device according to any one of claims 12 to 18, wherein the image determining part is further configured to determine a second reference mask image, the second reference mask image is used to characterize the first part The edge prediction shape of the region;
    识别所述人脸图像中的第一部位区域;identifying a first part region in the face image;
    根据所述第一部位区域与所述第二参考掩码图像生成第二掩码图像。A second mask image is generated according to the first part region and the second reference mask image.
  20. 根据权利要求12至19任意一项所述的装置,其中,所述信息获取部分,还被配置为响应于针对所述区域调整控件的触发事件,生成所述区域信息;The device according to any one of claims 12 to 19, wherein the information acquiring part is further configured to generate the area information in response to a trigger event for the area adjustment control;
    响应于针对所述颜色调整控件的触发事件,生成所述美化参数信息;generating the beautification parameter information in response to a trigger event for the color adjustment control;
    根据所述区域信息和所述美化参数信息确定所述唇部处理信息。The lip processing information is determined according to the area information and the beautification parameter information.
  21. 根据权利要求12至20任意一项所述的装置,其中,所述颜色调整部分,还被配置为根据所述美化参数信息和调整后的所述第二掩码图像生成美化图像,所述美化图像为在所述第二部位区域中填充所述美化参数信息表征颜色的图像;The device according to any one of claims 12 to 20, wherein the color adjustment part is further configured to generate a beautified image according to the beautification parameter information and the adjusted second mask image, the beautification The image is an image filled with the representation color of the beautification parameter information in the second part area;
    对所述美化图像与所述人脸图像进行图像融合,得到所述第二部位区域颜色被调整的目标图像。Image fusion is performed on the beautified image and the face image to obtain a target image in which the color of the second part region is adjusted.
  22. 根据权利要求12至21任意一项所述的装置,其中,所述图像处理装置用于为所述人脸图像添加唇线美化效果,所述第一部位区域为唇部区域,所述第二部位区域为唇线区域。The device according to any one of claims 12 to 21, wherein the image processing device is configured to add a lip line beautification effect to the face image, the first part area is a lip area, and the second The part area is the lip line area.
  23. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    被配置为存储处理器可执行指令的存储器;memory configured to store processor-executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至11中任意一项所述的方法。Wherein, the processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1-11.
  24. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至11中任意一项所述的方法。A computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
  25. 一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机存储介质,所述计算机程序被计算机读取并执行时实现权利要求1至11中任意一项所述的方法。A computer program product, the computer program product comprising a non-transitory computer storage medium storing a computer program, when the computer program is read and executed by a computer, the method according to any one of claims 1 to 11 is implemented.
PCT/CN2022/134617 2022-01-28 2022-11-28 Image processing method and apparatus, and electronic device, storage medium and computer program product WO2023142645A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210106872.0A CN114463212A (en) 2022-01-28 2022-01-28 Image processing method and device, electronic equipment and storage medium
CN202210106872.0 2022-01-28

Publications (1)

Publication Number Publication Date
WO2023142645A1 true WO2023142645A1 (en) 2023-08-03

Family

ID=81411321

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/134617 WO2023142645A1 (en) 2022-01-28 2022-11-28 Image processing method and apparatus, and electronic device, storage medium and computer program product

Country Status (2)

Country Link
CN (1) CN114463212A (en)
WO (1) WO2023142645A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114463212A (en) * 2022-01-28 2022-05-10 北京大甜绵白糖科技有限公司 Image processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005276182A (en) * 2004-02-26 2005-10-06 Dainippon Printing Co Ltd Method and device for creating human skin and lip area mask data
CN102708575A (en) * 2012-05-17 2012-10-03 彭强 Daily makeup design method and system based on face feature region recognition
CN109584180A (en) * 2018-11-30 2019-04-05 深圳市脸萌科技有限公司 Face image processing process, device, electronic equipment and computer storage medium
CN112308944A (en) * 2019-07-29 2021-02-02 丽宝大数据股份有限公司 Augmented reality display method of simulated lip makeup
CN113763286A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN114463212A (en) * 2022-01-28 2022-05-10 北京大甜绵白糖科技有限公司 Image processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005276182A (en) * 2004-02-26 2005-10-06 Dainippon Printing Co Ltd Method and device for creating human skin and lip area mask data
CN102708575A (en) * 2012-05-17 2012-10-03 彭强 Daily makeup design method and system based on face feature region recognition
CN109584180A (en) * 2018-11-30 2019-04-05 深圳市脸萌科技有限公司 Face image processing process, device, electronic equipment and computer storage medium
CN112308944A (en) * 2019-07-29 2021-02-02 丽宝大数据股份有限公司 Augmented reality display method of simulated lip makeup
CN113763286A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN114463212A (en) * 2022-01-28 2022-05-10 北京大甜绵白糖科技有限公司 Image processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114463212A (en) 2022-05-10

Similar Documents

Publication Publication Date Title
US11114130B2 (en) Method and device for processing video
WO2022179026A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN111310616B (en) Image processing method and device, electronic equipment and storage medium
CN109816764B (en) Image generation method and device, electronic equipment and storage medium
US20210383154A1 (en) Image processing method and apparatus, electronic device and storage medium
CN112766234B (en) Image processing method and device, electronic equipment and storage medium
US11030733B2 (en) Method, electronic device and storage medium for processing image
CN113160094A (en) Image processing method and device, electronic equipment and storage medium
CN109472738B (en) Image illumination correction method and device, electronic equipment and storage medium
WO2023045207A1 (en) Task processing method and apparatus, electronic device, storage medium, and computer program
CN111091610B (en) Image processing method and device, electronic equipment and storage medium
WO2023045941A1 (en) Image processing method and apparatus, electronic device and storage medium
CN111243011A (en) Key point detection method and device, electronic equipment and storage medium
CN111724361B (en) Method and device for displaying focus in real time, electronic equipment and storage medium
CN110929616B (en) Human hand identification method and device, electronic equipment and storage medium
WO2023045979A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN112767288A (en) Image processing method and device, electronic equipment and storage medium
WO2023142645A1 (en) Image processing method and apparatus, and electronic device, storage medium and computer program product
CN113822798B (en) Method and device for training generation countermeasure network, electronic equipment and storage medium
KR20220093091A (en) Labeling method and apparatus, electronic device and storage medium
CN113570581A (en) Image processing method and device, electronic equipment and storage medium
CN112613447A (en) Key point detection method and device, electronic equipment and storage medium
WO2023045950A1 (en) Image processing method and apparatus, electronic device, and storage medium
WO2023045961A1 (en) Virtual object generation method and apparatus, and electronic device and storage medium
WO2023045946A1 (en) Image processing method and apparatus, electronic device, and storage medium

Legal Events

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

Ref document number: 22923437

Country of ref document: EP

Kind code of ref document: A1