WO2023045950A1 - 图像处理方法及装置、电子设备和存储介质 - Google Patents
图像处理方法及装置、电子设备和存储介质 Download PDFInfo
- Publication number
- WO2023045950A1 WO2023045950A1 PCT/CN2022/120109 CN2022120109W WO2023045950A1 WO 2023045950 A1 WO2023045950 A1 WO 2023045950A1 CN 2022120109 W CN2022120109 W CN 2022120109W WO 2023045950 A1 WO2023045950 A1 WO 2023045950A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- eye
- area
- eye makeup
- target
- makeup
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/94—Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Definitions
- the present disclosure relates to the field of computer vision, and in particular to an image processing method and device, electronic equipment and a storage medium.
- the present disclosure proposes an image processing scheme.
- an image processing method including:
- the eye makeup operation on the user image determine an eye object to be subjected to eye makeup processing in the user image; divide the eye object into multiple target areas, wherein, the range of the target area is larger than the original target area, and the original target area is obtained by dividing the eye objects based on the hue information; according to the eye makeup parameters in the eye makeup operation , performing eye makeup processing matching the color tone of the target area to each of the multiple target areas to obtain multiple eye makeup results; generating a target user image according to the multiple eye makeup results.
- the determining the eye object to be subjected to eye makeup processing in the user image includes: performing key point recognition processing on the user image, and determining that the eye object is in the user image The initial position in the image; the user image is copied to multiple layers respectively; for each layer in the multiple layers, in this layer, the position is expanded with the initial position as the center to obtain An extension location, according to the extension location, determine the object to be processed for eye makeup in the layer.
- the hue information includes at least one of shadow information or midtone information; the division of the eye object based on the hue information of the eye object and preset area parameters For multiple target areas, at least one of the following operations is included: based on the shadow information of the eye object, combined with the first preset area parameter among the preset area parameters, extracting the shadow from the eye object region; or, based on the midtone information of the eye object, in combination with the second preset region parameter among the preset region parameters, extract a midtone region from the eye object.
- the extracting a shadow area from the eye object based on the shadow information of the eye object in combination with the first preset area parameter in the preset area parameters includes: Based on the reverse grayscale image of the eye object, perform multiply blending to obtain a first blending result; determine the pixels in the eye object according to the first blending result and the first preset area parameter The first transparency of the point; according to the first preset transparency threshold and the first transparency, pixel points in the eye object are extracted to obtain the shadow area, wherein the shadow area is larger than the original shadow area, The original shadow area is obtained by dividing the eye object based on the shadow information.
- the midtone area is extracted from the eye object based on the midtone information of the eye object in combination with the second preset area parameter among the preset area parameters
- the method includes: performing exclusion mixing based on the grayscale image of the eye object to obtain a second mixing result; determining the pixel points in the eye object according to the second mixing result and the second preset area parameter Second transparency: according to the second preset transparency threshold and the second transparency, extract the pixel points in the eye object to obtain the midtone area, wherein the midtone area is larger than the original midtone area , the original midtone area is obtained by dividing the eye object based on the midtone information.
- each of the multiple target areas is subjected to eye makeup processing that matches the color tone of the target area to obtain multiple
- the eye makeup results include: according to the color parameters in the eye makeup parameters, respectively rendering the multiple target areas to obtain multiple intermediate eye makeup results; according to the hues of the multiple target areas, determining the multiple target areas A processing method corresponding to each of the target areas; according to the processing methods corresponding to the plurality of target areas, the eye object and the plurality of intermediate eye makeup results are respectively mixed to obtain a plurality of eye makeup results.
- the target area includes at least one of the following: a shadow area or a midtone area; according to the hues of the multiple target areas, determining the corresponding processing methods of the multiple target areas , comprising: in response to determining that the target area includes a shadow area, determining that the processing manner includes multiply blending; in response to determining that the target area includes a midtone area, determining that the processing manner includes normal blending.
- the generating the target user image according to the multiple eye makeup results includes: superimposing the multiple eye makeup results to obtain the target eye makeup result; Fusion parameters in , the target eye makeup result is fused with the user image to obtain the target user image.
- an image processing device including:
- a determination module configured to determine an eye object to be subjected to eye makeup processing in the user image in response to an eye makeup operation on the user image; a division module, configured to based on the hue information of the eye object and preset area parameters , dividing the eye object into a plurality of target areas, wherein the scope of the target area is larger than the original target area, and the original target area is obtained by dividing the eye object based on the hue information; the eye A makeup module, configured to perform eye makeup processing on each of the multiple target areas according to the eye makeup parameters in the eye makeup operation to match the color tone of the target area, to obtain multiple eye makeup results; a generation module , for generating a target user image according to the multiple eye makeup results.
- the determining module is configured to: perform key point recognition processing on the user image, determine the initial position of the eye object in the user image; copy the user image respectively to a plurality of layers; for each layer in the plurality of layers, in the layer, the position is expanded with the initial position as the center to obtain the extended position, and the layer is determined according to the expanded position The object to be treated with eye makeup.
- the hue information includes at least one of shadow information or midtone information; the dividing module is used for at least one of the following: based on the shadow information of the eye object, combined with the The first preset area parameter in the preset area parameters is used to extract the shadow area from the eye object; or, based on the midtone information of the eye object, combined with the second preset area parameter in the preset area parameters Set a region parameter to extract a midtone region from the eye object.
- the division module is further configured to: perform multiplicative blending based on the reverse grayscale image of the eye object to obtain a first blending result; according to the first blending result and The first preset area parameter determines the first transparency of the pixels in the eye object; extracts the pixels in the eye object according to the first preset transparency threshold and the first transparency, The shadow area is obtained, wherein the shadow area is larger than the original shadow area obtained by dividing the eye object based on the shadow information.
- the dividing module is further configured to: perform exclusion mixing based on the grayscale image of the eye object to obtain a second mixing result; according to the second mixing result and the second Preset area parameters to determine the second transparency of the pixels in the eye object; extract the pixels in the eye object according to the second preset transparency threshold and the second transparency to obtain the intermediate a midtone area, wherein the midtone area is larger than an original midtone area, and the original midtone area is obtained by dividing the eye object based on the midtone information.
- the eye makeup module is configured to: respectively render the multiple target areas according to the color parameters in the eye makeup parameters to obtain multiple intermediate eye makeup results; according to the The color tone of the multiple target areas, determine the corresponding processing methods of the multiple target areas; according to the processing methods corresponding to the multiple target areas, the eye objects are respectively compared with the multiple intermediate eye makeup results Blend the treatment for multiple eye makeup results.
- the target area includes at least one of the following: one or more of a shadow area or a midtone area; the eye makeup module is further configured to: respond to determining that the target area includes For the shaded area, it is determined that the processing method includes multiply blending; in response to determining that the target area includes a midtone area, it is determined that the processing method includes normal blending.
- the generating module is configured to: superimpose the multiple eye makeup results to obtain a target eye makeup result; The result is fused with the user image to obtain the target user image.
- 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 the above-mentioned image processing method is implemented when the computer program instructions are executed by a processor.
- the eye object to be subjected to eye makeup processing in the user image is determined, thereby according to the hue information of the eye object and the preset area parameters.
- Divide the eye object into a plurality of target regions, wherein the range of the target region is larger than the range of the original target region divided by the hue, and according to the eye makeup parameters in the eye makeup operation, each of the plurality of target regions is compared with the The eye makeup processing of the color tone matching of the target area to obtain multiple eye makeup results, and generate the target user image after eye makeup processing on the eye object according to the multiple eye makeup results.
- the difference in hue between different target areas can be made greater by preset area parameters, and a larger target area can be obtained than the original target area obtained by dividing only based on the hue.
- Performing corresponding eye makeup processing based on the target area can make the overall eye makeup effect of the eye object more natural and real.
- eye objects can be divided into shadow areas and mid-tone areas according to tones such as shadows and mid-tones, so that in the process of applying eye makeup to shadow areas, the brightness of eye makeup can be reduced as much as possible, and eye makeup can be applied to mid-tone areas.
- the brightness of the eye makeup should be kept as much as possible, so that the eye makeup effect of the eye object can match the original color distribution of the eye object, and the authenticity and naturalness of the eye makeup can be improved, and the eye makeup can be omitted.
- the process of dividing an object into highlight areas reduces the amount of data processed and improves the efficiency of image processing.
- Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- Fig. 2 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- Fig. 3 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- Fig. 4 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- FIG. 5 shows a block diagram of an image processing device according to an embodiment of the present disclosure.
- Fig. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
- Fig. 7 shows a block diagram of an 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 image processing method may include:
- Step S11 in response to the eye makeup operation on the user image, determine eye objects to be subjected to eye makeup processing in the user image.
- the user image can be any image including the user's eyes, and the user image can include one or more users, or one or more users' eyes, and its implementation form can be flexibly determined according to the actual situation. No limitation is imposed in the disclosed embodiments.
- the eye object can be a part of the face that needs eye makeup processing in the user image.
- the eye object can include the complete eye, such as the eyes and the related parts near the eyes that can be used for eye makeup, such as eye shadow rendering.
- Parts, or eyeball parts that can be rendered with color contact lenses, etc. can also only include objects such as the left eye or right eye, which can be flexibly selected according to the actual situation of eye makeup operation.
- the eye makeup operation can be any operation of eye makeup processing on the eye object of the user image, such as eye shadow rendering or color contact lens rendering.
- the operation content included in the eye makeup operation can be flexibly determined according to the actual situation, and is not limited to the following disclosed embodiments.
- the eye makeup operation may include performing eye makeup processing on the eye objects in the user image; in some possible implementation manners, the eye makeup operation may also include the input makeup parameters, etc.
- the eye makeup parameters can be user-input parameters related to eye makeup processing on eye objects.
- the implementation form of the eye makeup parameters can be flexibly determined, such as color parameters, fusion parameters and other parameters.
- the manner of determining the eye object is not limited in the disclosed embodiments, and is not limited to the following disclosed embodiments.
- eye recognition processing may be performed on the user image to determine the target location.
- the manner of recognition processing is not limited in the embodiment of the present disclosure, for example, it may be key point recognition, direct recognition of the whole eye, and the like.
- Step S12 dividing the eye object into a plurality of target areas based on the hue information of the eye object and preset area parameters.
- the hue information may reflect the relative lightness and darkness of the eye object.
- the information contained in the hue information may be flexibly determined according to actual conditions.
- the hue information may include one or more of highlight information, shadow information, and midtone information.
- the highlight information can reflect the region with higher brightness in the eye object
- the shadow information can reflect the region with lower brightness in the eye object
- the midtone information can reflect the brightness in the eye object is between the highlight and shadow Area.
- Different hue information can be determined from the eye object in different hue ways.
- the above hue information can be obtained directly according to the brightness of the pixels in the eye object.
- Eye objects can also be processed in different ways to obtain different hue information. The manner of acquiring hue information can be referred to the following disclosed embodiments in detail, and will not be expanded here.
- the preset area parameter may be a related parameter used to determine the target area, and the implementation form of the preset area parameter is not limited in the embodiment of the present disclosure, for example, it may be related parameters such as a set area range or a range threshold.
- the eye object can be divided into multiple original target areas.
- the original target area can be The target area is further determined on the basis of the original target area.
- the preset area parameters may be related parameters used to determine the target area on the basis of the original target area. For example, it may be the preset value for adjusting the range of the original target area, or the relevant parameters that need to be used in the process of further determining the target area on the basis of the original target area. See the following disclosed embodiments for details. Do not expand here. Since the target area can be determined on the basis of the original target area, there may be a certain corresponding relationship between the two. In a possible implementation manner, the range of the target area may be larger than the original target area.
- the area type and area position contained in the target area can be flexibly determined according to the actual situation of the color tone information in the eye object. There may be overlapping areas between multiple target areas, and they may also be independent of each other. In the embodiment of the present disclosure No restrictions.
- the target area may include one or more of a highlight area, a shadow area, and a midtone area.
- the method of dividing the eye object into multiple target areas can be flexibly changed with the different hue information, for example, according to the obtained highlight information, shadow information and midtone information, the pixels in the eye object can be Points are divided into highlight area, shadow area and midtone area etc. respectively.
- step S12 refer to the following disclosed embodiments for details, which will not be expanded here.
- Step S13 according to the eye makeup parameters in the eye makeup operation, perform eye makeup processing on each of the multiple target areas that matches the color tone of the target area, and obtain multiple eye makeup results.
- the eye makeup parameters corresponding to different target areas can be the same or different.
- different target areas can correspond to the same or different color parameters, or different areas can use the same or different fusion parameters.
- the fusion of color parameters and the like can be flexibly set according to actual conditions, and are not limited to the embodiments of the present disclosure.
- the eye makeup result may be the result obtained after the target area has been treated with eye makeup.
- the way of eye makeup treatment may also be different, so corresponding eye makeup treatment can be performed on multiple target areas to obtain multiple eye makeup results.
- step S13 reference may be made to the following disclosed embodiments in detail, which will not be expanded here.
- Step S14 generating target user images according to multiple eye makeup results.
- the target user image can be an image obtained by performing eye makeup processing on the eye object of the user image, and the method of generating the target user image can be flexibly determined according to the actual situation.
- multiple eye makeup results can be fused to obtain the target user image.
- the user image or combine multiple eye makeup results with the user image to obtain the target user image.
- multiple eye makeup results may also respectively belong to multiple layers.
- the target user image may be obtained by superimposing the layers.
- 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 eye object to be subjected to eye makeup processing in the user image is determined, so that according to the hue information of the eye object and the preset area parameters, the eye object Divide into a plurality of target areas, wherein the range of the target area is larger than the range of the original target area divided by the color tone, and according to the eye makeup parameters in the eye makeup operation, each of the plurality of target areas is compared with the color tone of the target area Matching eye makeup processing to obtain multiple eye makeup results, and generate a target user image after performing eye makeup processing on eye objects according to the multiple eye makeup results.
- the difference in hue between different target areas can be made greater by presetting the area parameters, and a larger target area can be obtained compared to the original target area that is only divided according to the hue.
- the corresponding eye makeup treatment of the area can make the overall eye makeup effect of the eye object more natural and real.
- the eye object can be divided into a shadow area and a mid-tone area according to the shades such as shadows and mid-tones, so that the shadow area can be adjusted.
- the brightness of eye makeup should be reduced as much as possible, and in the process of eye makeup processing in the middle tone area, the brightness of eye makeup should be kept as much as possible, so that the eye makeup effect of the eye object is consistent with the original color of the eye object.
- Matching the color tone distribution improves the authenticity and naturalness of eye makeup, and can omit the process of dividing eye objects into highlight areas, reducing the amount of processed data and improving the efficiency of image processing.
- the eye object may include multiple eye objects respectively located in multiple layers.
- the eye makeup operation of eye shadow rendering one or Multiple areas are rendered, such as the basic eye shadow area, the basic lower eye shadow area, the upper eyelid area, the outer corner area, the inner eye corner area, and the upper right eye shadow area.
- these six regions can be used as eye objects for subsequent operations.
- step S11 may include:
- each layer expand the position centered on the initial position to obtain the expanded position, and determine the eye object in each layer according to the expanded position.
- the key point identification method is not limited in the embodiment of the present disclosure, for example, it may be identified through a relevant key point identification algorithm, or through a neural network with a key point identification function.
- the initial position may be the position of the eye object in the user image.
- the positions of the central areas of these eye objects may be used as the initial position.
- multiple eye shadow areas as eye objects are distributed around the eyes, so the position of the eyes in the user image can be used as the initial position.
- a layer may be any layer with image processing or editing functions, such as an editing layer in image editing software (Photoshop, PS).
- the number of multiple layers can be flexibly determined according to the actual situation, and is not limited in this embodiment of the present disclosure.
- the number of layers can be the same as the number of multiple eye objects; in some possible In the implementation mode, the number of layers can also be smaller than the number of multiple eye objects. In this case, it is possible to determine two or more eye objects in one or some layers at the same time, such as In a layer, you can determine both the base eye shadow area object and the base eye shadow area object.
- Copy the user image to multiple layers respectively which can be to copy multiple eye objects in the user image to multiple layers, or copy the entire user image to multiple layers, or directly copy the user image to multiple layers.
- the original layer the image was on is copied to multiple layers, etc.
- the position can be expanded with the initial position as the center to obtain the expanded position, and the eye objects in each layer can be determined according to the expanded position.
- the way of extension is not limited in this embodiment of the present disclosure.
- the corresponding position direction can be Expand according to the corresponding range, and the position correspondence can be determined according to the objective relationship between the eye object and the initial position. The inside of the initial position, etc.
- each image can be Layer eye makeup results are superimposed to further obtain the target user image after eye makeup processing.
- multiple eye objects can be determined separately and independently by copying user images to multiple layers, which facilitates subsequent eye makeup processing on multiple eye objects, improves the flexibility of eye makeup, and also It is convenient to change the eye makeup effect of each eye object to enhance the richness of eye makeup.
- FIG. 2 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- step S12 may include one or more of the following operations:
- Step S121 based on the shadow information of the eye object, combined with the first preset area parameter among the preset area parameters, extract the shadow area from the eye object.
- Step S122 based on the midtone information of the eye object, combined with the second preset region parameter among the preset region parameters, extracting a midtone region from the eye object.
- step S121 and step S122 are only used to distinguish the above-mentioned different steps, and do not limit the implementation order of different steps. Different steps can be executed simultaneously or sequentially, and the order is not limited in the embodiments of the present disclosure. . Step S12 may include the above two steps at the same time, and may also selectively execute some of the steps.
- eye objects can be flexibly divided into shadow regions and/or midtone regions according to shadow information and/or midtone information.
- it can effectively improve the flexibility of eye object beautification, and it is convenient to realize eye makeup processing flexibly and quickly;
- the embodiment of the present disclosure can omit the processing of the highlight area, and improve the efficiency of eye makeup processing.
- step S121 may include:
- pixel points in the eye object are extracted to obtain a shadow area.
- the reverse grayscale image of the eye object can be an image obtained after performing reverse grayscale processing on each pixel in the eye object, and the reverse grayscale can perform linear or non-linear inversion to obtain an image opposite to the grayscale image of the eye object.
- Multiply blending based on the reversed grayscale image of the eye object may be to perform multiplicative blending on the reversed grayscale image of the eye object itself to obtain the first blended result, specifically, it may be After copying the reversed grayscale image of the eye object, multiply blending is performed based on the two identical reversed grayscaled images to obtain the first blending result.
- the first mixed result obtained by the above method can reflect the shadow information of the eye object, therefore, based on the first mixed result, the original shadow area in the eye object can be further determined, and the original shadow area can be obtained only according to The shadow information represented by the first blending result is used to divide the eye object into the obtained area.
- the shadow area may be determined according to the first mixing result and further combined with the first preset area parameter.
- the first preset area parameter may be a preset parameter for determining the shaded area, and its parameter value may be flexibly determined according to actual conditions, and is not limited to the embodiments of the present disclosure.
- the first preset parameter may be any value greater than 1 (for example, 1.1 ⁇ 1.7).
- an alpha (alpha) channel value of each pixel in the first mixed result may be obtained, and the alpha channel value may be multiplied by a first preset area parameter to obtain a multiplied first grayscale result.
- the first grayscale result can be mapped to a transparency value through the mapping relationship between grayscale and transparency, so as to determine the first transparency of each pixel in the eye object.
- the specific mapping manner of the mapping relationship can be flexibly set according to the actual situation, and is not limited in this embodiment of the present disclosure.
- the first preset transparency threshold may be a preset threshold for filtering the pixels belonging to the shadow area in the eye object, and the specific value of the first preset transparency threshold is not limited in this embodiment of the present disclosure.
- the first preset transparency threshold it can be judged whether the first transparency of each pixel in the eye object is within the range of the first preset transparency threshold, if so, it is determined that the pixel belongs to the shadow area, otherwise it is considered that the pixel belongs to the shadow.
- regions other than the region through the above screening process, multiple pixels belonging to the shadow region can be obtained from the eye object, and then the pixels belonging to the shadow region in the eye object are extracted to obtain the shadow region.
- the transparency determined based on its own first blending result may be If it does not belong to the range of the first preset transparency threshold, and after multiplying it by the first preset area parameter, the pixel can be classified into a shadow area. Therefore, the shadow area obtained by the method of the embodiment of the present disclosure may be larger than the original shadow area determined only according to the shadow information.
- the alpha channel value of a certain pixel is 100, and the corresponding transparency is 39%, which is not within the range of the first preset transparency threshold (for example, greater than 40%) , and after multiplying the first mixed result with the first preset area parameter (such as 1.2), it can be determined that the first grayscale result of the pixel is 120, and the first transparency obtained by mapping is 47%, so by combining with After the first preset area parameter is multiplied, the pixel point may belong to the range of the first preset transparency threshold, and then belong to the shadow area.
- the first preset transparency threshold for example, greater than 40%
- the first blending result reflecting the shadow information can be obtained by multiplying and blending the reverse grayscale image of the eye object, so that according to the blending result and the first preset area parameters, the Extract the shadow area from the object.
- this method of obtaining shadow information is fast and convenient, and the accuracy is high. While improving the efficiency of eye makeup processing, it can effectively improve the accuracy of eye makeup, and then improve the effect of eye makeup;
- the first preset area parameter by introducing the first preset area parameter, the contrast of the shadow area relative to other target areas can be effectively enhanced, and the area range of the shadow area can be expanded to make up for the omission of the divided highlight area, so that the eyes based on the divided target area Makeup processing can be more accurate and have better results.
- step S122 may include:
- pixel points in the eye object are extracted to obtain a midtone area.
- the grayscale image of the eye object may be an image obtained by performing grayscale processing on the eye object. Excluding and mixing based on the grayscale image of the eye object may be to mix the grayscale image of the eye object itself in a form of exclusion to obtain the second mixed result, and its implementation form can refer to the above-mentioned disclosed embodiments, which are not described herein. Let me repeat.
- exclusion blending can be an image blending mode in PS editing software, which can change the brightness and grayscale of an image, and based on the result of exclusion blending, midtone information of eye objects can be obtained.
- the second mixed result obtained in the above manner can reflect the midtone information of the eye object, and therefore, based on the second mixed result, the original midtone region in the eye object can be further determined, and the original midtone region It may be the region obtained by dividing the eye object only according to the middle tone information represented by the obtained second mixing result.
- the middle tone area may be determined according to the second mixing result and further combined with the second preset area parameter.
- the second preset area parameter may be a preset parameter for determining the midtone area, and its parameter value may be flexibly determined according to actual conditions, and is not limited to the embodiments of the present disclosure.
- the value of the second preset area parameter may be the same as or different from the first preset area parameter.
- the second preset parameter may also be any value greater than 1 (for example, 1.1 to 1.7).
- the alpha channel value of each pixel in the second mixed result can be obtained, and the alpha channel value can be multiplied by the second preset area parameter to obtain the multiplied second grayscale result.
- the second grayscale result can be mapped to a transparency value through the mapping relationship between grayscale and transparency, so as to determine the second transparency of each pixel in the eye object.
- the second preset transparency threshold may be a preset threshold for filtering the pixel points belonging to the midtone region in the eye object, and the specific value of the second preset transparency threshold is not limited in the embodiments of the present disclosure. In a possible implementation manner, the second preset transparency threshold may be different from the first preset transparency threshold.
- the second preset threshold it can be judged whether the second transparency of each pixel in the eye object is within the range of the second preset threshold, if so, it is determined that the pixel belongs to the midtone area, otherwise, the pixel is considered to belong to the midtone.
- regions other than the region through the above screening process, multiple pixels belonging to the midtone region can be obtained from the eye object, and then the pixels belonging to the midtone region in the eye object are extracted to obtain the midtone region.
- the midtone area obtained through the second preset area parameter may be larger than the original midtone area determined only based on the midtone information.
- the grayscale image of the eye object can be excluded and mixed to obtain the second mixed result reflecting the midtone information, so that according to the mixed result and the second preset area parameters, the eye object can be extracted
- This method of obtaining mid-tone information is fast and convenient, and it is convenient for batch processing at the same time as the method of obtaining shadow information, thereby improving the efficiency and effect of eye makeup as a whole; on the other hand, by introducing the second
- the preset area parameters can effectively enhance the contrast of the midtone area relative to other target areas, and can expand the area range of the midtone area to make up for the omission of the divided highlight area, so that the eye makeup processing based on the divided target area can be More accurate and with better results.
- FIG. 3 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- step S13 may include:
- step S131 according to the color parameters in the eye makeup parameters, the multiple target areas are respectively rendered to obtain multiple intermediate eye makeup results.
- Step S132 according to the hues of the multiple target areas, determine the processing modes corresponding to the multiple target areas.
- step S133 the eye object is mixed with multiple intermediate eye makeup results to obtain multiple eye makeup results according to the corresponding processing methods of multiple target areas.
- the intermediate eye makeup result may be a rendering result obtained after rendering the color parameters to the target area.
- the color parameter may be a parameter for color rendering of the eye object, and the color parameter may be a color value or an RGB channel value.
- the color parameter can be determined according to the color selected by the user or the color value input by the user, or the color can be set in advance, and can be flexibly selected according to the actual situation.
- each target area may correspond to the same color parameters, or may correspond to different color parameters, which can be flexibly selected according to the actual situation.
- each target area may be mixed with corresponding color parameters to obtain an intermediate eye makeup result corresponding to each target area.
- different target areas can be divided based on different hue information
- different target areas can correspond to different hues, such as the shaded areas corresponding to shadows and the midtone area corresponding to midtones mentioned in the above disclosed embodiments.
- Target areas with different tones may have different eye makeup treatment methods.
- the corresponding relationship between the color tones and the treatment methods can be found in the following disclosed embodiments in detail, and will not be expanded here.
- the eye object can be mixed with each intermediate eye makeup result according to the processing method, so as to obtain multiple eye makeup results.
- the mixed processing of the corresponding processing methods can be performed on each target area to obtain the eye makeup result of each target area, so that different target areas can have the same color tone.
- the corresponding eye makeup effect effectively improves the accuracy and richness of the overall eye makeup effect, and also improves the flexibility of the eye makeup process.
- step S132 may include:
- the processing includes normal mixing.
- the intermediate eye makeup effect and eye objects in the shadow area can be mixed in the manner of multiplying and blending to obtain the eye makeup in the shadow area result.
- multiply and bottom blending can darken the blending result, thereby fully retaining the tonal properties of the shadow area and improving the processing effect.
- the mid-tone eye makeup effect and eye objects in the mid-tone area can be mixed in a normal blending manner to obtain an eye makeup result in the mid-tone area.
- normal blending has little effect on the brightness of the blending result, so as to fully preserve the tone properties of the midtone area and improve the processing effect.
- FIG. 4 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- step S14 may include:
- Step S141 superimposing multiple eye makeup results to obtain the target eye makeup result
- Step S142 according to the fusion parameters in the eye makeup parameters, the target eye makeup result is fused with the user image to obtain the target user image.
- the above-mentioned multiple target areas may also be determined in multiple layers respectively, in this case, the multiple eye makeup results obtained may also belong to multiple layers respectively, therefore, In an example, eye makeup results in multiple layers may be superimposed to obtain a target eye makeup result.
- overlay can be flexibly decided according to the actual situation, for example, it can be direct overlay between layers, and in some possible implementations, overlay can also be realized through some or some mixed methods, for example, multiple layers can be passed through Multiply the way to mix and overlay.
- multiple eye makeup results may also be directly fused or mixed to obtain a target eye makeup result.
- the target eye makeup result and the user image can be fused according to the fusion parameters to obtain the target user image.
- the fusion method is also not limited in this embodiment of the disclosure.
- the pixel values of the same position are added or multiplied to achieve fusion, or the pixel values of the pixels at the same position are weighted and fused.
- the fusion weight of the target eye makeup result in the weighted fusion can be determined according to the fusion parameters, and the fusion parameters can be preset parameter values, or can be determined according to the parameter values input by the user in the eye makeup operation, etc., according to the actual situation Choose flexibly.
- the fusion parameter can be transparency.
- the target eye makeup result is multiplied by the transparency and then added to the used image to obtain the target user image.
- the target eye makeup result can be fused with the user image according to the fusion parameters in the eye makeup parameters to obtain the target user image.
- the fusion parameters By changing the fusion parameters, it is easy to adjust the eye makeup effect, thereby improving the overall The flexibility and autonomy of the eye makeup process.
- FIG. 5 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 determination module 21 is configured to determine eye objects to be subjected to eye makeup processing in the user image in response to the eye makeup operation on the user image.
- the dividing module 22 is used to divide the eye object into a plurality of target areas based on the hue information of the eye object and preset area parameters, wherein the scope of the target area is larger than the original target area, and the original target area is divided into multiple target areas based on the hue information. It is obtained by dividing the department object.
- the eye makeup module 23 is configured to, according to the eye makeup parameters in the eye makeup operation, perform eye makeup processing on each of the multiple target areas matching the color tone of the target area to obtain multiple eye makeup results.
- the generating module 24 is configured to generate target user images according to multiple eye makeup results.
- the determining module is configured to: perform key point recognition processing on the user image, determine the initial position of the eye object in the user image; copy the user image respectively to a plurality of layers; for each layer in the plurality of layers, in the layer, the position is expanded with the initial position as the center to obtain the extended position, and the layer is determined according to the expanded position The object to be treated with eye makeup.
- the hue information includes at least one of the following: shadow information or midtone information; the dividing module is used for at least one of the following: based on the shadow information of the eye object, Extracting a shadow area from the eye object in combination with the first preset area parameter in the preset area parameters; or, based on the midtone information of the eye object, combining the first preset area parameter in the preset area parameters Two preset area parameters, extracting a midtone area from the eye object.
- the division module is further configured to: perform multiplicative blending based on the reverse grayscale image of the eye object to obtain a first blending result; according to the first blending result and The first preset area parameter determines the first transparency of the pixels in the eye object; extracts the pixels in the eye object according to the first preset transparency threshold and the first transparency, The shadow area is obtained, wherein the shadow area is larger than the original shadow area obtained by dividing the eye object based on the shadow information.
- the dividing module is further configured to: perform exclusion mixing based on the grayscale image of the eye object to obtain a second mixing result; according to the second mixing result and the second Preset area parameters to determine the second transparency of the pixels in the eye object; extract the pixels in the eye object according to the second preset transparency threshold and the second transparency to obtain the intermediate a midtone area, wherein the midtone area is larger than an original midtone area, and the original midtone area is obtained by dividing the eye object based on the midtone information.
- the eye makeup module is configured to: respectively render the multiple target areas according to the color parameters in the eye makeup parameters to obtain multiple intermediate eye makeup results; according to the The color tone of the multiple target areas, determine the corresponding processing methods of the multiple target areas; according to the processing methods corresponding to the multiple target areas, the eye objects are respectively compared with the multiple intermediate eye makeup results Blend the treatment for multiple eye makeup results.
- the target area includes at least one of the following: one or more of shadow areas and/or midtone areas; the eye makeup module is further configured to: respond to determining the target In response to determining that the target area includes a midtone area, it is determined that the processing includes normal blending in response to determining that the target area includes a shaded area.
- the generating module is configured to: superimpose the multiple eye makeup results to obtain a target eye makeup result; The result is fused with the user image to obtain the target user image.
- 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:
- Face recognition is performed based on the user image, the eye object is extracted from the user image, and the shadow area and the midtone area are separated for the eye object to obtain two target areas such as the high shadow area and the midtone area.
- the process of shadow separation can include:
- Multiply and mix the reverse grayscale image of the eye object and the reverse grayscale image of the eye object (for example, after copying the reverse grayscale image of the eye object, based on two identical reverse grayscale images Figures are multiplied and blended) to get the first blended result.
- Obtain the alpha channel value in the first mixed result and multiply the alpha channel value by the first preset area parameter (such as 1.2, etc.) to obtain the first grayscale result.
- the second A grayscale result is mapped to transparency, so as to obtain the first transparency of each pixel in the eye object, and based on the first transparency, pixel points belonging to the shadow area are screened from the eye object to obtain the shadow area.
- the process of separating midtones can include:
- a second mixed result is obtained.
- Obtain the alpha channel value in the second mixed result and multiply the alpha channel value by the second preset area parameter (such as 1.2, etc.) to obtain the second grayscale result.
- the first The second grayscale result is mapped to transparency, thereby obtaining the second transparency of each pixel in the eye object, and based on the second transparency, the pixels belonging to the midtone area are screened from the eye object to obtain the midtone area.
- the color parameters of the eye makeup input by the user can be mixed with the shadow area and the midtone area respectively to obtain the intermediate eye makeup results x and y respectively.
- the obtained intermediate eye makeup result y is normally mixed with the eye object to obtain the eye makeup result h.
- the target user image is an image obtained by performing the above-mentioned eye makeup processing on the eye object in the user image.
- Changing the transparency of i can change the transparency effect of the entire eye makeup color, wherein the target eye makeup result i can be fused with the target user image through normal mixing.
- the image processing method proposed in the application example of the present disclosure can make the eye makeup effect more natural by processing the target areas of different tones, including the skin texture details of the eyes, and can realize the processing effect of what you see is what you get. Moreover, the method proposed in the embodiments of the present disclosure can achieve more parameter definitions, such as changing the color parameters of eye makeup in different target areas, changing the fusion parameters of the target eye makeup result and the user image, etc., so that the eye makeup effect is more predictable. control, which is convenient for users to customize beautification parameters according to their preferences. For example, a designer may need to change the color of eye shadow in eye makeup in the process of designing makeup.
- the method proposed in the application example of this disclosure can be used, or the method steps in the application example of this disclosure can be used According to the operation process, it is recorded as a set of actions and run in PS and other software, so that the eye makeup effect can be changed conveniently and quickly. It is also convenient for institutions to provide users with richer custom functions according to the methods in the application examples of the present disclosure. For example, software developers in institutions can incorporate the methods of the application examples of the disclosure into the underlying technology when developing makeup-related software , and retain the interface for modifying the eye makeup color, so as to facilitate color changes, etc.
- 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. 6 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. 7 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)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Processing (AREA)
Abstract
Description
Claims (11)
- 一种图像处理方法,包括:响应于针对用户图像的眼妆操作,确定所述用户图像中待进行眼妆处理的眼部对象;基于所述眼部对象的色调信息和预设区域参数,将所述眼部对象划分为多个目标区域,其中,所述目标区域的范围大于原始目标区域,所述原始目标区域通过基于所述色调信息对所述眼部对象进行划分所得到;根据所述眼妆操作中的眼妆参数,对所述多个目标区域中的每个进行与该目标区域的色调匹配的眼妆处理,得到多个眼妆结果;根据所述多个眼妆结果,生成目标用户图像。
- 根据权利要求1所述的方法,其特征在于,所述确定所述用户图像中待进行眼妆处理的眼部对象,包括:对所述用户图像进行关键点识别处理,确定所述眼部对象在所述用户图像中的初始位置;将所述用户图像分别复制至多个图层中;针对所述多个图层中的每个图层,在该图层中,以所述初始位置为中心进行位置扩展得到扩展位置,根据所述扩展位置,确定该图层中待进行眼妆处理的对象。
- 根据权利要求1或2所述的方法,其特征在于,所述色调信息包括阴影信息或中间调信息中的至少一种;所述基于所述眼部对象的色调信息和预设区域参数,将所述眼部对象划分为多个目标区域,包括以下操作中的至少一项:基于所述眼部对象的阴影信息,结合所述预设区域参数中的第一预设区域参数,从所述眼部对象中提取阴影区域;或,基于所述眼部对象的中间调信息,结合所述预设区域参数中的第二预设区域参数,从所述眼部对象中提取中间调区域。
- 根据权利要求3所述的方法,其特征在于,所述基于所述眼部对象的阴影信息,结合所述预设区域参数中的第一预设区域参数,从所述眼部对象中提取阴影区域,包括:基于所述眼部对象的反向灰度图,进行正片叠底混合,得到第一混合结果;根据所述第一混合结果与所述第一预设区域参数,确定所述眼部对象中像素点的第一透明度;根据第一预设透明度阈值和所述第一透明度,对所述眼部对象中的像素点进行提取,得到所述阴影区域,其中,所述阴影区域大于原始阴影区域,所述原始阴影区域通过基于所述阴影信息对所述眼部对象进行划分所得到。
- 根据权利要求3或4所述的方法,其特征在于,所述基于所述眼部对象的中间调信息,结合所述预设区域参数中的第二预设区域参数,从所述眼部对象中提取中间调区域,包括:基于所述眼部对象的灰度图,进行排除混合,得到第二混合结果;根据所述第二混合结果与所述第二预设区域参数,确定所述眼部对象中像素点的第二透明度;根据第二预设透明度阈值和所述第二透明度,对所述眼部对象中的像素点进行提取,得到所述中间调区域,其中,所述中间调区域大于原始中间调区域,所述原始中间调区域通过基于所述中间调信息对所述眼部对象进行划分所得到。
- 根据权利要求1至5中任意一项所述的方法,其特征在于,所述根据所述眼妆操作中的眼妆参数,对所述多个目标区域分别进行与所述目标区域的色调匹配的眼妆处理,得到多个眼妆结果,包括:根据所述眼妆参数中的颜色参数,对所述多个目标区域分别进行渲染,得到多个 中间眼妆结果;根据所述多个目标区域的色调,确定所述多个目标区域分别对应的处理方式;按照所述多个目标区域分别对应的处理方式,将所述眼部对象分别与所述多个中间眼妆结果进行混合处理,得到多个眼妆结果。
- 根据权利要求6所述的方法,其特征在于,所述目标区域包括以下至少一项:阴影区域或中间调区域;所述根据所述多个目标区域的色调,确定所述多个目标区域分别对应的处理方式,包括:响应于确定所述目标区域包括阴影区域,确定所述处理方式包括正片叠底混合;响应于确定所述目标区域包括中间调区域,确定所述处理方式包括正常混合。
- 根据权利要求1至7中任意一项所述的方法,其特征在于,所述根据所述多个眼妆结果,生成目标用户图像,包括:将所述多个眼妆结果进行叠加,得到目标眼妆结果;根据所述眼妆参数中的融合参数,对所述目标眼妆结果与所述用户图像进行融合,得到所述目标用户图像。
- 一种图像处理装置,包括:确定模块,用于响应于针对用户图像的眼妆操作,确定所述用户图像中待进行眼妆处理的眼部对象;划分模块,用于基于所述眼部对象的色调信息和预设区域参数,将所述眼部对象划分为多个目标区域,其中,所述目标区域的范围大于原始目标区域,所述原始目标区域通过基于所述色调信息对所述眼部对象进行划分所得到;眼妆模块,用于根据所述眼妆操作中的眼妆参数,对所述多个目标区域分别进行与所述目标区域的色调匹配的眼妆处理,得到多个眼妆结果;生成模块,用于根据所述多个眼妆结果,生成目标用户图像。
- 一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至8中任意一项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至8中任意一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111137187.6 | 2021-09-27 | ||
| CN202111137187.6A CN113781359B (zh) | 2021-09-27 | 2021-09-27 | 图像处理方法及装置、电子设备和存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023045950A1 true WO2023045950A1 (zh) | 2023-03-30 |
Family
ID=78853735
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/120109 Ceased WO2023045950A1 (zh) | 2021-09-27 | 2022-09-21 | 图像处理方法及装置、电子设备和存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN113781359B (zh) |
| WO (1) | WO2023045950A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113781359B (zh) * | 2021-09-27 | 2024-06-11 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5999658A (en) * | 1996-06-28 | 1999-12-07 | Dainippon Screen Mfg. Co., Ltd. | Image tone interpolation method and apparatus therefor |
| US20050141002A1 (en) * | 2003-12-26 | 2005-06-30 | Konica Minolta Photo Imaging, Inc. | Image-processing method, image-processing apparatus and image-recording apparatus |
| US20140270514A1 (en) * | 2013-03-14 | 2014-09-18 | Ili Technology Corporation | Image processing method |
| JP2015156072A (ja) * | 2014-02-20 | 2015-08-27 | 国立大学法人お茶の水女子大学 | アイメイクデザイン生成方法及びプログラム |
| CN108053365A (zh) * | 2017-12-29 | 2018-05-18 | 百度在线网络技术(北京)有限公司 | 用于生成信息的方法和装置 |
| CN110572652A (zh) * | 2019-09-04 | 2019-12-13 | 锐捷网络股份有限公司 | 一种静态图像的处理方法及装置 |
| CN111583102A (zh) * | 2020-05-14 | 2020-08-25 | 北京字节跳动网络技术有限公司 | 人脸图像处理方法、装置、电子设备及计算机存储介质 |
| CN113781359A (zh) * | 2021-09-27 | 2021-12-10 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109584153A (zh) * | 2018-12-06 | 2019-04-05 | 北京旷视科技有限公司 | 修饰眼部的方法、装置和系统 |
| CN111091610B (zh) * | 2019-11-22 | 2023-04-11 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
| CN112330527A (zh) * | 2020-05-29 | 2021-02-05 | 北京沃东天骏信息技术有限公司 | 图像处理方法、装置、电子设备和介质 |
| CN112581395B (zh) * | 2020-12-15 | 2024-08-23 | 维沃移动通信有限公司 | 图像处理方法、装置、电子设备及存储介质 |
| CN112801916A (zh) * | 2021-02-23 | 2021-05-14 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
| CN112766234B (zh) * | 2021-02-23 | 2023-05-12 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
| CN112767285B (zh) * | 2021-02-23 | 2023-03-10 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
-
2021
- 2021-09-27 CN CN202111137187.6A patent/CN113781359B/zh active Active
-
2022
- 2022-09-21 WO PCT/CN2022/120109 patent/WO2023045950A1/zh not_active Ceased
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5999658A (en) * | 1996-06-28 | 1999-12-07 | Dainippon Screen Mfg. Co., Ltd. | Image tone interpolation method and apparatus therefor |
| US20050141002A1 (en) * | 2003-12-26 | 2005-06-30 | Konica Minolta Photo Imaging, Inc. | Image-processing method, image-processing apparatus and image-recording apparatus |
| US20140270514A1 (en) * | 2013-03-14 | 2014-09-18 | Ili Technology Corporation | Image processing method |
| JP2015156072A (ja) * | 2014-02-20 | 2015-08-27 | 国立大学法人お茶の水女子大学 | アイメイクデザイン生成方法及びプログラム |
| CN108053365A (zh) * | 2017-12-29 | 2018-05-18 | 百度在线网络技术(北京)有限公司 | 用于生成信息的方法和装置 |
| CN110572652A (zh) * | 2019-09-04 | 2019-12-13 | 锐捷网络股份有限公司 | 一种静态图像的处理方法及装置 |
| CN111583102A (zh) * | 2020-05-14 | 2020-08-25 | 北京字节跳动网络技术有限公司 | 人脸图像处理方法、装置、电子设备及计算机存储介质 |
| CN113781359A (zh) * | 2021-09-27 | 2021-12-10 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113781359B (zh) | 2024-06-11 |
| CN113781359A (zh) | 2021-12-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112767285B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN113870400B (zh) | 虚拟对象的生成方法及装置、电子设备和存储介质 | |
| CN110675310B (zh) | 视频处理方法、装置、电子设备及存储介质 | |
| CN112766234B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN111091610B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN109816764B (zh) | 图像生成方法及装置、电子设备和存储介质 | |
| WO2023045941A1 (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN113160094A (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN113822798B (zh) | 生成对抗网络训练方法及装置、电子设备和存储介质 | |
| CN107424130B (zh) | 图片美颜方法和装置 | |
| CN113570581A (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| WO2023142645A1 (zh) | 图像处理方法、装置、电子设备、存储介质和计算机程序产品 | |
| WO2023045979A1 (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN111935418B (zh) | 视频处理方法及装置、电子设备和存储介质 | |
| CN113762212B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| WO2023045946A1 (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| US20220270313A1 (en) | Image processing method, electronic device and storage medium | |
| CN113781359B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN120410929A (zh) | 人脸图像的增强方法、装置、设备及存储介质 | |
| CN113763284B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN113570583B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| HK40061771A (zh) | 图像处理方法及装置、电子设备和存储介质 | |
| CN115588221A (zh) | 面部属性编辑方法及装置 | |
| HK40057509A (zh) | 虚拟对象的生成方法及装置、电子设备和存储介质 | |
| HK40056542A (zh) | 图像处理方法及装置、电子设备和存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22871996 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22871996 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 27/11/2024) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22871996 Country of ref document: EP Kind code of ref document: A1 |