WO2023045941A1 - 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
WO2023045941A1
WO2023045941A1 PCT/CN2022/120090 CN2022120090W WO2023045941A1 WO 2023045941 A1 WO2023045941 A1 WO 2023045941A1 CN 2022120090 W CN2022120090 W CN 2022120090W WO 2023045941 A1 WO2023045941 A1 WO 2023045941A1
Authority
WO
WIPO (PCT)
Prior art keywords
beautification
target
area
beautified
preset
Prior art date
Application number
PCT/CN2022/120090
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 WO2023045941A1 publication Critical patent/WO2023045941A1/en

Links

Images

Classifications

    • G06T5/77
    • 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
    • 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/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the present disclosure relates to the field of computer 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:
  • a beautification operation on the user image determine a target position of a target part in the user image; based on the target position, determine a plurality of target areas to be beautified in the user image, wherein the plurality of target areas Belonging to the preset area range of the target part; according to the beautification parameters in the beautification operation, performing beautification processing matching the target area on each of the multiple target areas to obtain multiple beautification results; according to the beautification parameters in the beautification operation
  • the above multiple beautification results are used to generate target user images.
  • the determining multiple target areas to be beautified in the user image based on the target position includes: copying the user image to multiple layers; traversing the A plurality of layers, using the traversed layer as the target layer; in the target layer, according to the target position, determine N target areas to be beautified in the user image, where N is positive An integer, N is less than the number of the plurality of target regions.
  • determining N target areas to be beautified in the user image according to the target position includes: obtaining the N target areas and A preset positional relationship between the target parts; in the target layer, with the target position as the center, area extension is performed according to the preset positional relationship to obtain the N target areas.
  • the multiple layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation.
  • the determining multiple target areas to be beautified in the user image based on the target position includes: centering on the target position, in multiple preset directions, Perform area extension according to multiple preset extension ranges respectively, and determine the multiple target areas.
  • the beautification process is performed on each of the multiple target areas that matches the target area, and multiple beautification results are obtained, including: Traverse the multiple target areas, use the traversed target area as the area to be beautified, and acquire the original color of the user image in the area to be beautified; determine the to-be-beautified area based on the beautification parameters in the beautification operation A beautification color corresponding to the beautification area; in the area to be beautified, the original color is fused with the beautification color to obtain a beautification result of the area to be beautified.
  • the multiple beautification results respectively belong to multiple layers, and the multiple layers are arranged in a preset order, and the preset order is the same as the beautification in the beautification operation.
  • Executing sequence matching; said generating the target user image according to the multiple beautification results includes: superimposing the multiple layers to which the multiple beautification results belong according to the preset order to obtain the target beautification result ; Fusing the target beautification result with the user image to obtain the target user image.
  • the superimposing the multiple layers to which the multiple beautification results belong according to the preset order to obtain the target beautification result includes: according to the preset order, The multiple layers to which the multiple beautification results belong are superimposed to obtain an intermediate beautification result; the intermediate beautification result is fused with a preset texture material to obtain the target beautification result.
  • the target part includes an eye part
  • the beautification operation includes an eye shadow rendering operation
  • the multiple target areas include a basic eye shadow area, a basic lower eye shadow area, an upper eyelid area, and an outer corner area , at least one of the inner eye corner area or the outer upper eye shadow area.
  • an image processing device including:
  • a determination module configured to determine a target position of a target part in the user image in response to a beautification operation on the user image; an area determination module, configured to determine a plurality of target parts to be beautified in the user image based on the target position The target area, wherein the multiple target areas belong to the preset area range of the target part; the beautification module is configured to compare each of the multiple target areas according to the beautification parameters in the beautification operation The beautification processing of the target area matching obtains multiple beautification results; the generating module is configured to generate a target user image according to the multiple beautification results.
  • the area determination module is configured to: respectively copy the user image to multiple layers; traverse the multiple layers, and use the traversed layer as the target layer; In the target layer, N target areas to be beautified in the user image are determined according to the target positions, where N is a positive integer and N is smaller than the number of the multiple target areas.
  • the area determination module is further configured to: obtain preset positional relationships between the N target areas and the target parts; The location is the center, and the region is extended according to the preset position relationship to obtain the N target regions.
  • the multiple layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation.
  • the area determining module is configured to: take the target position as the center, perform area extension in multiple preset directions respectively according to multiple preset extension ranges, and determine the multiple target area.
  • the beautification module is configured to: traverse the multiple target areas, use the traversed target area as the area to be beautified, and obtain the original image of the user image in the area to be beautified. Color; based on the beautification parameters in the beautification operation, determine the beautification color corresponding to the area to be beautified; in the area to be beautified, fuse the original color and the beautification color to obtain the area to be beautified beautification results.
  • the multiple beautification results respectively belong to multiple layers, and the multiple layers are arranged in a preset order, and the preset order is the same as the beautification in the beautification operation.
  • Executing sequence matching; the generation module is configured to: superimpose the multiple layers to which the multiple beautification results belong according to the preset order to obtain a target beautification result; combine the target beautification result with the The user images are fused to obtain the target user image.
  • the generation module is further configured to: superimpose the multiple layers to which the multiple beautification results belong according to the preset order to obtain an intermediate beautification result;
  • the intermediate beautification result is fused with the preset texture material to obtain the target beautification result.
  • the target part includes an eye part
  • the beautification operation includes an eye shadow rendering operation
  • the multiple target areas include a basic eye shadow area, a basic lower eye shadow area, an upper eyelid area, and an outer corner area , at least one of the inner eye corner area or the outer upper eye shadow area.
  • 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.
  • multiple target areas to be beautified in the user image are determined based on the target position, and then according to the beautification operation beautification parameters, perform beautification processing on multiple target areas that match the target areas to obtain multiple beautification results, and generate a target user image after beautifying the target parts according to the multiple beautification results.
  • the area to be beautified can be divided into multiple target areas based on the target position of the target part, and these multiple target areas are processed separately to obtain the target user image, thereby realizing independent beautification of multiple areas, improving While beautifying the flexibility, the richness of the beautification effect can also be improved.
  • the eye shadow rendering operation through the method proposed in the embodiment of the present disclosure, multiple target areas of eye shadow rendering can be processed separately. On the one hand, each target area can be improved separately. The eye shadow rendering accuracy of the region can also make the overall eye shadow effect richer and more layered.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • FIG. 2 shows a schematic diagram of a mask image of a target area according to an embodiment of the present disclosure.
  • FIG. 3 shows a schematic diagram of a mask image of a target region according to an embodiment of the present disclosure.
  • FIG. 4 shows a schematic diagram of a mask image of a target region according to an embodiment of the present disclosure.
  • FIG. 5 shows a schematic diagram of a mask image of a target area according to an embodiment of the present disclosure.
  • FIG. 6 shows a schematic diagram of a mask image of a target region according to an embodiment of the present disclosure.
  • FIG. 7 shows a schematic diagram of a mask image of a target area according to an embodiment of the present disclosure.
  • Fig. 8 shows a schematic diagram of a user image according to an embodiment of the present disclosure.
  • FIG. 9 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
  • FIG. 10 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
  • FIG. 11 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
  • FIG. 12 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
  • FIG. 13 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
  • FIG. 14 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
  • FIG. 15 shows a block diagram of an image processing device according to an embodiment of the present disclosure.
  • FIG. 17 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 beautification operation on the user image, determine the target position of the target part in the user image.
  • the user image can be any image containing the target part of the user, and the user image can contain one or more users, and can also contain one or more target parts of the user, and its implementation form can be flexibly determined according to the actual situation.
  • the user image can contain one or more users, and can also contain one or more target parts of the user, and its implementation form can be flexibly determined according to the actual situation.
  • the target part can be any part in the user's image that needs to be beautified. Which parts are included in the target part, the implementation form can also be flexibly determined according to the actual situation of the beautification operation.
  • the target part can be the eye part;
  • the target part can be the face and the bridge of the nose and other parts that need to be repaired;
  • the target part can be the lip part, etc.
  • the beautification operation can be any operation that performs beautification processing on the target part of the user's image, such as various operations such as eye shadow rendering operation, facial repair operation, or lip makeup 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 of performing beautification processing on the user's target part in the user image; in some possible implementation manners, the beautification operation may also include various input beautification parameters and the like.
  • the beautification parameters may be parameters related to beautification of the target site input by the user, and the implementation form of the beautification parameters may be flexibly determined, such as various parameters such as beautification color, beautification intensity, or transparency.
  • the target location may be the location of the target part in the user's image.
  • the manner of determining the target location is not limited in the embodiments of the present disclosure, and is not limited to the following disclosed embodiments.
  • recognition processing may be performed on the user image to determine the target location.
  • the recognition processing manner is not limited in the embodiments of the present disclosure, for example, key point recognition or direct recognition of the entire target part may be used.
  • Step S12 based on the target position, determine a plurality of target areas to be beautified in the user's image.
  • the area type and area location contained in the target area can be flexibly determined according to the actual situation of the beautification operation. 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 Do limit.
  • the determined multiple target areas can be saved in the form of a mask image (mask).
  • the mask image can be used to determine the position of the target area in the user image.
  • each pixel in the mask image can also have Different transparency, so that the target area has a soft and transitional border. Wherein, the transparency of each pixel in the mask image can be flexibly set according to the actual situation, which is not limited in this embodiment of the present disclosure.
  • the target area may be one or more areas that need to be rendered in eye shadow rendering, such as the base eye shadow area, the base lower eye shadow area, the upper eyelid area, the outer corner area, and the inner eye corner area And 6 areas including the upper right eye shadow area.
  • 2 to 7 show schematic diagrams of mask images of the target area according to an embodiment of the present disclosure.
  • the eye shadow area may be the area between the eyes and the eyebrows.
  • the base lower eye shadow area may be the area under the eye where the lower eyelid is located.
  • the upper eyelid area may be the area above the eyes where the upper eyelid is located.
  • FIG. 1 the eye shadow area
  • the outer corner region may be the region where the corner of the eye near the contour of the face is located.
  • the inner corner region may be closer to the region where the corner of the eye on the nose side is located.
  • the upper outer eye shadow area may be the upper area in the outer corner of the eye.
  • the target area may be an area that needs to be treated in the contouring, such as the forehead area, the nose bridge area, or the mandible area.
  • the target area may be an area in the lip makeup that needs to be applied, such as the upper lip, the lower lip, the center of the lip, or the edge of the lip.
  • the target area since the target area needs to be determined according to the target position, the target area is generally within a certain range of the target part, so multiple target areas may belong to the preset area range of the target part, and the preset area range The size of can be determined according to the actual situation of the target site and target area, which is not limited in this embodiment of the present disclosure.
  • the method of determining multiple target areas according to the target position can be flexibly selected according to the actual situation.
  • multiple target areas can be determined by extending the target position in multiple directions, or a target area near the target position can be determined separately in different layers, etc. , refer to the following disclosed embodiments for details, and will not be expanded here.
  • Step S13 according to the beautification parameters in the beautification operation, perform beautification processing matching the target area on each of the multiple target areas, and obtain multiple beautification results.
  • the beautification parameters corresponding to different target areas can be the same or different, for example, different target areas can correspond to the same or different beautification colors, or different areas can be beautified with the same or different beautification intensities etc., can be flexibly set according to actual conditions, and are not limited to the embodiments of the present disclosure.
  • the beautification result may be a result obtained after the target area is beautified.
  • the manner of beautification processing may also be different. Therefore, corresponding beautification processing may be performed on multiple target areas to obtain multiple beautification 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 beautification results.
  • the target user image may be an image obtained by beautifying the preset area range of the target part of the user image, and the method of generating the target user image may be flexibly determined according to the actual situation, for example, multiple beautification results may be fused to obtain An image of the target user, or a plurality of beautification results are fused with the user image to obtain the image of the target user.
  • multiple beautification 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.
  • multiple target areas to be beautified in the user image are determined based on the target position, and then according to the beautification operation beautification parameters, perform beautification processing on multiple target areas that match the target areas to obtain multiple beautification results, and generate a target user image after beautifying the target parts according to the multiple beautification results.
  • the area to be beautified can be divided into multiple target areas based on the target position of the target part, and these multiple target areas are processed separately to obtain the target user image, thereby realizing independent beautification of multiple areas, improving While beautifying the flexibility, the richness of the beautification effect can also be improved.
  • the eye shadow rendering operation through the method proposed in the embodiment of the present disclosure, multiple target areas of the eye shadow rendering can be processed separately. On the one hand, each target area can be improved separately. The eye shadow rendering accuracy of the area can also make the overall eye shadow effect richer and layered.
  • step S12 may include:
  • N target areas to be beautified in the user image are determined according to the target position.
  • the layer may be any layer having an image processing or editing function, such as an editing layer in an image editing software (Photoshop, PS).
  • the number of multiple layers can be flexibly determined according to the actual situation, and is not limited in the embodiments of the present disclosure.
  • the number of layers can be the same as the number of the target area; in some possible implementations , the number of layers can also be smaller than the number of target areas, in this case, two or more target areas may be determined simultaneously in one or some layers.
  • Copying the user image to multiple layers respectively may be copying the target part and the preset area range of the target part in the user image to multiple layers, or copying the user image as a whole to multiple layers, or It is to directly copy the original layer where the user image is located to multiple layers, etc.
  • multiple layers can be traversed, and each layer traversed can be used as a target layer.
  • N target areas may be determined according to the target position, where N is a positive integer, and N is less than the number of multiple target areas.
  • N can be 1, that is, a target area is determined in each target layer, for example, for the eye shadow rendering operation, the 6 targets to be beautified mentioned in the above disclosed embodiments can be determined Area, in an example, the user image can be copied to 6 layers, and a target area to be beautified is determined in each layer, for example, the basic eye shadow area is determined in the first layer, and in The second layer defines the eye shadow area under the foundation and so on.
  • the number of N can also be an integer greater than 1 and less than the number of target areas.
  • the number of N can also be an integer greater than 1 and less than the number of target areas.
  • six target areas to be beautified can be determined.
  • the user The image is copied to 5 layers. Since the beautification color and beautification method of the base eye shadow area and the base eye shadow area are generally the same, the base eye shadow area and the base eye shadow area can be determined in the first layer, and In the remaining 4 layers, determine a target area and so on.
  • the manner of determining the target area in the target layer can be flexibly determined according to the actual situation of the target area. For details, refer to the following disclosed embodiments, which will not be expanded here.
  • multiple target areas can be determined separately and independently by copying the user image to multiple layers, which facilitates subsequent beautification processing on multiple target areas, improves the flexibility of beautification, and facilitates the The beautification effect of the area is changed to increase the richness of the beautification.
  • N target areas to be beautified in the user image are determined according to the target position, including:
  • the area is extended according to the preset position relationship to obtain N target areas.
  • the preset positional relationship may be an objectively existing positional relationship between the target area and the target part.
  • the preset positional relationship between the eye shadow area and the target part can be within the range of x1-x2 above the target part, and the preset positional relationship between the eye shadow area and the target part can be x3 below the target part Within the range of ⁇ x4, the values of x1, x2, x3 and x4 can be determined according to the actual situation, and are not limited in this embodiment of the present disclosure.
  • the preset positional relationship between other target areas and target parts can be deduced by analogy, and is flexibly determined according to the actual operation of eye shadow rendering, and will not be repeated here.
  • the area After determining the preset positional relationship, in the target layer, with the target position as the center, the area can be extended according to the preset positional relationship to obtain N target areas, wherein, the N target areas determined by the area extension can be Merged into one, or as N separate target areas for subsequent processing.
  • multiple layers may be arranged in a preset order, where the preset order may match the beautification execution order in the beautification operation.
  • the beautification execution sequence may be the beautification processing sequence of different target areas in the beautification operation.
  • the beautification execution order from front to back may be: basic eye shadow area, basic lower eye shadow area, outer upper eye shadow area, Outer eye area, upper eyelid area, and inner eye area.
  • the preset order of layer arrangement matches the beautification execution order, and the matching method can be set according to the actual situation.
  • the layer corresponding to the target area to be beautified first is set as the lowest layer among multiple layers, and the layer corresponding to the target area to be beautified last is set to The corresponding layer is set at the uppermost layer among the plurality of layers. Therefore, in an example, the target areas corresponding to the layers from bottom to top in the eye shadow rendering operation are: the base eye shadow area, the base bottom eye shadow area, the outer upper eye shadow area, the outer corner area, the upper eyelid area, and the inner eye shadow area. Eye area.
  • the beautified target image can be obtained by simulating the actual steps and methods of the beautification operation. images, effectively improving the effect and authenticity of landscaping.
  • step S12 may include:
  • the plurality of preset directions may be the directions of the plurality of target regions relative to the target part, respectively, and the plurality of preset extension ranges may be the extension ranges of the plurality of target regions respectively relative to the target part.
  • the multiple preset extension ranges are all within the preset area range.
  • the positions of multiple target areas can also be determined at the same time according to the preset directions and preset extension ranges between multiple target areas and target parts, so as to improve the convenience of determining the target areas, and then improve the beautification process. Processing efficiency.
  • step S13 may include:
  • Traverse multiple target areas use the traversed target area as the area to be beautified, and obtain the original color of the user image in the area to be beautified;
  • the original color is fused with the beautified color to obtain a beautification result of the area to be beautified.
  • the original color can be the color information of the user image itself. Since the position of the area to be beautified in the user image can be determined by step S12, the user image can be obtained by extracting the color of the user image within the range of the area to be beautified. The original color in the area to be beautified.
  • the beautification color may be a color used for rendering the area to be beautified, and the beautification color may be determined according to a color value or an RGB channel value input by the user during the beautification operation.
  • different target areas can correspond to different beautification parameters, so the beautification color corresponding to the area to be beautified can be determined according to the area type of the area to be beautified, for example, for the base eye shadow area and the base
  • the same beautification color can be used for the lower eye shadow area, and different beautification colors can be used for areas such as the outer corner of the eye, the inner corner of the eye highlight, the upper eyelid or the upper outer eye shadow.
  • the original color and the beautification color may be fused to obtain a beautification result of the area to be beautified, wherein the fusion method may be flexibly selected according to actual conditions. For example, each pixel in the area to be beautified can be traversed, and the original color and beautification color corresponding to each pixel can be added or multiplied to achieve fusion.
  • the beautification color and the mask image corresponding to the area to be beautified can also be mixed in a common way to achieve fusion.
  • each target area can be processed separately according to the beautification colors corresponding to different target areas to obtain the beautification results of each target area, so that different target areas can have different color beautification effects, effectively improving The richness of the overall beautification effect also improves the flexibility of the beautification process.
  • step S14 may include:
  • the multiple layers belonging to the multiple beautification results are superimposed to obtain the target beautification result
  • the target beautification result is fused with the user image to obtain the target user image.
  • multiple target areas may be determined through multiple layers, and correspondingly, multiple obtained beautification results may also respectively belong to multiple layers.
  • the multiple layers can be arranged in a preset order, so the positional relationship of the multiple layers during the superposition process can be consistent with the preset order.
  • the overlay order may be consistent with or different from the preset order.
  • 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.
  • the target beautification result can be fused with the user image to obtain the target user image.
  • the fusion method is also not limited in this embodiment of the disclosure. You can refer to the above-mentioned fusion method of the original color and the beautification color. This will not be repeated here.
  • layers belonging to multiple beautification results can be superimposed according to a preset order to obtain the target beautification result.
  • the beautification effect on the user image can be determined simply and conveniently; Set the order to achieve layer overlay to improve the authenticity of the beautification effect.
  • a target beautification result which may include:
  • the intermediate beautification result is fused with the preset texture material to obtain the target beautification result.
  • the preset texture material can be an additional material for beautifying the target part, and its implementation method can be flexibly changed according to different beautification operations.
  • the preset texture material can include eye shadow powder material
  • the preset texture material can include materials such as matte or high gloss, and for lip makeup operations, the preset texture material can also include materials such as pearlescent, velvet, or matte.
  • the preset texture material and the intermediate beautification result can be superimposed in the form of layers.
  • the layers of the preset texture material can be superimposed Above the layer of the intermediate beautification result to enhance the beautification effect.
  • a target user image in which a preset area of a target part in the user image is beautified can be obtained.
  • Fig. 8 shows a schematic diagram of a user image according to an embodiment of the present disclosure.
  • Figures 9 to 14 show the superimposition effects obtained by superimposing multiple layers of multiple beautification results in a preset order (in order to protect the objects in the images, mosaics are performed on some parts of the faces in each figure deal with).
  • Figure 9 is the first overlay effect obtained after superimposing the beautification results of the eye shadow area on the basis;
  • Figure 10 is the second overlay effect obtained after superimposing the beautification results of the eye shadow area under the foundation on the basis of Figure 9;
  • Figure 11 is On the basis of Figure 10, the third overlay effect is obtained by superimposing the beautification results of the inner corner of the eye;
  • Figure 12 is the fourth superimposition effect obtained after superimposing the beautification results of the outer corner of the eye on the basis of Figure 11;
  • Figure 13 is On the basis of Figure 12, the fifth superimposition effect is obtained by superimposing the beautification result of the upper eyelid area;
  • Fig. 14 is the sixth superimposition effect obtained by superimposing the beautification result of the outer upper eye shadow area on the basis of Fig. 13 .
  • the change of the eye shadow effect is not obvious, but it can still be seen through the comparison that through the method proposed in the embodiment of the present disclosure, the beautification results of different target areas can be superimposed to obtain a more realistic and natural eye shadow rendering effect.
  • FIG. 15 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 the target position of the target part in the user image in response to the beautification operation on the user image.
  • the area determination module 22 is configured to determine multiple target areas to be beautified in the user image based on the target position, wherein the multiple target areas belong to the preset area range of the target part.
  • the beautification module 23 is configured to, according to the beautification parameters in the beautification operation, perform beautification processing matching the target area on each of the multiple target areas to obtain multiple beautification results.
  • the generating module 24 is configured to generate target user images according to multiple beautification results.
  • the area determination module is used to: copy the user image to multiple layers respectively; traverse multiple layers, and use the traversed layer as the target layer; in the target layer, according to The target position is to determine N target areas to be beautified in the user image, where N is a positive integer, and N is smaller than the number of multiple target areas.
  • the area determining module is further used to: obtain the preset positional relationship between the N target areas and the target part; The region is extended to obtain N target regions.
  • multiple layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation.
  • the area determination module is configured to: take the target position as the center, and perform area extension in multiple preset directions respectively according to multiple preset extension ranges, to determine multiple target areas.
  • the beautification module is used to: traverse multiple target areas, use the traversed target area as the area to be beautified, and obtain the original color of the user image in the area to be beautified; based on the beautification in the beautification operation parameter to determine the beautification color corresponding to the area to be beautified; in the area to be beautified, the original color and the beautification color are fused to obtain the beautification result of the area to be beautified.
  • multiple beautification results belong to multiple layers, and the multiple layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation; the generation module is used to : According to the preset sequence, superimpose multiple layers belonging to multiple beautification results to obtain the target beautification result; fuse the target beautification result with the user image to obtain the target user image.
  • the generation module is further used to: superimpose multiple layers belonging to multiple beautification results in a preset order to obtain an intermediate beautification result; fuse the intermediate beautification result with a preset texture material , to get the target beautification result.
  • the target area includes the eye area
  • the beautification operation includes an eye shadow rendering operation
  • the multiple target areas include a basic eye shadow area, a basic lower eye shadow area, an upper eyelid area, an outer corner area, an inner eye corner area, or an outer corner area. At least one of the upper eyeshadow areas.
  • 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, and the target position of the eye part in the user image is determined. According to the target position, the area is extended outward from the eye part to obtain mask images of multiple target areas.
  • mask images of six target areas are respectively obtained, including: the base eye shadow area, the base lower eye shadow area, the upper eyelid area, the outer corner area, the inner eye corner area, and the outer upper eye shadow area.
  • the mask image can match the position of each area in the user image, and the mask image also contains the transparency information of each pixel in the target area, so the mask image has a soft transition boundary, which can simulate the powder in the The smudge effect of the skin.
  • the mask images of the 6 target areas can belong to 6 layers respectively, marked as a, b, c, d, e, and f, where layer a corresponds to the eye shadow area on the basis, and image b
  • the layer corresponds to the base lower eye shadow area
  • the c layer corresponds to the outer upper eye shadow area
  • the d layer corresponds to the outer corner area
  • the e layer corresponds to the upper eyelid area
  • the f layer corresponds to the inner eye corner area.
  • the layers are arranged in the order of a to f from bottom to top, that is, layer a is located at the bottom layer
  • layer f is located at the top layer.
  • the beautification color can be mixed with the mask image in this layer in a normal way.
  • the mixed layers can be marked as aa, bb, cc, dd, ee, and ff respectively, and the obtained
  • the mixed layers of the user image are mixed with the user image in the way of multiplication, and the beautification results of each target area are obtained, which are respectively marked as aaa, bbb, ccc, ddd, eee and fff.
  • the layer to which each beautification result belongs is mixed and superimposed from top to bottom in the order of fff to aaa, and the intermediate target beautification result can be obtained.
  • the image to which each beautification result belongs The order in which layers are superimposed cannot be changed.
  • preset texture materials such as eye shadow loose powder materials
  • the image processing method proposed in the application example of the present disclosure can make the eye shadow effect more natural through multi-level partition rendering, and can realize more parameter definitions. For example, the change of the beautification color of different target areas in the eye shadow, the change of the transparency of the mask image corresponding to different target areas, etc., so that the eye shadow effect is more controllable, and it is convenient for users to customize beautification parameters according to their preferences, and it is also convenient for institutions to use the application examples of this disclosure.
  • the method provides users with richer customization functions.
  • 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. 16 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. 17 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.

Abstract

The present disclosure relates to an image processing method and apparatus, an electronic device and a storage medium. The method comprises: in response to a beautification operation with respect to a user image, determining a target position of a target portion in the user image; determining multiple target areas to be beautified in the user image on the basis of the target position, where the multiple target areas belong to a preset area range of the target portion; performing, according to a beautification parameter in the beautification operation, beautification that matches the target area on each of the multiple target areas to obtain multiple beautification results; and generating a target user image according to the multiple beautification results.

Description

图像处理方法及装置、电子设备和存储介质Image processing method and device, electronic device and storage medium
相关申请的交叉引用Cross References to Related Applications
本公开要求于2021年09月27日提交的、申请号为202111137672.3的中国专利申请的优先权,该申请以引用的方式并入本文中。This disclosure claims the priority of the Chinese patent application with application number 202111137672.3 filed on September 27, 2021, which is incorporated herein by reference.
技术领域technical field
本公开涉及计算机视觉领域,尤其涉及一种图像处理方法及装置、电子设备和存储介质。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.
背景技术Background technique
随着计算机视觉技术的发展,对人脸图像中的眼睛部位进行眼影渲染等操作已愈加广泛应用于图像处理领域。然而,相关的眼影渲染操作中,往往是一次性实现渲染,导致渲染结果较为单调。With the development of computer vision technology, operations such as eye shadow rendering on eye parts in face images have become more and more widely used in the field of image processing. However, in the related eye shadow rendering operation, the rendering is often performed at one time, resulting in relatively monotonous rendering results.
发明内容Contents of the invention
本公开提出了一种图像处理方案。The present disclosure proposes an image processing scheme.
根据本公开的一方面,提供了一种图像处理方法,包括:According to an aspect of the present disclosure, an image processing method is provided, including:
响应于针对用户图像的美化操作,确定所述用户图像中目标部位的目标位置;基于所述目标位置,确定所述用户图像中待进行美化的多个目标区域,其中,所述多个目标区域属于所述目标部位的预设区域范围;根据所述美化操作中的美化参数,对所述多个目标区域中的每个进行与该目标区域匹配的美化处理,得到多个美化结果;根据所述多个美化结果,生成目标用户图像。In response to a beautification operation on the user image, determine a target position of a target part in the user image; based on the target position, determine a plurality of target areas to be beautified in the user image, wherein the plurality of target areas Belonging to the preset area range of the target part; according to the beautification parameters in the beautification operation, performing beautification processing matching the target area on each of the multiple target areas to obtain multiple beautification results; according to the beautification parameters in the beautification operation The above multiple beautification results are used to generate target user images.
在一种可能的实现方式中,所述基于所述目标位置,确定所述用户图像中待进行美化的多个目标区域,包括:将所述用户图像分别复制至多个图层中;遍历所述多个图层,将遍历到的图层作为目标图层;在所述目标图层中,根据所述目标位置,确定所述用户图像中待进行美化的N个目标区域,其中,N为正整数,N小于所述多个目标区域的数量。In a possible implementation manner, the determining multiple target areas to be beautified in the user image based on the target position includes: copying the user image to multiple layers; traversing the A plurality of layers, using the traversed layer as the target layer; in the target layer, according to the target position, determine N target areas to be beautified in the user image, where N is positive An integer, N is less than the number of the plurality of target regions.
在一种可能的实现方式中,所述在所述目标图层中,根据所述目标位置,确定所述用户图像中待进行美化的N个目标区域,包括:获取所述N个目标区域与所述目标部位之间的预设位置关系;在所述目标图层中,以所述目标位置为中心,根据所述预设位置关系进行区域延伸,得到所述N个目标区域。In a possible implementation manner, in the target layer, determining N target areas to be beautified in the user image according to the target position includes: obtaining the N target areas and A preset positional relationship between the target parts; in the target layer, with the target position as the center, area extension is performed according to the preset positional relationship to obtain the N target areas.
在一种可能的实现方式中,所述多个图层按照预设顺序进行图层排列,所述预设顺序与所述美化操作中的美化执行顺序匹配。In a possible implementation manner, the multiple layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation.
在一种可能的实现方式中,所述基于所述目标位置,确定所述用户图像中待进行美化的多个目标区域,包括:以所述目标位置为中心,在多个预设方向上,分别按照多个预设延伸范围进行区域延伸,确定所述多个目标区域。In a possible implementation manner, the determining multiple target areas to be beautified in the user image based on the target position includes: centering on the target position, in multiple preset directions, Perform area extension according to multiple preset extension ranges respectively, and determine the multiple target areas.
在一种可能的实现方式中,所述根据所述美化操作中的美化参数,对所述多个目标区域中的每个进行与该目标区域匹配的美化处理,得到多个美化结果,包括:遍历所述多个目标区域,将遍历到的目标区域作为待美化区域,并获取所述用户图像在所述待美化区域中的原始颜色;基于所述美化操作中的美化参数,确定所述待美化区域对应的美 化颜色;在所述待美化区域中,将所述原始颜色与所述美化颜色进行融合,得到所述待美化区域的美化结果。In a possible implementation manner, according to the beautification parameters in the beautification operation, the beautification process is performed on each of the multiple target areas that matches the target area, and multiple beautification results are obtained, including: Traverse the multiple target areas, use the traversed target area as the area to be beautified, and acquire the original color of the user image in the area to be beautified; determine the to-be-beautified area based on the beautification parameters in the beautification operation A beautification color corresponding to the beautification area; in the area to be beautified, the original color is fused with the beautification color to obtain a beautification result of the area to be beautified.
在一种可能的实现方式中,所述多个美化结果分别属于多个图层,所述多个图层按照预设顺序进行图层排列,所述预设顺序与所述美化操作中的美化执行顺序匹配;所述根据所述多个美化结果,生成目标用户图像,包括:按照所述预设顺序,将所述多个美化结果所属的所述多个图层进行叠加,得到目标美化结果;将所述目标美化结果与所述用户图像进行融合,得到所述目标用户图像。In a possible implementation manner, the multiple beautification results respectively belong to multiple layers, and the multiple layers are arranged in a preset order, and the preset order is the same as the beautification in the beautification operation. Executing sequence matching; said generating the target user image according to the multiple beautification results includes: superimposing the multiple layers to which the multiple beautification results belong according to the preset order to obtain the target beautification result ; Fusing the target beautification result with the user image to obtain the target user image.
在一种可能的实现方式中,所述按照所述预设顺序,将所述多个美化结果所属的所述多个图层进行叠加,得到目标美化结果,包括:按照所述预设顺序,将所述多个美化结果所属的所述多个图层进行叠加,得到中间美化结果;将所述中间美化结果与预设纹理素材进行融合,得到所述目标美化结果。In a possible implementation manner, the superimposing the multiple layers to which the multiple beautification results belong according to the preset order to obtain the target beautification result includes: according to the preset order, The multiple layers to which the multiple beautification results belong are superimposed to obtain an intermediate beautification result; the intermediate beautification result is fused with a preset texture material to obtain the target beautification result.
在一种可能的实现方式中,所述目标部位包括眼睛部位,所述美化操作包括眼影渲染操作;所述多个目标区域包括基础上眼影区域、基础下眼影区域、上眼皮区域、外眼角区域、内眼角区域或外上眼影区域中的至少一种。In a possible implementation manner, the target part includes an eye part, and the beautification operation includes an eye shadow rendering operation; the multiple target areas include a basic eye shadow area, a basic lower eye shadow area, an upper eyelid area, and an outer corner area , at least one of the inner eye corner area or the outer upper eye shadow area.
根据本公开的一方面,提供了一种图像处理装置,包括:According to an aspect of the present disclosure, an image processing device is provided, including:
确定模块,用于响应于针对用户图像的美化操作,确定所述用户图像中目标部位的目标位置;区域确定模块,用于基于所述目标位置,确定所述用户图像中待进行美化的多个目标区域,其中,所述多个目标区域属于所述目标部位的预设区域范围;美化模块,用于根据所述美化操作中的美化参数,对所述多个目标区域中的每个进行与该目标区域匹配的美化处理,得到多个美化结果;生成模块,用于根据所述多个美化结果,生成目标用户图像。A determination module, configured to determine a target position of a target part in the user image in response to a beautification operation on the user image; an area determination module, configured to determine a plurality of target parts to be beautified in the user image based on the target position The target area, wherein the multiple target areas belong to the preset area range of the target part; the beautification module is configured to compare each of the multiple target areas according to the beautification parameters in the beautification operation The beautification processing of the target area matching obtains multiple beautification results; the generating module is configured to generate a target user image according to the multiple beautification results.
在一种可能的实现方式中,所述区域确定模块用于:将所述用户图像分别复制至多个图层中;遍历所述多个图层,将遍历到的图层作为目标图层;在所述目标图层中,根据所述目标位置,确定所述用户图像中待进行美化的N个目标区域,其中,N为正整数,N小于所述多个目标区域的数量。In a possible implementation manner, the area determination module is configured to: respectively copy the user image to multiple layers; traverse the multiple layers, and use the traversed layer as the target layer; In the target layer, N target areas to be beautified in the user image are determined according to the target positions, where N is a positive integer and N is smaller than the number of the multiple target areas.
在一种可能的实现方式中,所述区域确定模块进一步用于:获取所述N个目标区域与所述目标部位之间的预设位置关系;在所述目标图层中,以所述目标位置为中心,根据所述预设位置关系进行区域延伸,得到所述N个目标区域。In a possible implementation manner, the area determination module is further configured to: obtain preset positional relationships between the N target areas and the target parts; The location is the center, and the region is extended according to the preset position relationship to obtain the N target regions.
在一种可能的实现方式中,所述多个图层按照预设顺序进行图层排列,所述预设顺序与所述美化操作中的美化执行顺序匹配。In a possible implementation manner, the multiple layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation.
在一种可能的实现方式中,所述区域确定模块用于:以所述目标位置为中心,在多个预设方向上,分别按照多个预设延伸范围进行区域延伸,确定所述多个目标区域。In a possible implementation manner, the area determining module is configured to: take the target position as the center, perform area extension in multiple preset directions respectively according to multiple preset extension ranges, and determine the multiple target area.
在一种可能的实现方式中,所述美化模块用于:遍历所述多个目标区域,将遍历到的目标区域作为待美化区域,并获取所述用户图像在所述待美化区域中的原始颜色;基于所述美化操作中的美化参数,确定所述待美化区域对应的美化颜色;在所述待美化区域中,将所述原始颜色与所述美化颜色进行融合,得到所述待美化区域的美化结果。In a possible implementation manner, the beautification module is configured to: traverse the multiple target areas, use the traversed target area as the area to be beautified, and obtain the original image of the user image in the area to be beautified. Color; based on the beautification parameters in the beautification operation, determine the beautification color corresponding to the area to be beautified; in the area to be beautified, fuse the original color and the beautification color to obtain the area to be beautified beautification results.
在一种可能的实现方式中,所述多个美化结果分别属于多个图层,所述多个图层按照预设顺序进行图层排列,所述预设顺序与所述美化操作中的美化执行顺序匹配;所述生成模块用于:按照所述预设顺序,将所述多个美化结果所属的所述多个图层进行叠加,得到目标美化结果;将所述目标美化结果与所述用户图像进行融合,得到所述目标用户图像。In a possible implementation manner, the multiple beautification results respectively belong to multiple layers, and the multiple layers are arranged in a preset order, and the preset order is the same as the beautification in the beautification operation. Executing sequence matching; the generation module is configured to: superimpose the multiple layers to which the multiple beautification results belong according to the preset order to obtain a target beautification result; combine the target beautification result with the The user images are fused to obtain the target user image.
在一种可能的实现方式中,所述生成模块进一步用于:按照所述预设顺序,将所述 多个美化结果所属的所述多个图层进行叠加,得到中间美化结果;将所述中间美化结果与预设纹理素材进行融合,得到所述目标美化结果。In a possible implementation manner, the generation module is further configured to: superimpose the multiple layers to which the multiple beautification results belong according to the preset order to obtain an intermediate beautification result; The intermediate beautification result is fused with the preset texture material to obtain the target beautification result.
在一种可能的实现方式中,所述目标部位包括眼睛部位,所述美化操作包括眼影渲染操作;所述多个目标区域包括基础上眼影区域、基础下眼影区域、上眼皮区域、外眼角区域、内眼角区域或外上眼影区域中的至少一种。In a possible implementation manner, the target part includes an eye part, and the beautification operation includes an eye shadow rendering operation; the multiple target areas include a basic eye shadow area, a basic lower eye shadow area, an upper eyelid area, and an outer corner area , at least one of the inner eye corner area or the outer upper eye shadow area.
根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行上述图像处理方法。According to an aspect of the present disclosure, an electronic device is provided, 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 one aspect of the present disclosure, there is provided 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.
在本公开实施例中,通过响应于针对用户图像的美化操作,确定用户图像中目标部位的目标位置,从而基于目标位置来确定用户图像中待进行美化的多个目标区域,继而根据美化操作中的美化参数,对多个目标区域分别进行与目标区域匹配的美化处理来得到多个美化结果,并根据多个美化结果来生成对目标部位进行美化后的目标用户图像。通过上述过程,可以基于目标部位的目标位置,来将待美化的区域划分为多个目标区域,并对这多个目标区域分别进行处理来得到目标用户图像,从而实现多区域的独立美化,提升美化灵活性的同时,还可以提升美化效果的丰富度,比如对于眼影渲染操作,通过本公开实施例提出的方法,可以对眼影渲染的多个目标区域分别进行处理,一方面可以分别提升各目标区域的眼影渲染精度,另一方面也可以使得整体的眼影效果更加丰富和具有层次感。In the embodiment of the present disclosure, by determining the target position of the target part in the user image in response to the beautification operation on the user image, multiple target areas to be beautified in the user image are determined based on the target position, and then according to the beautification operation beautification parameters, perform beautification processing on multiple target areas that match the target areas to obtain multiple beautification results, and generate a target user image after beautifying the target parts according to the multiple beautification results. Through the above process, the area to be beautified can be divided into multiple target areas based on the target position of the target part, and these multiple target areas are processed separately to obtain the target user image, thereby realizing independent beautification of multiple areas, improving While beautifying the flexibility, the richness of the beautification effect can also be improved. For example, for the eye shadow rendering operation, through the method proposed in the embodiment of the present disclosure, multiple target areas of eye shadow rendering can be processed separately. On the one hand, each target area can be improved separately. The eye shadow rendering accuracy of the region can also make the overall eye shadow effect richer and more layered.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.
图1示出根据本公开一实施例的图像处理方法的流程图。Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
图2示出根据本公开一实施例的目标区域的掩模图像示意图。FIG. 2 shows a schematic diagram of a mask image of a target area according to an embodiment of the present disclosure.
图3示出根据本公开一实施例的目标区域的掩模图像示意图。FIG. 3 shows a schematic diagram of a mask image of a target region according to an embodiment of the present disclosure.
图4示出根据本公开一实施例的目标区域的掩模图像示意图。FIG. 4 shows a schematic diagram of a mask image of a target region according to an embodiment of the present disclosure.
图5示出根据本公开一实施例的目标区域的掩模图像示意图。FIG. 5 shows a schematic diagram of a mask image of a target area according to an embodiment of the present disclosure.
图6示出根据本公开一实施例的目标区域的掩模图像示意图。FIG. 6 shows a schematic diagram of a mask image of a target region according to an embodiment of the present disclosure.
图7示出根据本公开一实施例的目标区域的掩模图像示意图。FIG. 7 shows a schematic diagram of a mask image of a target area according to an embodiment of the present disclosure.
图8示出根据本公开一实施例的用户图像的示意图。Fig. 8 shows a schematic diagram of a user image according to an embodiment of the present disclosure.
图9示出按照预设顺序对多个美化结果所属的多个图层进行叠加所得到的叠加效果。FIG. 9 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
图10示出按照预设顺序对多个美化结果所属的多个图层进行叠加所得到的叠加效果。FIG. 10 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
图11示出按照预设顺序对多个美化结果所属的多个图层进行叠加所得到的叠加效果。FIG. 11 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
图12示出按照预设顺序对多个美化结果所属的多个图层进行叠加所得到的叠加效果。FIG. 12 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
图13示出按照预设顺序对多个美化结果所属的多个图层进行叠加所得到的叠加效果。FIG. 13 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
图14示出按照预设顺序对多个美化结果所属的多个图层进行叠加所得到的叠加效果。FIG. 14 shows an overlay effect obtained by overlaying multiple layers to which multiple beautification results belong according to a preset order.
图15示出根据本公开一实施例的图像处理装置的框图。FIG. 15 shows a block diagram of an image processing device according to an embodiment of the present disclosure.
图16示出根据本公开实施例的一种电子设备的框图。FIG. 16 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
图17示出根据本公开实施例的一种电子设备的框图。FIG. 17 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While various aspects of the embodiments are shown in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在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.
如图1所示,在一种可能的实现方式中,所述图像处理方法可以包括:As shown in Figure 1, in a possible implementation, the image processing method may include:
步骤S11,响应于针对用户图像的美化操作,确定用户图像中目标部位的目标位置。Step S11, in response to the beautification operation on the user image, determine the target position of the target part in the user image.
其中,用户图像可以是包含用户目标部位的任意图像,用户图像中可以包含一个或多个用户,也可以包含一个或多个用户的目标部位,其实现形式可以根据实际情况灵活决定,在本公开实施例中不做限制。Wherein, the user image can be any image containing the target part of the user, and the user image can contain one or more users, and can also contain one or more target parts of the user, and its implementation form can be flexibly determined according to the actual situation. In this disclosure There are no limitations in the examples.
目标部位可以是用户图像中需要进行美化的任意部位,目标部位包含哪些部位,其 实现形式同样可以根据美化操作的实际情况灵活决定,比如针对于眼影渲染的美化操作,目标部位可以是眼睛部位;针对于修容操作的美化操作,目标部位可以是面部以及鼻梁等具有修容需求的部位等;针对于唇妆的美化操作,目标部位可以是嘴唇部位等。The target part can be any part in the user's image that needs to be beautified. Which parts are included in the target part, the implementation form can also be flexibly determined according to the actual situation of the beautification operation. For example, for the beautification operation of eye shadow rendering, the target part can be the eye part; For the beautification operation of the cosmetic operation, the target part can be the face and the bridge of the nose and other parts that need to be repaired; for the beautification operation of the lip makeup, the target part can be the lip part, etc.
美化操作,可以是对用户图像的目标部位进行美化处理的任意操作,比如眼影渲染操作、修容操作或唇妆操作等各类操作。美化操作包含的操作内容可以根据实际情况灵活决定,不局限于下述各公开实施例。在一种可能的实现方式中,该美化操作可以包括对用户图像中用户的目标部位进行美化处理的操作;在一些可能的实现方式中,该美化操作还可以包括输入的各类美化参数等。The beautification operation can be any operation that performs beautification processing on the target part of the user's image, such as various operations such as eye shadow rendering operation, facial repair operation, or lip makeup 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 of performing beautification processing on the user's target part in the user image; in some possible implementation manners, the beautification operation may also include various input beautification parameters and the like.
美化参数可以是用户输入的,对目标部位进行美化的相关参数,该美化参数的实现形式可以灵活决定,比如美化颜色、美化强度或是透明度等各类参数。The beautification parameters may be parameters related to beautification of the target site input by the user, and the implementation form of the beautification parameters may be flexibly determined, such as various parameters such as beautification color, beautification intensity, or transparency.
目标位置可以是目标部位在用户图像中的位置。确定目标位置的方式在本公开实施例中不做限制,不局限于下述各公开实施例。在一种可能的实现方式中,可以对用户图像进行识别处理以确定目标位置。其中,识别处理的方式在本公开实施例中不做限制,比如可以为关键点识别或是对目标部位整体进行直接识别等。The target location may be the location of the target part in the user's image. The manner of determining the target location is not limited in the embodiments of the present disclosure, and is not limited to the following disclosed embodiments. In a possible implementation, recognition processing may be performed on the user image to determine the target location. Wherein, the recognition processing manner is not limited in the embodiments of the present disclosure, for example, key point recognition or direct recognition of the entire target part may be used.
步骤S12,基于目标位置,确定用户图像中待进行美化的多个目标区域。Step S12, based on the target position, determine a plurality of target areas to be beautified in the user's image.
其中,目标区域包含的区域类型与区域位置等,均可以根据美化操作的实际情况灵活决定,多个目标区域之间可以存在重叠区域,也可以彼此之间相互独立,在本公开实施例中不做限制。Among them, the area type and area location contained in the target area can be flexibly determined according to the actual situation of the beautification operation. 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 Do limit.
确定的多个目标区域可以保存为掩模图像(mask)的形式,该掩模图像一方面可以用于确定目标区域在用户图像中的位置,另一方面掩模图像中各像素点还可以具有不同的透明度,从而使得目标区域具有柔和过度的边界。其中,掩模图像中各像素点的透明度可以根据实际情况灵活设定,在本公开实施例中不做限定。The determined multiple target areas can be saved in the form of a mask image (mask). On the one hand, the mask image can be used to determine the position of the target area in the user image. On the other hand, each pixel in the mask image can also have Different transparency, so that the target area has a soft and transitional border. Wherein, the transparency of each pixel in the mask image can be flexibly set according to the actual situation, which is not limited in this embodiment of the present disclosure.
在一个示例中,针对眼影渲染的美化操作,目标区域可以是眼影渲染中需要渲染的一个或多个区域,比如基础上眼影区域、基础下眼影区域、上眼皮区域、外眼角区域、内眼角区域以及右上眼影区域等6个区域。图2至图7示出根据本公开一实施例的目标区域的掩模图像示意图,如图2所示,基础上眼影区域可以为位于眼睛和眉毛之间的区域。如图3所示,基础下眼影区域可以为眼睛下方下眼皮所在的区域。如图4所示,上眼皮区域可以为眼睛上方上眼皮所在的区域。如图5所示,外眼角区域可以为靠近面部轮廓侧的眼角所在的区域。如图6所示,内眼角区域可以靠近鼻子侧的眼角所在的区域。如图7所示,外上眼影区域可以为外眼角中的上方区域。In an example, for the beautification operation of eye shadow rendering, the target area may be one or more areas that need to be rendered in eye shadow rendering, such as the base eye shadow area, the base lower eye shadow area, the upper eyelid area, the outer corner area, and the inner eye corner area And 6 areas including the upper right eye shadow area. 2 to 7 show schematic diagrams of mask images of the target area according to an embodiment of the present disclosure. As shown in FIG. 2 , basically the eye shadow area may be the area between the eyes and the eyebrows. As shown in Figure 3, the base lower eye shadow area may be the area under the eye where the lower eyelid is located. As shown in FIG. 4 , the upper eyelid area may be the area above the eyes where the upper eyelid is located. As shown in FIG. 5 , the outer corner region may be the region where the corner of the eye near the contour of the face is located. As shown in FIG. 6 , the inner corner region may be closer to the region where the corner of the eye on the nose side is located. As shown in Figure 7, the upper outer eye shadow area may be the upper area in the outer corner of the eye.
在一些可能的实现方式中,针对面部修容的美化操作,目标区域可以是修容中需要进行处理的区域,比如额头区域、鼻梁区域或是下颚骨区域等。在一些可能的实现方式中,针对唇妆操作的美化操作,目标区域可以是唇妆中需要上妆的区域,比如上嘴唇、下嘴唇、嘴唇中心或嘴唇边沿等。In some possible implementation manners, for the beautification operation of facial contouring, the target area may be an area that needs to be treated in the contouring, such as the forehead area, the nose bridge area, or the mandible area. In some possible implementation manners, for the beautification operation of the lip makeup operation, the target area may be an area in the lip makeup that needs to be applied, such as the upper lip, the lower lip, the center of the lip, or the edge of the lip.
在一些可能的实现方式中,由于目标区域需要根据目标位置所确定,因此目标区域一般在目标部位的一定范围以内,故多个目标区域可以属于目标部位的预设区域范围,该预设区域范围的大小可以根据目标部位和目标区域的实际情况所确定,在本公开实施例中不做限制。In some possible implementations, since the target area needs to be determined according to the target position, the target area is generally within a certain range of the target part, so multiple target areas may belong to the preset area range of the target part, and the preset area range The size of can be determined according to the actual situation of the target site and target area, which is not limited in this embodiment of the present disclosure.
根据目标位置确定多个目标区域的方式可以根据实际情况灵活选择,比如可以通过对目标位置进行多方向延伸确定多个目标区域,或者在不同图层中,分别确定目标位置附近的一个目标区域等,详见下述各公开实施例,在此先不做展开。The method of determining multiple target areas according to the target position can be flexibly selected according to the actual situation. For example, multiple target areas can be determined by extending the target position in multiple directions, or a target area near the target position can be determined separately in different layers, etc. , refer to the following disclosed embodiments for details, and will not be expanded here.
步骤S13,根据美化操作中的美化参数,对多个目标区域中的每个进行与该目标区 域匹配的美化处理,得到多个美化结果。Step S13, according to the beautification parameters in the beautification operation, perform beautification processing matching the target area on each of the multiple target areas, and obtain multiple beautification results.
其中,美化参数的实现形式可以参考上述各公开实施例,在此不再赘述。对于多个目标区域来说,不同目标区域对应的美化参数可以相同,也可以不同,比如不同的目标区域可以对应相同或不同的美化颜色,或是不同区域可以采用相同或不同的美化强度进行美化等,可以根据实际情况进行灵活设定,不局限于本公开各实施例。For the implementation form of the beautification parameters, reference may be made to the above-mentioned disclosed embodiments, which will not be repeated here. For multiple target areas, the beautification parameters corresponding to different target areas can be the same or different, for example, different target areas can correspond to the same or different beautification colors, or different areas can be beautified with the same or different beautification intensities etc., can be flexibly set according to actual conditions, and are not limited to the embodiments of the present disclosure.
美化结果可以是目标区域经过美化处理后所得到的结果。随着目标区域的不同,美化处理的方式也可能不同,因此可以分别对多个目标区域进行相应的美化处理,以得到多个美化结果。步骤S13的一些可能的实现方式可以详见下述各公开实施例,在此先不做展开。The beautification result may be a result obtained after the target area is beautified. Depending on the target area, the manner of beautification processing may also be different. Therefore, corresponding beautification processing may be performed on multiple target areas to obtain multiple beautification results. For some possible implementation manners of step S13, reference may be made to the following disclosed embodiments in detail, which will not be expanded here.
步骤S14,根据多个美化结果,生成目标用户图像。Step S14, generating target user images according to multiple beautification results.
其中,目标用户图像,可以是对用户图像的目标部位的预设区域范围进行美化所得到的图像,生成目标用户图像的方式可以根据实际情况灵活决定,比如可以将多个美化结果进行融合以得到目标用户图像,或是将多个美化结果与用户图像进行融合以得到目标用户图像。在一些可能的实现方式中,多个美化结果也可以分别属于多个图层,在这种情况下,可以通过图层叠加以得到目标用户图像。Wherein, the target user image may be an image obtained by beautifying the preset area range of the target part of the user image, and the method of generating the target user image may be flexibly determined according to the actual situation, for example, multiple beautification results may be fused to obtain An image of the target user, or a plurality of beautification results are fused with the user image to obtain the image of the target user. In some possible implementation manners, multiple beautification results may also respectively belong to multiple layers. In this case, the target user image may be obtained by superimposing the layers.
步骤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 determining the target position of the target part in the user image in response to the beautification operation on the user image, multiple target areas to be beautified in the user image are determined based on the target position, and then according to the beautification operation beautification parameters, perform beautification processing on multiple target areas that match the target areas to obtain multiple beautification results, and generate a target user image after beautifying the target parts according to the multiple beautification results. Through the above process, the area to be beautified can be divided into multiple target areas based on the target position of the target part, and these multiple target areas are processed separately to obtain the target user image, thereby realizing independent beautification of multiple areas, improving While beautifying the flexibility, the richness of the beautification effect can also be improved. For example, for the eye shadow rendering operation, through the method proposed in the embodiment of the present disclosure, multiple target areas of the eye shadow rendering can be processed separately. On the one hand, each target area can be improved separately. The eye shadow rendering accuracy of the area can also make the overall eye shadow effect richer and layered.
在一种可能的实现方式中,步骤S12可以包括:In a possible implementation manner, step S12 may include:
将用户图像分别复制至多个图层中;Copy user images to multiple layers respectively;
遍历多个图层,将遍历到的图层作为目标图层;Traverse multiple layers, and use the traversed layer as the target layer;
在目标图层中,根据目标位置,确定用户图像中待进行美化的N个目标区域。In the target layer, N target areas to be beautified in the user image are determined according to the target position.
其中,图层可以是具有图像处理或编辑功能的任意图层,比如图像编辑软件(Photoshop,PS)中的编辑图层。Wherein, the layer may be any layer having an image processing or editing function, such as an editing layer in an image editing software (Photoshop, PS).
多个图层的数量可以根据实际情况灵活决定,在本公开实施例中不做限制,在一些可能的实现方式中,图层的数量可以与目标区域的数量相同;在一些可能的实现方式中,图层的数量也可以小于目标区域的数量,在这种情况下,可能在某个或某些图层中,同时确定两个或两个以上的目标区域。The number of multiple layers can be flexibly determined according to the actual situation, and is not limited in the embodiments of the present disclosure. In some possible implementations, the number of layers can be the same as the number of the target area; in some possible implementations , the number of layers can also be smaller than the number of target areas, in this case, two or more target areas may be determined simultaneously in one or some layers.
将用户图像分别复制至多个图层中,可以是将用户图像中的目标部位以及目标部位的预设区域范围复制至多个图层中,也可以是将用户图像整体复制至多个图层中,或是直接将用户图像所在的原始图层复制至多个图层中等。Copying the user image to multiple layers respectively, may be copying the target part and the preset area range of the target part in the user image to multiple layers, or copying the user image as a whole to multiple layers, or It is to directly copy the original layer where the user image is located to multiple layers, etc.
在通过复制得到多个图层后,可以对多个图层进行遍历,并将遍历到的每个图层作为目标图层。After multiple layers are obtained by copying, multiple layers can be traversed, and each layer traversed can be used as a target layer.
在每个目标图层中,可以根据目标位置来确定N个目标区域,其中,N为正整数,且N小于多个目标区域的数量。In each target layer, N target areas may be determined according to the target position, where N is a positive integer, and N is less than the number of multiple target areas.
在一种可能的实现方式中,N可以为1,即在每个目标图层中分别确定一个目标区域,比如对于眼影渲染操作,可以确定上述公开实施例中提到的6个待美化的目标区域,在一个示例中,可以将用户图像复制到6个图层中,并在每个图层分别确定1个待美化的目标区域,比如在第一个图层中确定基础上眼影区域,在第二个图层中确定基础下眼影区域等等。In a possible implementation, N can be 1, that is, a target area is determined in each target layer, for example, for the eye shadow rendering operation, the 6 targets to be beautified mentioned in the above disclosed embodiments can be determined Area, in an example, the user image can be copied to 6 layers, and a target area to be beautified is determined in each layer, for example, the basic eye shadow area is determined in the first layer, and in The second layer defines the eye shadow area under the foundation and so on.
在一种可能的实现方式中,N的数量也可以为大于1且小于目标区域的数量的整数,比如对于眼影渲染操作,可以确定6个待美化的目标区域,在一个示例中,可以将用户图像复制到5个图层中,由于基础上眼影区域和基础下眼影区域的美化颜色和美化处理方式一般相同,因此可以在第一个图层中确定基础上眼影区域和基础下眼影区域,并在剩余的4个图层中,各确定一个目标区域等。In a possible implementation, the number of N can also be an integer greater than 1 and less than the number of target areas. For example, for the eye shadow rendering operation, six target areas to be beautified can be determined. In one example, the user The image is copied to 5 layers. Since the beautification color and beautification method of the base eye shadow area and the base eye shadow area are generally the same, the base eye shadow area and the base eye shadow area can be determined in the first layer, and In the remaining 4 layers, determine a target area and so on.
在目标图层中确定目标区域的方式可以根据目标区域的实际情况灵活决定,详见下述各公开实施例,在此先不做展开。The manner of determining the target area in the target layer can be flexibly determined according to the actual situation of the target area. For details, refer to the following disclosed embodiments, which will not be expanded here.
根据本公开实施例,可以通过将用户图像复制至多个图层,分别且独立地确定多个目标区域,便于后续对多个目标区域分别进行美化处理,提升美化的灵活性,也便于对各目标区域的美化效果进行更改,提升美化的丰富程度。According to the embodiment of the present disclosure, multiple target areas can be determined separately and independently by copying the user image to multiple layers, which facilitates subsequent beautification processing on multiple target areas, improves the flexibility of beautification, and facilitates the The beautification effect of the area is changed to increase the richness of the beautification.
在一种可能的实现方式中,在目标图层中,根据目标位置,确定用户图像中待进行美化的N个目标区域,包括:In a possible implementation manner, in the target layer, N target areas to be beautified in the user image are determined according to the target position, including:
获取N个目标区域与目标部位之间的预设位置关系;Acquiring preset positional relationships between N target areas and target parts;
在目标图层中,以目标位置为中心,根据预设位置关系进行区域延伸,得到N个目标区域。In the target layer, with the target position as the center, the area is extended according to the preset position relationship to obtain N target areas.
其中,预设位置关系可以是目标区域与目标部位之间客观存在的位置关系。比如基础上眼影区域与目标部位之间的预设位置关系可以是在目标部位上方的x1~x2范围以内,基础下眼影区域与目标部位之间的预设位置关系可以是在目标部位下方的x3~x4范围以内,其中x1、x2、x3和x4的值均可以根据实际情况所决定,在本公开实施例中不做限制。其他目标区域与目标部位之间的预设位置关系可以以此类推,根据眼影渲染的实际操作情况所灵活决定,在此不再一一赘述。Wherein, the preset positional relationship may be an objectively existing positional relationship between the target area and the target part. For example, the preset positional relationship between the eye shadow area and the target part can be within the range of x1-x2 above the target part, and the preset positional relationship between the eye shadow area and the target part can be x3 below the target part Within the range of ~x4, the values of x1, x2, x3 and x4 can be determined according to the actual situation, and are not limited in this embodiment of the present disclosure. The preset positional relationship between other target areas and target parts can be deduced by analogy, and is flexibly determined according to the actual operation of eye shadow rendering, and will not be repeated here.
在N大于1的情况下,获取到的预设位置关系的数量也可以为N个,在这种情况下,可以将N个预设位置关系合并为一个预设位置关系,也可以分别基于N个预设位置关系进行后续处理。In the case where N is greater than 1, the number of acquired preset positional relationships can also be N. In this case, the N preset positional relationships can be combined into one preset positional relationship, or can be based on N A preset positional relationship is used for subsequent processing.
在确定预设位置关系后,可以在目标图层中,以目标位置为中心,根据预设位置关系进行区域延伸来得到N个目标区域,其中,通过区域延伸所确定的N个目标区域,可以合并为一个,也可以作为N个单独的目标区域以待后续处理。After determining the preset positional relationship, in the target layer, with the target position as the center, the area can be extended according to the preset positional relationship to obtain N target areas, wherein, the N target areas determined by the area extension can be Merged into one, or as N separate target areas for subsequent processing.
通过本公开实施例,可以在目标图层中,根据预设位置关系快速便捷地确定目标区域,提升目标区域的确定效率,继而提升整个美化过程的处理效率。Through the embodiments of the present disclosure, the target area can be quickly and conveniently determined according to the preset position relationship in the target layer, thereby improving the efficiency of determining the target area, and then improving the processing efficiency of the entire beautification process.
在一种可能的实现方式中,多个图层可以按照预设顺序进行图层排列,其中预设顺序可以与美化操作中的美化执行顺序匹配。In a possible implementation manner, multiple layers may be arranged in a preset order, where the preset order may match the beautification execution order in the beautification operation.
其中,美化执行顺序可以是美化操作中对不同目标区域的美化处理顺序,比如眼影渲染操作中,美化执行顺序从前到后可以依次为:基础上眼影区域、基础下眼影区域、外上眼影区域、外眼角区域、上眼皮区域以及内眼角区域。Wherein, the beautification execution sequence may be the beautification processing sequence of different target areas in the beautification operation. For example, in the eye shadow rendering operation, the beautification execution order from front to back may be: basic eye shadow area, basic lower eye shadow area, outer upper eye shadow area, Outer eye area, upper eyelid area, and inner eye area.
图层排列的预设顺序与美化执行顺序匹配,其匹配方式可以根据实际情况进行设定。在一种可能的实现方式中,可以是按照美化执行的先后顺序,将最先进行美化的目标区域所对应的图层设置在多个图层中的最下层,将最后进行美化的目标区域所对应的图层设置在多个图层中的最上层。因此,在一个示例中,眼影渲染操作中从下往上的图层所对应的目标区域依次为:基础上眼影区域、基础下眼影区域、外上眼影区域、外眼角区域、上眼皮区域以及内眼角区域。The preset order of layer arrangement matches the beautification execution order, and the matching method can be set according to the actual situation. In a possible implementation manner, according to the order of beautification execution, the layer corresponding to the target area to be beautified first is set as the lowest layer among multiple layers, and the layer corresponding to the target area to be beautified last is set to The corresponding layer is set at the uppermost layer among the plurality of layers. Therefore, in an example, the target areas corresponding to the layers from bottom to top in the eye shadow rendering operation are: the base eye shadow area, the base bottom eye shadow area, the outer upper eye shadow area, the outer corner area, the upper eyelid area, and the inner eye shadow area. Eye area.
通过本公开实施例,通过按照与美化操作中的美化执行顺序匹配的预设顺序,对多个图层进行图层排列,可以通过模拟美化操作的实际步骤和手法,来得到美化后的目标用图像,有效提升美化的效果和真实性。Through the embodiments of the present disclosure, by arranging multiple layers according to the preset order that matches the beautification execution order in the beautification operation, the beautified target image can be obtained by simulating the actual steps and methods of the beautification operation. images, effectively improving the effect and authenticity of landscaping.
在一种可能的实现方式中,步骤S12可以包括:In a possible implementation manner, step S12 may include:
以目标位置为中心,在多个预设方向上,分别按照多个预设延伸范围进行区域延伸,确定多个目标区域。Taking the target position as the center, in multiple preset directions, area extension is carried out according to multiple preset extension ranges respectively, and multiple target areas are determined.
其中,多个预设方向可以是多个目标区域分别相对于目标部位的方向,多个预设延伸范围可以是多个目标区域分别相对于目标部位的延伸范围。其中,由于多个目标区域均属于目标部位的预设区域范围,因此多个预设延伸范围均在预设区域范围以内。Wherein, the plurality of preset directions may be the directions of the plurality of target regions relative to the target part, respectively, and the plurality of preset extension ranges may be the extension ranges of the plurality of target regions respectively relative to the target part. Wherein, since the multiple target areas all belong to the preset area range of the target part, the multiple preset extension ranges are all within the preset area range.
通过本公开实施例,也可以根据多个目标区域与目标部位之间的预设方向和预设延伸范围,同时确定多个目标区域的位置,提升确定目标区域的便捷程度,继而提升美化过程的处理效率。Through the embodiments of the present disclosure, the positions of multiple target areas can also be determined at the same time according to the preset directions and preset extension ranges between multiple target areas and target parts, so as to improve the convenience of determining the target areas, and then improve the beautification process. Processing efficiency.
在一种可能的实现方式中,步骤S13可以包括:In a possible implementation, step S13 may include:
遍历多个目标区域,将遍历到的目标区域作为待美化区域,并获取用户图像在待美化区域中的原始颜色;Traverse multiple target areas, use the traversed target area as the area to be beautified, and obtain the original color of the user image in the area to be beautified;
基于美化操作中的美化参数,确定待美化区域对应的美化颜色;Based on the beautification parameters in the beautification operation, determine the beautification color corresponding to the area to be beautified;
在待美化区域中,将原始颜色与美化颜色进行融合,得到待美化区域的美化结果。In the area to be beautified, the original color is fused with the beautified color to obtain a beautification result of the area to be beautified.
其中,待美化区域可以是在遍历目标区域的过程中,被遍历到的目标区域。在一种可能的实现方式中,由于多个目标区域可以是分别在多个图层中所确定的,因此也可以通过遍历多个图层,来实现对多个目标区域的遍历,而后续在待美化区域中将原始颜色与美化颜色进行融合的过程,也可以在待美化区域所属的图层中所进行,在这种情况下,得到多个美化结果可以分别属于多个图层。Wherein, the area to be beautified may be a target area traversed during the process of traversing the target area. In a possible implementation manner, since multiple target areas can be determined in multiple layers respectively, it is also possible to traverse multiple layers to achieve traversal of multiple target areas, and subsequently in The process of fusing the original color and the beautified color in the area to be beautified can also be performed in the layer to which the area to be beautified belongs. In this case, multiple beautification results obtained can belong to multiple layers.
原始颜色可以是用户图像本身的颜色信息,由于待美化区域在用户图像中的位置可以通过步骤S12确定,因此,在待美化区域的区域范围内对用户图像的颜色进行提取,即可得到用户图像在待美化区域中的原始颜色。The original color can be the color information of the user image itself. Since the position of the area to be beautified in the user image can be determined by step S12, the user image can be obtained by extracting the color of the user image within the range of the area to be beautified. The original color in the area to be beautified.
美化颜色可以是用于对待美化区域进行渲染的颜色,该美化颜色可以根据美化操作中用户输入的颜色值或RGB通道值等确定。如上述公开实施例所述,不同的目标区域可以对应不同的美化参数,因此可以根据待美化区域的区域类型,确定待美化区域所对应的美化颜色,举例来说,对于基础上眼影区域和基础下眼影区域,可以采用相同的美化颜色,而对于外眼角、内眼角高光、上眼皮或外上眼影等区域,则可以对应不同的美化颜色。The beautification color may be a color used for rendering the area to be beautified, and the beautification color may be determined according to a color value or an RGB channel value input by the user during the beautification operation. As described in the above disclosed embodiments, different target areas can correspond to different beautification parameters, so the beautification color corresponding to the area to be beautified can be determined according to the area type of the area to be beautified, for example, for the base eye shadow area and the base The same beautification color can be used for the lower eye shadow area, and different beautification colors can be used for areas such as the outer corner of the eye, the inner corner of the eye highlight, the upper eyelid or the upper outer eye shadow.
在待美化区域中,可以将原始颜色与美化颜色进行融合以得到待美化区域的美化结果,其中,融合的方式可以根据实际情况灵活选择。比如可以遍历待美化区域的每个像素点,并将每个像素点对应的原始颜色和美化颜色进行相加或相乘等来实现融合。在一种可能的实现方式中,也可以将美化颜色与待美化区域对应的掩模图像,通过普通混 合的方式,进行混合处理以实现融合等。In the area to be beautified, the original color and the beautification color may be fused to obtain a beautification result of the area to be beautified, wherein the fusion method may be flexibly selected according to actual conditions. For example, each pixel in the area to be beautified can be traversed, and the original color and beautification color corresponding to each pixel can be added or multiplied to achieve fusion. In a possible implementation, the beautification color and the mask image corresponding to the area to be beautified can also be mixed in a common way to achieve fusion.
通过本公开实施例,可以按照不同目标区域所对应的美化颜色,来分别对各目标区域进行处理以得到各目标区域的美化结果,从而使得不同的目标区域可以具有不同颜色的美化效果,有效提升整体美化效果的丰富程度,也提升了美化过程的灵活性。Through the embodiments of the present disclosure, each target area can be processed separately according to the beautification colors corresponding to different target areas to obtain the beautification results of each target area, so that different target areas can have different color beautification effects, effectively improving The richness of the overall beautification effect also improves the flexibility of the beautification process.
在一种可能的实现方式中,步骤S14可以包括:In a possible implementation, step S14 may include:
按照预设顺序,将多个美化结果所属的多个图层进行叠加,得到目标美化结果;According to the preset order, the multiple layers belonging to the multiple beautification results are superimposed to obtain the target beautification result;
将目标美化结果与用户图像进行融合,得到目标用户图像。The target beautification result is fused with the user image to obtain the target user image.
如上述公开实施例所述,可以通过多个图层来确定多个目标区域,相应地,得到的多个美化结果也可以分别属于多个图层。As described in the above disclosed embodiments, multiple target areas may be determined through multiple layers, and correspondingly, multiple obtained beautification results may also respectively belong to multiple layers.
在这种情况下,可以将多个图层进行叠加,来得到目标美化结果。In this case, multiple layers can be superimposed to obtain the target beautification result.
如上述公开实施例所述,多个图层可以按照预设顺序进行排列,因此多个图层在叠加过程中的位置关系可以与预设顺序一致。在多个图层的叠加位置关系确定的情况下,叠加的顺序可以与预设顺序一致,也可以与预设顺序不同。As described in the above disclosed embodiments, the multiple layers can be arranged in a preset order, so the positional relationship of the multiple layers during the superposition process can be consistent with the preset order. In the case where the overlay positional relationship of multiple layers is determined, the overlay order may be consistent with or different from the preset order.
叠加的方式可以根据实际情况灵活决定,比如可以为图层之间的直接叠加,在一些可能的实现方式中,也可以通过某种或某些混合方式实现叠加,比如可以将多个图层通过正片叠底的方式进行混合叠加。The way of 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.
在得到目标美化结果后,可以将目标美化结果与用户图像进行融合以得到目标用户图像,融合的方式同样在本公开实施例中不做限制,可以参考上述原始颜色与美化颜色的融合方式,在此不再赘述。After the target beautification result is obtained, the target beautification result can be fused with the user image to obtain the target user image. The fusion method is also not limited in this embodiment of the disclosure. You can refer to the above-mentioned fusion method of the original color and the beautification color. This will not be repeated here.
通过本公开实施例,可以按照预设顺序,将多个美化结果所属的图层进行叠加以得到目标美化结果,一方面可以简单便捷地确定对用户图像的美化效果,另一方面还可以基于预设顺序实现图层叠加,提升美化效果的真实性。Through the embodiments of the present disclosure, layers belonging to multiple beautification results can be superimposed according to a preset order to obtain the target beautification result. On the one hand, the beautification effect on the user image can be determined simply and conveniently; Set the order to achieve layer overlay to improve the authenticity of the beautification effect.
在一种可能的实现方式中,按照所述预设顺序,将多个美化结果所属的多个图层进行叠加,得到目标美化结果,可以包括:In a possible implementation manner, according to the preset order, multiple layers to which multiple beautification results belong are superimposed to obtain a target beautification result, which may include:
按照所述预设顺序,将多个美化结果所属的多个图层进行叠加,得到中间美化结果;According to the preset order, superimpose the multiple layers to which the multiple beautification results belong to obtain an intermediate beautification result;
将中间美化结果与预设纹理素材进行融合,得到目标美化结果。The intermediate beautification result is fused with the preset texture material to obtain the target beautification result.
其中,得到中间美化结果的过程可以参考上述通过图层叠加得到目标美化结果的过程,在此不再赘述。For the process of obtaining the intermediate beautification result, reference may be made to the above-mentioned process of obtaining the target beautification result through layer overlay, which will not be repeated here.
预设纹理素材可以是对目标部位进行美化操作的额外素材,其实现方式可以根据美化操作的不同而灵活变化,比如针对眼影渲染操作,预设纹理素材可以包括眼影散粉素材,针对修容操作,预设纹理素材可以包括哑光或高光等素材,针对唇妆操作,预设纹理素材还可以包括珠光、丝绒或雾面等素材。The preset texture material can be an additional material for beautifying the target part, and its implementation method can be flexibly changed according to different beautification operations. For example, for the eye shadow rendering operation, the preset texture material can include eye shadow powder material, for the repair operation, The preset texture material can include materials such as matte or high gloss, and for lip makeup operations, the preset texture material can also include materials such as pearlescent, velvet, or matte.
将中间美化结果与预设纹理素材进行融合的方式同样可以参考上述各公开实施例中的融合方式,在此不再赘述。在一种可能的实现方式中,可以将预设纹理素材与中间美化结果通过图层的形式进行叠加,在一个示例中,为了保留更多的纹理细节,可以将预设纹理素材的图层叠加在中间美化结果的图层的上方,以提升美化效果。For the manner of fusing the intermediate beautification result and the preset texture material, reference may also be made to the fusion manners in the above disclosed embodiments, which will not be repeated here. In a possible implementation, the preset texture material and the intermediate beautification result can be superimposed in the form of layers. In an example, in order to preserve more texture details, the layers of the preset texture material can be superimposed Above the layer of the intermediate beautification result to enhance the beautification effect.
通过本公开实施例,可以在多目标区域进行美化的基础上,进一步叠加更多的纹理细节信息,增加美化操作的精细度,进一步提升美化效果。Through the embodiments of the present disclosure, on the basis of beautification of multiple target areas, more texture detail information can be further superimposed to increase the fineness of the beautification operation and further improve the beautification effect.
基于上述各公开实施例,可以得到对用户图像中目标部位的预设区域进行美化的目标用户图像。图8示出根据本公开一实施例的用户图像的示意图。图9至图14示出按照预设顺序对多个美化结果所属的多个图层进行叠加所得到的叠加效果(为了对图像中的对象进行保护,各图中人脸的部分部位进行了马赛克处理)。其中,图9为叠加基础上眼影区域的美化结果后得到的第一叠加效果;图10为在图9的基础上,叠加基础下眼影区域的美化结果后得到的第二叠加效果;图11为在图10的基础上,叠加内眼角区域的美化结果后得到的第三叠加效果;图12为在图11的基础上,叠加外眼角区域的美化结果后得到的第四叠加效果;图13为在图12的基础上,叠加上眼皮区域的美化结果后得到的第五叠加效果;图14为在图13的基础上,叠加外上眼影区域的美化结果后得到的第六叠加效果。由于图像显示为灰度图,故眼影效果的变化不明显,但通过对比仍可以看出,通过本公开实施例提出的方法,对不同目标区域的美化结果进行叠加,可以得到较为真实自然的眼影渲染效果。Based on the above disclosed embodiments, a target user image in which a preset area of a target part in the user image is beautified can be obtained. Fig. 8 shows a schematic diagram of a user image according to an embodiment of the present disclosure. Figures 9 to 14 show the superimposition effects obtained by superimposing multiple layers of multiple beautification results in a preset order (in order to protect the objects in the images, mosaics are performed on some parts of the faces in each figure deal with). Among them, Figure 9 is the first overlay effect obtained after superimposing the beautification results of the eye shadow area on the basis; Figure 10 is the second overlay effect obtained after superimposing the beautification results of the eye shadow area under the foundation on the basis of Figure 9; Figure 11 is On the basis of Figure 10, the third overlay effect is obtained by superimposing the beautification results of the inner corner of the eye; Figure 12 is the fourth superimposition effect obtained after superimposing the beautification results of the outer corner of the eye on the basis of Figure 11; Figure 13 is On the basis of Figure 12, the fifth superimposition effect is obtained by superimposing the beautification result of the upper eyelid area; Fig. 14 is the sixth superimposition effect obtained by superimposing the beautification result of the outer upper eye shadow area on the basis of Fig. 13 . Since the image is displayed as a grayscale image, the change of the eye shadow effect is not obvious, but it can still be seen through the comparison that through the method proposed in the embodiment of the present disclosure, the beautification results of different target areas can be superimposed to obtain a more realistic and natural eye shadow rendering effect.
图15示出根据本公开一实施例的图像处理装置的框图。如图所示,所述图像处理装置20可以包括:FIG. 15 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 determination module 21 is configured to determine the target position of the target part in the user image in response to the beautification operation on the user image.
区域确定模块22,用于基于目标位置,确定用户图像中待进行美化的多个目标区域,其中,多个目标区域属于目标部位的预设区域范围。The area determination module 22 is configured to determine multiple target areas to be beautified in the user image based on the target position, wherein the multiple target areas belong to the preset area range of the target part.
美化模块23,用于根据美化操作中的美化参数,对多个目标区域中的每个进行与该目标区域匹配的美化处理,得到多个美化结果。The beautification module 23 is configured to, according to the beautification parameters in the beautification operation, perform beautification processing matching the target area on each of the multiple target areas to obtain multiple beautification results.
生成模块24,用于根据多个美化结果,生成目标用户图像。The generating module 24 is configured to generate target user images according to multiple beautification results.
在一种可能的实现方式中,区域确定模块用于:将用户图像分别复制至多个图层中;遍历多个图层,将遍历到的图层作为目标图层;在目标图层中,根据目标位置,确定用户图像中待进行美化的N个目标区域,其中,N为正整数,N小于多个目标区域的数量。In a possible implementation, the area determination module is used to: copy the user image to multiple layers respectively; traverse multiple layers, and use the traversed layer as the target layer; in the target layer, according to The target position is to determine N target areas to be beautified in the user image, where N is a positive integer, and N is smaller than the number of multiple target areas.
在一种可能的实现方式中,区域确定模块进一步用于:获取N个目标区域与目标部位之间的预设位置关系;在目标图层中,以目标位置为中心,根据预设位置关系进行区域延伸,得到N个目标区域。In a possible implementation, the area determining module is further used to: obtain the preset positional relationship between the N target areas and the target part; The region is extended to obtain N target regions.
在一种可能的实现方式中,多个图层按照预设顺序进行图层排列,预设顺序与美化操作中的美化执行顺序匹配。In a possible implementation, multiple layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation.
在一种可能的实现方式中,区域确定模块用于:以目标位置为中心,在多个预设方向上,分别按照多个预设延伸范围进行区域延伸,确定多个目标区域。In a possible implementation manner, the area determination module is configured to: take the target position as the center, and perform area extension in multiple preset directions respectively according to multiple preset extension ranges, to determine multiple target areas.
在一种可能的实现方式中,美化模块用于:遍历多个目标区域,将遍历到的目标区域作为待美化区域,并获取用户图像在待美化区域中的原始颜色;基于美化操作中的美化参数,确定待美化区域对应的美化颜色;在待美化区域中,将原始颜色与美化颜色进行融合,得到待美化区域的美化结果。In a possible implementation, the beautification module is used to: traverse multiple target areas, use the traversed target area as the area to be beautified, and obtain the original color of the user image in the area to be beautified; based on the beautification in the beautification operation parameter to determine the beautification color corresponding to the area to be beautified; in the area to be beautified, the original color and the beautification color are fused to obtain the beautification result of the area to be beautified.
在一种可能的实现方式中,多个美化结果分别属于多个图层,多个图层按照预设顺序进行图层排列,预设顺序与美化操作中的美化执行顺序匹配;生成模块用于:按照预设顺序,将多个美化结果所属的多个图层进行叠加,得到目标美化结果;将目标美化结果与用户图像进行融合,得到目标用户图像。In a possible implementation, multiple beautification results belong to multiple layers, and the multiple layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation; the generation module is used to : According to the preset sequence, superimpose multiple layers belonging to multiple beautification results to obtain the target beautification result; fuse the target beautification result with the user image to obtain the target user image.
在一种可能的实现方式中,生成模块进一步用于:按照预设顺序,将多个美化结果所属的多个图层进行叠加,得到中间美化结果;将中间美化结果与预设纹理素材进行 融合,得到目标美化结果。In a possible implementation, the generation module is further used to: superimpose multiple layers belonging to multiple beautification results in a preset order to obtain an intermediate beautification result; fuse the intermediate beautification result with a preset texture material , to get the target beautification result.
在一种可能的实现方式中,目标部位包括眼睛部位,美化操作包括眼影渲染操作;多个目标区域包括基础上眼影区域、基础下眼影区域、上眼皮区域、外眼角区域、内眼角区域或外上眼影区域中的至少一种。In a possible implementation manner, the target area includes the eye area, and the beautification operation includes an eye shadow rendering operation; the multiple target areas include a basic eye shadow area, a basic lower eye shadow area, an upper eyelid area, an outer corner area, an inner eye corner area, or an outer corner area. At least one of the upper eyeshadow areas.
本公开涉及增强现实领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的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 images rendered with realistic and rich eye shadows has become an urgent problem to be solved.
本公开应用示例提出了一种图像处理方法,包括如下过程:The disclosed application example proposes an image processing method, including the following process:
基于用户图像进行人脸识别,确定眼睛部位在用户图像中的目标位置,根据目标位置,在眼睛部位向外进行区域延伸,得到多个目标区域的mask图像。在本公开应用示例中,分别得到6个目标区域的mask图像,分别包括:基础上眼影区域、基础下眼影区域、上眼皮区域、外眼角区域、内眼角区域以及外上眼影区域。Face recognition is performed based on the user image, and the target position of the eye part in the user image is determined. According to the target position, the area is extended outward from the eye part to obtain mask images of multiple target areas. In the application example of the present disclosure, mask images of six target areas are respectively obtained, including: the base eye shadow area, the base lower eye shadow area, the upper eyelid area, the outer corner area, the inner eye corner area, and the outer upper eye shadow area.
在本公开应用示例中,mask图像可以与各区域在用户图像中的位置匹配,且mask图像还包含该目标区域中各像素点的透明度信息,因此mask图像具有柔和过渡的边界,可以模拟粉饼在皮肤的晕染效果。In the application example of this disclosure, the mask image can match the position of each area in the user image, and the mask image also contains the transparency information of each pixel in the target area, so the mask image has a soft transition boundary, which can simulate the powder in the The smudge effect of the skin.
在本公开应用示例中,6个目标区域的mask图像可以分别属于6个图层,分别标记为a、b、c、d、e和f,其中,a图层对应基础上眼影区域,b图层对应基础下眼影区域,c图层对应外上眼影区域,d图层对应外眼角区域,e图层对应上眼皮区域,f图层对应内眼角区域。其中,各图层从下至上,按照a至f的顺序进行图层排列,即a图层位于最下层,f图层位于最上层。通过本公开应用示例的图层排列顺序,可以模拟化妆的步骤和手法,符合大部分且经典的眼影化妆顺序,得到较为真实的眼影渲染效果。In the application example of this disclosure, the mask images of the 6 target areas can belong to 6 layers respectively, marked as a, b, c, d, e, and f, where layer a corresponds to the eye shadow area on the basis, and image b The layer corresponds to the base lower eye shadow area, the c layer corresponds to the outer upper eye shadow area, the d layer corresponds to the outer corner area, the e layer corresponds to the upper eyelid area, and the f layer corresponds to the inner eye corner area. Wherein, the layers are arranged in the order of a to f from bottom to top, that is, layer a is located at the bottom layer, and layer f is located at the top layer. Through the layer arrangement sequence of the disclosed application example, the steps and techniques of makeup can be simulated, which conforms to most and classic eye shadow makeup sequences, and a more realistic eye shadow rendering effect can be obtained.
在每一个图层中,可以将美化颜色与该图层中的mask图像进行普通方式的混合处理,混合后的各图层可以分别标记为aa、bb、cc、dd、ee和ff,将得到的混合后的各图层再分别与用户图像进行正片叠底方式的混合处理,得到各目标区域的美化结果,分别标记为aaa、bbb、ccc、ddd、eee和fff。In each layer, the beautification color can be mixed with the mask image in this layer in a normal way. The mixed layers can be marked as aa, bb, cc, dd, ee, and ff respectively, and the obtained The mixed layers of the user image are mixed with the user image in the way of multiplication, and the beautification results of each target area are obtained, which are respectively marked as aaa, bbb, ccc, ddd, eee and fff.
将各美化结果所属的图层,按照fff至aaa的顺序,从上至下进行混合叠加,可以得到中间目标美化结果,在一个示例中,考虑到渲染的层级关系,将各美化结果所属的图层进行叠加的顺序不可变动。The layer to which each beautification result belongs is mixed and superimposed from top to bottom in the order of fff to aaa, and the intermediate target beautification result can be obtained. In an example, considering the hierarchical relationship of rendering, the image to which each beautification result belongs The order in which layers are superimposed cannot be changed.
在一个示例中,还可以在中间目标美化结果的基础上叠加预设纹理素材,比如眼影散粉素材等,以增强眼影效果的现实感、立体感和氛围感,从而可以实现多层次、多细节且多纹理的渲染,得到更加精细的眼影效果。In an example, preset texture materials, such as eye shadow loose powder materials, can also be superimposed on the basis of the intermediate target beautification results to enhance the reality, three-dimensionality and atmosphere of the eye shadow effect, so that multi-level, multi-detail and Multi-texture rendering for more detailed eyeshadow effects.
本公开应用示例中提出的图像处理方法,可以通过多层次的分区渲染,使得眼影效果更加自然,且可以实现更多的参数定义。比如眼影中不同目标区域的美化颜色的更改,不同目标区域对应的掩模图像的透明度更改等,从而使得眼影效果更加可控,方便用户根据喜好定制美化参数,也方便机构根据本公开应用示例中的方法为用户提供更加丰富的自定义功能。The image processing method proposed in the application example of the present disclosure can make the eye shadow effect more natural through multi-level partition rendering, and can realize more parameter definitions. For example, the change of the beautification color of different target areas in the eye shadow, the change of the transparency of the mask image corresponding to different target areas, etc., so that the eye shadow effect is more controllable, and it is convenient for users to customize beautification parameters according to their preferences, and it is also convenient for institutions to use the application examples of this disclosure. The method provides users with richer customization functions.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。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.
图16是根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 16 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.
参照图16,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。16, 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.
图17是根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图17,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 17 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. 17 , 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 (12)

  1. 一种图像处理方法,包括:An image processing method, comprising:
    响应于针对用户图像的美化操作,确定所述用户图像中目标部位的目标位置;determining a target position of a target part in the user image in response to a beautification operation on the user image;
    基于所述目标位置,确定所述用户图像中待进行美化的多个目标区域,其中,所述多个目标区域属于所述目标部位的预设区域范围;Based on the target position, determine a plurality of target areas to be beautified in the user image, wherein the plurality of target areas belong to a preset area range of the target part;
    根据所述美化操作中的美化参数,对所述多个目标区域中的每个进行与该目标区域匹配的美化处理,得到多个美化结果;performing beautification processing matching the target area on each of the multiple target areas according to the beautification parameters in the beautification operation, to obtain multiple beautification results;
    根据所述多个美化结果,生成目标用户图像。Generate target user images according to the multiple beautification results.
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述目标位置,确定所述用户图像中待进行美化的多个目标区域,包括:The method according to claim 1, wherein the determining a plurality of target areas to be beautified in the user image based on the target position comprises:
    将所述用户图像分别复制至多个图层中;Copying the user images to multiple layers respectively;
    遍历所述多个图层,将遍历到的图层作为目标图层;Traversing the multiple layers, using the traversed layer as the target layer;
    在所述目标图层中,根据所述目标位置,确定所述用户图像中待进行美化的N个目标区域,其中,N为正整数,N小于所述多个目标区域的数量。In the target layer, N target areas to be beautified in the user image are determined according to the target position, where N is a positive integer, and N is smaller than the number of the multiple target areas.
  3. 根据权利要求2所述的方法,其特征在于,所述在所述目标图层中,根据所述目标位置,确定所述用户图像中待进行美化的N个目标区域,包括:The method according to claim 2, wherein, in the target layer, according to the target position, determining N target areas to be beautified in the user image comprises:
    获取所述N个目标区域与所述目标部位之间的预设位置关系;Acquiring a preset positional relationship between the N target areas and the target site;
    在所述目标图层中,以所述目标位置为中心,根据所述预设位置关系进行区域延伸,得到所述N个目标区域。In the target layer, with the target position as the center, area extension is performed according to the preset position relationship to obtain the N target areas.
  4. 根据权利要求2或3所述的方法,其特征在于,所述多个图层按照预设顺序进行图层排列,所述预设顺序与所述美化操作中的美化执行顺序匹配。The method according to claim 2 or 3, wherein the plurality of layers are arranged in a preset order, and the preset order matches the beautification execution order in the beautification operation.
  5. 根据权利要求1至4中任意一项所述的方法,其特征在于,所述基于所述目标位置,确定所述用户图像中待进行美化的多个目标区域,包括:The method according to any one of claims 1 to 4, wherein the determining a plurality of target areas to be beautified in the user image based on the target position comprises:
    以所述目标位置为中心,在多个预设方向上,分别按照多个预设延伸范围进行区域延伸,确定所述多个目标区域。Taking the target position as the center, in multiple preset directions, area extension is carried out respectively according to multiple preset extension ranges to determine the multiple target areas.
  6. 根据权利要求1至5中任意一项所述的方法,其特征在于,所述根据所述美化操作中的美化参数,对所述多个目标区域中的每个进行与该目标区域匹配的美化处理,得到多个美化结果,包括:The method according to any one of claims 1 to 5, wherein, according to the beautification parameters in the beautification operation, each of the plurality of target areas is beautified to match the target area Processing, get multiple beautification results, including:
    遍历所述多个目标区域,将遍历到的目标区域作为待美化区域,并获取所述用户图像在所述待美化区域中的原始颜色;Traversing the plurality of target areas, using the traversed target area as the area to be beautified, and acquiring the original color of the user image in the area to be beautified;
    基于所述美化操作中的美化参数,确定所述待美化区域对应的美化颜色;Based on the beautification parameters in the beautification operation, determine the beautification color corresponding to the area to be beautified;
    在所述待美化区域中,将所述原始颜色与所述美化颜色进行融合,得到所述待美化区域的美化结果。In the area to be beautified, the original color is fused with the beautification color to obtain a beautification result of the area to be beautified.
  7. 根据权利要求1至6中任意一项所述的方法,其特征在于,所述多个美化结果分别属于多个图层,所述多个图层按照预设顺序进行图层排列,所述预设顺序与所述美化操作中的美化执行顺序匹配;The method according to any one of claims 1 to 6, wherein the multiple beautification results respectively belong to multiple layers, and the multiple layers are arranged in a preset order, and the preset set order to match the beautification execution order in said beautification operations;
    所述根据所述多个美化结果,生成目标用户图像,包括:The generating target user images according to the multiple beautification results includes:
    按照所述预设顺序,将所述多个美化结果所属的所述多个图层进行叠加,得到目标美化结果;superimposing the multiple layers to which the multiple beautification results belong according to the preset order to obtain a target beautification result;
    将所述目标美化结果与所述用户图像进行融合,得到所述目标用户图像。The target beautification result is fused with the user image to obtain the target user image.
  8. 根据权利要求7所述的方法,其特征在于,所述按照所述预设顺序,将所述多个美化结果所属的所述多个图层进行叠加,得到目标美化结果,包括:The method according to claim 7, wherein the step of superimposing the multiple layers to which the multiple beautification results belong according to the preset order to obtain the target beautification result includes:
    按照所述预设顺序,将所述多个美化结果所属的所述多个图层进行叠加,得到中间美化结果;superimposing the multiple layers to which the multiple beautification results belong according to the preset order to obtain an intermediate beautification result;
    将所述中间美化结果与预设纹理素材进行融合,得到所述目标美化结果。The intermediate beautification result is fused with the preset texture material to obtain the target beautification result.
  9. 根据权利要求1至8中任意一项所述的方法,其特征在于,所述目标部位包括 眼睛部位,所述美化操作包括眼影渲染操作;The method according to any one of claims 1 to 8, wherein the target site includes an eye site, and the beautification operation includes an eye shadow rendering operation;
    所述多个目标区域包括基础上眼影区域、基础下眼影区域、上眼皮区域、外眼角区域、内眼角区域或外上眼影区域中的至少一种。The plurality of target areas includes at least one of a base eye shadow area, a base lower eye shadow area, an upper eyelid area, an outer corner area, an inner corner area, or an outer upper eye shadow area.
  10. 一种图像处理装置,包括:An image processing device, comprising:
    确定模块,用于响应于针对用户图像的美化操作,确定所述用户图像中目标部位的目标位置;A determining module, configured to determine a target position of a target part in the user image in response to a beautification operation on the user image;
    区域确定模块,用于基于所述目标位置,确定所述用户图像中待进行美化的多个目标区域,其中,所述多个目标区域属于所述目标部位的预设区域范围;An area determining module, configured to determine a plurality of target areas to be beautified in the user image based on the target position, wherein the multiple target areas belong to a preset area range of the target part;
    美化模块,用于根据所述美化操作中的美化参数,对所述多个目标区域中的每个进行与该目标区域匹配的美化处理,得到多个美化结果;A beautification module, configured to, according to the beautification parameters in the beautification operation, perform beautification processing on each of the plurality of target areas matching the target area to obtain multiple beautification results;
    生成模块,用于根据所述多个美化结果,生成目标用户图像。A generating module, configured to generate target user images according to the multiple beautification results.
  11. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至9中任意一项所述的方法。Wherein, the processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1-9.
  12. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法。A computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is realized.
PCT/CN2022/120090 2021-09-27 2022-09-21 Image processing method and apparatus, electronic device and storage medium WO2023045941A1 (en)

Applications Claiming Priority (2)

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

Publications (1)

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

Family

ID=78797743

Family Applications (1)

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

Country Status (2)

Country Link
CN (1) CN113763286A (en)
WO (1) WO2023045941A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763286A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN114463212A (en) * 2022-01-28 2022-05-10 北京大甜绵白糖科技有限公司 Image processing method and device, electronic equipment and storage medium
CN115880168A (en) * 2022-09-30 2023-03-31 北京字跳网络技术有限公司 Image restoration method, device, equipment, computer readable storage medium and product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107742274A (en) * 2017-10-31 2018-02-27 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and electronic equipment
CN109543646A (en) * 2018-11-30 2019-03-29 深圳市脸萌科技有限公司 Face image processing process, device, electronic equipment and computer storage medium
CN112102159A (en) * 2020-09-18 2020-12-18 广州虎牙科技有限公司 Human body beautifying method, device, electronic equipment and storage medium
CN112541955A (en) * 2020-12-17 2021-03-23 维沃移动通信有限公司 Image processing method, device and equipment
CN112801916A (en) * 2021-02-23 2021-05-14 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN113421204A (en) * 2021-07-09 2021-09-21 北京百度网讯科技有限公司 Image processing method and device, electronic equipment and readable storage medium
CN113763286A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9508181B2 (en) * 2011-08-31 2016-11-29 Adobe Systems Incorporated Ordering and rendering buffers for complex scenes with cyclic dependency
US9342322B2 (en) * 2011-09-12 2016-05-17 Microsoft Technology Licensing, Llc System and method for layering using tile-based renderers
CN102622613B (en) * 2011-12-16 2013-11-06 彭强 Hair style design method based on eyes location and face recognition
US9483853B2 (en) * 2012-05-23 2016-11-01 Glasses.Com Inc. Systems and methods to display rendered images
CN104537612A (en) * 2014-08-05 2015-04-22 华南理工大学 Method for automatically beautifying skin of facial image
CN104574306A (en) * 2014-12-24 2015-04-29 掌赢信息科技(上海)有限公司 Face beautifying method for real-time video and electronic equipment
CN106023104B (en) * 2016-05-16 2019-01-08 厦门美图之家科技有限公司 Image enchancing method, system and the camera terminal of face ocular
CN107358573A (en) * 2017-06-16 2017-11-17 广东欧珀移动通信有限公司 Image U.S. face treating method and apparatus
CN109102467A (en) * 2017-06-21 2018-12-28 北京小米移动软件有限公司 The method and device of picture processing
JP7003558B2 (en) * 2017-10-12 2022-01-20 カシオ計算機株式会社 Image processing equipment, image processing methods, and programs
CN107808137A (en) * 2017-10-31 2018-03-16 广东欧珀移动通信有限公司 Image processing method, device, electronic equipment and computer-readable recording medium
CN109409319A (en) * 2018-11-07 2019-03-01 北京旷视科技有限公司 A kind of pet image beautification method, device and its storage medium
CN110111279B (en) * 2019-05-05 2021-04-30 腾讯科技(深圳)有限公司 Image processing method and device and terminal equipment
CN110458921B (en) * 2019-08-05 2021-08-03 腾讯科技(深圳)有限公司 Image processing method, device, terminal and storage medium
CN111640163B (en) * 2020-06-03 2022-04-22 湖南工业大学 Image synthesis method and computer-readable storage medium
CN112348736B (en) * 2020-10-12 2023-03-28 武汉斗鱼鱼乐网络科技有限公司 Method, storage medium, device and system for removing black eye
CN112883821B (en) * 2021-01-27 2024-02-20 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN112766234B (en) * 2021-02-23 2023-05-12 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN113240792B (en) * 2021-04-29 2022-08-16 浙江大学 Image fusion generation type face changing method based on face reconstruction

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107742274A (en) * 2017-10-31 2018-02-27 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and electronic equipment
CN109543646A (en) * 2018-11-30 2019-03-29 深圳市脸萌科技有限公司 Face image processing process, device, electronic equipment and computer storage medium
CN112102159A (en) * 2020-09-18 2020-12-18 广州虎牙科技有限公司 Human body beautifying method, device, electronic equipment and storage medium
CN112541955A (en) * 2020-12-17 2021-03-23 维沃移动通信有限公司 Image processing method, device and equipment
CN112801916A (en) * 2021-02-23 2021-05-14 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN113421204A (en) * 2021-07-09 2021-09-21 北京百度网讯科技有限公司 Image processing method and device, electronic equipment and readable storage medium
CN113763286A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2022179025A1 (en) Image processing method and apparatus, electronic device, and storage medium
WO2022179026A1 (en) Image processing method and apparatus, electronic device, and storage medium
WO2023045941A1 (en) Image processing method and apparatus, electronic device and storage medium
US20200335136A1 (en) Method and device for processing video
WO2018153267A1 (en) Group video session method and network device
WO2017152673A1 (en) Expression animation generation method and apparatus for human face model
CN113160094A (en) Image processing method and device, electronic equipment and storage medium
US20180182144A1 (en) Information processing apparatus, information processing method, and program
US20180182145A1 (en) Information processing apparatus, information processing method, and program
CN110889382A (en) Virtual image rendering method and device, electronic equipment and storage medium
US20210256672A1 (en) Method, electronic device and storage medium for processing image
WO2016197469A1 (en) Method and apparatus for generating unlocking interface, and electronic device
WO2023045979A1 (en) Image processing method and apparatus, electronic device, and storage medium
WO2023045207A1 (en) Task processing method and apparatus, electronic device, storage medium, and computer program
TWI752473B (en) Image processing method and apparatus, electronic device and computer-readable storage medium
WO2023284632A1 (en) Image display method and apparatus, and electronic device
CN113822798B (en) Method and device for training generation countermeasure network, electronic equipment and storage medium
WO2023045950A1 (en) Image processing method and apparatus, electronic device, and storage medium
WO2023045946A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN113570581A (en) Image processing method and device, electronic equipment and storage medium
WO2023142645A1 (en) Image processing method and apparatus, and electronic device, storage medium and computer program product
WO2023045961A1 (en) Virtual object generation method and apparatus, and electronic device and storage medium
WO2023051356A1 (en) Virtual object display method and apparatus, and electronic device and storage medium
WO2023220163A1 (en) Multi-modal human interaction controlled augmented reality
JP2019512141A (en) Face model editing method and apparatus

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

Country of ref document: EP

Kind code of ref document: A1