WO2023045946A1 - Image processing method and apparatus, electronic device, and storage medium - Google Patents

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

Info

Publication number
WO2023045946A1
WO2023045946A1 PCT/CN2022/120104 CN2022120104W WO2023045946A1 WO 2023045946 A1 WO2023045946 A1 WO 2023045946A1 CN 2022120104 W CN2022120104 W CN 2022120104W WO 2023045946 A1 WO2023045946 A1 WO 2023045946A1
Authority
WO
WIPO (PCT)
Prior art keywords
brightness
target part
target
beautification
value
Prior art date
Application number
PCT/CN2022/120104
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 WO2023045946A1 publication Critical patent/WO2023045946A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • 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

  • This disclosure relates to the field of computer vision, and more particularly to image processing.
  • the present disclosure proposes an image processing scheme.
  • an image processing method including: receiving a beautification operation for a user image, determining a target part to be beautified in the user image; according to the brightness of the center position of the target part, Determine the reference brightness of the target part; according to the reference brightness, increase the brightness of the pixels in the target part to obtain the target brightness of the pixels in the target part; according to the beautification material input in the beautification operation and the The target brightness is used to generate a target user image after beautifying the target part.
  • an image processing device including: a receiving module, configured to receive a beautification operation on a user image, and determine a target part to be beautified in the user image; a brightness determination module, configured to Determine the reference brightness of the target part according to the brightness of the central position of the target part; the brightness enhancement module is configured to increase the brightness of the pixels in the target part according to the reference brightness, and obtain the pixels in the target part The target brightness of the point; a beautification module, configured to generate a target user image after beautifying the target part according to the beautification material input in the beautification operation and the target brightness.
  • an electronic device including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to: execute the above image processing 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 image processing method is implemented.
  • the reference brightness is determined according to the brightness of the center position of the target part, and then the pixels in the target part are raised according to the reference brightness brightness to obtain the target brightness, and based on the beautification material and the target brightness input in the beautification operation, a target user image after beautification of the target part is generated.
  • the target part in the user image can be lightened by increasing the brightness, reducing the influence of the original color of the target part on the beautification process, and improving the beautification effect of the target user image.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • FIG. 2 shows an image of a beautification material according to an embodiment of the present disclosure.
  • FIG. 3 shows an image of a beautification material according to another embodiment of the present disclosure.
  • FIG. 4 shows a schematic diagram of a target site mask according to an embodiment of the disclosure.
  • Fig. 5 shows a schematic diagram of a preset face image according to an embodiment of the present disclosure.
  • Fig. 6 shows a schematic diagram of a user image according to an embodiment of the present disclosure.
  • Fig. 7 shows a schematic diagram of an intermediate user image according to an embodiment of the present disclosure.
  • Fig. 8 shows a schematic diagram of a user image according to another embodiment of the present disclosure.
  • Fig. 9 shows a schematic diagram of an intermediate user image according to another embodiment of the present disclosure.
  • Fig. 10 shows a schematic diagram of a target user image according to an embodiment of the present disclosure.
  • Fig. 11 shows a schematic diagram of a target user image according to another embodiment of the present disclosure.
  • Fig. 12 shows a schematic diagram of a target user image according to yet another embodiment of the present disclosure.
  • Fig. 13 shows a schematic diagram of a target user image according to yet another embodiment of the present disclosure.
  • FIG. 14 shows a block diagram of an image processing device according to an embodiment of the present disclosure.
  • Fig. 15 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 16 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • the method can be applied to an image processing device or an image processing system, and the image processing device can be a terminal device, a server, or other processing devices.
  • the terminal device can be user equipment (User Equipment, UE), mobile device, user terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, wearable device wait.
  • the image processing method can be applied to a cloud server or a local server, and the cloud server can be a public cloud server or a private cloud server, which can be flexibly selected according to actual conditions.
  • the image processing method may also be implemented in a manner in which the processor invokes computer-readable instructions stored in the memory.
  • the present disclosure proposes an image processing method, as shown in FIG. 1 , in a possible implementation manner, the image processing method may include:
  • Step S11 receiving a beautification operation on the user's image, and determining a target part to be beautified in the user's image.
  • the user image can be any image containing the target part of one or more objects, and the user image can contain one or more objects or the target part of one or more objects, which can be flexibly determined according to the actual situation.
  • the user image can be any image containing the target part of one or more objects, and the user image can contain one or more objects or the target part of one or more objects, which can be flexibly determined according to the actual situation.
  • the target part can be any part of the user's image that needs to be beautified, and can be flexibly determined according to the actual situation of the beautification operation.
  • the target part can be the eyebrow part;
  • the beautification operation of the hair dyeing operation The target part may be a hair part;
  • the target part may be a lip part, etc.
  • the beautification operation can be any operation to beautify the target part of the user's image, such as eyebrow rendering operation, hair dyeing operation, lip makeup operation, eye makeup operation, or cosmetic operation.
  • the operation content included in the beautification operation can be flexibly determined according to the actual situation, and is not limited to the following disclosed embodiments.
  • the beautification operation may include an operation indicating to beautify the target part of the object in the user image; in some possible implementation manners, the beautification operation may also include inputting one or more parameters, etc., Such as beautifying the material or adjusting parameters.
  • the beautification material can be any material input in the beautification operation to beautify the target part of the user image.
  • the beautification material can be the same or different from the color of the target part in the user image.
  • the beautification material can be flexibly selected and set according to the actual situation. There is no limitation in the embodiments of the present disclosure. In some possible implementation manners, multiple beautification materials may also be provided to the user, and the selected beautification material is determined according to the user's selection. In the beautification operation, a single beautification material can be input or selected, or multiple beautification materials can be input or selected at the same time.
  • Fig. 2 and Fig. 3 respectively show the image of the beautification material according to an embodiment of the present disclosure, as shown in Fig. 2, in an example, the beautification material can be the first eyebrow material with eyebrow peak; In an example, the beautification material may also be a second eyebrow material with a gentle eyebrow shape.
  • the adjustment parameters may be input during the beautification operation, and are relevant parameters for beautifying and adjusting the target part of the user image.
  • the adjustment parameters may include various parameter types.
  • the adjustment parameters may include: At least one of intensity, highlight, mid-tone, glossiness, or grayness of the color of the target part should be beautified.
  • the process of beautifying the target part can be flexibly changed with different beautification materials, which is not limited in this embodiment of the present disclosure.
  • the manner of determining the target site is not limited in the embodiments of the present disclosure, and is not limited to the following disclosed embodiments.
  • the position of the target part in the user image may be determined through a target part mask (mask for a target part).
  • the target part mask can be used to extract the target part image to be beautified in the user image, for example: multiply the pre-made target part mask with the user image to obtain the target part to be beautified in the user image image.
  • the target part mask may be a mask image of the target part, which may be flexibly changed according to different target parts.
  • FIG. 4 shows a schematic diagram of a target part mask according to an embodiment of the present disclosure.
  • the target part mask may be a mask image of an eyebrow part.
  • the image values of the target part may remain unchanged compared to the user image, while the image values other than the target part may be 0.
  • the method of determining the target part in the user image according to the target part mask can be flexibly determined according to the actual situation.
  • the position of the target part in the user image can be identified to obtain the initial position of the target part in the user image.
  • the manner of recognition is not limited in the embodiments of the present disclosure, for example, key point recognition or direct recognition of the entire eyebrow part may be performed.
  • the target part in the user's image may be determined according to the initial position.
  • the exact position of the target part in the user image can be further determined based on the initial position.
  • the target part mask can be fused with the target part in the preset face image to obtain a standard material image , and then extract the target part in the standard material image according to the initial position to obtain the extracted material of the target part. If the pixel transparency in the extracted material belongs to the preset transparency range, the corresponding The pixel points are confirmed as the pixel points belonging to the target part, and then the target part in the user's image can be determined.
  • the preset face image may be a standard face image template, which may include complete and comprehensive face parts, and the position of each face part in the preset face image is standard.
  • the implementation form of the preset face image can be flexibly determined according to the actual situation, and any standard face (standard face) used in the field of face image processing can be used as the preset face image.
  • Fig. 5 shows a schematic diagram of a preset face image according to an embodiment of the present disclosure (in order to protect objects in the image, some parts of the face in Fig. 5 have been mosaiced), as can be seen from Fig. 5 ,
  • the facial parts included in the preset human face image are clear, complete and conform to the objective distribution of the facial parts in the human face.
  • the target part mask can be directly fused with the position corresponding to the target part in the preset face image to obtain a standard material image.
  • Step S12 determining the reference brightness of the target part according to the brightness of the central position of the target part.
  • the center position of the target part can be flexibly determined according to the actual situation of the target part.
  • the center position can be the center position between the left eyebrow and the right eyebrow.
  • the center position may also be the center point position of the left eyebrow or the center point position of the right eyebrow, etc., which can be flexibly set according to the actual situation.
  • the reference brightness can be used as a reference to determine the boost value of the brightness of each pixel in the target part.
  • step S12 may include: obtaining the reference brightness of the target part according to the original brightness of at least one pixel at the central position of the target part.
  • the original brightness of the pixel in the target part may be the original brightness of the pixel in the user image.
  • the original brightness can be determined according to the color values of pixels in the user image, or directly read from the user image. Therefore, in a possible implementation manner, the method proposed in the embodiment of the present disclosure may also include:
  • the original brightness of the pixel in the target part is determined.
  • the original color of the pixel in the target part may be the original color value of the pixel in the user image, for example, RGB color value.
  • the way to determine the original brightness according to the original color can be flexibly selected according to the actual situation.
  • the channel value of each color channel in the original color can be calculated to obtain the brightness value as the original brightness; or the original color can be converted to a color space containing brightness. In, such as HSL (hue H, saturation S and lightness L) color space, or HSV (hue H, saturation S and lightness V) color space, etc., and then based on the lightness or lightness component in the color space, determine the original brightness.
  • the original brightness of the pixel at the center of the target part can be used as the reference brightness; in one example, the average or weighted average of the original brightness of multiple pixels at the center of the target part Values, etc. are used as the reference brightness, etc., and the method of confirming the reference brightness can be flexibly selected according to the actual situation.
  • the original luminance of one or more pixels in the center of the target part can be used to determine the reference luminance, which increases the diversity of ways to determine the reference luminance, thereby improving the flexibility and application range of the image processing process.
  • Step S13 according to the reference brightness, the brightness of the pixel points in the target part is increased to obtain the target brightness of the pixel points in the target part.
  • the pixel points in the target part may be every pixel contained in the target part, or may be some pixels in the target part.
  • the target brightness may be the brightness obtained by increasing the brightness of the pixels in the target part. How to determine which pixels to increase the brightness of, and how to increase the brightness of the pixels according to the reference brightness, the implementation may refer to the following disclosed embodiments, which will not be expanded here. For example, the brightness of the pixel can be increased according to the difference between the reference brightness and the original brightness of the pixel in the target part.
  • Step S14 according to the beautification material and target brightness input in the beautification operation, generate a target user image after beautifying the target part.
  • the target user image can be an image obtained by beautifying the target part of the user image based on the target brightness and beautification materials.
  • the method of generating the target user image can be flexibly determined according to the actual situation.
  • the converted color is fused with the color of each pixel in the beautification material to obtain the target user image, or the color of each pixel in the beautification material is converted into brightness, and then fused with the target brightness to obtain the target user image, etc.
  • step S14 For some possible implementation manners of step S14, reference may be made to the following disclosed embodiments in detail, which will not be expanded here.
  • the reference brightness is determined according to the brightness of the center position of the target part, and then the pixels in the target part are raised according to the reference brightness brightness to obtain the target brightness, and based on the beautification material and the target brightness input in the beautification operation, a target user image after beautification of the target part is generated.
  • the target part in the user image can be lightened by increasing the brightness, reducing the influence of the original color of the target part on the beautification process, and improving the beautification effect of the target user image.
  • step S13 may include:
  • the target brightness of the pixels in the target part is obtained.
  • the brightness enhancement value may be an enhancement value or a value range for enhancing the brightness of a pixel point.
  • the brightness boost value can be determined according to the numerical relationship between the original brightness and the reference brightness, for example, the brightness boost can be determined according to the difference between the original brightness and the reference brightness or the absolute value of the difference, etc. value.
  • the calculation method for determining the brightness boost value can be flexibly selected according to the actual situation, see the following disclosed embodiments for details, and will not be expanded here.
  • the method of obtaining the target brightness according to the brightness enhancement value and the original brightness can also be flexibly selected according to the actual situation.
  • the original brightness and the brightness enhancement value can be fused or weighted to obtain the target brightness.
  • the fusion method can also be based on the actual situation. Make selections such as stacking or multiplying.
  • the original brightness and the brightness boost value can be added to obtain the target brightness.
  • determining the target brightness of the pixels in the target part according to the brightness boost value and the original brightness includes: determining the first original brightness of the pixels in the target part according to the original color of one or more pixels in the target part, Wherein, the first original brightness may represent the average original brightness of the pixels in the target part; according to the first original brightness and the reference brightness, determine the first brightness enhancement value of the pixels in the target part; according to the first A brightness boost value and the first original brightness, determining the target brightness of the pixel in the target part, for example, for each pixel in the target part, adding the original brightness of the pixel to the first brightness boost value, Get the target brightness of the pixel.
  • determining the target brightness of the pixel in the target part according to the brightness enhancement value and the original brightness includes: for each pixel in the pixel in the target part, according to the original color of the pixel, determine the pixel the second original brightness; according to the second original brightness and the reference brightness, determine the second brightness boost value of the pixel; according to the second brightness boost value and the second original brightness, determine the pixel target brightness.
  • the method for specifically determining the target brightness of the pixel points in the target part is not limited in this disclosure, and any extension scheme based on the technical solutions in this disclosure belongs to the rights of this disclosure without creative work. the scope of protection required.
  • the embodiments of the present disclosure it is possible to first determine the brightness boost value of a pixel point according to the original brightness and the reference brightness, and then determine the target brightness of the pixel point based on the brightness boost value. Compared with directly determining the target brightness according to the original brightness and the reference brightness, this The methods proposed in the disclosed embodiments can determine the target brightness more conveniently, and facilitate simultaneous determination of the target brightness of multiple pixels, improving the efficiency and convenience of image processing.
  • determining the brightness enhancement value of the pixel in the target part may include:
  • the brightness enhancement value of the pixel in the target part is obtained.
  • the first difference may be the difference result obtained by subtracting the original brightness from the reference brightness, and if the original brightness of the pixel in the target part is lower than the reference brightness, it indicates that the original brightness of the pixel in the target part is relatively dark, In this case, if the pixel is beautified directly, the beautification effect may be poor due to the influence of the original color of the pixel. Therefore, the pixel can be determined when the original brightness of the pixel is lower than the reference brightness. The brightness of the point needs to be increased, and the brightness enhancement value of the pixel point is obtained according to the first difference value.
  • the calculation relationship between the first difference value and the brightness boost value can be flexibly set according to the actual situation.
  • the original brightness of the pixel in the target part when the original brightness of the pixel in the target part is higher than or equal to the reference brightness, it can be indicated that the pixel itself has a higher brightness, so the original brightness of the pixel in the target part can be Brightness as the target brightness.
  • the brightness enhancement value of the pixel in the target part is obtained, which may include:
  • the brightness enhancement value of the pixel in the target part is obtained.
  • the preset channel value may be a channel value determined according to the target part mask, and the realization of the target part mask may refer to the above-mentioned disclosed embodiments, which will not be repeated here.
  • the preset channel value may be a channel value of the target part mask on a certain color-related channel.
  • the alpha channel value of each pixel in the target part mask may be used as the preset channel value.
  • the calculation process of obtaining the brightness boost value according to the first difference value and the preset channel value is not limited to the following disclosed embodiments, and can be flexibly adjusted according to actual conditions.
  • the process of obtaining the brightness boost value can be expressed by the following formula (1):
  • add_bright is the luminance enhancement value
  • ref_luminance is the reference luminance
  • V is the original luminance of the pixel in the target part
  • x is the preset calculation value
  • mask_alpha is the preset channel value
  • pow(a,b) indicates the calculation of b of a The result of the power.
  • the first difference value and the preset channel value contained in the target part mask can be used to jointly determine the brightness boost value of the pixel in the target part, and the first difference formed by the reference brightness and the original brightness can be fully utilized.
  • it also effectively uses the channel value of the target part mask determined from the user image, so that the obtained brightness enhancement value has a higher correlation with the position of the pixel point in the user image, and then improves the entire target part.
  • the overall brightness enhancement effect makes the beautification effect of the subsequent target parts more natural.
  • determining the brightness enhancement value of the pixel in the target part may also include:
  • the brightness boost value is updated based on a second difference between the brightness boost value and the preset brightness threshold to obtain an updated brightness boost value.
  • the preset brightness threshold may be a brightness threshold flexibly set according to actual conditions, and specific values may be flexibly selected according to actual conditions, and are not limited to the following disclosed embodiments.
  • the preset brightness threshold may be calculated according to the reference brightness.
  • the calculation relationship between the preset brightness threshold and the reference brightness can also be flexibly set according to the actual situation, and is not limited to the following disclosed embodiments.
  • the calculation relationship between the preset brightness threshold and the reference brightness It can be expressed by the following formula (2):
  • V_threshold ref_luminance*y
  • V_threshold is the preset brightness threshold
  • ref_luminance is the reference brightness
  • y is the preset ratio value.
  • the preset brightness threshold can be further determined according to the reference brightness, so that when the reference brightness is determined, the brightness of the pixels in the target part can be better brightened, reducing the need to obtain additional data and at the same time Better improve the beautification effect of subsequent target parts.
  • the second difference can be the difference result obtained by subtracting the preset brightness threshold from the brightness boost value.
  • Individual positions have a more abrupt brightness enhancement effect, which may affect the beautification effect of subsequent target parts. Therefore, in order to reduce the occurrence of this situation, the brightness boost value may be updated according to the second difference between the brightness boost value and the preset brightness threshold, so as to limit the brightness boost value of the pixel in the target part.
  • the calculation relationship between the second difference and the updated brightness boost value can be flexibly set according to the actual situation.
  • the brightness boost value when the brightness boost value is less than or equal to the preset brightness threshold, it can be indicated that the brightness boost value of the pixel is reasonable, so the brightness boost value can be directly used as the updated brightness boost value .
  • the target brightness of the pixel point in the target part can be obtained according to the updated brightness boost value and the original brightness.
  • the method of obtaining the target brightness by increasing the value and the original brightness will not be repeated here.
  • the brightness boost value of the pixel in the target part can be limited within a certain value range, thereby reducing the brightness at the edge of the target part caused by the brightness boost.
  • Some pixels are too bright, which makes the beautified target part have a better transition as a whole and enhances the natural effect of beautification.
  • the brightness boost value is updated to obtain an updated brightness boost value, including:
  • An updated brightness boost value is obtained according to the second difference value, the original brightness and the preset channel value.
  • the manner of obtaining the second difference value and the manner of realizing the preset channel value can refer to the above-mentioned disclosed embodiments, which will not be repeated here.
  • the calculation process of obtaining the updated brightness boost value according to the second difference value, the original brightness of the pixel and the preset channel value is not limited to the following disclosed embodiments, and can be flexibly adjusted according to the actual situation.
  • the process of obtaining the updated brightness boost value can be expressed by the following formula (3):
  • add_bright_new is the updated brightness enhancement value
  • add_bright is the brightness enhancement value
  • V_threshold is the preset brightness threshold
  • V is the original brightness of the pixel in the target part
  • mask_alpha is the preset channel value
  • the second difference value, the original brightness and the preset channel value contained in the target part mask can be used to jointly update the brightness enhancement value of the pixel in the target part, so that the pixel in the target part
  • the brightness enhancement value is limited within a more reasonable range to improve the overall beautification effect of the target part.
  • FIG. 6 shows a schematic diagram of a user image according to an embodiment of the present disclosure (in order to protect the objects in the image, some parts of the face in each figure have been mosaiced, and the images in the following disclosed embodiments are the same, No more details),
  • Figure 7 is a schematic diagram of the intermediate user image obtained after the brightness of the pixels in the eyebrows of the first user in Figure 6 is increased, and Figure 6 and Figure 7 are displayed as grayscale images, so the brightness changes The display is not obvious, but it can still be seen through comparison that the eyebrows of the first user in FIG. 7 are significantly brighter and lighter in color than the eyebrows of the first user in FIG. 6 . Therefore, according to the image processing methods proposed in the above disclosed embodiments, the brightness of the target part can be effectively enhanced.
  • FIG. 8 shows a schematic diagram of a user image according to an embodiment of the present disclosure
  • FIG. 9 is a schematic diagram of an intermediate user image obtained after enhancing the brightness of pixels in the eyebrows of the second user in FIG. 8 , through It can also be seen from the comparison that in different user images, the image processing method proposed in the embodiments of the present disclosure can better improve the brightness of the target part.
  • step S14 may include:
  • the intermediate color can be the color obtained by converting the target brightness into brightness and color value
  • the method of obtaining the intermediate color according to the target brightness can be flexibly determined according to the actual situation, for example, according to the relationship between each channel value and brightness in the color Perform reverse calculation to obtain the intermediate color, or convert the color space where the target brightness is located, such as HSV space or HSL space, to a color space, such as RGB space, to obtain the intermediate color of the pixel.
  • the beautification color may be the color of each pixel in the beautification material
  • the target color may be a color obtained by beautifying the color of the pixel in the target part according to the beautification color.
  • the target color may be obtained by fusing the intermediate color and the beautification color, and the fusing manner may be flexibly selected according to actual conditions, and is not limited to the following disclosed embodiments.
  • the target color can be obtained by mixing the intermediate color and the beautification color by means of multiplication, wherein the multiplication can use the intermediate color and the beautification color as two layers by multiplying , which darkens the colors of the two layers in a smooth, non-linear fashion.
  • the process of blending the intermediate color and the beautification color by multiplying can be expressed by the following formula (4):
  • result_color is the fused target color
  • fade_color is the intermediate color
  • material_color is the beautification color
  • the target color can be used as the color of the pixels in the beautified target part to obtain the beautified target user image, and the color of the pixels in the target part can also be further rendered based on the target color to obtain a beautified image.
  • the target user image How to implement it can be flexibly selected according to the actual situation, which is not limited in the embodiments of the present disclosure.
  • the color beautification of the pixel points in the target part can be realized, and then the influence of the original color of the pixel points in the target part on the beautification process can be reduced by increasing the brightness, thereby improving the Beautification effect and degree of naturalness.
  • a target user image in which a target part in the user image is beautified can be obtained.
  • 10-13 respectively show schematic diagrams of target user images according to an embodiment of the present disclosure, wherein FIG. 10 shows the eyebrow rendering operation on the first user image in FIG. 6 through the first eyebrow material in FIG. 2 The obtained target user image, FIG. 11 is the target user image obtained after the eyebrow rendering operation is performed on the first user image in FIG. 6 through the second eyebrow material in FIG. 3 , and FIG. An eyebrow material is the target user image obtained after the eyebrow rendering operation is performed on the second user image in FIG. 8.
  • FIG. 13 is the eyebrow rendering of the second user image in FIG. The resulting image of the target user after the operation.
  • FIG. 14 shows a block diagram of an image processing device according to an embodiment of the present disclosure.
  • the image processing device 20 may include:
  • the receiving module 21 is configured to receive a beautification operation on the user's image, and determine a target part to be beautified in the user's image.
  • the brightness determination module 22 is configured to determine the reference brightness of the target part according to the brightness of the central position of the target part.
  • the brightness enhancement module 23 is configured to increase the brightness of the pixel points in the target part according to the reference brightness, so as to obtain the target brightness of the pixel points in the target part.
  • the beautification module 24 is configured to generate a beautified target user image of the target part according to the beautification material and target brightness input in the beautification operation.
  • the device is also used to: determine the original brightness of the pixels in the target part according to the original color of the pixels in the target part; the brightness enhancement module is used to: determine the target part according to the original brightness and the reference brightness The brightness enhancement value of the pixels in the center; according to the brightness enhancement value and the original brightness, the target brightness of the pixels in the target part is obtained.
  • the brightness enhancement module is further configured to: when the original brightness of the pixel in the target part is lower than the reference brightness, based on the first difference between the reference brightness and the original brightness, obtain the target part The brightness boost value of the pixels in the middle.
  • the brightness enhancement module is further used to: obtain the first difference between the reference brightness and the original brightness; obtain the brightness enhancement of the pixel in the target part according to the first difference and the preset channel value value, wherein the preset channel value is determined according to the target part mask, and the target part mask is used to determine the target part to be beautified in the user image.
  • the brightness boost module is further configured to: when the brightness boost value is greater than the preset brightness threshold, based on the second difference between the brightness boost value and the preset brightness threshold, adjust the brightness boost value Perform an update to obtain the updated brightness enhancement value; obtain the target brightness of the pixel points in the target part according to the brightness enhancement value and the original brightness, including: obtain the target brightness of the pixel points in the target part according to the updated brightness enhancement value and the original brightness brightness.
  • the brightness enhancement module is further used to: obtain the second difference between the brightness enhancement value and the preset brightness threshold; obtain the updated The brightness enhancement value of , wherein, the preset channel value is determined according to the target part mask, and the target part mask is used to determine the target part to be beautified in the user image.
  • the preset brightness threshold is calculated according to the reference brightness.
  • the brightness determining module is configured to: obtain the reference brightness of the target part according to the original brightness of at least one pixel at the central position of the target part.
  • the beautification module is used to: determine the intermediate color of the pixel in the target part according to the target brightness; fuse the intermediate color with the beautification color in the beautification material to obtain the target color of the pixel in the target part ; Based on the target color, an image of the target user after beautifying the target part is obtained.
  • the target part includes an eyebrow part
  • the beautification operation includes an eyebrow shape rendering operation
  • This disclosure relates to the field of augmented reality.
  • 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 features, states and attributes of the target object, and thus 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 features, 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.
  • the disclosed application example proposes an image processing method, including the following process:
  • the first step is to calculate the luminance of the pixel at the brow center position in the user image as the reference luminance and record it as ref_luminance.
  • the eyebrow part mask (mask) is used as the target part mask to obtain the eyebrow part in the user image.
  • the third step is to traverse each pixel of the eyebrows and perform the following processing:
  • the luminance enhancement value add_bright is obtained by referring to the formula (1) in the above disclosed embodiments;
  • add_bright is limited by the formula (2) in the above-mentioned disclosed embodiments to obtain an updated brightness boost value, so as to reduce the abrupt effect of lightening eyebrows caused by too brightening the occurrence of the situation;
  • the fourth step is to multiply and mix the beautification color in the eyebrow material and the intermediate color fade_color according to the formula (4) in each of the above-mentioned disclosed embodiments, and obtain the image of the target user after rendering the eyebrow shape.
  • users can be provided with a variety of selectable eyebrow shape effects, and according to the eyebrow material selected by the user, corresponding makeup effect processing is performed on the eyebrow parts to obtain the eyebrow shape effect required by the user.
  • the application example of the present disclosure The proposed method can support both real-time eyebrow rendering and eyebrow rendering to preset images.
  • the image processing method proposed in the application example of this disclosure can not only be applied to the beautification operation of the eyebrow part in the user image, but also can be extended to other parts of the beautification operation, such as lip makeup or hair coloring, etc., as the beautification operation Depending on the type, the image processing method proposed by the application example of the present disclosure can be flexibly expanded and modified accordingly.
  • 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.
  • 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.
  • the computer readable storage medium may be a volatile computer readable storage medium or a nonvolatile computer readable storage medium.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured as the above method.
  • the above-mentioned memory can be volatile memory (volatile memory), such as RAM; or non-volatile memory (non-volatile memory), such as ROM, flash memory (flash memory), hard disk (Hard Disk Drive , HDD) or solid-state drive (Solid-State Drive, SSD); or a combination of the above types of memory, and provide instructions and data to the processor.
  • volatile memory such as RAM
  • non-volatile memory non-volatile memory
  • ROM read-only memory
  • flash memory flash memory
  • HDD hard disk
  • SSD solid-state drive
  • the aforementioned processor may be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It can be understood that, for different devices, the electronic device used to implement the above processor function may also be other, which is not specifically limited in this embodiment of the present disclosure.
  • Electronic devices may be provided as terminals, servers, or other forms of devices.
  • the embodiments of the present disclosure further provide a computer program, which implements the above method when the computer program is executed by a processor.
  • FIG. 15 is a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • the electronic device 800 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 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
  • the memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as 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), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • the power supply component 806 provides power to various components of the electronic device 800 .
  • Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
  • the multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a 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 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 .
  • the audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, 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 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 .
  • the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related personnel information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth
  • electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmable gate array
  • controller microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
  • a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to implement the above method.
  • FIG. 16 is a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • electronic device 1900 may be provided as a server.
  • electronic device 1900 includes processing component 1922 , which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922 , such as application programs.
  • the application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above method.
  • Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input-output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-transitory computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.
  • the present disclosure can be a system, method and/or 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.
  • Computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, such as a printer with instructions stored thereon A hole card or a raised structure in a groove, and any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disc read only memory
  • DVD digital versatile disc
  • memory stick floppy disk
  • mechanically encoded device such as a printer with instructions stored thereon
  • a hole card or a raised structure in a groove and any suitable combination of the above.
  • 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.
  • Computer-readable program instructions described herein may 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 the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • 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 architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or Source or object code written in any combination, 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 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 via the Internet using an Internet service provider). connect).
  • electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), are personalized by utilizing status personnel information of computer readable program instructions, the electronic circuits Computer readable program instructions may be executed to implement 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/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or 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 the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Processing (AREA)

Abstract

An image processing method and apparatus, an electronic device, and a storage medium. The method comprises: receiving a beautification operation for a user image, and determining a target part to be beautified in the user image (S11); determining a reference brightness of the target part according to the brightness of a central position of the target part (S12); increasing the brightness of a pixel point in the target part according to the reference brightness to obtain a target brightness of the pixel point in the target part (S13); and according to a beautification material inputted in the beautification operation and the target brightness, generating a target user image after beautification of the target part (S14).

Description

图像处理Image Processing
相关申请的交叉引用Cross References to Related Applications
本申请要求在2021年9月27日提交至中国专利局、申请号为CN2021111377232的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This application claims priority to a Chinese patent application with application number CN2021111377232 filed with the China Patent Office on September 27, 2021, the entire contents of which are incorporated in this disclosure by reference.
技术领域technical field
本公开涉及计算机视觉领域,尤其涉及图像处理。This disclosure relates to the field of computer vision, and more particularly to image processing.
背景技术Background technique
随着计算机视觉技术的发展,对图像中的眉毛等部位进行眉形或颜色渲染等操作已愈加广泛地应用于图像处理领域。With the development of computer vision technology, operations such as eyebrow shape or color rendering on the eyebrows in the image have been more and more widely used in the field of image processing.
发明内容Contents of the invention
本公开提出了一种图像处理方案。The present disclosure proposes an image processing scheme.
根据本公开的第一方面,提供了一种图像处理方法,包括:接收针对用户图像的美化操作,确定所述用户图像中待进行美化的目标部位;根据所述目标部位的中心位置的亮度,确定所述目标部位的基准亮度;根据所述基准亮度,提升所述目标部位中像素点的亮度,得到所述目标部位中像素点的目标亮度;根据所述美化操作中输入的美化素材以及所述目标亮度,生成对所述目标部位进行美化后的目标用户图像。According to the first aspect of the present disclosure, an image processing method is provided, including: receiving a beautification operation for a user image, determining a target part to be beautified in the user image; according to the brightness of the center position of the target part, Determine the reference brightness of the target part; according to the reference brightness, increase the brightness of the pixels in the target part to obtain the target brightness of the pixels in the target part; according to the beautification material input in the beautification operation and the The target brightness is used to generate a target user image after beautifying the target part.
根据本公开的第二方面,提供了一种图像处理装置,包括:接收模块,用于接收针对用户图像的美化操作,确定所述用户图像中待进行美化的目标部位;亮度确定模块,用于根据所述目标部位的中心位置的亮度,确定所述目标部位的基准亮度;亮度提升模块,用于根据所述基准亮度,提升所述目标部位中像素点的亮度,得到所述目标部位中像素点的目标亮度;美化模块,用于根据所述美化操作中输入的美化素材以及所述目标亮度,生成对所述目标部位进行美化后的目标用户图像。According to a second aspect of the present disclosure, an image processing device is provided, including: a receiving module, configured to receive a beautification operation on a user image, and determine a target part to be beautified in the user image; a brightness determination module, configured to Determine the reference brightness of the target part according to the brightness of the central position of the target part; the brightness enhancement module is configured to increase the brightness of the pixels in the target part according to the reference brightness, and obtain the pixels in the target part The target brightness of the point; a beautification module, configured to generate a target user image after beautifying the target part according to the beautification material input in the beautification operation and the target brightness.
根据本公开的第三方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行上述图像处理方法。According to a third aspect of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to: execute the above image processing method.
根据本公开的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述图像处理方法。According to a fourth 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 image processing method is implemented.
在本公开实施例中,通过接收对用户图像的美化操作,并确定用户图像中待进行美化的目标部位,从而根据目标部位中心位置的亮度确定基准亮度,继而根据基准亮度提升目标部位中像素点的亮度以得到目标亮度,从而基于美化操作中输入的美化素材以及目标亮度,生成对目标部位进行美化后的目标用户图像。通过上述过程,可以通过提升亮度的方式对用户图像中的目标部位实现淡化,减少目标部位原始颜色对美化过程的影响,提升目标用户图像的美化效果。In the embodiment of the present disclosure, by receiving the beautification operation on the user image and determining the target part to be beautified in the user image, the reference brightness is determined according to the brightness of the center position of the target part, and then the pixels in the target part are raised according to the reference brightness brightness to obtain the target brightness, and based on the beautification material and the target brightness input in the beautification operation, a target user image after beautification of the target part is generated. Through the above process, the target part in the user image can be lightened by increasing the brightness, reducing the influence of the original color of the target part on the beautification process, and improving the beautification effect of the target user 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 an image of a beautification material according to an embodiment of the present disclosure.
图3示出根据本公开另一实施例的美化素材的图像。FIG. 3 shows an image of a beautification material according to another embodiment of the present disclosure.
图4示出根据本公开一实施例的目标部位掩模的示意图。FIG. 4 shows a schematic diagram of a target site mask according to an embodiment of the disclosure.
图5示出根据本公开一实施例的预设人脸图像的示意图。Fig. 5 shows a schematic diagram of a preset face image according to an embodiment of the present disclosure.
图6示出根据本公开一实施例的用户图像的示意图。Fig. 6 shows a schematic diagram of a user image according to an embodiment of the present disclosure.
图7示出根据本公开一实施例的中间用户图像示意图。Fig. 7 shows a schematic diagram of an intermediate user image according to an embodiment of the present disclosure.
图8示出根据本公开另一实施例的用户图像的示意图。Fig. 8 shows a schematic diagram of a user image according to another embodiment of the present disclosure.
图9示出根据本公开另一实施例的中间用户图像示意图。Fig. 9 shows a schematic diagram of an intermediate user image according to another embodiment of the present disclosure.
图10示出根据本公开一实施例的目标用户图像的示意图。Fig. 10 shows a schematic diagram of a target user image according to an embodiment of the present disclosure.
图11示出根据本公开另一实施例的目标用户图像的示意图。Fig. 11 shows a schematic diagram of a target user image according to another embodiment of the present disclosure.
图12示出根据本公开再一实施例的目标用户图像的示意图。Fig. 12 shows a schematic diagram of a target user image according to yet another embodiment of the present disclosure.
图13示出根据本公开又一实施例的目标用户图像的示意图。Fig. 13 shows a schematic diagram of a target user image according to yet another embodiment of the present disclosure.
图14示出根据本公开一实施例的图像处理装置的框图。FIG. 14 shows a block diagram of an image processing device according to an embodiment of the present disclosure.
图15示出根据本公开实施例的一种电子设备的框图。Fig. 15 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
图16示出根据本公开实施例的另一种电子设备的框图。FIG. 16 shows a block diagram of another 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" should not be construed as preferred or better than other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific 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 some of the specific details. In some instances, methods, means, components and circuits that are well known to those skilled in the art have not been described in detail so as to obscure the gist of the present disclosure.
图1示出根据本公开一实施例的图像处理方法的流程图,该方法可以应用于图像处理装置或图像处理系统等,图像处理装置可以为终端设备、服务器或者其他处理设备等。其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一个示例中,该图像处理方法可以应用于云端服务器或本地服务器,云端服务器可以为公有云服务器,也可以为私有云服务器,根据实际情况灵活选择即可。Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure. The method can be applied to an image processing device or an image processing system, and the image processing device can be a terminal device, a server, or other processing devices. Among them, the terminal device can be user equipment (User Equipment, UE), mobile device, user terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, wearable device wait. In an example, the image processing method can be applied to a cloud server or a local server, and the cloud server can be a public cloud server or a private cloud server, which can be flexibly selected according to actual conditions.
在一些可能的实现方式中,该图像处理方法也可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。In some possible implementation manners, the image processing method may also be implemented in a manner in which the processor invokes computer-readable instructions stored in the memory.
随着计算机视觉技术的发展,对图像中的眉毛等部位进行眉形或颜色渲染等操作已愈加广泛地应用于图像处理领域。然而,由于眉毛等部位本身具有较重的颜色,往往使得渲染效果难以达到预期。With the development of computer vision technology, operations such as eyebrow shape or color rendering on the eyebrows in the image have been more and more widely used in the field of image processing. However, due to the heavy color of the eyebrows and other parts, the rendering effect is often difficult to achieve as expected.
有鉴于此,本公开提出一种图像处理方法,如图1所示,在一种可能的实现方式中,所述图像处理方法可以包括:In view of this, the present disclosure proposes an image processing method, as shown in FIG. 1 , in a possible implementation manner, the image processing method may include:
步骤S11,接收针对用户图像的美化操作,确定用户图像中待进行美化的目标部位。Step S11, receiving a beautification operation on the user's image, and determining a target part to be beautified in the user's image.
其中,用户图像可以是包含一个或多个对象的目标部位的任意图像,用户图像中可以包含一个或多个对象,也可以包含一个或多个对象的目标部位,可以根据实际情况灵活决定,在本公开实施例中不做限制。Wherein, the user image can be any image containing the target part of one or more objects, and the user image can contain one or more objects or the target part of one or more objects, which can be flexibly determined according to the actual situation. There is no limitation in the embodiments of the present disclosure.
目标部位可以是用户图像中需要进行美化的任意部位,可以根据美化操作的实际情况灵活决定,比如针对于眉形渲染操作的美化操作,目标部位可以是眉毛部位;针对于染发操作的美化操作,目标部位可以是头发部位;针对于唇妆操作的美化操作,目标部位可以是唇部部位等。The target part can be any part of the user's image that needs to be beautified, and can be flexibly determined according to the actual situation of the beautification operation. For example, for the beautification operation of the eyebrow rendering operation, the target part can be the eyebrow part; for the beautification operation of the hair dyeing operation, The target part may be a hair part; for a beautification operation for lip makeup operation, the target part may be a lip part, etc.
美化操作,可以是对用户图像的目标部位美化的任意操作,比如眉形渲染操作、染发操作、唇妆操作、眼妆操作或是修容操作等各类操作。美化操作包含的操作内容可以根据实际情况灵活决定,不局限于下述各公开实施例。在一种可能的实现方式中,该美化操作可以包括指示对用户图像中对象的目标部位美化的操作;在一些可能的实现方式中,该美化操作还可以包括输入一种或多种参数等,比如美化素材或是调整参数等。The beautification operation can be any operation to beautify the target part of the user's image, such as eyebrow rendering operation, hair dyeing operation, lip makeup operation, eye makeup operation, or cosmetic operation. The operation content included in the beautification operation can be flexibly determined according to the actual situation, and is not limited to the following disclosed embodiments. In a possible implementation manner, the beautification operation may include an operation indicating to beautify the target part of the object in the user image; in some possible implementation manners, the beautification operation may also include inputting one or more parameters, etc., Such as beautifying the material or adjusting parameters.
美化素材可以是在美化操作中输入的,对用户图像的目标部位进行美化的任意素材,美化素材可以与用户图像中目标部位的颜色相同或不相同,美化素材可以根据实际情况灵活选择设定,在本公开实施例中不做限制。在一些可能的实现方式中,也可以向用户提供多种美化素材,并根据用户的选择确定选中的美化素材。美化操作中可以输入或选中单种美化素材,也可以同时输入或选中多种美化素材等。图2和图3分别示出根据本公开一实施例的美化素材的图像,如图2所示,在一个示例中,美化素材可以为具有眉峰的第一眉毛素材;如图3所示,在一个示例中,美化素材也可以为具有平缓眉形的第二眉毛素材。The beautification material can be any material input in the beautification operation to beautify the target part of the user image. The beautification material can be the same or different from the color of the target part in the user image. The beautification material can be flexibly selected and set according to the actual situation. There is no limitation in the embodiments of the present disclosure. In some possible implementation manners, multiple beautification materials may also be provided to the user, and the selected beautification material is determined according to the user's selection. In the beautification operation, a single beautification material can be input or selected, or multiple beautification materials can be input or selected at the same time. Fig. 2 and Fig. 3 respectively show the image of the beautification material according to an embodiment of the present disclosure, as shown in Fig. 2, in an example, the beautification material can be the first eyebrow material with eyebrow peak; In an example, the beautification material may also be a second eyebrow material with a gentle eyebrow shape.
调整参数可以是在美化操作中输入的,对用户图像的目标部位进行美化调整的相关参数,调整参数可以包括各种参数类型,在一些可能的实现方式中,调整参数可以包括:对用户图像的目标部位的颜色进行美化的强度、高光、中间调、光泽度或是灰白度等至少一种。对目标部位进行美化的过程可以随着美化素材的不同而灵活发生变化,在本公开实施例中不做限制。The adjustment parameters may be input during the beautification operation, and are relevant parameters for beautifying and adjusting the target part of the user image. The adjustment parameters may include various parameter types. In some possible implementations, the adjustment parameters may include: At least one of intensity, highlight, mid-tone, glossiness, or grayness of the color of the target part should be beautified. The process of beautifying the target part can be flexibly changed with different beautification materials, which is not limited in this embodiment of the present disclosure.
确定目标部位的方式在本公开实施例中不做限制,不局限于下述各公开实施例。在一种可能的实现方式中,可以通过目标部位掩模(mask for a target part)来确定目标部位在用户图像中的位置。在一个例子中,目标部位掩摸可以用来提取用户图像中待进行美化的目标部位图像,例如:用预先制作的目标部位掩模与用户图像相乘,得到用户图像中待进行美化的目标部位图像。The manner of determining the target site is not limited in the embodiments of the present disclosure, and is not limited to the following disclosed embodiments. In a possible implementation manner, the position of the target part in the user image may be determined through a target part mask (mask for a target part). In one example, the target part mask can be used to extract the target part image to be beautified in the user image, for example: multiply the pre-made target part mask with the user image to obtain the target part to be beautified in the user image image.
其中,目标部位掩模可以是目标部位的掩模图像,可以根据目标部位的不同而灵活发生变化。图4示出根据本公开一实施例的目标部位掩模的示意图,如图所示,在一个示例中,目标部位掩模可以是眉毛部位的掩模图像。在一示例中,在目标部位的掩模图像的作用下,目标部位的图像值相较于用户图像可保持不变,而除目标部位以外的图像 值可为0。Wherein, the target part mask may be a mask image of the target part, which may be flexibly changed according to different target parts. FIG. 4 shows a schematic diagram of a target part mask according to an embodiment of the present disclosure. As shown in the figure, in an example, the target part mask may be a mask image of an eyebrow part. In one example, under the effect of the mask image of the target part, the image values of the target part may remain unchanged compared to the user image, while the image values other than the target part may be 0.
根据目标部位掩模确定用户图像中的目标部位的方式可以根据实际情况灵活决定,在一个示例中,可以对用户图像中目标部位的位置进行识别,得到目标部位在用户图像中的初始位置。其中,识别的方式在本公开实施例中不做限制,比如可以通过关键点识别或是对眉毛部位整体进行直接识别。The method of determining the target part in the user image according to the target part mask can be flexibly determined according to the actual situation. In one example, the position of the target part in the user image can be identified to obtain the initial position of the target part in the user image. Wherein, the manner of recognition is not limited in the embodiments of the present disclosure, for example, key point recognition or direct recognition of the entire eyebrow part may be performed.
在一个示例中,可以根据该初始位置确定用户图像中的目标部位。在一个示例中,也可以基于该初始位置进一步确定目标部位在用户图像中的准确位置,举例来说,可以将目标部位掩模与预设人脸图像中的目标部位进行融合,得到标准素材图像,然后根据初始位置对标准素材图像中的目标部位进行提取,得到目标部位的提取素材,在提取素材中的像素点透明度属于预设透明度范围的情况下,将该像素点在用户图像中对应的像素点,确认为属于目标部位的像素点,继而可以确定出用户图像中的目标部位。In an example, the target part in the user's image may be determined according to the initial position. In an example, the exact position of the target part in the user image can be further determined based on the initial position. For example, the target part mask can be fused with the target part in the preset face image to obtain a standard material image , and then extract the target part in the standard material image according to the initial position to obtain the extracted material of the target part. If the pixel transparency in the extracted material belongs to the preset transparency range, the corresponding The pixel points are confirmed as the pixel points belonging to the target part, and then the target part in the user's image can be determined.
其中,预设人脸图像可以是标准的人脸图像模板,可以包括完整全面的人脸部位,且各人脸部位在预设人脸图像中的位置是标准的。预设人脸图像的实现形式可以根据实际情况灵活决定,任何人脸图像处理领域中采用的标准脸(standard face)均可以作为预设人脸图像。图5示出根据本公开一实施例的预设人脸图像的示意图(为了对图像中的对象进行保护,图5中人脸的部分部位进行了马赛克处理),从图5中可以看出,在一个示例中,预设人脸图像中包含的人脸部位是清楚、完整且符合人脸中各人脸部位的客观分布的。同时,由于预设人脸图像中各人脸部位的位置是标准的,因此目标部位掩模可以直接与预设人脸图像中目标部位对应的位置进行融合,以得到标准素材图像。Wherein, the preset face image may be a standard face image template, which may include complete and comprehensive face parts, and the position of each face part in the preset face image is standard. The implementation form of the preset face image can be flexibly determined according to the actual situation, and any standard face (standard face) used in the field of face image processing can be used as the preset face image. Fig. 5 shows a schematic diagram of a preset face image according to an embodiment of the present disclosure (in order to protect objects in the image, some parts of the face in Fig. 5 have been mosaiced), as can be seen from Fig. 5 , In one example, the facial parts included in the preset human face image are clear, complete and conform to the objective distribution of the facial parts in the human face. At the same time, since the position of each face part in the preset face image is standard, the target part mask can be directly fused with the position corresponding to the target part in the preset face image to obtain a standard material image.
步骤S12,根据目标部位的中心位置的亮度,确定目标部位的基准亮度。Step S12, determining the reference brightness of the target part according to the brightness of the central position of the target part.
其中,目标部位的中心位置可以根据目标部位的实际情况灵活确定,在一个示例中,在目标部位为眉毛部位的情况下,中心位置可以为左眉毛和右眉毛之间的中心位置。在一个示例中,在目标部位为眉毛部位的情况下,中心位置也可以为左眉毛的中心点位置或右眉毛的中心点位置等,可以根据实际情况灵活设定。基准亮度可以作为基准,用于确定对目标部位中各像素点亮度的提升值。Wherein, the center position of the target part can be flexibly determined according to the actual situation of the target part. In one example, when the target part is an eyebrow part, the center position can be the center position between the left eyebrow and the right eyebrow. In one example, when the target part is the eyebrow part, the center position may also be the center point position of the left eyebrow or the center point position of the right eyebrow, etc., which can be flexibly set according to the actual situation. The reference brightness can be used as a reference to determine the boost value of the brightness of each pixel in the target part.
在一种可能的实现方式中,步骤S12可以包括:根据目标部位的中心位置的至少一个像素点的原始亮度,得到目标部位的基准亮度。In a possible implementation manner, step S12 may include: obtaining the reference brightness of the target part according to the original brightness of at least one pixel at the central position of the target part.
其中,目标部位中像素点的原始亮度可以为该像素点在用户图像中原本的亮度。该原始亮度可以根据用户图像中像素点的颜色值所确定,或是直接从用户图像中进行读取等。故在一种可能的实现方式中,本公开实施例中提出的方法还可以包括:Wherein, the original brightness of the pixel in the target part may be the original brightness of the pixel in the user image. The original brightness can be determined according to the color values of pixels in the user image, or directly read from the user image. Therefore, in a possible implementation manner, the method proposed in the embodiment of the present disclosure may also include:
根据目标部位中像素点的原始颜色,确定目标部位中像素点的原始亮度。According to the original color of the pixel in the target part, the original brightness of the pixel in the target part is determined.
其中,目标部位中像素点的原始颜色可以为该像素点在用户图像中原本的颜色值,比如可以为RGB颜色值。根据原始颜色确定原始亮度的方式可以根据实际情况灵活选择,比如可以根据原始颜色中各颜色通道的通道值进行计算,来得到亮度值作为原始亮度;或是将原始颜色转换到包含亮度的颜色空间中,比如HSL(色调H,饱和度S和亮度L)颜色空间,或是HSV(色调H,饱和度S和明度V)颜色空间等,然后基于该颜色空间中的亮度或明度分量,确定原始亮度。Wherein, the original color of the pixel in the target part may be the original color value of the pixel in the user image, for example, RGB color value. The way to determine the original brightness according to the original color can be flexibly selected according to the actual situation. For example, the channel value of each color channel in the original color can be calculated to obtain the brightness value as the original brightness; or the original color can be converted to a color space containing brightness. In, such as HSL (hue H, saturation S and lightness L) color space, or HSV (hue H, saturation S and lightness V) color space, etc., and then based on the lightness or lightness component in the color space, determine the original brightness.
在一个示例中,可以将处于目标部位的正中心的像素点的原始亮度作为基准亮度;在一个示例中,也可以将处于目标部位中心位置的多个像素点的原始亮度的平均值或加权平均值等作为基准亮度等,根据实际情况灵活选择确认基准亮度的方式即可。In one example, the original brightness of the pixel at the center of the target part can be used as the reference brightness; in one example, the average or weighted average of the original brightness of multiple pixels at the center of the target part Values, etc. are used as the reference brightness, etc., and the method of confirming the reference brightness can be flexibly selected according to the actual situation.
通过本公开实施例,可以利用目标部位的中心位置中一个或多个像素点的原始亮度来确定基准亮度,提升确定基准亮度的方式的多样性,继而提升图像处理过程的灵活程 度和应用范围。Through the embodiments of the present disclosure, the original luminance of one or more pixels in the center of the target part can be used to determine the reference luminance, which increases the diversity of ways to determine the reference luminance, thereby improving the flexibility and application range of the image processing process.
步骤S13,根据基准亮度,提升目标部位中像素点的亮度,得到目标部位中像素点的目标亮度。Step S13 , according to the reference brightness, the brightness of the pixel points in the target part is increased to obtain the target brightness of the pixel points in the target part.
其中,目标部位中的像素点,可以是目标部位中包含的每一个像素点,也可以是目标部位中的部分像素点。目标亮度可以是目标部位中像素点进行亮度提升后所得到的亮度。如何确定对哪些像素点进行亮度提升,以及如何根据基准亮度对像素点进行亮度提升,其实现方式可以参考下述各公开实施例,在此先不做展开。比如可以根据基准亮度和目标部位中像素点的原始亮度之间的差值,对像素点进行亮度提升等。Wherein, the pixel points in the target part may be every pixel contained in the target part, or may be some pixels in the target part. The target brightness may be the brightness obtained by increasing the brightness of the pixels in the target part. How to determine which pixels to increase the brightness of, and how to increase the brightness of the pixels according to the reference brightness, the implementation may refer to the following disclosed embodiments, which will not be expanded here. For example, the brightness of the pixel can be increased according to the difference between the reference brightness and the original brightness of the pixel in the target part.
步骤S14,根据美化操作中输入的美化素材以及目标亮度,生成对目标部位进行美化后的目标用户图像。Step S14, according to the beautification material and target brightness input in the beautification operation, generate a target user image after beautifying the target part.
其中,美化素材的实现形式可以参考上述公开实施例,在此不再赘述。目标用户图像,可以是基于目标亮度和美化素材对用户图像的目标部位进行美化所得到的图像,生成目标用户图像的方式可以根据实际情况灵活决定,比如可以将目标亮度转换为对应的颜色,然后将转换后的颜色与美化素材中各像素点的颜色进行融合来得到目标用户图像,或是将美化素材中各像素点的颜色转换为亮度,再与目标亮度进行融合来得到目标用户图像等。For the implementation form of the beautification material, reference may be made to the above-mentioned disclosed embodiments, which will not be repeated here. The target user image can be an image obtained by beautifying the target part of the user image based on the target brightness and beautification materials. The method of generating the target user image can be flexibly determined according to the actual situation. The converted color is fused with the color of each pixel in the beautification material to obtain the target user image, or the color of each pixel in the beautification material is converted into brightness, and then fused with the target brightness to obtain the target user image, etc.
步骤S14的一些可能的实现方式可以详见下述各公开实施例,在此先不做展开。For some possible implementation manners of step S14, reference may be made to the following disclosed embodiments in detail, which will not be expanded here.
在本公开实施例中,通过接收对用户图像的美化操作,并确定用户图像中待进行美化的目标部位,从而根据目标部位中心位置的亮度确定基准亮度,继而根据基准亮度提升目标部位中像素点的亮度以得到目标亮度,从而基于美化操作中输入的美化素材以及目标亮度,生成对目标部位进行美化后的目标用户图像。通过上述过程,可以通过提升亮度的方式对用户图像中的目标部位实现淡化,减少目标部位原始颜色对美化过程的影响,提升目标用户图像的美化效果。In the embodiment of the present disclosure, by receiving the beautification operation on the user image and determining the target part to be beautified in the user image, the reference brightness is determined according to the brightness of the center position of the target part, and then the pixels in the target part are raised according to the reference brightness brightness to obtain the target brightness, and based on the beautification material and the target brightness input in the beautification operation, a target user image after beautification of the target part is generated. Through the above process, the target part in the user image can be lightened by increasing the brightness, reducing the influence of the original color of the target part on the beautification process, and improving the beautification effect of the target user image.
在一种可能的实现方式中,步骤S13可以包括:In a possible implementation, step S13 may include:
根据原始亮度和基准亮度,确定目标部位中像素点的亮度提升值;Determine the brightness enhancement value of the pixel in the target part according to the original brightness and the reference brightness;
根据亮度提升值和原始亮度,得到目标部位中像素点的目标亮度。According to the brightness enhancement value and the original brightness, the target brightness of the pixels in the target part is obtained.
其中,亮度提升值可以为对像素点进行亮度提升的提升数值或数值范围等。在一些可能的实现方式中,可以根据原始亮度和基准亮度之间的数值关系来确定亮度提升值,比如可以根据原始亮度和基准亮度之间的差值或差值绝对值等,来确定亮度提升值。Wherein, the brightness enhancement value may be an enhancement value or a value range for enhancing the brightness of a pixel point. In some possible implementations, the brightness boost value can be determined according to the numerical relationship between the original brightness and the reference brightness, for example, the brightness boost can be determined according to the difference between the original brightness and the reference brightness or the absolute value of the difference, etc. value.
确定亮度提升值的计算方式可以根据实际情况灵活选择,详见下述各公开实施例,在此先不做展开。The calculation method for determining the brightness boost value can be flexibly selected according to the actual situation, see the following disclosed embodiments for details, and will not be expanded here.
根据亮度提升值和原始亮度得到目标亮度的方式同样可以根据实际情况灵活选择,比如可以将原始亮度与亮度提升值进行融合或加权融合等,来得到目标亮度,其中融合的方式也可以根据实际情况进行选择,比如叠加或相乘等。在一个示例中,可以将原始亮度与亮度提升值相加以得到目标亮度。The method of obtaining the target brightness according to the brightness enhancement value and the original brightness can also be flexibly selected according to the actual situation. For example, the original brightness and the brightness enhancement value can be fused or weighted to obtain the target brightness. The fusion method can also be based on the actual situation. Make selections such as stacking or multiplying. In one example, the original brightness and the brightness boost value can be added to obtain the target brightness.
在一些实施例中,根据亮度提升值和原始亮度确定目标部位中像素点的目标亮度包括:根据目标部位中一个或多个像素点的原始颜色,确定目标部位中像素点的第一原始亮度,其中,所述第一原始亮度可以表示所述目标部位中像素点的平均原始亮度;根据第一原始亮度和所述基准亮度,确定目标部位中像素点的第一亮度提升值;根据所述第一亮度提升值和第一原始亮度,确定目标部位中像素点的目标亮度,例如,针对目标部位中的每个像素点,将该像素点的原始亮度与所述第一亮度提升值相加,得到该像素点 的目标亮度。在另一些实施例中,根据亮度提升值和原始亮度确定目标部位中像素点的目标亮度包括:针对目标部位中像素点中的每个像素点,根据该像素点的原始颜色,确定该像素点的第二原始亮度;根据所述第二原始亮度和所述基准亮度,确定该像素点的第二亮度提升值;根据所述第二亮度提升值和所述第二原始亮度,确定该像素点的目标亮度。需要说明的是,具体确定目标部位中像素点的目标亮度的方法在本公开中不做限定,在没有付出创造性劳动的前提下,任何基于本公开中技术方案的延伸方案都属于本公开的权利要求的保护范围。In some embodiments, determining the target brightness of the pixels in the target part according to the brightness boost value and the original brightness includes: determining the first original brightness of the pixels in the target part according to the original color of one or more pixels in the target part, Wherein, the first original brightness may represent the average original brightness of the pixels in the target part; according to the first original brightness and the reference brightness, determine the first brightness enhancement value of the pixels in the target part; according to the first A brightness boost value and the first original brightness, determining the target brightness of the pixel in the target part, for example, for each pixel in the target part, adding the original brightness of the pixel to the first brightness boost value, Get the target brightness of the pixel. In some other embodiments, determining the target brightness of the pixel in the target part according to the brightness enhancement value and the original brightness includes: for each pixel in the pixel in the target part, according to the original color of the pixel, determine the pixel the second original brightness; according to the second original brightness and the reference brightness, determine the second brightness boost value of the pixel; according to the second brightness boost value and the second original brightness, determine the pixel target brightness. It should be noted that the method for specifically determining the target brightness of the pixel points in the target part is not limited in this disclosure, and any extension scheme based on the technical solutions in this disclosure belongs to the rights of this disclosure without creative work. the scope of protection required.
通过本公开实施例,可以先根据原始亮度和基准亮度确定像素点的亮度提升值,再基于该亮度提升值确定像素点的目标亮度,相比与直接根据原始亮度和基准亮度确定目标亮度,本公开实施例提出的方法可以更加便捷地确定目标亮度,且便于同时确定多个像素点的目标亮度,提升图像处理的效率和便捷性。Through the embodiments of the present disclosure, it is possible to first determine the brightness boost value of a pixel point according to the original brightness and the reference brightness, and then determine the target brightness of the pixel point based on the brightness boost value. Compared with directly determining the target brightness according to the original brightness and the reference brightness, this The methods proposed in the disclosed embodiments can determine the target brightness more conveniently, and facilitate simultaneous determination of the target brightness of multiple pixels, improving the efficiency and convenience of image processing.
在一种可能的实现方式中,根据原始亮度和基准亮度,确定目标部位中像素点的亮度提升值,可以包括:In a possible implementation manner, according to the original brightness and the reference brightness, determining the brightness enhancement value of the pixel in the target part may include:
在目标部位中像素点的原始亮度低于基准亮度的情况下,基于基准亮度与原始亮度之间的第一差值,得到目标部位中像素点的亮度提升值。If the original luminance of the pixel in the target part is lower than the reference luminance, based on the first difference between the reference luminance and the original luminance, the brightness enhancement value of the pixel in the target part is obtained.
其中,第一差值可以为基准亮度减去原始亮度所得到的差值结果,在目标部位中像素点的原始亮度低于基准亮度的情况下,表明目标部位中像素点的原始亮度较暗,在这种情况下如果直接对该像素点进行美化,可能会受到像素点原始颜色的影响而导致美化效果较差,因此,可以在像素点的原始亮度低于基准亮度的情况下,确定该像素点需要被提升亮度,并根据第一差值来得到该像素点的亮度提升值。Wherein, the first difference may be the difference result obtained by subtracting the original brightness from the reference brightness, and if the original brightness of the pixel in the target part is lower than the reference brightness, it indicates that the original brightness of the pixel in the target part is relatively dark, In this case, if the pixel is beautified directly, the beautification effect may be poor due to the influence of the original color of the pixel. Therefore, the pixel can be determined when the original brightness of the pixel is lower than the reference brightness. The brightness of the point needs to be increased, and the brightness enhancement value of the pixel point is obtained according to the first difference value.
第一差值与亮度提升值之间的计算关系可以根据实际情况灵活设定,详见下述各公开实施例,在此先不做展开。The calculation relationship between the first difference value and the brightness boost value can be flexibly set according to the actual situation. For details, please refer to the following disclosed embodiments, which will not be expanded here.
在一些可能的实现方式中,在目标部位中像素点的原始亮度高于或等于基准亮度的情况下,可以表明该像素点本身具有较高的亮度,因此可以将该目标部位中像素点的原始亮度作为目标亮度。In some possible implementations, when the original brightness of the pixel in the target part is higher than or equal to the reference brightness, it can be indicated that the pixel itself has a higher brightness, so the original brightness of the pixel in the target part can be Brightness as the target brightness.
通过本公开实施例,可以通过像素点的原始亮度与基准亮度之间的比较,来确定是否需要对该像素点的亮度进行提升,从而有效地减少在图像处理过程中需要进行亮度提升的像素点的数量,提升图像处理的效率。Through the embodiments of the present disclosure, it is possible to determine whether the brightness of the pixel needs to be improved by comparing the original brightness of the pixel with the reference brightness, thereby effectively reducing the number of pixels that need brightness improvement in the image processing process to improve the efficiency of image processing.
在一种可能的实现方式中,基于基准亮度与原始亮度之间的第一差值,得到目标部位中像素点的亮度提升值,可以包括:In a possible implementation manner, based on the first difference between the reference brightness and the original brightness, the brightness enhancement value of the pixel in the target part is obtained, which may include:
获取基准亮度与原始亮度之间的第一差值;Obtain the first difference between the reference brightness and the original brightness;
根据第一差值与预设通道值,得到目标部位中像素点的亮度提升值。According to the first difference value and the preset channel value, the brightness enhancement value of the pixel in the target part is obtained.
其中,第一差值的获取方式可以参考上述各公开实施例,在此不再赘述。Wherein, the way of acquiring the first difference can refer to the above-mentioned disclosed embodiments, which will not be repeated here.
预设通道值可以是根据目标部位掩模所确定的通道值,目标部位掩模的实现方式可以参考上述各公开实施例,在此不再赘述。预设通道值可以是目标部位掩模在某个与颜色相关的通道上的通道值,在一个示例中,可以将目标部位掩模中各像素点的alpha通道值,作为预设通道值。The preset channel value may be a channel value determined according to the target part mask, and the realization of the target part mask may refer to the above-mentioned disclosed embodiments, which will not be repeated here. The preset channel value may be a channel value of the target part mask on a certain color-related channel. In one example, the alpha channel value of each pixel in the target part mask may be used as the preset channel value.
根据第一差值和预设通道值来得到亮度提升值的计算过程不局限于下述各公开实施例,可以根据实际情况灵活调整。在一个示例中,得到亮度提升值的过程可以通过下述公式(1)进行表示:The calculation process of obtaining the brightness boost value according to the first difference value and the preset channel value is not limited to the following disclosed embodiments, and can be flexibly adjusted according to actual conditions. In an example, the process of obtaining the brightness boost value can be expressed by the following formula (1):
add_bright=pow((ref_luminance-V),x)*mask_alpha     (1)add_bright=pow((ref_luminance-V),x)*mask_alpha (1)
其中,add_bright为亮度提升值,ref_luminance为基准亮度,V为目标部位中像素点的原始亮度,x为预设的计算数值,mask_alpha为预设通道值,pow(a,b)表明计算a的b次方的结果。Among them, add_bright is the luminance enhancement value, ref_luminance is the reference luminance, V is the original luminance of the pixel in the target part, x is the preset calculation value, mask_alpha is the preset channel value, pow(a,b) indicates the calculation of b of a The result of the power.
通过本公开实施例,可以利用第一差值和目标部位掩模中包含的预设通道值,来共同确定目标部位中像素点的亮度提升值,在充分利用基准亮度与原始亮度形成的第一差值的基础上,还有效利用了从用户图像中确定目标部位掩模的通道值,使得得到的亮度提升值与像素点在用户图像中的位置具有更高的相关性,继而提升整个目标部位的整体亮度提升效果,从而使得后续目标部位的美化效果更自然。Through the embodiments of the present disclosure, the first difference value and the preset channel value contained in the target part mask can be used to jointly determine the brightness boost value of the pixel in the target part, and the first difference formed by the reference brightness and the original brightness can be fully utilized. On the basis of the difference, it also effectively uses the channel value of the target part mask determined from the user image, so that the obtained brightness enhancement value has a higher correlation with the position of the pixel point in the user image, and then improves the entire target part. The overall brightness enhancement effect makes the beautification effect of the subsequent target parts more natural.
在一种可能的实现方式中,根据基准亮度和原始亮度,确定目标部位中像素点的亮度提升值,还可以包括:In a possible implementation manner, according to the reference brightness and the original brightness, determining the brightness enhancement value of the pixel in the target part may also include:
在亮度提升值大于预设亮度阈值的情况下,基于亮度提升值与预设亮度阈值之间的第二差值,对亮度提升值进行更新,得到更新后的亮度提升值。If the brightness boost value is greater than the preset brightness threshold, the brightness boost value is updated based on a second difference between the brightness boost value and the preset brightness threshold to obtain an updated brightness boost value.
其中,预设亮度阈值可以是根据实际情况灵活设定的亮度阈值,具体的数值可以根据实际情况灵活选择,不局限于下述各公开实施例。在一种可能的实现方式中,预设亮度阈值可以根据基准亮度计算得到。Wherein, the preset brightness threshold may be a brightness threshold flexibly set according to actual conditions, and specific values may be flexibly selected according to actual conditions, and are not limited to the following disclosed embodiments. In a possible implementation manner, the preset brightness threshold may be calculated according to the reference brightness.
其中,预设亮度阈值与基准亮度之间的计算关系同样可以根据实际情况灵活设定,不局限于下述各公开实施例,在一个示例中,预设亮度阈值与基准亮度之间的计算关系可以通过下述公式(2)进行表示:The calculation relationship between the preset brightness threshold and the reference brightness can also be flexibly set according to the actual situation, and is not limited to the following disclosed embodiments. In one example, the calculation relationship between the preset brightness threshold and the reference brightness It can be expressed by the following formula (2):
V_threshold=ref_luminance*y       (2)V_threshold=ref_luminance*y (2)
其中,V_threshold为预设亮度阈值,ref_luminance为基准亮度,y为预设的比例数值。Among them, V_threshold is the preset brightness threshold, ref_luminance is the reference brightness, and y is the preset ratio value.
通过本公开实施例,可以根据基准亮度进一步确定预设亮度阈值,从而可以在确定基准亮度的情况下,对目标部位中像素点的亮度均进行更好的亮度提升,减少获取额外数据的同时可以更好地提升后续目标部位的美化效果。Through the embodiments of the present disclosure, the preset brightness threshold can be further determined according to the reference brightness, so that when the reference brightness is determined, the brightness of the pixels in the target part can be better brightened, reducing the need to obtain additional data and at the same time Better improve the beautification effect of subsequent target parts.
第二差值可以为亮度提升值减去预设亮度阈值所得到的差值结果,在亮度提升值大于预设亮度阈值的情况下,表明像素点提升的亮度过高,这容易导致目标部位在个别位置处具有较为突兀的亮度提升效果,继而可能影响到后续目标部位的美化效果。因此,为了减少这种情况下的发生,可以根据亮度提升值与预设亮度阈值之间的第二差值,对亮度提升值进行更新,以对目标部位中像素点的亮度提升值进行限制。The second difference can be the difference result obtained by subtracting the preset brightness threshold from the brightness boost value. Individual positions have a more abrupt brightness enhancement effect, which may affect the beautification effect of subsequent target parts. Therefore, in order to reduce the occurrence of this situation, the brightness boost value may be updated according to the second difference between the brightness boost value and the preset brightness threshold, so as to limit the brightness boost value of the pixel in the target part.
第二差值与更新后的亮度提升值之间的计算关系可以根据实际情况灵活设定,详见下述各公开实施例,在此先不做展开。The calculation relationship between the second difference and the updated brightness boost value can be flexibly set according to the actual situation. For details, please refer to the following disclosed embodiments, which will not be expanded here.
在一些可能的实现方式中,在亮度提升值小于或等于预设亮度阈值的情况下,可以表明该像素点的亮度提升值比较合理,因此可以将该亮度提升值直接作为更新后的亮度提升值。In some possible implementations, when the brightness boost value is less than or equal to the preset brightness threshold, it can be indicated that the brightness boost value of the pixel is reasonable, so the brightness boost value can be directly used as the updated brightness boost value .
在得到更新后的亮度提升值的情况下,可以根据更新后的亮度提升值和原始亮度,来得到目标部位中像素点的目标亮度,具体得到目标亮度的方式可以参考上述公开实施例中根据亮度提升值和原始亮度得到目标亮度的方式,在此不再赘述。In the case of obtaining the updated brightness boost value, the target brightness of the pixel point in the target part can be obtained according to the updated brightness boost value and the original brightness. The method of obtaining the target brightness by increasing the value and the original brightness will not be repeated here.
通过本公开实施例,可以通过亮度提升值与预设亮度阈值之间的比较,将目标部位中像素点的亮度提升值限制在一定的数值范围内,从而减少由于亮度提升导致目标部位边缘处的部分像素点出现过亮的情况,继而使得美化后的目标部位整体具有较好的过渡性,提升美化的自然效果。Through the embodiments of the present disclosure, by comparing the brightness boost value with the preset brightness threshold, the brightness boost value of the pixel in the target part can be limited within a certain value range, thereby reducing the brightness at the edge of the target part caused by the brightness boost. Some pixels are too bright, which makes the beautified target part have a better transition as a whole and enhances the natural effect of beautification.
在一种可能的实现方式中,基于亮度提升值与预设亮度阈值之间的第二差值,对亮度提升值进行更新,得到更新后的亮度提升值,包括:In a possible implementation manner, based on the second difference between the brightness boost value and the preset brightness threshold, the brightness boost value is updated to obtain an updated brightness boost value, including:
获取亮度提升值与预设亮度阈值之间的第二差值;Acquiring a second difference between the brightness boost value and a preset brightness threshold;
根据第二差值、原始亮度以及预设通道值,得到更新后的亮度提升值。An updated brightness boost value is obtained according to the second difference value, the original brightness and the preset channel value.
其中,第二差值的获取方式以及预设通道值的实现方式均可以参考上述各公开实施例,在此不再赘述。Wherein, the manner of obtaining the second difference value and the manner of realizing the preset channel value can refer to the above-mentioned disclosed embodiments, which will not be repeated here.
根据第二差值、像素点的原始亮度和预设通道值来得到更新后的亮度提升值的计算过程不局限于下述各公开实施例,可以根据实际情况灵活调整。在一个示例中,得到更新后的亮度提升值的过程可以通过下述公式(3)进行表示:The calculation process of obtaining the updated brightness boost value according to the second difference value, the original brightness of the pixel and the preset channel value is not limited to the following disclosed embodiments, and can be flexibly adjusted according to the actual situation. In an example, the process of obtaining the updated brightness boost value can be expressed by the following formula (3):
add_bright_new=V_threshold+(add_bright-V_threshold)*V*mask_alpha   (3)add_bright_new=V_threshold+(add_bright-V_threshold)*V*mask_alpha (3)
其中,add_bright_new为更新后的亮度提升值,add_bright为亮度提升值,V_threshold为预设亮度阈值,V为目标部位中像素点的原始亮度,mask_alpha为预设通道值。Among them, add_bright_new is the updated brightness enhancement value, add_bright is the brightness enhancement value, V_threshold is the preset brightness threshold, V is the original brightness of the pixel in the target part, and mask_alpha is the preset channel value.
通过本公开实施例,可以利用第二差值、原始亮度和目标部位掩模中包含的预设通道值,来共同对目标部位中像素点的亮度提升值进行更新,从而将目标部位中像素点的亮度提升值限制在一个较为合理的范围内,提升目标部位的整体美化效果。Through the embodiments of the present disclosure, the second difference value, the original brightness and the preset channel value contained in the target part mask can be used to jointly update the brightness enhancement value of the pixel in the target part, so that the pixel in the target part The brightness enhancement value is limited within a more reasonable range to improve the overall beautification effect of the target part.
图6示出根据本公开一实施例的用户图像的示意图(为了对图像中的对象进行保护,各图中人脸的部分部位进行了马赛克处理,下述各公开实施例中的图像同理,不再赘述),图7为对图6中的第一用户的眉毛部位中像素点的亮度进行提升后所得到的中间用户图像示意图,图6和图7由于显示为灰度图,故亮度变化显示不明显,但通过对比仍可以看出,图7中第一用户的眉毛部位相对于图6中第一用户的眉毛部位在亮度上具有明显提升且颜色也更淡。故根据上述各公开实施例提出的图像处理方法,可以有效提升目标部位的亮度。Fig. 6 shows a schematic diagram of a user image according to an embodiment of the present disclosure (in order to protect the objects in the image, some parts of the face in each figure have been mosaiced, and the images in the following disclosed embodiments are the same, No more details), Figure 7 is a schematic diagram of the intermediate user image obtained after the brightness of the pixels in the eyebrows of the first user in Figure 6 is increased, and Figure 6 and Figure 7 are displayed as grayscale images, so the brightness changes The display is not obvious, but it can still be seen through comparison that the eyebrows of the first user in FIG. 7 are significantly brighter and lighter in color than the eyebrows of the first user in FIG. 6 . Therefore, according to the image processing methods proposed in the above disclosed embodiments, the brightness of the target part can be effectively enhanced.
同理,图8示出根据本公开一实施例的用户图像的示意图,图9为对图8中的第二用户的眉毛部位中像素点的亮度进行提升后所得到的中间用户图像示意图,通过对比也可以看出,在不同的用户图像中,本公开实施例中提出的图像处理方法均可以较好地提升目标部位的亮度。Similarly, FIG. 8 shows a schematic diagram of a user image according to an embodiment of the present disclosure, and FIG. 9 is a schematic diagram of an intermediate user image obtained after enhancing the brightness of pixels in the eyebrows of the second user in FIG. 8 , through It can also be seen from the comparison that in different user images, the image processing method proposed in the embodiments of the present disclosure can better improve the brightness of the target part.
在一种可能的实现方式中,步骤S14可以包括:In a possible implementation, step S14 may include:
根据目标亮度,确定目标部位中像素点的中间颜色;According to the brightness of the target, determine the middle color of the pixel in the target part;
将中间颜色与美化素材中的美化颜色进行融合,得到目标部位中像素点的目标颜色;Merge the intermediate color with the beautification color in the beautification material to obtain the target color of the pixel in the target part;
基于目标颜色,得到对目标部位进行美化后的目标用户图像。Based on the target color, an image of the target user after beautifying the target part is obtained.
其中,中间颜色可以是将目标亮度进行亮度与颜色值转换后所得到的颜色,根据目标亮度得到中间颜色的方式可以根据实际情况灵活决定,比如可以根据颜色中各通道值与亮度之间的关系进行反向计算来得到中间颜色,或是将目标亮度所处的颜色空间,比如HSV空间或HSL空间等,转换至颜色空间,比如RGB空间等,来得到像素点的中间颜色。Among them, the intermediate color can be the color obtained by converting the target brightness into brightness and color value, and the method of obtaining the intermediate color according to the target brightness can be flexibly determined according to the actual situation, for example, according to the relationship between each channel value and brightness in the color Perform reverse calculation to obtain the intermediate color, or convert the color space where the target brightness is located, such as HSV space or HSL space, to a color space, such as RGB space, to obtain the intermediate color of the pixel.
美化颜色可以是美化素材中各像素点的颜色,目标颜色可以是根据美化颜色对目标部位中像素点的颜色进行美化所得到的颜色。在一种可能的实现方式中,目标颜色可以通过将中间颜色与美化颜色进行融合所得到,融合的方式可以根据实际情况灵活选择,不局限于下述各公开实施例。The beautification color may be the color of each pixel in the beautification material, and the target color may be a color obtained by beautifying the color of the pixel in the target part according to the beautification color. In a possible implementation manner, the target color may be obtained by fusing the intermediate color and the beautification color, and the fusing manner may be flexibly selected according to actual conditions, and is not limited to the following disclosed embodiments.
在一种可能的实现方式中,可以通过正片叠底的方式将中间颜色与美化颜色进行混合,来得到目标颜色,其中,正片叠底可以将中间颜色与美化颜色作为两个图层通过相乘的形式进行混合,从而使得两个图层的颜色以一种平滑非线性的方式变暗。在一个示例中,通过正片叠底将中间颜色与美化颜色进行融合的过程可以通过下述公式(4)进行表示:In a possible implementation, the target color can be obtained by mixing the intermediate color and the beautification color by means of multiplication, wherein the multiplication can use the intermediate color and the beautification color as two layers by multiplying , which darkens the colors of the two layers in a smooth, non-linear fashion. In an example, the process of blending the intermediate color and the beautification color by multiplying can be expressed by the following formula (4):
result_color=fade_color*material_color        (4)result_color=fade_color*material_color (4)
其中,result_color为融合后的目标颜色,fade_color为中间颜色,material_color为美化颜色。Among them, result_color is the fused target color, fade_color is the intermediate color, and material_color is the beautification color.
确定目标颜色后,可以将目标颜色作为美化后的目标部位中像素点的颜色来得到美化后的目标用户图像,也可以基于该目标颜色对目标部位中像素点的颜色进行进一步渲染,以得到美化后的目标用户图像。具体如何实现可以根据实际情况灵活选择,在本公开实施例中不做限制。After the target color is determined, the target color can be used as the color of the pixels in the beautified target part to obtain the beautified target user image, and the color of the pixels in the target part can also be further rendered based on the target color to obtain a beautified image. After the target user image. How to implement it can be flexibly selected according to the actual situation, which is not limited in the embodiments of the present disclosure.
通过本公开实施例,可以基于提升后的目标亮度,来实现目标部位中像素点的颜色美化,继而通过亮度提升的形式降低目标部位中像素点的原始颜色对美化过程所带来的影响,提升美化效果和自然程度。Through the embodiments of the present disclosure, based on the increased target brightness, the color beautification of the pixel points in the target part can be realized, and then the influence of the original color of the pixel points in the target part on the beautification process can be reduced by increasing the brightness, thereby improving the Beautification effect and degree of naturalness.
基于上述各公开实施例,可以得到对用户图像中目标部位进行美化的目标用户图像。图10-图13分别示出根据本公开一实施例的目标用户图像的示意图,其中,图10为通过图2中的第一眉毛素材对图6中的第一用户图像进行眉形渲染操作后所得到的目标用户图像,图11为通过图3中的第二眉毛素材对图6中的第一用户图像进行眉形渲染操作后所得到的目标用户图像,图12为通过图2中的第一眉毛素材对图8中的第二用户图像进行眉形渲染操作后所得到的目标用户图像,图13为通过图3中的第二眉毛素材对图8中的第二用户图像进行眉形渲染操作后所得到的目标用户图像。Based on the above disclosed embodiments, a target user image in which a target part in the user image is beautified can be obtained. 10-13 respectively show schematic diagrams of target user images according to an embodiment of the present disclosure, wherein FIG. 10 shows the eyebrow rendering operation on the first user image in FIG. 6 through the first eyebrow material in FIG. 2 The obtained target user image, FIG. 11 is the target user image obtained after the eyebrow rendering operation is performed on the first user image in FIG. 6 through the second eyebrow material in FIG. 3 , and FIG. An eyebrow material is the target user image obtained after the eyebrow rendering operation is performed on the second user image in FIG. 8. FIG. 13 is the eyebrow rendering of the second user image in FIG. The resulting image of the target user after the operation.
虽然灰度图无法较为明显地体现出眉毛部位的变化,但通过对比仍可以看出,通过上述各公开实施例提出的图像处理方法,可以得到眉形渲染较为真实自然的目标用户图像。Although the grayscale image cannot clearly reflect the changes of the eyebrows, it can still be seen through comparison that through the image processing methods proposed in the above-mentioned disclosed embodiments, a target user image with a more realistic and natural eyebrow rendering can be obtained.
图14示出根据本公开一实施例的图像处理装置的框图。如图所示,所述图像处理装置20可以包括:FIG. 14 shows a block diagram of an image processing device according to an embodiment of the present disclosure. As shown in the figure, the image processing device 20 may include:
接收模块21,用于接收针对用户图像的美化操作,确定用户图像中待进行美化的目标部位。The receiving module 21 is configured to receive a beautification operation on the user's image, and determine a target part to be beautified in the user's image.
亮度确定模块22,用于根据目标部位的中心位置的亮度,确定目标部位的基准亮度。The brightness determination module 22 is configured to determine the reference brightness of the target part according to the brightness of the central position of the target part.
亮度提升模块23,用于根据基准亮度,提升目标部位中像素点的亮度,得到目标部位中像素点的目标亮度。The brightness enhancement module 23 is configured to increase the brightness of the pixel points in the target part according to the reference brightness, so as to obtain the target brightness of the pixel points in the target part.
美化模块24,用于根据美化操作中输入的美化素材以及目标亮度,生成对目标部位进行美化后的目标用户图像。The beautification module 24 is configured to generate a beautified target user image of the target part according to the beautification material and target brightness input in the beautification operation.
在一种可能的实现方式中,装置还用于:根据目标部位中像素点的原始颜色,确定目标部位中像素点的原始亮度;亮度提升模块用于:根据原始亮度和基准亮度,确定目标部位中像素点的亮度提升值;根据亮度提升值和原始亮度,得到目标部位中像素点的目标亮度。In a possible implementation manner, the device is also used to: determine the original brightness of the pixels in the target part according to the original color of the pixels in the target part; the brightness enhancement module is used to: determine the target part according to the original brightness and the reference brightness The brightness enhancement value of the pixels in the center; according to the brightness enhancement value and the original brightness, the target brightness of the pixels in the target part is obtained.
在一种可能的实现方式中,亮度提升模块进一步用于:在目标部位中像素点的原始亮度低于基准亮度的情况下,基于基准亮度与原始亮度之间的第一差值,得到目标部位中像素点的亮度提升值。In a possible implementation, the brightness enhancement module is further configured to: when the original brightness of the pixel in the target part is lower than the reference brightness, based on the first difference between the reference brightness and the original brightness, obtain the target part The brightness boost value of the pixels in the middle.
在一种可能的实现方式中,亮度提升模块进一步用于:获取基准亮度与原始亮度之间的第一差值;根据第一差值与预设通道值,得到目标部位中像素点的亮度提升值,其中,预设通道值根据目标部位掩模所确定,目标部位掩模用于确定用户图像中待进行美化的目标部位。In a possible implementation, the brightness enhancement module is further used to: obtain the first difference between the reference brightness and the original brightness; obtain the brightness enhancement of the pixel in the target part according to the first difference and the preset channel value value, wherein the preset channel value is determined according to the target part mask, and the target part mask is used to determine the target part to be beautified in the user image.
在一种可能的实现方式中,亮度提升模块还用于:在亮度提升值大于预设亮度阈 值的情况下,基于亮度提升值与预设亮度阈值之间的第二差值,对亮度提升值进行更新,得到更新后的亮度提升值;根据亮度提升值和原始亮度,得到目标部位中像素点的目标亮度,包括:根据更新后的亮度提升值和原始亮度,得到目标部位中像素点的目标亮度。In a possible implementation manner, the brightness boost module is further configured to: when the brightness boost value is greater than the preset brightness threshold, based on the second difference between the brightness boost value and the preset brightness threshold, adjust the brightness boost value Perform an update to obtain the updated brightness enhancement value; obtain the target brightness of the pixel points in the target part according to the brightness enhancement value and the original brightness, including: obtain the target brightness of the pixel points in the target part according to the updated brightness enhancement value and the original brightness brightness.
在一种可能的实现方式中,亮度提升模块进一步用于:获取亮度提升值与预设亮度阈值之间的第二差值;根据第二差值、原始亮度以及预设通道值,得到更新后的亮度提升值,其中,预设通道值根据目标部位掩模所确定,目标部位掩模用于确定用户图像中待美化的目标部位。In a possible implementation, the brightness enhancement module is further used to: obtain the second difference between the brightness enhancement value and the preset brightness threshold; obtain the updated The brightness enhancement value of , wherein, the preset channel value is determined according to the target part mask, and the target part mask is used to determine the target part to be beautified in the user image.
在一种可能的实现方式中,预设亮度阈值根据基准亮度计算得到。In a possible implementation manner, the preset brightness threshold is calculated according to the reference brightness.
在一种可能的实现方式中,亮度确定模块用于:根据目标部位的中心位置的至少一个像素点的原始亮度,得到目标部位的基准亮度。In a possible implementation manner, the brightness determining module is configured to: obtain the reference brightness of the target part according to the original brightness of at least one pixel at the central position of the target part.
在一种可能的实现方式中,美化模块用于:根据目标亮度,确定目标部位中像素点的中间颜色;将中间颜色与美化素材中的美化颜色进行融合,得到目标部位中像素点的目标颜色;基于目标颜色,得到对目标部位进行美化后的目标用户图像。In a possible implementation, the beautification module is used to: determine the intermediate color of the pixel in the target part according to the target brightness; fuse the intermediate color with the beautification color in the beautification material to obtain the target color of the pixel in the target part ; Based on the target color, an image of the target user after beautifying the target part is obtained.
在一种可能的实现方式中,目标部位包括眉毛部位,美化操作包括眉形渲染操作。In a possible implementation manner, the target part includes an eyebrow part, and the beautification operation includes an eyebrow shape rendering operation.
本公开涉及增强现实领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的AR效果。示例性的,目标对象可涉及与人体相关的脸部、肢体、手势、动作等,或者与物体相关的标识物、标志物,或者与场馆或场所相关的沙盘、展示区域或展示物品等。视觉相关算法可涉及视觉定位、SLAM、三维重建、图像注册、背景分割、对象的关键点提取及跟踪、对象的位姿或深度检测等。具体应用不仅可以涉及跟真实场景或物品相关的导览、导航、讲解、重建、虚拟效果叠加展示等交互场景,还可以涉及与人相关的特效处理,比如妆容美化、肢体美化、特效展示、虚拟模型展示等交互场景。可通过卷积神经网络,实现对目标对象的相关特征、状态及属性进行检测或识别处理。上述卷积神经网络是基于深度学习框架进行模型训练而得到的网络模型。This disclosure relates to the field of augmented reality. 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 features, states and attributes of the target object, and thus 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 features, 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.
应用场景示例Application Scenario Example
在计算机视觉领域,如何得到更加真实自然的眉形渲染后的图像成为目前一个亟待解决的问题。In the field of computer vision, how to obtain more realistic and natural eyebrow rendering images has become an urgent problem to be solved.
本公开应用示例提出了一种图像处理方法,包括如下过程:The disclosed application example proposes an image processing method, including the following process:
第一步,计算用户图像中眉心位置的像素点的亮度,作为基准亮度并记为ref_luminance。The first step is to calculate the luminance of the pixel at the brow center position in the user image as the reference luminance and record it as ref_luminance.
第二步,将眉毛部位的掩模(mask)作为目标部位掩模,用以获取用户图像中的眉毛部位。In the second step, the eyebrow part mask (mask) is used as the target part mask to obtain the eyebrow part in the user image.
第三步,遍历眉毛部位的各像素点,并进行如下处理:The third step is to traverse each pixel of the eyebrows and perform the following processing:
将像素点的原始颜色从RGB颜色空间转换到HSV颜色空间,且均转换到[0.0,1.0]的范围,得到像素点的原始亮度;Convert the original color of the pixel from the RGB color space to the HSV color space, and convert both to the range of [0.0,1.0] to obtain the original brightness of the pixel;
如果该像素点的原始亮度小于ref_luminance,则对该像素点进行亮度提升,并参考上述各公开实施例中的公式(1)得到亮度提升值add_bright;If the original luminance of the pixel is less than ref_luminance, the luminance of the pixel is increased, and the luminance enhancement value add_bright is obtained by referring to the formula (1) in the above disclosed embodiments;
如果亮度提升值add_bright的亮度大于预设亮度阈值,通过上述各公开实施例中的公式(2),对add_bright进行限制,得到更新后的亮度提升值,以减少提升过亮导致淡化眉毛的效果突兀情况的发生;If the brightness of the brightness boost value add_bright is greater than the preset brightness threshold, add_bright is limited by the formula (2) in the above-mentioned disclosed embodiments to obtain an updated brightness boost value, so as to reduce the abrupt effect of lightening eyebrows caused by too brightening the occurrence of the situation;
将像素点的原始亮度与亮度提升值add_bright或更新后的亮度提升值相加,得到目标亮度,然后将目标亮度转换到RGB颜色空间,得到淡化眉毛之后像素点的中间颜色fade_color。Add the original brightness of the pixel to the brightness enhancement value add_bright or the updated brightness enhancement value to obtain the target brightness, and then convert the target brightness to the RGB color space to obtain the intermediate color fade_color of the pixel after lightening the eyebrows.
第四步,通过上述各公开实施例中的公式(4),将眉毛素材中的美化颜色与中间颜色fade_color进行正片叠底的混合,得到眉形渲染后的目标用户图像。The fourth step is to multiply and mix the beautification color in the eyebrow material and the intermediate color fade_color according to the formula (4) in each of the above-mentioned disclosed embodiments, and obtain the image of the target user after rendering the eyebrow shape.
通过本公开应用示例,可以为用户提供多种可选择的眉形效果,并根据用户选择的眉毛素材,对眉毛部位进行相应的妆容效果处理,得到用户所需的眉形效果,本公开应用示例提出的方法既可以支持实时眉形渲染,也可支持对预设图像的眉形渲染。Through the application example of the present disclosure, users can be provided with a variety of selectable eyebrow shape effects, and according to the eyebrow material selected by the user, corresponding makeup effect processing is performed on the eyebrow parts to obtain the eyebrow shape effect required by the user. The application example of the present disclosure The proposed method can support both real-time eyebrow rendering and eyebrow rendering to preset images.
本公开应用示例中提出的图像处理方法,除了可以应用于对用户图像中的眉毛部位进行美化操作以外,还可以扩展应用于其他部位的美化操作,比如唇妆或是染发等,随着美化操作类型的不同,本公开应用示例提出的图像处理方法可以相应的进行灵活扩展与改动。The image processing method proposed in the application example of this disclosure can not only be applied to the beautification operation of the eyebrow part in the user image, but also can be extended to other parts of the beautification operation, such as lip makeup or hair coloring, etc., as the beautification operation Depending on the type, the image processing method proposed by the application example of the present disclosure can be flexibly expanded and modified accordingly.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。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. Due to space limitations, this disclosure will not repeat them.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。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.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性计算机可读存储介质或非易失性计算机可读存储介质。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. The computer readable storage medium may be a volatile computer readable storage medium or a nonvolatile computer readable storage medium.
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。An embodiment of the present disclosure also proposes an electronic device, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured as the above method.
在实际应用中,上述存储器可以是易失性存储器(volatile memory),例如RAM;或者非易失性存储器(non-volatile memory),例如ROM,快闪存储器(flash memory),硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);或者上述种类的存储器的组合,并向处理器提供指令和数据。In practical application, the above-mentioned memory can be volatile memory (volatile memory), such as RAM; or non-volatile memory (non-volatile memory), such as ROM, flash memory (flash memory), hard disk (Hard Disk Drive , HDD) or solid-state drive (Solid-State Drive, SSD); or a combination of the above types of memory, and provide instructions and data to the processor.
上述处理器可以为ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微处理器中的至少一种。可以理解地,对于不同的设备,用于实现上述处理器功能的电子器件还可以为其它,本公开实施例不作具体限定。The aforementioned processor may be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It can be understood that, for different devices, the electronic device used to implement the above processor function may also be other, which is not specifically limited in this embodiment of the present disclosure.
电子设备可以被提供为终端、服务器或其它形态的设备。Electronic devices may be provided as terminals, servers, or other forms of devices.
基于前述实施例相同的技术构思,本公开实施例还提供了一种计算机程序,该计算机程序被处理器执行时实现上述方法。Based on the same technical idea as the foregoing embodiments, the embodiments of the present disclosure further provide a computer program, which implements the above method when the computer program is executed by a processor.
图15是根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 15 is a block diagram of an electronic device 800 according to an embodiment of the present disclosure. For example, the electronic device 800 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.
参照图15,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。15, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个 或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as 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), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to various components of the electronic device 800 . Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a 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 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 . In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, 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.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 . For example, the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关人员信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related personnel information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, there is also provided a non-volatile computer-readable storage medium, such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to implement the above method.
图16是根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图16,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 16 is a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, electronic device 1900 may be provided as a server. Referring to FIG. 16 , electronic device 1900 includes processing component 1922 , which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922 , such as application programs. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。 Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input-output (I/O) interface 1958 . The electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure can be a system, method and/or 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.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(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. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, such as a printer with instructions stored thereon A hole card or a raised structure in a groove, and any suitable combination of the above. 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.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions described herein may 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 the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. 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 .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作 为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态人员信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or Source or object code written in any combination, 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 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 via the Internet using an Internet service provider). connect). In some embodiments, electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), are personalized by utilizing status personnel information of computer readable program instructions, the electronic circuits Computer readable program instructions may be executed to implement various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or 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/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or 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 one or more blocks in the flowcharts and/or 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 module, a portion of a program segment, or 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 should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。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 terminology used herein is chosen to best explain the principle of each embodiment, practical application or technical improvement in the market, or to enable other ordinary skilled in the art to understand each embodiment disclosed herein.

Claims (13)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized in that, comprising:
    接收针对用户图像的美化操作,Receive beautification operations on user images,
    确定所述用户图像中待进行美化的目标部位;Determining the target part to be beautified in the user image;
    根据所述目标部位的中心位置的亮度,确定所述目标部位的基准亮度;determining the reference brightness of the target part according to the brightness of the central position of the target part;
    根据所述基准亮度,提升所述目标部位中像素点的亮度,得到所述目标部位中像素点的目标亮度;increasing the brightness of the pixels in the target part according to the reference brightness to obtain the target brightness of the pixels in the target part;
    根据所述美化操作中输入的美化素材以及所述目标亮度,生成对所述目标部位进行美化后的目标用户图像。A target user image after beautification of the target part is generated according to the beautification material input in the beautification operation and the target brightness.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:根据所述目标部位中像素点的原始颜色,确定所述目标部位中像素点的原始亮度;The method according to claim 1, further comprising: determining the original brightness of the pixels in the target part according to the original color of the pixels in the target part;
    所述根据所述基准亮度,提升所述目标部位中像素点的亮度,得到所述目标部位中像素点的目标亮度,包括:The step of increasing the brightness of the pixels in the target part according to the reference brightness to obtain the target brightness of the pixels in the target part includes:
    根据所述原始亮度和所述基准亮度,确定所述目标部位中像素点的亮度提升值;determining a brightness enhancement value of a pixel in the target part according to the original brightness and the reference brightness;
    根据所述亮度提升值和所述原始亮度,得到所述目标部位中像素点的目标亮度。According to the brightness enhancement value and the original brightness, the target brightness of the pixels in the target part is obtained.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述原始亮度和所述基准亮度,确定所述目标部位中像素点的亮度提升值,包括:The method according to claim 2, wherein the determining the brightness enhancement value of the pixel in the target part according to the original brightness and the reference brightness comprises:
    在所述目标部位中像素点的所述原始亮度低于所述基准亮度的情况下,基于所述基准亮度与所述原始亮度之间的第一差值,得到所述目标部位中像素点的亮度提升值。If the original luminance of the pixel in the target part is lower than the reference luminance, based on the first difference between the reference luminance and the original luminance, the pixel in the target part is obtained Brightness boost value.
  4. 根据权利要求3所述的方法,其特征在于,所述基于所述基准亮度与所述原始亮度之间的第一差值,得到所述目标部位中像素点的亮度提升值,包括:The method according to claim 3, wherein the obtaining the brightness enhancement value of the pixel in the target part based on the first difference between the reference brightness and the original brightness includes:
    获取所述基准亮度与所述原始亮度之间的第一差值;acquiring a first difference between the reference brightness and the original brightness;
    根据所述第一差值与预设通道值,得到所述目标部位中像素点的亮度提升值,其中,所述预设通道值根据目标部位掩模所确定,所述目标部位掩模用于确定所述用户图像中待进行美化的目标部位。According to the first difference value and the preset channel value, the brightness enhancement value of the pixel in the target part is obtained, wherein the preset channel value is determined according to the target part mask, and the target part mask is used for Determine the target part to be beautified in the user image.
  5. 根据权利要求2至4中任意一项所述的方法,其特征在于,所述根据所述原始亮度和所述基准亮度,确定所述目标部位中像素点的亮度提升值,还包括:The method according to any one of claims 2 to 4, wherein, according to the original brightness and the reference brightness, determining the brightness enhancement value of the pixel in the target part further includes:
    在所述亮度提升值大于预设亮度阈值的情况下,基于所述亮度提升值与所述预设亮度阈值之间的第二差值,对所述亮度提升值进行更新,得到更新后的亮度提升值;If the brightness boost value is greater than a preset brightness threshold, based on a second difference between the brightness boost value and the preset brightness threshold, update the brightness boost value to obtain an updated brightness boost value;
    所述根据所述亮度提升值和所述原始亮度,得到所述目标部位中像素点的目标亮度,包括:The obtaining the target brightness of the pixels in the target part according to the brightness boost value and the original brightness includes:
    根据所述更新后的亮度提升值和所述原始亮度,得到所述目标部位中像素点的目标亮度。According to the updated brightness enhancement value and the original brightness, the target brightness of the pixels in the target part is obtained.
  6. 根据权利要求5所述的方法,其特征在于,所述基于所述亮度提升值与所述预设亮度阈值之间的第二差值,对所述亮度提升值进行更新,得到更新后的亮度提升值,包括:The method according to claim 5, characterized in that, based on the second difference between the brightness boost value and the preset brightness threshold, the brightness boost value is updated to obtain the updated brightness Boost values, including:
    获取所述亮度提升值与所述预设亮度阈值之间的第二差值;Acquiring a second difference between the brightness boost value and the preset brightness threshold;
    根据所述第二差值、所述原始亮度以及预设通道值,得到所述更新后的亮度提升值,其中,所述预设通道值根据目标部位掩模所确定,所述目标部位掩模用于确定所述用户图像中待进行美化的目标部位。According to the second difference value, the original brightness and the preset channel value, the updated brightness boost value is obtained, wherein the preset channel value is determined according to the target part mask, and the target part mask It is used to determine the target part to be beautified in the user image.
  7. 根据权利要求5或6所述的方法,其特征在于,所述预设亮度阈值根据所述基准亮度计算得到。The method according to claim 5 or 6, wherein the preset brightness threshold is calculated according to the reference brightness.
  8. 根据权利要求1至7中任意一项所述的方法,其特征在于,所述根据所述目标部位的中心位置的亮度,确定所述目标部位的基准亮度,包括:The method according to any one of claims 1 to 7, wherein the determining the reference brightness of the target part according to the brightness of the central position of the target part comprises:
    根据所述目标部位的中心位置的至少一个像素点的原始亮度,得到所述目标部位的所述基准亮度。The reference brightness of the target part is obtained according to the original brightness of at least one pixel at the central position of the target part.
  9. 根据权利要求1至8中任意一项所述的方法,其特征在于,所述根据所述美化操作中输入的美化素材以及所述目标亮度,生成对所述目标部位进行美化后的目标用户图像,包括:The method according to any one of claims 1 to 8, characterized in that, according to the beautification material input in the beautification operation and the target brightness, a target user image after beautification of the target part is generated ,include:
    根据所述目标亮度,确定所述目标部位中像素点的中间颜色;determining an intermediate color of pixels in the target part according to the target brightness;
    将所述中间颜色与所述美化素材中的美化颜色进行融合,得到所述目标部位中像素点的目标颜色;Fusing the intermediate color with the beautification color in the beautification material to obtain the target color of the pixel in the target part;
    基于所述目标颜色,得到对所述目标部位进行美化后的目标用户图像。Based on the target color, an image of the target user after beautifying the target part is obtained.
  10. 根据权利要求1至9中任意一项所述的方法,其特征在于,所述目标部位包括眉毛部位,所述美化操作包括眉形渲染操作。The method according to any one of claims 1 to 9, wherein the target part includes an eyebrow part, and the beautification operation includes an eyebrow shape rendering operation.
  11. 一种图像处理装置,其特征在于,包括:An image processing device, characterized in that it comprises:
    接收模块,用于接收针对用户图像的美化操作,确定所述用户图像中待进行美化的目标部位;A receiving module, configured to receive a beautification operation for the user image, and determine a target part to be beautified in the user image;
    亮度确定模块,用于根据所述目标部位的中心位置的亮度,确定所述目标部位的基准亮度;A brightness determination module, configured to determine the reference brightness of the target part according to the brightness of the central position of the target part;
    亮度提升模块,用于根据所述基准亮度,提升所述目标部位中像素点的亮度,得到所述目标部位中像素点的目标亮度;A brightness enhancement module, configured to increase the brightness of the pixels in the target part according to the reference brightness, to obtain the target brightness of the pixels in the target part;
    美化模块,用于根据所述美化操作中输入的美化素材以及所述目标亮度,生成对所述目标部位进行美化后的目标用户图像。A beautification module, configured to generate a beautified target user image of the target part according to the beautification material input in the beautification operation and the target brightness.
  12. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至10中任意一项所述的方法。Wherein, the processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1-10.
  13. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至10中任意一项所述的方法。A computer-readable storage medium, on which computer program instructions are stored, wherein, when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
PCT/CN2022/120104 2021-09-27 2022-09-21 Image processing method and apparatus, electronic device, and storage medium WO2023045946A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111137723.2 2021-09-27
CN202111137723.2A CN113763287A (en) 2021-09-27 2021-09-27 Image processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023045946A1 true WO2023045946A1 (en) 2023-03-30

Family

ID=78797744

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/120104 WO2023045946A1 (en) 2021-09-27 2022-09-21 Image processing method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN113763287A (en)
WO (1) WO2023045946A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763287A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111281A (en) * 2019-05-08 2019-08-09 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN111127591A (en) * 2019-12-24 2020-05-08 腾讯科技(深圳)有限公司 Image hair dyeing processing method, device, terminal and storage medium
CN112614060A (en) * 2020-12-09 2021-04-06 深圳数联天下智能科技有限公司 Method and device for rendering human face image hair, electronic equipment and medium
CN112767238A (en) * 2020-12-31 2021-05-07 北京字跳网络技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN112767285A (en) * 2021-02-23 2021-05-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
US20210158021A1 (en) * 2019-11-25 2021-05-27 Beijing Dajia Internet Information Technology Co., Ltd. Method for processing images and electronic device
WO2021169394A1 (en) * 2020-02-25 2021-09-02 荣耀终端有限公司 Depth-based human body image beautification method and electronic device
CN113763287A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5810384B2 (en) * 2011-05-11 2015-11-11 学校法人明治大学 Face image processing system, face image processing method, and face image processing program
US20140369554A1 (en) * 2013-06-18 2014-12-18 Nvidia Corporation Face beautification system and method of use thereof
CN104994363B (en) * 2015-07-02 2017-10-20 广东欧珀移动通信有限公司 A kind of U.S. face method, device and intelligent terminal based on dress ornament
CN106846240B (en) * 2015-12-03 2021-05-07 斑马智行网络(香港)有限公司 Method, device and equipment for adjusting fusion materials
CN105931211A (en) * 2016-04-19 2016-09-07 中山大学 Face image beautification method
CN107231505B (en) * 2017-07-18 2019-09-10 北京小米移动软件有限公司 Image processing method and device
CN107679497B (en) * 2017-10-11 2023-06-27 山东新睿信息科技有限公司 Video face mapping special effect processing method and generating system
CN107800965B (en) * 2017-10-31 2019-08-16 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and computer equipment
CN108021901A (en) * 2017-12-18 2018-05-11 北京小米移动软件有限公司 The method, apparatus and computer-readable recording medium of image procossing
CN111178560A (en) * 2018-11-09 2020-05-19 大连神奇视角网络科技有限公司 AR technology-based hairdressing recommendation reservation system
CN109614902A (en) * 2018-11-30 2019-04-12 深圳市脸萌科技有限公司 Face image processing process, device, electronic equipment and computer storage medium
CN109859098B (en) * 2019-01-15 2022-11-22 深圳市云之梦科技有限公司 Face image fusion method and device, computer equipment and readable storage medium
CN110766606B (en) * 2019-10-29 2023-09-26 维沃移动通信有限公司 Image processing method and electronic equipment
CN111583139B (en) * 2020-04-27 2023-06-20 抖音视界有限公司 Blush adjustment method, blush adjustment device, electronic equipment and computer readable medium
CN111784568A (en) * 2020-07-06 2020-10-16 北京字节跳动网络技术有限公司 Face image processing method and device, electronic equipment and computer readable medium
CN112614227B (en) * 2020-12-17 2024-03-19 北京达佳互联信息技术有限公司 Method and device for realizing special effect of image, electronic equipment and storage medium
CN112488965A (en) * 2020-12-23 2021-03-12 联想(北京)有限公司 Image processing method and device
CN112383719B (en) * 2021-01-13 2022-02-01 腾讯科技(深圳)有限公司 Image brightness adjusting method, device and equipment and readable storage medium
CN112801916A (en) * 2021-02-23 2021-05-14 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN113344836B (en) * 2021-06-28 2023-04-14 展讯通信(上海)有限公司 Face image processing method and device, computer readable storage medium and terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111281A (en) * 2019-05-08 2019-08-09 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
US20210158021A1 (en) * 2019-11-25 2021-05-27 Beijing Dajia Internet Information Technology Co., Ltd. Method for processing images and electronic device
CN111127591A (en) * 2019-12-24 2020-05-08 腾讯科技(深圳)有限公司 Image hair dyeing processing method, device, terminal and storage medium
WO2021169394A1 (en) * 2020-02-25 2021-09-02 荣耀终端有限公司 Depth-based human body image beautification method and electronic device
CN112614060A (en) * 2020-12-09 2021-04-06 深圳数联天下智能科技有限公司 Method and device for rendering human face image hair, electronic equipment and medium
CN112767238A (en) * 2020-12-31 2021-05-07 北京字跳网络技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN112767285A (en) * 2021-02-23 2021-05-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN113763287A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
QIU JIALIANG, DAI SHENGKUI: "Fast Facial Beautification Algorithm Based on Skin Texture Preserving", JOURNAL OF COMPUTER-AIDED DESIGN & COMPUTER GRAPHICS, GAI-KAN BIAN-WEI-HUI, BEIJING, CN, vol. 30, no. 2, 1 January 2018 (2018-01-01), CN , pages 336 - 3, XP093053600, ISSN: 1003-9775, DOI: 10.3724/SP.J.1089.2018.16281 *

Also Published As

Publication number Publication date
CN113763287A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
WO2022179026A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN110675310B (en) Video processing method and device, electronic equipment and storage medium
WO2022179025A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN113160094A (en) Image processing method and device, electronic equipment and storage medium
WO2023045941A1 (en) Image processing method and apparatus, electronic device and storage medium
CN109472738B (en) Image illumination correction method and device, electronic equipment and storage medium
WO2023045979A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN111784568A (en) Face image processing method and device, electronic equipment and computer readable medium
CN111091610B (en) Image processing method and device, electronic equipment and storage medium
CN111815750A (en) Method and device for polishing image, electronic equipment and storage medium
WO2023045946A1 (en) Image processing method and apparatus, electronic device, and storage medium
US20220327749A1 (en) Method and electronic device for processing images
CN113453027B (en) Live video and virtual make-up image processing method and device and electronic equipment
CN113822798B (en) Method and device for training generation countermeasure network, electronic equipment and storage medium
CN113570581A (en) Image processing method and device, electronic equipment and storage medium
WO2023045950A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN111935418B (en) Video processing method and device, electronic equipment and storage medium
WO2023045961A1 (en) Virtual object generation method and apparatus, and electronic device and storage medium
WO2023142645A1 (en) Image processing method and apparatus, and electronic device, storage medium and computer program product
CN113570583A (en) Image processing method and device, electronic equipment and storage medium
CN111373409A (en) Method and terminal for acquiring color value change
JP2024508267A (en) Image processing methods and devices, electronic equipment, and storage media
WO2022042160A1 (en) Image processing method and apparatus
CN113763284A (en) Image processing method and device, electronic equipment and storage medium
CN113762212A (en) Image processing method and device, electronic equipment 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: 22871992

Country of ref document: EP

Kind code of ref document: A1