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

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

Info

Publication number
WO2022179026A1
WO2022179026A1 PCT/CN2021/103249 CN2021103249W WO2022179026A1 WO 2022179026 A1 WO2022179026 A1 WO 2022179026A1 CN 2021103249 W CN2021103249 W CN 2021103249W WO 2022179026 A1 WO2022179026 A1 WO 2022179026A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
brightness
target
pixel
preset
Prior art date
Application number
PCT/CN2021/103249
Other languages
English (en)
French (fr)
Inventor
苏柳
Original Assignee
北京市商汤科技开发有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京市商汤科技开发有限公司 filed Critical 北京市商汤科技开发有限公司
Priority to EP21927457.8A priority Critical patent/EP4207048A4/en
Publication of WO2022179026A1 publication Critical patent/WO2022179026A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/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/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 apparatus, an electronic device and a storage medium.
  • Lip makeup refers to the cosmetic makeup of the lips, and the lips after lip makeup are generally pure and shiny.
  • processing an image containing lips to obtain an image processed by lip makeup has been more and more widely used in people's daily life.
  • how to make the image after lip makeup treatment similar to the gloss effect after natural lip makeup treatment is still an urgent problem to be solved.
  • the present disclosure proposes an image processing scheme.
  • an image processing method comprising:
  • the determining the target color of at least one pixel in the target part based on the original color and the brightness information includes: according to the color selected in the beauty makeup operation, performing color search on the original color of at least one pixel in the target part, and determining the initial target color of at least one pixel in the target part, wherein the initial target color matches the original color; based on the brightness information, and adjust the initial target color to obtain the target color of at least one pixel in the target part.
  • the brightness information includes at least one of a first brightness, a second brightness, and a third brightness
  • the acquiring the brightness information of at least one pixel in the target part includes: identifying The processing type of the beauty makeup operation, according to the processing type, at least one of the first brightness, the second brightness and the third brightness of the at least one pixel is extracted by adopting at least one processing method;
  • the at least one The processing method includes: determining the first brightness of the pixel point according to the original color of the pixel point; and/or, obtaining the preset processing range of the pixel point in the target part according to the preset processing range
  • the third brightness wherein the filtering range of the preset convolution kernel is consistent with the preset processing range.
  • the processing type includes a haze light effect
  • the brightness information includes the first brightness and the third brightness
  • the processing type includes a moisturizing light effect
  • the brightness information includes the first brightness, the second brightness, and the third brightness
  • the brightness information based on the brightness information, Adjusting the initial target color to obtain the target color of at least one pixel in the target part includes: in the case that the first brightness is greater than the third brightness, according to the first brightness, the The second brightness, the third brightness and the preset brightness radius are adjusted to the initial target color of the pixel to obtain the target color of the pixel; or, when the first brightness is less than or equal to the In the case of the third brightness, the initial target color of the pixel is taken as the target color of the pixel.
  • the processing type includes a flickering light effect
  • the brightness information includes a first brightness, a second brightness, and a third brightness
  • the initial target color is performed based on the brightness information.
  • Adjusting to obtain the target color of at least one pixel in the target part includes: when the first brightness is greater than the third brightness, according to the first brightness, the second brightness, the third brightness Three brightnesses and a preset brightness radius, adjust the initial target color of the pixel to obtain the target color of the pixel; or, when the first brightness is less than or equal to the third brightness, A random value is generated within a first preset value range; according to the random value, the initial target color is adjusted to obtain a target color of at least one pixel in the target portion.
  • the adjusting the initial target color according to the random value to obtain the target color of at least one pixel in the target part includes: when the random value belongs to the second In the case within the preset value range, adjust the initial target color of the pixel point according to the random value and the corresponding transparency of the pixel point in the target material to obtain the target color of the pixel point; Or, in the case that the random value is outside the second preset value range, the initial target color of the pixel point is used as the target color of the pixel point.
  • the color search is performed on the original color of at least one pixel point in the target part according to the color selected in the beauty makeup operation, and the at least one pixel point in the target part is determined.
  • the initial target color includes: obtaining a color lookup table corresponding to the selected color according to the selected color in the beauty makeup operation, wherein the output colors in the color lookup table are arranged in a gradient form; The output color corresponding to the original color of at least one pixel in the target part is respectively searched in the color lookup table as the initial target color of at least one pixel in the target part.
  • the fusion of the original color of at least one pixel in the target part and the target color to obtain a fusion face image includes: determining the original color respectively according to a preset fusion intensity The first fusion ratio of the target color and the second fusion ratio of the target color; according to the first fusion ratio and the second fusion ratio, the original color and the target color are fused to obtain a fusion face image.
  • the extracting the original color of at least one pixel in the target part of the face image in response to the cosmetic operation on the target part of the face image includes: acquiring the target part Corresponding target material; according to the transparency of at least one pixel in the target material, extract the original color of at least one pixel in the target part of the face image.
  • the method further includes: recognizing the target part in the face image to obtain the initial position of the target part in the face image; acquiring the corresponding part of the target part
  • the target material includes: obtaining the original target material corresponding to the target part according to the target part; fusing the original target material with the target part in the preset face image to obtain a standard material image; At the initial position, the standard material image is extracted to obtain the target material.
  • the beauty makeup operation includes a lip makeup operation
  • the target portion includes a lip portion
  • an image processing apparatus including:
  • the original color extraction module is used for extracting the original color of at least one pixel in the target part of the face image in response to the cosmetic operation for the target part of the face image;
  • the brightness information acquisition module is used to obtain the target brightness information of at least one pixel point in the part;
  • a target color determination module used to determine the target color of at least one pixel point in the target part based on the original color and the brightness information;
  • a fusion module used to combine the The original color of at least one pixel in the target part and the target color are fused to obtain a fused face image.
  • an electronic device comprising: 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 having computer program instructions stored thereon, the computer program instructions implementing the above-mentioned image processing method when executed by a processor.
  • a computer program product comprising computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in an electronic device
  • the processor in the electronic device executes the image processing method described above.
  • the original color of at least one pixel in the target part of the face image is extracted, and the brightness information of at least one pixel in the target part is obtained, and according to The original color and brightness information are used to determine the target color of at least one pixel in the target part, so that the original color and the target color of at least one pixel in the target part are fused to obtain a fused face image.
  • the original color can be adjusted to obtain the target color by introducing the brightness information of at least one pixel in the target part, so that the color in the fusion face image that combines the original color and the target color has a more realistic color.
  • a glossy effect that enhances the effect and realism of fused face images.
  • 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 target material according to an embodiment of the present disclosure.
  • FIG. 3 shows a schematic diagram of a constructed triangular mesh according to an embodiment of the present disclosure.
  • FIG. 4 shows a schematic diagram of a preset face image according to an embodiment of the present disclosure.
  • FIG. 5 shows a schematic diagram of a color lookup table according to an embodiment of the present disclosure.
  • FIG. 6 shows a schematic diagram of fusing face images according to an embodiment of the present disclosure.
  • FIG. 7 shows a schematic diagram of fusing face images according to an embodiment of the present disclosure.
  • FIG. 8 shows a schematic diagram of fusing face images according to an embodiment of the present disclosure.
  • FIG. 9 shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure.
  • FIG. 10 shows a schematic diagram of an application example according to the present disclosure.
  • FIG. 11 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 12 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the method can be applied to an image processing apparatus or an image processing system, and the image processing apparatus can be a terminal device, a server, or other processing devices.
  • the terminal device may be User Equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, Personal Digital Assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable devices, etc.
  • UE User Equipment
  • PDA Personal Digital Assistant
  • the image processing method may be applied to a cloud server or a local server
  • the cloud server may be a public cloud server or a private cloud server, which can be flexibly selected according to actual conditions.
  • the image processing method can also be implemented by the processor calling computer-readable instructions stored in the memory.
  • the image processing method may include:
  • Step S11 in response to the cosmetic operation for the target part of the face image, extract the original color of at least one pixel in the target part of the face image.
  • the face image may be any image including a face, and the face image may include one face or multiple faces, and its implementation form can be flexibly determined according to the actual situation, which is not limited in the embodiments of the present disclosure .
  • the operation content it contains can be flexibly determined according to the actual situation, and is not limited to the following disclosed embodiments.
  • the beauty makeup operation may include an operation of instructing to perform beauty makeup processing on the face image; in a possible implementation manner, the beauty makeup operation may further include selecting a beauty makeup operation Color, etc.; in a possible implementation manner, the beauty makeup operation may further include an operation indicating a treatment type of beauty makeup, and the like.
  • the form of the cosmetic operation can be flexibly determined according to the actual situation, and is not limited to the following disclosed embodiments.
  • the beauty makeup operation may include a lip makeup operation.
  • the types of processing included in the beauty operations can also be flexibly changed.
  • the beauty operations can include one type of processing.
  • Makeup operations can also include multiple treatment types at the same time.
  • the treatment type may include one or more of a matte light effect, a moisturizing light effect, and a flickering light effect.
  • the matte light effect can include the modification of the lip color and the change of the light effect, so as to obtain a matte lip makeup effect with low gloss
  • the moisturizing light effect can include the modification of the lip color and the change of the light effect, so as to obtain A moisturizing lip makeup effect with high gloss and natural brightness transition
  • the shimmering light effect can include modification of the color of the lips and the change of the light effect, so as to obtain a shimmering lip makeup effect with high brightness, high gloss and brightness with intervals.
  • the target part can be any part of the face image that needs to be cosmetically applied. Which parts are included in the target part can also be flexibly determined according to the actual situation of the cosmetic operation. In a possible implementation, in the cosmetic operation. In the case of including a lip makeup operation, the target area may include the lip area.
  • the original color may be the unprocessed color of the target part in the face image, and the method of extracting the original color of at least one pixel point from the target part of the face image is not limited in the embodiment of the present disclosure, and can be based on the actual situation. Flexible decision.
  • the area where the target part is located in the face image may be determined, and the color of one or more pixels contained in the area may be extracted to obtain at least one pixel in the target part of the face image The original color of the point.
  • Step S12 acquiring brightness information of at least one pixel in the target portion.
  • the brightness information may be related information determined according to the color of the pixel in the target part of the face image, etc., and the content of the information may be flexibly determined according to the actual situation.
  • the types of information contained in the brightness information and how to obtain the brightness information of the pixels can be implemented in detail in the following disclosed embodiments, which will not be expanded here.
  • Step S13 based on the original color and brightness information, determine the target color of at least one pixel in the target portion.
  • the target color may correspond to the original color and is related to the brightness information, so that on the basis of corresponding to the original color, the brightness situation is reflected to achieve the corresponding processing effect.
  • the original color can be adjusted according to the brightness information to obtain the target color.
  • the color corresponding to the original color can also be obtained, and then the corresponding color corresponding to the original color can be obtained according to the brightness information.
  • the color is adjusted to get the target color, etc.
  • how to obtain the target color of at least one pixel in the target part according to the original color and the brightness information, and the processing method can be flexibly determined according to the information content contained in the brightness information. For details, please refer to the following disclosed embodiments, which will not be discussed here. Expand.
  • step S14 the original color of at least one pixel in the target part and the target color are fused to obtain a fused face image.
  • to fuse the original color of at least one pixel in the target part with the target color it may be to perform fusion processing on a plurality of pixels in the target part respectively.
  • the pixel point is fused with the original color of the pixel point based on the target color determined by the original color to obtain the fused color of the pixel point, and then the fused face image is obtained.
  • step S14 The manner of fusion in step S14 can be flexibly changed according to the actual situation.
  • the original color of at least one pixel in the target part of the face image is extracted, and the brightness information of at least one pixel in the target part is obtained, and according to The original color and brightness information are used to determine the target color of at least one pixel in the target part, so that the original color and the target color of at least one pixel in the target part are fused to obtain a fused face image.
  • the original color can be adjusted to obtain the target color by introducing the brightness information of at least one pixel in the target part, so that the color in the fusion face image that combines the original color and the target color has a more realistic color.
  • a glossy effect that enhances the effect and realism of fused face images.
  • step S11 may include:
  • the original color of at least one pixel in the target part of the face image is extracted.
  • the target material may be a relevant material used to realize beauty makeup on the face image, and the realization form of the target material may be flexibly determined according to the actual situation of the beauty operation.
  • the target material when the beauty makeup operation includes a lip makeup operation, may be a lip makeup material, such as a lip mask.
  • the target material may be a material selected by the user in the beauty operation; in some possible implementations, the target material may also be a preset material, which is selected in the beauty operation is called automatically. In some possible implementation manners, the target material may also be a material obtained by processing the original target material based on a face image. How to obtain the target material, and the implementation method thereof, can be found in the following disclosed embodiments, which will not be expanded here.
  • the original color of at least one pixel in the target part of the face image can be extracted according to the transparency of at least one pixel in the target material.
  • the extraction method can be flexibly determined according to the actual situation.
  • the position of the pixel points in the face image and the pixel points can be compared.
  • the corresponding area is taken as the image area where the target part is located, and the original colors of multiple pixels in the image area are extracted.
  • the specific range of the preset transparency range can be flexibly determined according to the actual situation.
  • the preset transparency range can be set to be lower than 100%, that is, the transparency of the pixels in the target material is low.
  • 100% not fully transparent
  • the area corresponding to the position of the pixel in the face image can be used as the image area where the target part is located, and the original color of the pixel in the image area can be extracted;
  • the preset transparency range may also be set to be lower than other transparency values, or within a certain transparency range, etc.
  • the embodiment of the present disclosure does not limit the range value of the preset transparency range.
  • the value of the preset transparency range can be set, and more Targetedly determine the image area where the target part that meets the requirements is located, so as to extract the more accurate original color of the target part from the face image, and then improve the reliability and authenticity of the subsequent fusion face image.
  • FIG. 2 shows a schematic diagram of a target material according to an embodiment of the present disclosure.
  • the target material may be a lip mask, and the transparency of different pixels in the lip mask is different , which can better represent the natural and real lip shape, so the original color in the face image extracted based on the lip mask is also more accurate and reliable.
  • the method proposed by the embodiment of the present disclosure may further include: recognizing the target part in the face image to obtain the initial position of the target part in the face image.
  • the initial position may be determined according to the face image, and the approximate position of the target part in the face image.
  • the method for determining the initial position of the target part is not limited in the embodiments of the present disclosure, and can be flexibly selected according to the actual situation, and is not limited to the following disclosed embodiments.
  • the initial position of the target part can be determined by identifying the key points of the target part.
  • the initial position of the target part can be determined according to the coordinates of the identified key points of the target part in the face image. Or determine the range of the target part in the face image according to the key points of the recognized target part, so as to obtain the initial position of the target part, etc.
  • the target part in the face image is identified to obtain the initial position of the target part in the face image, which may include:
  • the initial position of the target part in the face image is determined.
  • the face key points may be relevant key points for locating the positions of key regions in the face, such as eye key points, mouth key points, eyebrow key points or nose key points.
  • the acquired face key points specifically include which key points and the number of key points included are not limited in the embodiments of the present disclosure, and can be flexibly selected according to the actual situation.
  • all relevant key points in the face image may be acquired, and the number of acquired key points may be between 100 and 300, for example, may include 106 whole face key points (Face106) of the face, etc. , or including 240 or 282 face key points, etc.; in some possible implementations, some key points in the face image can also be obtained, such as key points related to the target part, such as the relevant key points of the lips, etc. .
  • the manner of obtaining the key points of the face is not limited in the embodiments of the present disclosure, and any method that can identify the key points of the face in the image can be used as an implementation manner of obtaining the key points of the face.
  • a triangular mesh After acquiring at least one face key point, a triangular mesh can be constructed in the face image according to the face key point.
  • the manner of constructing the triangular mesh is not limited in the embodiments of the present disclosure.
  • every three adjacent points may be connected to obtain multiple triangular meshes. grid.
  • interpolation processing can also be performed according to the acquired face key points to obtain interpolation points, and then in the point set formed by the face key points and the interpolation points, every three adjacent points Connect to get multiple triangular meshes.
  • FIG. 3 shows a schematic diagram of a triangular mesh constructed according to an embodiment of the present disclosure (in order to protect objects in the image, part of the face in the figure is subjected to mosaic processing). It can be seen from the figure that in a In a possible implementation manner, multiple triangular meshes can be obtained by connecting the face key points in the face image with the interpolation points.
  • a triangular mesh corresponding to the target part can also be constructed in the face image according to the key points of the face.
  • the difference is that The face key points and interpolation points related to the target part can be obtained to construct a triangular mesh corresponding to the target part, and the construction of the triangular meshes of other parts in the face image is omitted.
  • the initial position of the target part in the face image can be determined according to the position coordinates of the triangular mesh in the face image.
  • the expression form of the initial position is not limited in the embodiment of the present disclosure.
  • the position of the center point of one or more triangular meshes corresponding to the target part may be used as the initial position of the target part;
  • the coordinates of each vertex of one or more triangular meshes corresponding to the target part can also be used as the initial position of the target part, etc., which can be flexibly selected according to the actual situation.
  • a triangular mesh corresponding to the target part is constructed in the face image, so as to determine the position coordinates of the triangular mesh in the face image.
  • the initial position of the target site Through the above process, the initial positioning of the target part in the face image can be efficiently and accurately performed by means of key point recognition and grid construction, so as to facilitate the subsequent acquisition of target materials matching the target part, thereby improving image processing. accuracy and authenticity.
  • acquiring the target material corresponding to the target part may include:
  • the target part obtain the original target material corresponding to the target part
  • the standard material image is extracted to obtain the target material.
  • the original target material may be a preset material bound to the beauty makeup operation, for example, the original lip mask corresponding to the lip makeup operation may be used as the original target material.
  • the manner of obtaining the original target material is not limited in the embodiments of the present disclosure.
  • the material selected in the beauty makeup operation may be used as the original target material, or the corresponding original target material may be automatically read according to the beauty makeup operation.
  • the preset human face image may be a standard human face image template, which may include complete and comprehensive human face parts, and the positions of each human face part in the preset human face image are standard.
  • the realization form of the preset face image can be flexibly determined according to the actual situation, and any standard face used in the field of face image processing can be used as the realization form of the preset face image.
  • FIG. 4 shows a schematic diagram of a preset face image according to an embodiment of the present disclosure (same as the above-mentioned embodiment, in order to protect the objects in the image, part of the face in the figure is subjected to mosaic processing). From the figure, you can It can be seen that, in an example, the face positions contained in the preset face image are clear, complete and consistent with the objective distribution of the face positions of each person in the face.
  • the original target material can be directly fused with the position corresponding to the target part in the preset face image to obtain the standard material image.
  • the manner in which the original target material and the target part in the preset face image are fused is not limited in the embodiments of the present disclosure.
  • the original target material and the target part in the preset face image can be directly merged
  • the pixel values of the corresponding pixels in the face image are superimposed to obtain a standard material image; in some possible implementations, the original target material and the pixel values of the corresponding pixels in the target part in the preset face image can also be
  • the preset weights are weighted and superimposed to achieve fusion, etc.
  • the standard material image can be obtained by fusing the original target material with the target part in the preset face image.
  • the target material may be extracted from the standard material image based on the initial position in the above disclosed embodiments.
  • the method of extracting the target material based on the initial position may include: acquiring the color value and transparency of each pixel in the range corresponding to the initial position in the standard material image, The image composed of pixels is used as the target material.
  • the target material By fusing the original target material with the target part in the preset face image, a standard material image is obtained, and based on the initial position, the target material is extracted from the standard material image, because the initial position is based on the target part in the face image. Therefore, through the above process, the obtained target material can be more corresponding to the position of the target part in the face image, so that the original color of at least one pixel in the extracted target part can be more realistic and reliable.
  • the brightness information may include at least one of the first brightness, the second brightness, and the third brightness
  • step S12 may include:
  • Identify the processing type of the cosmetic operation and according to the processing type, extract at least one of the first brightness, the second brightness and the third brightness of the at least one pixel by using at least one processing method.
  • At least one processing method may include:
  • the first brightness of the pixel is determined according to the original color of the pixel. and / or,
  • the second brightness of the pixel point with the target brightness in the preset processing range is determined. and / or,
  • the pixel points are filtered through a preset convolution kernel, and the third brightness of the pixel points is determined according to the intermediate color obtained by the filtering of the pixel points, wherein the filtering range of the preset convolution kernel is consistent with the preset processing range .
  • the first brightness may be a brightness value determined according to the color value of the original color of the pixel, wherein the brightness value may be determined by calculating the color value, in an example, the brightness value may be determined according to three of the color values.
  • the values of the color channels red R, green G, and blue B are calculated.
  • the second brightness can also be determined according to the color value of the pixel with the target brightness, wherein the pixel with the target brightness can be in the target part of the face image, within the preset processing range of the pixel and having the highest Brightness of pixels.
  • the range size of the preset processing range can be flexibly set according to the actual situation, which is not limited in the embodiments of the present disclosure.
  • the third brightness may be a brightness value determined according to a color value of an intermediate color of a pixel, wherein the intermediate color of a pixel may be a color obtained by filtering the pixel through a preset convolution check.
  • the form and size of the preset convolution kernel can be flexibly set according to the actual situation.
  • the filtering range of the preset convolution kernel is consistent with the preset processing range in the above-mentioned disclosed embodiments, that is,
  • a pixel point may be filtered through a preset convolution check to obtain an intermediate color of the pixel point after filtering, and a corresponding brightness value is calculated according to the color value of the intermediate color, as the third brightness
  • the range of the area covered by the filtering of the pixel points by the preset convolution check can be used as the preset processing range, and the target part of the face image is located within the preset processing range and has the highest brightness. Brightness of the pixel value, which can be used as the second brightness.
  • the filtering method is also not limited in the embodiment of the present disclosure, and can be flexibly selected according to the actual situation.
  • Gaussian filtering can be performed on the pixels through a preset convolution check.
  • the brightness types included in the acquired brightness information may change, and the corresponding relationship between the acquired brightness information and processing types can be flexibly determined according to the actual situation, and is not limited to the following disclosed embodiments .
  • the brightness information when the treatment type includes a matte light effect, the brightness information may include a first brightness and a third brightness; in a possible implementation, when the treatment type includes a moisturizing light effect and/or in the case of a flickering light effect, the brightness information may include a first brightness, a second brightness and a third brightness.
  • the acquisition quantity and order of the first brightness, the second brightness, and the third brightness are not limited in the embodiments of the present disclosure.
  • multiple brightnesses can be acquired at the same time, or multiple brightnesses can be acquired sequentially in a certain order, etc., which can be flexibly selected according to the actual situation.
  • Adjusting the initial target color of the point can fully consider the brightness information of the pixels in the face image within a certain range, so that the target color determined based on the brightness information can be more realistic and reliable, and can meet the needs of light effect processing. , to improve the beauty and authenticity of the fused face image.
  • step S13 may include:
  • Step S131 according to the color selected in the beauty makeup operation, perform color search on the original color of at least one pixel in the target part, and obtain the initial target color of at least one pixel in the target part, wherein the initial target color matches the original color. ;
  • Step S132 based on the brightness information, adjust the initial target color to obtain the target color of at least one pixel in the target part.
  • the color selected in the beauty makeup operation may be the color used for the beauty makeup selected by the user when the user chooses to perform the beauty makeup operation, or it may be the color that is preset with the beauty makeup when the beauty makeup operation is selected.
  • the color corresponding to the makeup operation is bound, and the specific color value of the color can be flexibly determined according to the actual situation, which is not limited in the embodiments of the present disclosure.
  • the initial target color can be a color determined by searching based on the original color in the range of the selected color, and through the color search based on the selected color and the original color, the initial target color can be made to belong to the selected color.
  • the matching of the initial target color and the original color can be that the pixel values of the two correspond to each other through a certain color mapping relationship, or they can have the same color.
  • the initial target color can also be adjusted based on the brightness information to obtain the target color.
  • the adjustment method in the process of adjusting the initial target color according to the brightness information, can be flexibly selected according to the processing type corresponding to the beauty operation, so as to obtain the corresponding glossy effect suitable for the processing type. target color, etc. How to obtain the target color by further adjustment according to the initial target color, the implementation method can also refer to the following disclosed embodiments, which will not be expanded here.
  • the initial target color of at least one pixel in the target part is obtained, and the initial target color is adjusted according to the brightness information to get the target color.
  • color search can be used to obtain the target color that belongs to the range of the selected color and corresponds to the original color, so that the color of the target color is more realistic, and the color transition between different pixels is more natural, and then The naturalness and beauty effect of the fusion face image are improved; on the other hand, by introducing the brightness information, the initial target color can be flexibly adjusted, so as to obtain the target color that meets the requirements of the gloss effect.
  • step S131 may include:
  • the output color corresponding to the original color of at least one pixel in the target part is respectively searched in the color lookup table as the initial target color of at least one pixel in the target part.
  • the color lookup table may include a plurality of correspondences between input colors and output colors, wherein the input color may be the color searched in the color lookup table, and the output color may be the color found in the color lookup table. For example, for example, searching in the color lookup table according to the input color A, the output color B corresponding to A can be found.
  • the corresponding relationship between the colors in the color lookup table can be flexibly set according to the actual situation, which is not limited in this embodiment of the present disclosure.
  • the output colors in the color lookup table may be arranged in a gradient form, and the specific arrangement manner is not limited in the embodiments of the present disclosure, and is not limited to the following disclosed embodiments.
  • the color lookup table corresponding to the selected color can be obtained according to the color selected in the beauty operation.
  • the output color in the color lookup table belongs to the corresponding selected color. Therefore, the initial target color found according to the color lookup table can be within the corresponding range of the selected color and correspond to the original color.
  • the output color corresponding to each pixel can be searched from the color lookup table according to the original colors of the plurality of pixels in the target part, as the initial target color of the plurality of pixels in the target part.
  • the search method can be flexibly determined according to the form of the color look-up table, which is not limited in this embodiment of the present disclosure.
  • the color lookup table includes a plurality of gradient colors with natural transitions as output colors (due to the grayscale image display The color with different shades in the picture is actually a gradient color with color difference), after obtaining the original colors of multiple pixels in the target part, you can look up the output of these multiple pixels from the color lookup table. color as the initial target color.
  • the color lookup table containing the gradient output color can be used to obtain the initial target color with natural color transition, so that the subsequent obtained target color The transitions are also more natural, improving the naturalness and beauty of the resulting fused face image.
  • step S132 can also be flexibly changed.
  • step S132 may include:
  • the initial target color of the pixel is adjusted according to the first brightness and the preset brightness threshold to obtain the target color of the pixel.
  • the initial target color of the pixel is adjusted according to the first brightness and the third brightness to obtain the target color of the pixel.
  • the value of the preset brightness threshold may be flexibly set according to the actual situation, which is not limited in the embodiments of the present disclosure.
  • different data can be selected in different ways to adjust the initial target color of the pixel to obtain the target color of the pixel.
  • the method of adjusting the initial target color can be flexibly determined according to the actual situation, and is not limited to the following disclosed embodiments.
  • no matter what kind of data is used to adjust the initial target color of the pixel point The process of adjusting to obtain the target color can be summarized as the following process, that is, in a possible implementation manner, the initial target color of the pixel is adjusted to obtain the target color of the pixel.
  • the target color may include:
  • the initial target color of the pixel is adjusted to obtain the target color of the pixel.
  • the adjustment coefficient may be a related parameter in the process of adjusting the initial target color. With different processing types and comparison results, the calculation method of the adjustment coefficient can also be flexibly changed, and is not limited to the following disclosed embodiments.
  • the adjustment coefficient when the processing type is fog light effect and the first brightness is greater than the preset brightness threshold, the adjustment coefficient may be determined according to the first brightness and the preset brightness threshold, and the determination method may be based on The actual situation can be flexibly selected, and is not limited to the following disclosed embodiments.
  • the manner of determining the adjustment coefficient according to the first brightness and the preset brightness threshold can be expressed by the following formula (1):
  • Adjustment coefficient (first brightness - preset brightness threshold) ⁇ (-1.0)/(1.0 - preset brightness threshold) (1)
  • the adjustment coefficient when the processing type is fog light effect and the first brightness is less than or equal to the preset brightness threshold, the adjustment coefficient may be determined according to the first brightness and the third brightness, and the method of determining It can also be flexibly selected according to the actual situation, and is not limited to the following disclosed embodiments.
  • the manner of determining the adjustment coefficient according to the first brightness and the third brightness in the above situation can be expressed by the following formula (2):
  • Adjustment coefficient first brightness - third brightness (2):
  • the target color of the pixel can be determined according to the adjustment coefficient and the preset light source value. There is no limitation in the embodiments of the present disclosure.
  • the method of adjusting the initial target color based on the adjustment coefficient and the preset light source value can also be flexibly set according to the actual situation, and is not limited to the following disclosed embodiments.
  • the method is determined according to the adjustment coefficient and the preset light source value
  • the way of the target color can be expressed by the following formula (3):
  • Target color initial target color + adjustment factor ⁇ preset light source value (3)
  • the initial target color can be flexibly adjusted according to the brightness information of the pixel points according to the comparison between the first brightness and the preset brightness threshold, and the gloss of the target color can be reduced. degree and brightness, so as to obtain a fused face image with better haze light effect.
  • step S132 may include:
  • the initial target color of the pixel is adjusted according to the first brightness, the second brightness, the third brightness and the preset brightness radius to obtain the target color of the pixel. or,
  • the initial target color of the pixel is taken as the target color of the pixel.
  • the preset brightness radius may determine the radius of the bright spot in the light effect, and the value of the preset brightness radius may be flexibly set according to the actual situation, which is not limited in the embodiments of the present disclosure.
  • different data can be selected to adjust the initial target color of the pixel point in different ways to obtain the pixel point. target color.
  • the method of adjusting the initial target color may refer to the above disclosed embodiments, that is, the adjustment coefficient may be determined first, and then the target color may be determined based on the adjustment coefficient and the preset light source value.
  • the first brightness, the second brightness, the third brightness and the preset brightness radius can be used to determine The adjustment coefficient is jointly determined, and the determination method can be flexibly selected according to the actual situation, and is not limited to the following disclosed embodiments.
  • the method of jointly determining the adjustment coefficient according to the first brightness, the second brightness, the third brightness and the preset brightness radius can be performed by the following The formula (4) is used to express:
  • Adjustment coefficient pow((first brightness-third brightness)/(second brightness-third brightness),shiness) (4)
  • pow(x, y) indicates the result of calculating the y power of x
  • shine is the preset brightness radius
  • the manner in which the target color is determined based on the adjustment coefficient may refer to the foregoing disclosed embodiments, which will not be repeated here.
  • the adjustment coefficient when the processing type is moisturizing light effect, and the first brightness is less than or equal to the third brightness, the adjustment coefficient can be directly determined as 0.
  • the above formula As mentioned in (3), it can be seen from the method of determining the target color based on the adjustment coefficient that when the adjustment coefficient is 0, the target color can be directly equal to the initial target color. Therefore, in this case, the pixel point can be The initial target color of is the target color of the pixel.
  • the initial target color can be flexibly adjusted according to the comparison of the first brightness and the third brightness according to the brightness information of the pixel points, so as to improve the glossiness and brightness of the target color.
  • the color adjustment results of different pixel points are as consistent as possible, so as to obtain a fusion face image with good moisturizing light effect.
  • step S132 may include:
  • the initial target color of the pixel is adjusted according to the first brightness, the second brightness, the third brightness and the preset brightness radius to obtain the target color of the pixel. or,
  • a random value is generated within the first preset value range; according to the random value, the initial target color is adjusted to obtain the target color of at least one pixel in the target part.
  • the preset brightness radius reference may be made to the above disclosed embodiments. It should be noted that in different processing types, the preset brightness radius may have the same value or different values. limit.
  • different data can be selected in different ways to adjust the initial target color of the pixel, so as to obtain the pixel's initial target color. target color.
  • the method of adjusting the initial target color may refer to the above disclosed embodiments, that is, the adjustment coefficient may be determined first, and then the target color may be determined based on the adjustment coefficient and the preset light source value.
  • the processing type when the processing type is flickering light effect and the first brightness is greater than the third brightness, the first brightness, the second brightness, the third brightness and the preset brightness radius can be jointly The adjustment coefficient is determined, and the determination method can be flexibly selected according to the actual situation, and is not limited to the following disclosed embodiments.
  • the method of jointly determining the adjustment coefficient according to the first brightness, the second brightness, the third brightness and the preset brightness radius can be combined with the processing method.
  • the method of jointly determining the adjustment coefficient according to the first brightness, the second brightness, the third brightness and the preset brightness radius is the same. For details, please refer to the above disclosed embodiments and formula (4), It is not repeated here.
  • the manner in which the target color is determined based on the adjustment coefficient may also refer to the foregoing disclosed embodiments, and details are not described herein again.
  • an adjustment coefficient may be further determined according to the generated random value, and based on the adjustment coefficient, the The method proposed in the above disclosed embodiments determines the target color.
  • the random value may be randomly generated data information, and the manner of generating the random value is not limited in the embodiments of the present disclosure, and is not limited to the following disclosed embodiments.
  • a first preset value range may be preset in advance, and a random value may be randomly generated within the first preset value range.
  • the specific data range of the first preset numerical value range can be flexibly selected according to the actual situation.
  • the first preset numerical value range can be set to [0.0, 1.0].
  • the initial target color can be flexibly adjusted according to the comparison of the first brightness and the third brightness, according to the brightness information of the pixel points and the generated random value, and then the target color can be improved.
  • the flickering gloss effect is achieved by random values, so as to obtain a fusion face image with better flickering light effect.
  • the initial target color is adjusted according to the random value to obtain the target color of at least one pixel in the target part, which may include:
  • the initial target color of the pixel is adjusted according to the random value and the corresponding transparency of the pixel in the target material to obtain the target color of the pixel.
  • the initial target color of the pixel is used as the target color of the pixel.
  • the second preset value range may also be a preset value range, and the range value of the second preset value range should belong to the first preset value range.
  • the specific data range of the second preset value range can also be flexibly selected according to the actual situation.
  • the second preset value range can be set to [0.99, 1.0].
  • the pixel point in the target material corresponding to the position of the pixel point in the target part may be determined according to the positional correspondence between the target part and the target material, and the corresponding pixel in the target material The transparency of the point, as the corresponding transparency of the pixel point in the target material.
  • the adjustment coefficient may be determined according to the random value and the corresponding transparency of the pixel in the target material.
  • the method of determining the adjustment coefficient according to the random value and transparency can be flexibly determined according to the actual situation, and is not limited to the following disclosed embodiments. In a possible implementation manner, the method of determining the adjustment coefficient according to the random value and transparency can be It is expressed by the following formula (5):
  • Adjustment coefficient random value ⁇ pow (transparency, T) (5)
  • T is a preset value, and the specific value can be flexibly set according to the actual situation.
  • it can be in the range of 2 to 5.
  • the value of T can be 4.0; for the calculation method of pow, please refer to the above publications The embodiments are not repeated here.
  • the initial target color can be further adjusted by the methods proposed in the above disclosed embodiments to obtain the target color, and the specific methods are not repeated here.
  • the adjustment coefficient can be directly determined as 0.
  • the method of determining the target color based on the adjustment coefficient can be It can be seen that when the adjustment coefficient is 0, the target color can be directly equal to the initial target color. Therefore, in this case, the initial target color of the pixel can be used as the target color of the pixel.
  • the adjustment method for the initial target color can be flexibly changed by comparing the generated random value with the second preset value range.
  • step S14 may include:
  • the preset fusion strength respectively determine the first fusion ratio of the original color and the second fusion ratio of the target color
  • the original color and the target color are fused to obtain a fusion face image.
  • the preset fusion strength is used to indicate the respective fusion ratio or weight of the original color and the target color in the fusion process, and its value can be flexibly set according to the actual situation.
  • the fusion weight of the original color and the target color can be preset as the preset fusion strength; in a possible implementation, in the beauty operation for the face image, you can also Including the selection strength of the fusion strength, in this case, the fusion strength selected in the beauty operation can be used as the preset fusion strength.
  • the first ratio may be the fusion ratio of the original color in the fusion process
  • the second ratio may be the fusion ratio of the target color in the fusion process.
  • the preset fusion intensity the first fusion ratio and the second fusion ratio of the original color and the target color are respectively determined, and the original color and the target color are fused according to the corresponding fusion ratios, so as to obtain a fusion face image.
  • the preset fusion intensity can also be flexibly set according to actual needs, so as to obtain a fusion face image with fusion intensity and effect that meets the requirements, which improves the flexibility of image processing.
  • FIGS. 6 to 8 show schematic diagrams of fused face images according to an embodiment of the present disclosure (similar to the above disclosed embodiments, in order to protect the objects in the images, some parts of the faces in the figures are subjected to mosaic processing) , wherein Figure 6 is the fused face image obtained under the processing mode of the foggy light effect; Figure 7 is the fused face image obtained under the processing mode of the moisturizing light effect; Figure 8 is the processing mode of the flickering light effect.
  • the fused face image obtained below It can be seen from the above images that, through the image processing methods proposed in the above disclosed embodiments, a more realistic and natural fused face image with better fusion effect can be obtained.
  • FIG. 9 shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure.
  • the image processing apparatus 20 may include:
  • the original color extraction module 21 is configured to extract the original color of at least one pixel in the target part of the human face image in response to the cosmetic operation for the target part of the human face image.
  • the brightness information acquisition module 22 is configured to acquire the brightness information of at least one pixel in the target part.
  • the target color determination module 23 is configured to determine the target color of at least one pixel in the target part based on the original color and the brightness information.
  • the fusion module 24 is used to fuse the original color of at least one pixel in the target part with the target color to obtain a fused face image.
  • the target color determination module is used to: perform color search on the original color of at least one pixel in the target part according to the color selected in the beauty makeup operation, and determine the color of at least one pixel in the target part.
  • the initial target color wherein the initial target color matches the original color; based on the brightness information, the initial target color is adjusted to obtain the target color of at least one pixel in the target part.
  • the brightness information includes at least one of the first brightness, the second brightness, and the third brightness;
  • the brightness information acquisition module is used to: identify the processing type of the beauty operation, and according to the processing type, adopt at least one of the One processing method extracts at least one of the first brightness, the second brightness and the third brightness of at least one pixel;
  • at least one processing method includes: determining the first brightness of the pixel according to the original color of the pixel; and /or, according to the preset processing range of the pixel point in the target part, obtain the second brightness of the pixel point with the target brightness in the preset processing range; and/or filter the pixel point through a preset convolution check, The intermediate color obtained by the point filtering determines the third brightness of the pixel point, wherein the filtering range of the preset convolution kernel is consistent with the preset processing range.
  • the processing type includes a haze light effect
  • the brightness information includes a first brightness and a third brightness
  • the target color determination module is further configured to: when the first brightness is greater than a preset brightness threshold, according to The first brightness and the preset brightness threshold are adjusted to the initial target color of the pixel to obtain the target color of the pixel; or, when the first brightness is less than or equal to the preset brightness threshold, according to the first brightness and the third Brightness, adjust the initial target color of the pixel to obtain the target color of the pixel.
  • the processing type includes a moisturizing light effect
  • the brightness information includes a first brightness, a second brightness, and a third brightness
  • the target color determination module is further configured to: when the first brightness is greater than the third brightness Then, according to the first brightness, the second brightness, the third brightness and the preset brightness radius, the initial target color of the pixel is adjusted to obtain the target color of the pixel; or, when the first brightness is less than or equal to the third brightness In the case of , the initial target color of the pixel is used as the target color of the pixel.
  • the processing type includes a flickering light effect
  • the brightness information includes a first brightness, a second brightness, and a third brightness
  • the target color determination module is further configured to: when the first brightness is greater than the third brightness , according to the first brightness, the second brightness, the third brightness and the preset brightness radius, adjust the initial target color of the pixel to obtain the target color of the pixel; or, when the first brightness is less than or equal to the third brightness
  • a random value is generated within the first preset value range; according to the random value, the initial target color is adjusted to obtain the target color of at least one pixel in the target part.
  • the target color determination module is further configured to: in the case that the random value falls within the second preset value range, according to the random value and the corresponding transparency of the pixel in the target material, determine the value of the pixel.
  • the initial target color is adjusted to obtain the target color of the pixel; or, when the random value falls outside the second preset value range, the initial target color of the pixel is used as the target color of the pixel.
  • the target color determination module is further configured to: obtain a color lookup table corresponding to the selected color according to the selected color in the beauty makeup operation, wherein the output color in the color lookup table is a gradient The output color corresponding to the original color of at least one pixel in the target part is respectively searched in the color lookup table as the initial target color of at least one pixel in the target part.
  • the fusion module is used to: determine the first fusion ratio of the original color and the second fusion ratio of the target color according to the preset fusion strength; The original color and the target color are fused to obtain a fused face image.
  • the original color extraction module is used to: obtain the target material corresponding to the target part; according to the transparency of at least one pixel in the target material, extract the original color of at least one pixel in the target part of the face image .
  • the device is further used for: recognizing the target part in the face image to obtain the initial position of the target part in the face image; the original color extraction module is further used for: obtaining and matching the target part according to the target part.
  • the original target material corresponding to the target part; the original target material is fused with the target part in the preset face image to obtain a standard material image; based on the initial position, the standard material image is extracted to obtain the target material.
  • the beauty makeup operation includes a lip makeup operation
  • the target portion includes a lip portion
  • FIG. 10 shows a schematic diagram of an application example of the present disclosure.
  • the application example of the present disclosure proposes an image processing method, including the following processes:
  • Step S31 in response to the lip makeup operation on the lips of the face image, place the original lip makeup material (the lip makeup mask in FIG. 2 ) on the position where the lips are located in the preset face image as shown in FIG. 4 . position, get the standard material image;
  • Step S32 in the face image, determine the face key points through key point recognition, and use the face key points and some points interpolated through the face key points to construct the face area in the face image as shown in Figure 3. the triangular mesh;
  • Step S33 through the triangular mesh corresponding to the key points of the face, determine the position coordinates of the lips in the face image to sample the standard material image to obtain the target material;
  • Step S34 according to the target material, determine the image area where the lips are located in the face image, and obtain an image of the lips in the face image;
  • Step S35 extract the original color of a plurality of pixel points in the image of the lip part, and look up the corresponding initial target color on the color lookup table through the original color;
  • Step S36 through a preset convolution kernel, obtain the middle color of each pixel and the second brightness corresponding to the middle color after the image of the convolution kernel is subjected to Gaussian filtering on the lip part, and the convolution kernel is in the lip part.
  • Step S37 Adjust the initial target color according to the obtained adjustment coefficient and the preset light source value to obtain the target color; wherein, the method of obtaining the target color can refer to formula (3) in the above disclosed embodiments to obtain the adjustment
  • the method of coefficients can be seen in the following examples:
  • the adjustment coefficient for the initial target color can be obtained in the following manner: if the first brightness of the pixel (corresponding to the color value of the pixel) brightness value) is greater than the preset brightness threshold, then the adjustment coefficient is calculated by the formula (1) mentioned in the above disclosed embodiment; The mentioned formula (2) to calculate the adjustment coefficient;
  • the adjustment coefficient for the initial target color can be obtained in the following manner: if the first brightness of the pixel is greater than the third brightness, the above-mentioned disclosure
  • the formula (4) mentioned in the embodiment is used to calculate the adjustment coefficient; if the first brightness of the pixel is less than or equal to the third brightness, the adjustment coefficient is set to the first preset value, and the value of the first preset value is It can be flexibly set according to the actual situation, such as any value in [0,0.1], in an example, the preset value of the adjustment coefficient can be set to 0;
  • the adjustment coefficient for the initial target color can be obtained in the following manner: if the first brightness of the pixel is greater than the third brightness, the above disclosure is also used.
  • the formula (4) mentioned in the embodiment calculates the adjustment coefficient; if the first brightness of the pixel is less than or equal to the third brightness, then generate a random value within the first preset value range, and determine whether the random value is It belongs to the second preset value range.
  • the adjustment coefficient is calculated by the formula (5) mentioned in the above disclosed embodiment; if it does not belong, the adjustment coefficient is set to the second preset value, the second The value of the preset value can also be flexibly set according to the actual situation, which can be the same as or different from the first preset value, and the value range of the second preset value can also be [0, 0.1].
  • the second preset value can also be set to 0;
  • step S38 the target color and the original color are fused according to the preset fusion intensity given by the user to obtain the fused face images shown in Figs. 6-8.
  • the target color of fusion can be adjusted according to the brightness information in the face image to obtain a glossy effect conforming to the type of beauty treatment, so that the obtained face fusion image is more realistic, reliable and consistent with User needs.
  • the image processing method proposed in the application example of the present disclosure can be applied to other cosmetic operations, such as blush or eye shadow, in addition to the lip makeup processing on the lips in the face image. , with the different types of cosmetic operations, the image processing method proposed in the application example of the present disclosure can be flexibly expanded and modified accordingly.
  • the writing order of each step does not mean a strict execution order but constitutes any limitation on the implementation process, and the specific execution order of each step should be based on its function and possible Internal logic is determined.
  • Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • the computer-readable storage medium may be a volatile computer-readable storage medium or a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above method.
  • Embodiments of the present disclosure also provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running, the processor in the electronic device executes the above method.
  • the above-mentioned memory can be a volatile memory (volatile memory), such as RAM; or a 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 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.
  • the above-mentioned 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 function of the processor may also be other, which is not specifically limited in the embodiment of the present disclosure.
  • the electronic device may be provided as a terminal, server or other form of device.
  • an embodiment of the present disclosure further provides a computer program, which implements the above method when the computer program is executed by a processor.
  • FIG. 11 is a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
  • an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
  • the processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above.
  • processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components.
  • processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
  • Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, 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
  • Power supply assembly 806 provides power to various components of electronic device 800 .
  • Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
  • Multimedia component 808 includes a screen that provides 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 touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front-facing camera and/or a rear-facing 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 may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
  • Audio component 810 is configured to output and/or input audio signals.
  • audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode.
  • the received audio signal may be further stored in memory 804 or transmitted via communication component 816 .
  • 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, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 .
  • the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the 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 a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices.
  • Electronic device 800 may access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof.
  • the communication component 816 receives broadcast signals 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.
  • NFC near field communication
  • the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • 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 programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmed gate array
  • controller microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
  • FIG. 12 is a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server. 12
  • electronic device 1900 includes a 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 applications.
  • An application program 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-described methods.
  • the electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • Electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded 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 hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but 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.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, 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 disk read only memory
  • DVD digital versatile disk
  • memory sticks floppy disks
  • mechanically coded devices such as printers with instructions stored thereon Hole cards or raised structures in grooves, 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 (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or 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 network interface in each computing/processing device receives computer-readable program instructions from a 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 carrying out 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 instructions in one or more programming languages.
  • 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.
  • the 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 may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state personnel information of computer readable program instructions.
  • Computer readable program instructions can 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 that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks 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 in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.

Landscapes

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

Abstract

一种图像处理方法及装置(20)、电子设备(800、1900)和存储介质。方法包括:响应于针对人脸图像的目标部位的美妆操作,提取人脸图像的目标部位中至少一个像素点的原始颜色(S11);获取目标部位中至少一个像素点的亮度信息(S12);基于原始颜色以及亮度信息,确定目标部位中至少一个像素点的目标颜色(S13);将目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像(S14)。

Description

图像处理方法及装置、电子设备和存储介质
本申请要求在2021年02月23日提交中国专利局、申请号为202110203295.2、申请名称为“图像处理方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及计算机视觉领域,尤其涉及一种图像处理方法及装置、电子设备和存储介质。
背景技术
唇妆是指唇部的美容化妆,唇妆修饰后的嘴唇一般纯正且富有光泽。随着计算机视觉技术的发展,对包含嘴唇的图像进行处理以得到经过唇妆处理的图像,已愈加广泛地应用于人们的日常生活之中。然而,随着唇妆类型的不断增多,如何使得唇妆处理后的图像与自然唇妆处理后的光泽效果类似,仍是目前一个亟待解决的问题。
发明内容
本公开提出了一种图像处理方案。
根据本公开的一方面,提供了一种图像处理方法,包括:
响应于针对人脸图像的目标部位的美妆操作,提取所述人脸图像的目标部位中至少一个像素点的原始颜色;获取所述目标部位中至少一个像素点的亮度信息;基于所述原始颜色以及所述亮度信息,确定所述目标部位中至少一个像素点的目标颜色;将所述目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像。
在一种可能的实现方式中,所述基于所述原始颜色以及所述亮度信息,确定所述目标部位中至少一个像素点的目标颜色,包括:根据所述美妆操作中被选中的颜色,对所述目标部位中至少一个像素点的原始颜色进行颜色查找,确定所述目标部位中至少一个像素点的初始目标颜色,其中,所述初始目标颜色与所述原始颜色匹配;基于所述亮度信息,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色。
在一种可能的实现方式中,所述亮度信息包括第一亮度、第二亮度以及第三亮度中的至少一种;所述获取所述目标部位中至少一个像素点的亮度信息,包括:识别所述美妆操作的处理类型,根据所述处理类型,采用至少一种处理方式提取所述至少一个像素点的第一亮度、第二亮度以及第三亮度中的至少一种;所述至少一种处理方式包括:根据所述像素点的原始颜色,确定所述像素点的第一亮度;和/或,根据所述像素点在所述目标部位中的预设处理范围,获取所述预设处理范围中具有目标亮度的像素点的第二亮度;和/或,通过预设卷积核对所述像素点进行滤波,根据所述像素点经过滤波所得到的中间颜色,确定所述像素点的第三亮度,其中,所述预设卷积核的滤波范围与所述预设处理范围一致。
在一种可能的实现方式中,所述处理类型包括雾面光效,所述亮度信息包括所述第一亮度和所述第三亮度;所述基于所述亮度信息,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色,包括:在所述第一亮度大于预设亮度阈值的情况下,根据所述第一亮度以及所述预设亮度阈值,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色;或者,在所述第一亮度小于或等于预设亮度阈值的情况下,根据所述第一亮度以及所述第三亮度,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色。
在一种可能的实现方式中,所述处理类型包括水润光效,所述亮度信息包括所述第一亮度、所述第二亮度和所述第三亮度;所述基于所述亮度信息,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色,包括:在所述第一亮度大于所述第三亮度的情况下,根据所述第一亮度、所述第二亮度、所述第三亮度以及预设的亮度半径,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色;或者,在所述第一亮度小于或等于所述第三亮度的情况下,将所述像素点的初始目标颜色作为所述像素点的目标颜色。
在一种可能的实现方式中,所述处理类型包括闪烁光效,所述亮度信息包括第一亮度、第二亮度和第三亮度;所述基于所述亮度信息,对所述初始目标颜色进行调整,得到所述目标部位中至少一 个像素点的目标颜色,包括:在所述第一亮度大于所述第三亮度的情况下,根据所述第一亮度、所述第二亮度、所述第三亮度以及预设的亮度半径,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色;或者,在所述第一亮度小于或等于所述第三亮度的情况下,在第一预设数值范围内生成随机数值;根据所述随机数值,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色。
在一种可能的实现方式中,所述根据所述随机数值,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色,包括:在所述随机数值属于第二预设数值范围以内的情况下,根据所述随机数值和所述像素点在所述目标素材中对应的透明度,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色;或者,在所述随机数值属于第二预设数值范围以外的情况下,将所述像素点的初始目标颜色作为所述像素点的目标颜色。
在一种可能的实现方式中,所述根据所述美妆操作中被选中的颜色,对所述目标部位中至少一个像素点的原始颜色进行颜色查找,确定所述目标部位中至少一个像素点的初始目标颜色,包括:根据所述美妆操作中被选中的颜色,获取与所述被选中的颜色对应的颜色查找表,其中,所述颜色查找表中的输出颜色以渐变形式进行排列;在所述颜色查找表中分别查找与所述目标部位中至少一个像素点的原始颜色对应的输出颜色,作为所述目标部位中至少一个像素点的初始目标颜色。
在一种可能的实现方式中,所述将所述目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像,包括:根据预设融合强度,分别确定所述原始颜色的第一融合比例以及所述目标颜色的第二融合比例;根据所述第一融合比例和所述第二融合比例,将所述原始颜色与所述目标颜色进行融合,得到融合人脸图像。
在一种可能的实现方式中,所述响应于针对人脸图像的目标部位的美妆操作,提取所述人脸图像的目标部位中至少一个像素点的原始颜色,包括:获取所述目标部位对应的目标素材;根据所述目标素材中至少一个像素点的透明度,提取所述人脸图像的目标部位中至少一个像素点的原始颜色。
在一种可能的实现方式中,所述方法还包括:对所述人脸图像中的目标部位进行识别,得到所述人脸图像中目标部位的初始位置;所述获取所述目标部位对应的目标素材,包括:根据所述目标部位,获取与所述目标部位对应的原始目标素材;将所述原始目标素材与预设人脸图像中的目标部位进行融合,得到标准素材图像;基于所述初始位置,对所述标准素材图像进行提取,得到目标素材。
在一种可能的实现方式中,所述美妆操作包括唇妆操作,所述目标部位包括嘴唇部位。
根据本公开的一方面,提供了一种图像处理装置,包括:
原始颜色提取模块,用于响应于针对人脸图像的目标部位的美妆操作,提取所述人脸图像的目标部位中至少一个像素点的原始颜色;亮度信息获取模块,用于获取所述目标部位中至少一个像素点的亮度信息;目标颜色确定模块,用于基于所述原始颜色以及所述亮度信息,确定所述目标部位中至少一个像素点的目标颜色;融合模块,用于将所述目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像。
根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行上述图像处理方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述图像处理方法。
根据本公开的一方面,提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现上述图像处理方法。
在本公开实施例中,通过响应于针对人脸图像的美妆操作,提取人脸图像的目标部位中至少一个像素点的原始颜色,以及获取目标部位中至少一个像素点的亮度信息,并根据原始颜色和亮度信息,来确定目标部位中至少一个像素点的目标颜色,从而将目标部位中至少一个像素点的原始颜色和目标颜色进行融合,来得到融合人脸图像。通过上述过程,可以通过引入目标部位中至少一个像素点的亮度信息,来对原始颜色进行调整以得到目标颜色,从而使得融合了原始颜色和目标颜色的融合人脸图 像中的颜色具有更加真实的光泽效果,提升了融合人脸图像的效果和真实性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开一实施例的图像处理方法的流程图。
图2示出根据本公开一实施例的目标素材的示意图。
图3示出根据本公开一实施例的构建的三角网格的示意图。
图4示出根据本公开一实施例的预设人脸图像的示意图。
图5示出根据本公开一实施例的颜色查找表的示意图。
图6示出根据本公开一实施例的融合人脸图像的示意图。
图7示出根据本公开一实施例的融合人脸图像的示意图。
图8示出根据本公开一实施例的融合人脸图像的示意图。
图9示出根据本公开一实施例的图像处理装置的框图。
图10示出根据本公开一应用示例的示意图。
图11示出根据本公开实施例的一种电子设备的框图。
图12示出根据本公开实施例的一种电子设备的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
图1示出根据本公开一实施例的图像处理方法的流程图,该方法可以应用于图像处理装置或图像处理系统等,图像处理装置可以为终端设备、服务器或者其他处理设备等。其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一个示例中,该图像处理方法可以应用于云端服务器或本地服务器,云端服务器可以为公有云服务器,也可以为私有云服务器,根据实际情况灵活选择即可。
在一些可能的实现方式中,该图像处理方法也可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
如图1所示,在一种可能的实现方式中,所述图像处理方法可以包括:
步骤S11,响应于针对人脸图像的目标部位的美妆操作,提取人脸图像的目标部位中至少一个像素点的原始颜色。
其中,人脸图像可以是包含人脸的任意图像,人脸图像中可以包含一个人脸,也可以包含多个人脸,其实现形式可以根据实际情况灵活决定,在本公开实施例中不做限制。
针对人脸图像的美妆操作,其包含的操作内容可以根据实际情况灵活决定,不局限于下述各公 开实施例。在一种可能的实现方式中,该美妆操作可以包括指示对人脸图像进行美妆处理的操作;在一种可能的实现方式中,该美妆操作还可以包括选中用于进行美妆的颜色等;在一种可能的实现方式中,该美妆操作还可以包括指示美妆的处理类型的操作等。
其中,美妆操作的形式可以根据实际情况灵活决定,不局限于下述各公开实施例。在一种可能的实现方式中,美妆操作可以包括唇妆操作。
随着美妆操作形式的不同,美妆操作中包含的处理类型也可以灵活发生变化,在一种可能的实现方式中,美妆操作可以包含一种处理类型,在一些可能的实现方式中,美妆操作也可以同时包含多种处理类型等。在一种可能的实现方式中,在美妆操作包括唇妆操作的情况下,处理类型可以包括雾面光效、水润光效以及闪烁光效中的一种或多种。其中,雾面光效可以包括对嘴唇颜色的修饰以及光效的改变,得到具有低光泽度的雾面唇妆效果;水润光效可以包括对嘴唇颜色的修饰以及光效的改变,得到具有高光泽度且亮度过渡自然的水润唇妆效果;闪烁光效可以包括对嘴唇颜色的修饰以及光效的改变,得到具有高亮度、高光泽度且亮度具有间隔的闪烁唇妆效果。
目标部位可以是人脸图像中需要进行美妆的任意部位,目标部位包含哪些部位,其实现形式同样可以根据美妆操作的实际情况灵活决定,在一种可能的实现方式中,在美妆操作包括唇妆操作的情况下,目标部位可以包括嘴唇部位。
原始颜色可以是目标部位在人脸图像中未经处理过的颜色,从人脸图像的目标部位中提取至少一个像素点的原始颜色的方式在本公开实施例中不做限定,可以根据实际情况灵活决定。在一些可能的实现方式中,可以确定目标部位在人脸图像中所在的区域,并对该区域包含的一个或多个像素点的颜色进行提取,以得到人脸图像的目标部位中至少一个像素点的原始颜色。
步骤S12,获取目标部位中至少一个像素点的亮度信息。
其中,亮度信息可以为根据像素点在人脸图像的目标部位中的颜色等情况所确定的相关信息,其包含的信息内容可以根据实际情况灵活决定。亮度信息包含的信息种类,以及如何获取像素点的亮度信息,其实现方式可以详见下述各公开实施例,在此先不做展开。
步骤S13,基于原始颜色以及亮度信息,确定目标部位中至少一个像素点的目标颜色。
其中,目标颜色可以与原始颜色对应,且与亮度信息相关,从而在与原始颜色对应的基础上,反映亮度情况以实现对应的处理效果。在一些可能的实现方式中,可以根据亮度信息对原始颜色进行调整来得到目标颜色,在一些可能的实现方式中,也可以获取与原始颜色对应的颜色,再根据亮度信息对与原始颜色对应的颜色进行调整,以得到目标颜色等。具体如何根据原始颜色以及亮度信息来分别得到目标部位中至少一个像素点的目标颜色,其处理方式可以根据亮度信息包含的信息内容灵活决定,详见下述各公开实施例,在此先不做展开。
步骤S14,将目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像。
其中,将目标部位中至少一个像素点的原始颜色和目标颜色进行融合,可以是分别对目标部位中的多个像素点进行融合处理,其中,在像素点被进行融合处理的情况下,可以将该像素点基于原始颜色所确定的目标颜色,与该像素点的原始颜色进行融合,以得到该像素点融合后的颜色,继而得到融合人脸图像。
步骤S14中融合的方式可以根据实际情况灵活变化,详见下述各公开实施例,在此也先不做展开。
在本公开实施例中,通过响应于针对人脸图像的美妆操作,提取人脸图像的目标部位中至少一个像素点的原始颜色,以及获取目标部位中至少一个像素点的亮度信息,并根据原始颜色和亮度信息,来确定目标部位中至少一个像素点的目标颜色,从而将目标部位中至少一个像素点的原始颜色和目标颜色进行融合,来得到融合人脸图像。通过上述过程,可以通过引入目标部位中至少一个像素点的亮度信息,来对原始颜色进行调整以得到目标颜色,从而使得融合了原始颜色和目标颜色的融合人脸图像中的颜色具有更加真实的光泽效果,提升了融合人脸图像的效果和真实性。
在一种可能的实现方式中,步骤S11可以包括:
获取目标部位对应的目标素材;
根据目标素材中至少一个像素点的透明度,提取人脸图像的目标部位中至少一个像素点的原始颜色。
其中,目标素材可以是用于对人脸图像实现美妆的相关素材,目标素材的实现形式可以根据美妆操作的实际情况灵活决定。在一种可能的实现方式中,在美妆操作包括唇妆操作的情况下,目标素材可以是唇妆素材,比如唇部掩模(mask)等。
在一种可能的实现方式中,目标素材可以是在美妆操作中用户一并选中的素材;在一些可能的实现方式中,目标素材也可以是预先设置的素材,在美妆操作被选择的情况下自动被调用。在一些可能的实现方式中,目标素材还可以是基于人脸图像,对原始目标素材进行处理后所得到的素材。如何获取目标素材,其实现方式可以详见下述各公开实施例,在此先不做展开。
在获取目标部位对应的目标素材以后,可以根据目标素材中至少一个像素点的透明度,来提取人脸图像的目标部位中至少一个像素点的原始颜色。其中,提取的方式可以根据实际情况灵活决定,在一种可能的实现方式中,可以在目标素材中的像素点的透明度属于预设透明度范围的情况下,将人脸图像中与像素点的位置对应的区域,作为目标部位所在图像区域,并提取该图像区域中多个像素点的原始颜色。
其中,预设透明度范围的具体范围情况可以根据实际情况灵活决定,在一种可能的实现方式中,可以将预设透明度范围设定为低于100%,即在目标素材中像素点的透明度低于100%(并非全透明)的情况下,可以将人脸图像中与像素点的位置对应的区域,作为目标部位所在图像区域,并提取图像区域内像素点的原始颜色;在一种可能的实现方式中,也可以将预设透明度范围设定为低于其他透明度值,或是处于某一透明度范围以内等,本公开实施例对预设透明度范围的范围值不做限定。
通过在目标素材中的像素点的透明度属于预设透明度范围的情况下,对人脸图像对应的像素点的原始颜色进行提取,通过上述过程,可以通过设定预设透明度范围的值,更有针对性地确定符合需求的目标部位所在图像区域,从而从人脸图像中提取到更加准确的目标部位中的原始颜色,继而提升后续得到的融合人脸图像的可靠性和真实性。
图2示出根据本公开一实施例的目标素材的示意图,从图中可以看出,在一个示例中,目标素材可以为唇部掩模,且该唇部掩模中不同像素点的透明度不同,可以更好地表现自然真实的唇部形状,因此基于该唇部掩模提取到的人脸图像中的原始颜色,也更加准确可靠。
通过获取目标部位对应的目标素材,并根据目标素材中至少一个像素点的透明度来提取人脸图像的目标部位中至少一个像素点的原始颜色,通过上述过程,可以提取到更加真实可靠,与人脸图像中唇部真实位置相对应的原始颜色,继而使得后续基于原始颜色得到的融合人脸图像更加真实自然。
在一种可能的实现方式中,本公开实施例提出的方法还可以包括:对人脸图像中的目标部位进行识别,得到人脸图像中目标部位的初始位置。
其中,初始位置可以是根据人脸图像所确定的,目标部位在人脸图像中的大致位置。确定目标部位的初始位置的方法,在本公开实施例中不做限制,可以根据实际情况灵活选择,不局限于下述各公开实施例。
在一种可能的实现方式中,可以通过对目标部位的关键点进行识别的方式来确定目标部位的初始位置,比如可以根据识别到的目标部位的关键点在人脸图像中的坐标来确定初始位置;或是根据识别到目标部位的关键点来对目标部位在人脸图像中的范围进行确定,以得到目标部位的初始位置等。
在一种可能的实现方式中,对人脸图像中的目标部位进行识别,得到人脸图像中目标部位的初始位置,可以包括:
获取人脸图像中的至少一个人脸关键点;
根据人脸关键点,在人脸图像中构建与目标部位对应的三角网格;
根据三角网格的位置坐标,确定人脸图像中目标部位的初始位置。
其中,人脸关键点可以是对人脸面部中的关键区域位置进行定位的相关关键点,比如眼睛关键点、嘴巴关键点、眉毛关键点或是鼻子关键点等。获取到的人脸关键点具体包含哪些关键点以及包含的关键点数量在本公开实施例中不做限制,可以根据实际情况灵活选择。在一些可能的实现方式中, 可以获取人脸图像中相关的所有关键点,获取的关键点数量可以在100~300个之间,比如可以包括人脸的106个整脸关键点(Face106)等,或是包括240或282个人脸关键点等;在一些可能的实现方式中,也可以获取人脸图像中的部分关键点,比如与目标部位相关的关键点,比如嘴唇部位的相关关键点等。
获取人脸关键点的方式在本公开实施例中不做限制,任何可以对图像中的人脸关键点进行识别的方式,均可以作为获取人脸关键点的实现方式。
在获取到至少一个人脸关键点以后,可以根据人脸关键点,在人脸图像中构建三角网格。构建三角网格的方式在本公开实施例中不做限制,在一种可能的实现方式中,可以将获取到的人脸关键点中,每三个相邻的点进行连接以得到多个三角网格。在一些可能的实现方式中,还可以先根据获取到的人脸关键点进行插值处理,以得到插值点,再在人脸关键点与插值点共同构成的点集中,每三个相邻的点进行连接以得到多个三角网格。
图3示出根据本公开一实施例的构建的三角网格的示意图(为了对图像中的对象进行保护,图中人脸的部分部位进行了马赛克处理),从图中可以看出,在一种可能的实现方式中,通过对人脸图像中的人脸关键点与插值点进行连接,可以得到多个三角网格。
在一种可能的实现方式中,也可以根据人脸关键点,在人脸图像中构建与目标部位对应的三角网格,其中,构建三角网格的方式可以参考上述各公开实施例,区别在于可以获取与目标部位相关的人脸关键点和插值点,来构建与目标部位对应的三角网格,而省略对人脸图像中其他部位的三角网格的构建。
在得到与目标部位对应的三角网格以后,可以根据该三角网格在人脸图像中的位置坐标,来确定人脸图像中目标部位的初始位置。初始位置的表现形式在本公开实施例中不做限制,在一种可能的实现方式中,可以将目标部位对应的一个或多个三角网格的中心点位置作为目标部位的初始位置;在一种可能的实现方式中,也可以将目标部位对应的一个或多个三角网格的各顶点坐标作为目标部位的初始位置等,可以根据实际情况进行灵活选择。
通过获取人脸图像中的至少一个人脸关键点,并根据人脸关键点,在人脸图像中构建与目标部位对应的三角网格,从而根据三角网格的位置坐标,确定人脸图像中目标部位的初始位置。通过上述过程,可以通过关键点识别与网格构建的方式,高效且准确地对目标部位在人脸图像中的部位进行初步定位,从而便于后续获取与目标部位匹配的目标素材,继而提高图像处理的精度和真实性。
在一种可能的实现方式中,获取目标部位对应的目标素材可以包括:
根据目标部位,获取与目标部位对应的原始目标素材;
将原始目标素材与预设人脸图像中的目标部位进行融合,得到标准素材图像;
基于初始位置,对标准素材图像进行提取,得到目标素材。
其中,原始目标素材可以是预先设置好的,与美妆操作所绑定的素材,比如与唇妆操作对应的可以是原始的唇部掩模作为原始目标素材等。获取原始目标素材的方式在本公开实施例中不做限制,可以将美妆操作中选中的素材作为原始目标素材,也可以根据美妆操作,自动读取对应的原始目标素材等。
预设人脸图像可以是标准的人脸图像模板,可以包括完整全面的人脸部位,且各人脸部位在预设人脸图像中的位置是标准的。预设人脸图像的实现形式可以根据实际情况灵活决定,任何人脸图像处理领域中采用的标准脸(standard face)均可以作为预设人脸图像的实现形式。图4示出根据本公开一实施例的预设人脸图像的示意图(同上述实施例,为了对图像中的对象进行保护,图中人脸的部分部位进行了马赛克处理),从图中可以看出,在一个示例中,预设人脸图像中包含的人脸部位是清楚、完整且符合人脸中各人脸部位的客观分布的。
由于标准人脸图像中各人脸部位的位置是标准的,因此原始目标素材可以直接与预设人脸图像中目标部位对应的位置进行融合,以得到标准素材图像。原始目标素材与预设人脸图像中目标部位进行融合的方式在本公开实施例中不做限制,在一种可能的实现方式中,可以直接将原始目标素材与预设人脸图像中目标部位中对应的像素点的像素值进行叠加,来得到标准素材图像;在一些可能的实现 方式中,也可以将原始目标素材与预设人脸图像中的目标部位中对应的像素点的像素值按照预设的权重进行加权叠加以实现融合等。
将原始目标素材与预设人脸图像中的目标部位进行融合,可以得到标准素材图像。在一种可能的实现方式中,可以基于上述各公开实施例中的初始位置,来从标准素材图像中提取目标素材。
在一种可能的实现方式中,基于初始位置提取目标素材的方式可以包括:获取标准素材图像中与初始位置对应范围内的各像素点的颜色值和透明度,将包含颜色值和透明度的多个像素点所构成的图像,作为目标素材。
通过将原始目标素材与预设人脸图像中的目标部位进行融合,得到标准素材图像,并基于初始位置,从标准素材图像中提取目标素材,由于初始位置是根据对人脸图像中目标部位进行识别所得到的,因此通过上述过程,可以使得获取的目标素材与人脸图像中目标部位所在的位置更加对应,从而使得提取到的目标部位中至少一个像素点的原始颜色更加真实可靠。
在一种可能的实现方式中,亮度信息可以包括第一亮度、第二亮度以及第三亮度中的至少一种,步骤S12可以包括:
识别美妆操作的处理类型,根据处理类型,采用至少一种处理方式提取至少一个像素点的第一亮度、第二亮度以及第三亮度中的至少一种。
其中,至少一种处理方式可以包括:
根据像素点的原始颜色,确定像素点的第一亮度。和/或,
根据像素点在目标部位中的预设处理范围,确定预设处理范围中具有目标亮度的像素点的第二亮度。和/或,
通过预设卷积核对所述像素点进行滤波,根据像素点经过滤波所得到的中间颜色,确定像素点的第三亮度,其中,预设卷积核的滤波范围与所述预设处理范围一致。
其中,第一亮度可以为根据像素点的原始颜色的颜色值所确定的亮度值,其中,亮度值可以通过对颜色值进行计算所确定,在一个示例中,亮度值可以根据颜色值中三个颜色通道(红色R、绿色G以及蓝色B)的值进行计算所得到。
第二亮度同样可以根据具有目标亮度的像素点的颜色值所确定,其中,具有目标亮度的像素点,可以是在人脸图像的目标部位中,位于像素点的预设处理范围以内且具有最高亮度的像素点。其中,预设处理范围的范围大小可以根据实际情况灵活设定,在本公开实施例中不做限制。
第三亮度可以是根据对像素点的中间颜色的颜色值所确定的亮度值,其中,像素点的中间颜色,可以是通过预设卷积核对像素点进行滤波后所得到的颜色。其中,预设卷积核的形式与大小可以根据实际情况灵活设定,在一种可能的实现方式中,预设卷积核的滤波范围与上述公开实施例中的预设处理范围一致,即在一个示例中,一方面可以通过预设卷积核对像素点进行滤波处理,以得到该像素点在滤波后的中间颜色,并根据中间颜色的颜色值计算对应的亮度值,作为第三亮度,另一方面可以将预设卷积核对像素点进行滤波所覆盖的区域范围作为预设处理范围,则人脸图像的目标部位中,位于该预设处理范围以内且具有最高亮度的像素点的亮度值,可以作为第二亮度。
滤波的方式在本公开实施例中也不做限制,可以根据实际情况灵活选择,在一个示例中,可以通过预设卷积核对像素点进行高斯滤波。
处理类型的实现方式可以参考上述各公开实施例,在此不再赘述。随着处理类型的不同,获取的亮度信息中,包括的亮度类型可能发生变化,获取的亮度信息与处理类型之间的对应关系,可以根据实际情况灵活决定,不局限于下述各公开实施例。在一种可能的实现方式中,在处理类型包括雾面光效的情况下,亮度信息可以包括第一亮度和第三亮度;在一种可能的实现方式中,在处理类型包括水润光效和/或闪烁光效的情况下,亮度信息可以包括第一亮度、第二亮度和第三亮度。
上述各公开实施例中,第一亮度、第二亮度以及第三亮度的获取数量以及顺序在本公开实施例中不做限定,在获取第一亮度、第二亮度以及第三亮度中的多种亮度的情况下,可以同时获取多种亮度,也可以按照一定的顺序依次获取多种亮度等,根据实际情况灵活选择即可。
通过根据像素点的原始颜色确定的第一亮度、根据像素点在目标部位中的预设处理范围所确定 的第二亮度以及根据像素点滤波后的颜色值所确定的第三亮度,来对像素点的初始目标颜色进行调整,可以充分考虑到人脸图像中像素点在一定范围内的亮度信息,从而使得基于该亮度信息所确定的目标颜色可以更加真实可靠,且能满足光效处理的需求,提高融合人脸图像的美妆效果和真实性。
在一种可能的实现方式中,步骤S13可以包括:
步骤S131,根据美妆操作中被选中的颜色,对目标部位中至少一个像素点的原始颜色进行颜色查找,得到目标部位中至少一个像素点的初始目标颜色,其中,初始目标颜色与原始颜色匹配;
步骤S132,基于亮度信息,对初始目标颜色进行调整,得到目标部位中至少一个像素点的目标颜色。
其中,美妆操作中被选中的颜色,可以是用户在选择进行美妆操作的情况下一并选中的美妆所用的颜色,也可以是选择美妆操作的情况下,预先设置好的与美妆操作所绑定对应的颜色,该颜色的具体颜色值可以根据实际情况灵活决定,在本公开实施例中不做限制。
初始目标颜色可以是在被选中的颜色的范围中,基于原始颜色进行查找所确定的颜色,通过基于被选中的颜色和原始颜色所进行的颜色查找,可以使得该初始目标颜色属于被选中的颜色范围以内,且与原始颜色匹配,初始目标颜色与原始颜色的匹配,可以是二者的像素值通过一定的颜色映射关系进行对应,也可以是具有相同的颜色等。
如何根据被选中的颜色和原始颜色,对目标部位中至少一个像素点的初始目标颜色进行颜色查找,其查找方式可以根据实际情况灵活决定,详见下述各公开实施例,在此先不做展开。
在确定初始目标颜色以后,还可以基于亮度信息,对初始目标颜色进行调整,以得到目标颜色。在一些可能的实现方式中,根据亮度信息对初始目标颜色进行调整的过程中,可以根据美妆操作对应的处理类型,来灵活选择调整方式,以得到与处理类型相适应的具有对应光泽效果的目标颜色等。如何根据初始目标颜色进一步调整来得到目标颜色,其实现方式同样可以详见下述各公开实施例,在此也先不做展开。
通过根据美妆操作中被选中的颜色,对目标部位中至少一个像素点的原始颜色进行颜色查找,得到目标部位中至少一个像素点的初始目标颜色,并根据亮度信息,对初始目标颜色进行调整以得到目标颜色。通过上述过程,一方面可以利用颜色查找,得到属于被选中的颜色的范围,且与原始颜色对应的目标颜色,从而使得目标颜色的颜色更加真实,不同像素点之间颜色的过度更加自然,继而提升了融合人脸图像的自然程度与美妆效果;另一方面通过引入亮度信息,灵活地对初始目标颜色进行调整,从而得到符合光泽效果需求的目标颜色。
在一种可能的实现方式中,步骤S131可以包括:
根据美妆操作中被选中的颜色,获取与被选中的颜色对应的颜色查找表,其中,颜色查找表中的输出颜色以渐变形式进行排列;
在颜色查找表中分别查找与目标部位中至少一个像素点的原始颜色对应的输出颜色,作为目标部位中至少一个像素点的初始目标颜色。
其中,颜色查找表可以包含多个输入颜色与输出颜色之间的对应关系,其中输入颜色可以为向颜色查找表进行查找的颜色,输出颜色可以为颜色查找表中查找到的颜色。举例来说,比如根据输入颜色A在颜色查找表中查找,可以找到与A对应的输出颜色B。颜色查找表中颜色之间的对应关系可以根据实际情况灵活设定,在本公开实施例中不做限制。在一种可能的实现方式中,颜色查找表中的输出颜色可以通过渐变形式进行排列,具体的排列方式在本公开实施例中不做限制,不局限于下述各公开实施例。
在一种可能的实现方式中,可以根据美妆操作中被选中的颜色,来获取与被选中的颜色对应的颜色查找表,在这种情况下,颜色查找表中的输出颜色属于对应的被选中的颜色的范围以内,因而根据颜色查找表查找到的初始目标颜色,可以在被选中的颜色的相应范围以内,且与原始颜色相互对应。
在获取到颜色查找表以后,可以根据目标部位中多个像素点的原始颜色,分别从颜色查找表中查找各像素点对应的输出颜色,来作为目标部位中多个像素点的初始目标颜色。查找的方式可以根据颜色查找表的形式灵活决定,在本公开实施例中不做限定。
图5示出根据本公开一实施例的颜色查找表的示意图,从图中可以看出,在一个示例中,颜色查找表中包括多个自然过渡的渐变色作为输出颜色(由于灰度图显示的限制,图中深浅不同的颜色实际上为具有颜色区别的渐变色),在获取到目标部位中多个像素点的原始颜色后,可以从颜色查找表中分别查找这多个像素点的输出颜色来作为初始目标颜色。
通过根据美妆操作中被选中的颜色,获取与被选中的颜色对应的包含多个渐变输出颜色的颜色查找表,并在颜色查找表中分别查找与目标部位中至少一个像素点的原始颜色对应的输出颜色,来作为目标部位中至少一个像素点的初始目标颜色,通过上述过程,可以利用包含渐变输出颜色的颜色查找表,得到颜色过渡自然的初始目标颜色,从而使得后续得到的目标颜色的过渡也更加自然,提高得到的融合人脸图像的自然程度和美妆效果。
随着亮度信息与处理类型的不同,步骤S132的实现形式也可以灵活发生变化,在一种可能的实现方式中,在处理类型包括雾面光效的情况下,步骤S132可以包括:
在第一亮度大于预设亮度阈值的情况下,根据第一亮度以及预设亮度阈值,对像素点的初始目标颜色进行调整,得到像素点的目标颜色。或者,
在第一亮度小于或等于预设亮度阈值的情况下,根据第一亮度以及第三亮度,对像素点的初始目标颜色进行调整,得到所述像素点的目标颜色。
其中,预设亮度阈值的数值可以根据实际情况灵活设定,在本公开实施例中不做限制。
根据第一亮度和预设亮度阈值的比较结果,可以通过不同的方式,选用不同的数据,来对像素点的初始目标颜色进行调整,以得到像素点的目标颜色。
其中,对初始目标颜色进行调整的方式可以根据实际情况灵活决定,不局限于下述各公开实施例,在一种可能的实现方式中,无论通过何种数据来对像素点的初始目标颜色进行调整来得到目标颜色,其过程均可以概况为下述过程,即在一种可能的实现方式中,对像素点的初始目标颜色进行调整,得到像素点的目标颜色可以包括:
根据对应的数据,确定对初始目标颜色进行调整的调整系数;
根据调整系数和预设光源值,对像素点的初始目标颜色进行调整,得到像素点的目标颜色。
其中,调整系数可以是对初始目标颜色进行调整过程中的相关参数。随着处理类型以及比较结果的不同,调整系数的计算方式也可以灵活发生变化,不局限于下述各公开实施例。在一种可能的实现方式中,在处理类型为雾面光效,且第一亮度大于预设亮度阈值的情况下,可以根据第一亮度以及预设亮度阈值确定调整系数,确定的方式可以根据实际情况灵活选择,不局限于下述各公开实施例。在一种可能的实现方式中,根据第一亮度以及预设亮度阈值确定调整系数的方式,可以通过下述公式(1)进行表示:
调整系数=(第一亮度-预设亮度阈值)×(-1.0)/(1.0-预设亮度阈值)   (1)
在一种可能的实现方式中,在处理类型为雾面光效,且第一亮度小于或等于预设亮度阈值的情况下,可以根据第一亮度以及第三亮度来确定调整系数,确定的方式同样可以根据实际情况灵活选择,不局限于下述各公开实施例。在一种可能的实现方式中,在上述情况下根据第一亮度以及第三亮度确定调整系数的方式,可以通过下述公式(2)进行表示:
调整系数=第一亮度-第三亮度           (2):
在确定调整系数以后,可以根据调整系数和预设光源值来确定像素点的目标颜色,其中,预设光源值可以为根据实际情况灵活为美妆操作进行设定的光源值,其数值的大小在本公开实施例中不做限制。
基于调整系数和预设光源值对初始目标颜色进行调整的方式,同样可以根据实际情况灵活设定,不局限于下述各公开实施例,在一个示例中,根据调整系数和预设光源值确定目标颜色的方式可以通过下述公式(3)进行表示:
目标颜色=初始目标颜色+调整系数×预设光源值        (3)
通过上述过程,可以在处理类型为雾面光效的情况下,根据第一亮度与预设亮度阈值的比较情况,根据像素点的亮度信息对初始目标颜色进行灵活调整,减小目标颜色的光泽度和亮度,从而得到 具有较好的雾面光效的融合人脸图像。
在一种可能的实现方式中,在处理类型包括水润光效的情况下,步骤S132可以包括:
在第一亮度大于第三亮度的情况下,根据第一亮度、第二亮度、第三亮度以及预设的亮度半径,对像素点的初始目标颜色进行调整,得到像素点的目标颜色。或者,
在第一亮度小于或等于所述第三亮度的情况下,将像素点的初始目标颜色作为像素点的目标颜色。
其中,预设的亮度半径可以决定光效中亮斑的半径,预设的亮度半径的值可以根据实际情况灵活设定,在本公开实施例中不做限定。
在处理类型为水润光效的情况下,根据第一亮度和第三亮度的比较结果,可以通过不同的方式,选用不同的数据,来对像素点的初始目标颜色进行调整,以得到像素点的目标颜色。
其中,对初始目标颜色进行调整的方式可以参考上述各公开实施例,即可以先确定调整系数,再基于调整系数和预设光源值确定目标颜色。
在一种可能的实现方式中,在处理类型为水润光效,且第一亮度大于第三亮度的情况下,可以根据第一亮度、第二亮度、第三亮度以及预设的亮度半径来共同确定调整系数,确定的方式可以根据实际情况灵活选择,不局限于下述各公开实施例。在一种可能的实现方式中,在处理类型为水润光效的情况下,根据第一亮度、第二亮度、第三亮度以及预设的亮度半径来共同确定调整系数的方式,可以通过下述公式(4)进行表示:
调整系数=pow((第一亮度-第三亮度)/(第二亮度-第三亮度),shiness)  (4)
其中,pow(x,y)表明计算x的y次方的结果,shiness为预设的亮度半径。
在通过上述方式确定调整系数以后,基于调整系数确定目标颜色的方式可以参考上述各公开实施例,在此不再赘述。
在一种可能的实现方式中,在处理类型为水润光效,且第一亮度小于或等于第三亮度的情况下,可以直接将调整系数确定为0,在这种情况下,通过上述公式(3)中提到的,基于调整系数确定目标颜色的方式可以看出,在调整系数为0的情况下,目标颜色可以直接等于初始目标颜色,因此,在这种情况下,可以将像素点的初始目标颜色作为像素点的目标颜色。
通过上述过程,可以在处理类型为水润光效的情况下,根据第一亮度与第三亮度的比较情况,根据像素点的亮度信息对初始目标颜色进行灵活调整,提升目标颜色的光泽度和亮度的同时,使得不同像素点的颜色调整结果尽可能地连贯,从而得到具有较好的水润光效的融合人脸图像。
在一种可能的实现方式中,在处理类型包括闪烁光效的情况下,步骤S132可以包括:
在第一亮度大于第三亮度的情况下,根据第一亮度、第二亮度、第三亮度以及预设的亮度半径,对像素点的初始目标颜色进行调整,得到像素点的目标颜色。或者,
在第一亮度小于或等于第三亮度的情况下,在第一预设数值范围内生成随机数值;根据随机数值,对初始目标颜色进行调整,得到目标部位中至少一个像素点的目标颜色。
其中,预设的亮度半径可以参考上述各公开实施例,需要注意的是,在不同的处理类型中,预设的亮度半径的值可以相同,也可以不同,在本公开实施例中也不做限制。
在处理类型为闪烁光效的情况下,根据第一亮度和第三亮度的比较结果,可以通过不同的方式,选用不同的数据,来对像素点的初始目标颜色进行调整,以得到像素点的目标颜色。
其中,对初始目标颜色进行调整的方式可以参考上述各公开实施例,即可以先确定调整系数,再基于调整系数和预设光源值确定目标颜色。
在一种可能的实现方式中,在处理类型为闪烁光效,且第一亮度大于第三亮度的情况下,可以根据第一亮度、第二亮度、第三亮度以及预设的亮度半径来共同确定调整系数,确定的方式可以根据实际情况灵活选择,不局限于下述各公开实施例。在一种可能的实现方式中,在处理类型为闪烁光效的情况下,根据第一亮度、第二亮度、第三亮度以及预设的亮度半径来共同确定调整系数的方式,可以与在处理类型为水润光效的情况下,根据第一亮度、第二亮度、第三亮度以及预设的亮度半径来共同确定调整系数的方式相同,详见上述各公开实施例以及公式(4),在此不再赘述。
在通过上述方式确定调整系数以后,基于调整系数确定目标颜色的方式同样可以参考上述各公开实施例,在此不再赘述。
在一种可能的实现方式中,在处理类型为闪烁光效,且第一亮度小于或等于第三亮度的情况下,可以进一步根据生成的随机数值,来确定调整系数,并基于调整系数,通过上述各公开实施例中提出的方式来确定目标颜色。
其中,随机数值可以为随机生成的数据信息,随机数值的生成方式在本公开实施例中不做限制,不局限于下述各公开实施例。在一种可能的实现方式中,可以先预先设置一个第一预设数值范围,并在该第一预设数值范围以内随机来生成一个随机数值。第一预设数值范围的具体数据范围可以根据实际情况灵活选择,在一个示例中,可以将第一预设数值范围设置为[0.0,1.0]。
在生成随机数值以后,如何基于随机数值来确定调整系数,从而实现对初始目标颜色的调整,其实现方式可以根据实际情况灵活决定,详见下述各公开实施例,在此先不做展开。
通过上述过程,可以在处理类型为闪烁光效的情况下,根据第一亮度与第三亮度的比较情况,根据像素点的亮度信息以及生成的随机数值对初始目标颜色进行灵活调整,在提升目标颜色的光泽度和亮度的同时,通过随机数值来实现闪烁的光泽效果,从而得到具有较好的闪烁光效的融合人脸图像。
在一种可能的实现方式中,根据随机数值,对初始目标颜色进行调整,得到目标部位中至少一个像素点的目标颜色,可以包括:
在随机数值属于第二预设数值范围以内的情况下,根据随机数值和像素点在目标素材中对应的透明度,对像素点的初始目标颜色进行调整,得到像素点的目标颜色。或者,
在随机数值属于第二预设数值范围以外的情况下,将像素点的初始目标颜色作为像素点的目标颜色。
其中,第二预设数值范围同样可以是预先设定的数值范围,且第二预设数值范围的范围值应该属于第一预设数值范围以内。第二预设数值范围的具体数据范围同样可以根据实际情况灵活选择,在一个示例中,可以将第二预设数值范围设置为[0.99,1.0]。
目标素材的实现形式可以参考上述各公开实施例,在此不再赘述。在一种可能的实现方式中,可以根据目标部位与目标素材之间的位置对应关系,来确定目标素材中与目标部位内的像素点的位置对应的像素点,并将目标素材中该对应像素点的透明度,作为像素点在目标素材中对应的透明度。
在随机数值属于第二预设数值范围以内的情况下,可以根据随机数值和像素点在目标素材中对应的透明度,来确定调整系数。其中,根据随机数值和透明度确定调整系数的方式可以根据实际情况灵活决定,不局限于下述各公开实施例,在一种可能的实现方式中,根据随机数值和透明度确定调整系数的方式,可以通过下述公式(5)进行表示:
调整系数=随机数值×pow(透明度,T)        (5)
其中,T为预设数值,具体的数值可以根据实际情况灵活设定,比如可以在2~5的范围内,在一个示例中,T的值可以为4.0;pow的计算方式可以参考上述各公开实施例,在此不再赘述。
在通过上述公开实施例,基于随机数值和透明度确定调整系数以后,可以进一步通过上述各公开实施例中提出的方式对初始目标颜色进行调整,得到目标颜色,具体方式在此不再赘述。
在随机数值属于第二预设数值范围以外的情况下,可以直接将调整系数确定为0,在这种情况下,通过上述公式(3)中提到的,基于调整系数确定目标颜色的方式可以看出,在调整系数为0的情况下,目标颜色可以直接等于初始目标颜色,因此,在这种情况下,可以将像素点的初始目标颜色作为像素点的目标颜色。
在本公开实施例中,通过生成的随机数值与第二预设数值范围的比较,来灵活改变对初始目标颜色的调整方式,通过上述过程,可以通过随机生成的数值对不同像素点进行不同方式的颜色调整处理,从而更好地对闪烁情况进行模拟,得到更加自然逼真的具有闪烁光效的融合人脸图像。
在得到目标颜色以后,可以通过步骤S14,来对原始颜色和目标颜色进行融合,在一种可能的实现方式中,步骤S14可以包括:
根据预设融合强度,分别确定原始颜色的第一融合比例以及目标颜色的第二融合比例;
根据第一融合比例和第二融合比例,将原始颜色与目标颜色进行融合,得到融合人脸图像。
其中,预设融合强度用于指示原始颜色和目标颜色在融合过程中各自的融合比例或权重,其数值可以根据实际情况灵活设定。在一种可能的实现方式中,可以预先设置好原始颜色与目标颜色的融合权重,作为预设融合强度;在一种可能的实现方式中,针对于人脸图像的美妆操作中,也可以包括对融合强度的选择强度,在这种情况下,可以将美妆操作中被选中的融合强度作为预设融合强度。
第一比例可以是原始颜色在融合过程中的融合比例,第二比例可以是目标颜色在融合过程中的融合比例,在根据预设融合强度分别确定第一融合比例和第二融合比例以后,可以将原始颜色与目标颜色按照对应的融合比例进行相互融合,以得到融合人脸图像,其中,在按照融合比例进行融合的过程中,可以是直接通过叠加进行融合,也可以是通过一些其他的方式,如正片叠底或是柔光等图像处理方式进行融合,具体选择何种融合方式在本公开实施例中同样不做限制。
通过根据预设融合强度,分别确定原始颜色与目标颜色的第一融合比例和第二融合比例,并将原始颜色与目标颜色分别按照对应的融合比例进行融合,得到融合人脸图像,通过上述过程,还可以根据实际需求,灵活设定预设融合强度,来得到融合强度与效果符合需求的融合人脸图像,提升了图像处理的灵活性。
随着美妆操作中处理类型的不同,最终得到的融合人脸图像也可以灵活随之变化。图6~图8示出根据本公开一实施例的融合人脸图像的示意图(同上述各公开实施例,为了对图像中的对象进行保护,各图中人脸的部分部位进行了马赛克处理),其中图6为在雾面光效的处理方式下得到的融合人脸图像;图7为在水润光效的处理方式下得到的融合人脸图像;图8为在闪烁光效的处理方式下得到的融合人脸图像。通过上述各图像可以看出,通过上述各公开实施例提出的图像处理方法,可以得到较为真实自然,具有较好融合效果的融合人脸图像。
图9示出根据本公开一实施例的图像处理装置的框图。如图所示,所述图像处理装置20可以包括:
原始颜色提取模块21,用于响应于针对人脸图像的目标部位的美妆操作,提取人脸图像的目标部位中至少一个像素点的原始颜色。
亮度信息获取模块22,用于获取目标部位中至少一个像素点的亮度信息。
目标颜色确定模块23,用于基于原始颜色以及亮度信息,确定目标部位中至少一个像素点的目标颜色。
融合模块24,用于将目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像。
在一种可能的实现方式中,目标颜色确定模块用于:根据美妆操作中被选中的颜色,对目标部位中至少一个像素点的原始颜色进行颜色查找,确定目标部位中至少一个像素点的初始目标颜色,其中,初始目标颜色与原始颜色匹配;基于亮度信息,对初始目标颜色进行调整,得到目标部位中至少一个像素点的目标颜色。
在一种可能的实现方式中,亮度信息包括第一亮度、第二亮度以及第三亮度中的至少一种;亮度信息获取模块用于:识别美妆操作的处理类型,根据处理类型,采用至少一种处理方式提取至少一个像素点的第一亮度、第二亮度以及第三亮度中的至少一种;至少一种处理方式包括:根据像素点的原始颜色,确定像素点的第一亮度;和/或,根据像素点在目标部位中的预设处理范围,获取预设处理范围中具有目标亮度的像素点的第二亮度;和/或,通过预设卷积核对像素点进行滤波,根据像素点经过滤波所得到的中间颜色,确定像素点的第三亮度,其中,预设卷积核的滤波范围与预设处理范围一致。
在一种可能的实现方式中,处理类型包括雾面光效,亮度信息包括第一亮度和第三亮度;目标颜色确定模块进一步用于:在第一亮度大于预设亮度阈值的情况下,根据第一亮度以及预设亮度阈值,对像素点的初始目标颜色进行调整,得到像素点的目标颜色;或者,在第一亮度小于或等于预设亮度阈值的情况下,根据第一亮度以及第三亮度,对像素点的初始目标颜色进行调整,得到像素点的目标颜色。
在一种可能的实现方式中,处理类型包括水润光效,亮度信息包括第一亮度、第二亮度和第三亮度;目标颜色确定模块进一步用于:在第一亮度大于第三亮度的情况下,根据第一亮度、第二亮度、第三亮度以及预设的亮度半径,对像素点的初始目标颜色进行调整,得到像素点的目标颜色;或者,在第一亮度小于或等于第三亮度的情况下,将像素点的初始目标颜色作为像素点的目标颜色。
在一种可能的实现方式中,处理类型包括闪烁光效,亮度信息包括第一亮度、第二亮度和第三亮度;目标颜色确定模块进一步用于:在第一亮度大于第三亮度的情况下,根据第一亮度、第二亮度、第三亮度以及预设的亮度半径,对像素点的初始目标颜色进行调整,得到像素点的目标颜色;或者,在第一亮度小于或等于第三亮度的情况下,在第一预设数值范围内生成随机数值;根据随机数值,对初始目标颜色进行调整,得到目标部位中至少一个像素点的目标颜色。
在一种可能的实现方式中,目标颜色确定模块进一步用于:在随机数值属于第二预设数值范围以内的情况下,根据随机数值和像素点在目标素材中对应的透明度,对像素点的初始目标颜色进行调整,得到像素点的目标颜色;或者,在随机数值属于第二预设数值范围以外的情况下,将像素点的初始目标颜色作为像素点的目标颜色。
在一种可能的实现方式中,目标颜色确定模块进一步用于:根据美妆操作中被选中的颜色,获取与被选中的颜色对应的颜色查找表,其中,颜色查找表中的输出颜色以渐变形式进行排列;在颜色查找表中分别查找与目标部位中至少一个像素点的原始颜色对应的输出颜色,作为目标部位中至少一个像素点的初始目标颜色。
在一种可能的实现方式中,融合模块用于:根据预设融合强度,分别确定原始颜色的第一融合比例以及目标颜色的第二融合比例;根据第一融合比例和第二融合比例,将原始颜色与目标颜色进行融合,得到融合人脸图像。
在一种可能的实现方式中,原始颜色提取模块用于:获取目标部位对应的目标素材;根据目标素材中至少一个像素点的透明度,提取人脸图像的目标部位中至少一个像素点的原始颜色。
在一种可能的实现方式中,装置还用于:对人脸图像中的目标部位进行识别,得到人脸图像中目标部位的初始位置;原始颜色提取模块进一步用于:根据目标部位,获取与目标部位对应的原始目标素材;将原始目标素材与预设人脸图像中的目标部位进行融合,得到标准素材图像;基于初始位置,对标准素材图像进行提取,得到目标素材。
在一种可能的实现方式中,美妆操作包括唇妆操作,目标部位包括嘴唇部位。
应用场景示例
在计算机视觉领域,如何得到更加真实自然的唇妆处理后的图像成为目前一个亟待解决的问题。
图10示出根据本公开一应用示例的示意图,如图所示,本公开应用示例提出了一种图像处理方法,包括如下过程:
步骤S31,响应于针对人脸图像的唇部的唇妆操作,将原始的唇妆素材(图2中的唇妆mask)放置到如图4所示的预设人脸图像中唇部所在的位置,得到标准素材图像;
步骤S32,在人脸图像中,通过关键点识别确定人脸关键点,并使用人脸关键点与通过人脸关键点插值出的一些点构建如图3所示的人脸图像中人脸区域的三角网格;
步骤S33,通过人脸关键点对应的三角网格,确定人脸图像中唇部的位置坐标去采样标准素材图像,来获取目标素材;
步骤S34,根据目标素材,确定人脸图像中唇部所在图像区域,得到人脸图像中唇部部位的图像;
步骤S35,提取唇部部位的图像中多个像素点的原始颜色,并通过该原始颜色在颜色查找表上查找对应的初始目标颜色;
步骤S36,通过一个预设的卷积核,获取该卷积核对唇部部位的图像做高斯滤波之后各像素点的中间颜色以及中间颜色对应的第二亮度,以及该卷积核在唇部部位的图像上进行移动的过程中,覆盖的每个区域中具有最高亮度的像素点的第三亮度;
步骤S37,根据得到的调整系数,以及预设的光源值来对初始目标颜色进行调整,得到目标颜色;其中,得到目标颜色的方式可以参考上述各公开实施例中的公式(3),得到调整系数的方式可以详见 下述各示例:
在对人脸图像中的唇部进行雾面光效处理的情况下,可以通过下述方式来得到对初始目标颜色的调整系数:若像素点的第一亮度(与像素点的颜色值对应的亮度值)大于预设亮度阈值,则通过上述公开实施例中提到的公式(1)来计算调整系数;若像素点的第一亮度小于或等于预设亮度阈值,则通过上述公开实施例中提到的公式(2)来计算调整系数;
在对人脸图像中的唇部进行水润光效处理的情况下,可以通过下述方式来得到对初始目标颜色的调整系数:若像素点的第一亮度大于第三亮度,则通过上述公开实施例中提到的公式(4)来计算调整系数;若像素点的第一亮度小于或等于第三亮度,则将调整系数设置为第一预设值,该第一预设值的取值可以根据实际情况灵活设定,比如[0,0.1]中的任意值,在一个示例中,调整系数的预设值可以设置为0;
在对人脸图像中的唇部进行闪烁光效处理的情况下,可以通过下述方式来得到对初始目标颜色的调整系数:若像素点的第一亮度大于第三亮度,则同样通过上述公开实施例中提到的公式(4)来计算调整系数;若像素点的第一亮度小于或等于第三亮度,则生成一个在第一预设数值范围以内的随机数值,并判断该随机数值是否属于第二预设数值范围以内,若属于,则通过上述公开实施例中提到的公式(5)来计算调整系数;若不属于,则将调整系数设置为第二预设值,该第二预设值的取值也可以根据实际情况灵活设定,可以与第一预设值相同也可以不同,第二预设置的取值范围也可以在[0,0.1],在一个示例中,该第二预设值也可以设置为0;
步骤S38,将目标颜色与原始颜色按照用户所给的预设融合强度进行融合,得到如图6~图8所示的融合人脸图像。
通过本公开应用示例提出的方法,可以根据人脸图像中的亮度信息,对融合的目标颜色进行调整以得到符合美妆处理类型的光泽效果,从而使得得到的人脸融合图像更加真实可靠且符合用户需求。
本公开应用示例中提出的图像处理方法,除了可以应用于对人脸图像中的唇部进行唇妆处理以外,还可以扩展应用于其他的美妆操作,比如腮红或是眼影等美妆操作,随着美妆操作类型的不同,本公开应用示例提出的图像处理方法可以相应的进行灵活扩展与改动。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性计算机可读存储介质或非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。
本公开实施例还提出一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。
在实际应用中,上述存储器可以是易失性存储器(volatile memory),例如RAM;或者非易失性存储器(non-volatile memory),例如ROM,快闪存储器(flash memory),硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);或者上述种类的存储器的组合,并向处理器提供指令和数据。
上述处理器可以为ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微处理器中的至少一种。可以理解地,对于不同的设备,用于实现上述处理器功能的电子器件还可以为其它,本公开实施例不作具体限定。
电子设备可以被提供为终端、服务器或其它形态的设备。
基于前述实施例相同的技术构思,本公开实施例还提供了一种计算机程序,该计算机程序被处理器执行时实现上述方法。
图11是根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图11,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关人员信息。在一个示例性 实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图12是根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图12,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态人员信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (16)

  1. 一种图像处理方法,其特征在于,包括:
    响应于针对人脸图像的目标部位的美妆操作,提取所述人脸图像的目标部位中至少一个像素点的原始颜色;
    获取所述目标部位中至少一个像素点的亮度信息;
    基于所述原始颜色以及所述亮度信息,确定所述目标部位中至少一个像素点的目标颜色;
    将所述目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述原始颜色以及所述亮度信息,确定所述目标部位中至少一个像素点的目标颜色,包括:
    根据所述美妆操作中被选中的颜色,对所述目标部位中至少一个像素点的原始颜色进行颜色查找,确定所述目标部位中至少一个像素点的初始目标颜色,其中,所述初始目标颜色与所述原始颜色匹配;
    基于所述亮度信息,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色。
  3. 根据权利要求2所述的方法,其特征在于,所述亮度信息包括第一亮度、第二亮度以及第三亮度中的至少一种;
    所述获取所述目标部位中至少一个像素点的亮度信息,包括:
    识别所述美妆操作的处理类型,根据所述处理类型,采用至少一种处理方式提取所述至少一个像素点的第一亮度、第二亮度以及第三亮度中的至少一种;
    所述至少一种处理方式包括:
    根据所述像素点的原始颜色,确定所述像素点的第一亮度;和/或,
    根据所述像素点在所述目标部位中的预设处理范围,获取所述预设处理范围中具有目标亮度的像素点的第二亮度;和/或,
    通过预设卷积核对所述像素点进行滤波,根据所述像素点经过滤波所得到的中间颜色,确定所述像素点的第三亮度,其中,所述预设卷积核的滤波范围与所述预设处理范围一致。
  4. 根据权利要求3所述的方法,其特征在于,所述处理类型包括雾面光效,所述亮度信息包括所述第一亮度和所述第三亮度;
    所述基于所述亮度信息,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色,包括:
    在所述第一亮度大于预设亮度阈值的情况下,根据所述第一亮度以及所述预设亮度阈值,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色;或者,
    在所述第一亮度小于或等于预设亮度阈值的情况下,根据所述第一亮度以及所述第三亮度,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色。
  5. 根据权利要求3所述的方法,其特征在于,所述处理类型包括水润光效,所述亮度信息包括所述第一亮度、所述第二亮度和所述第三亮度;
    所述基于所述亮度信息,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色,包括:
    在所述第一亮度大于所述第三亮度的情况下,根据所述第一亮度、所述第二亮度、所述第三亮度以及预设的亮度半径,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色;或者,在所述第一亮度小于或等于所述第三亮度的情况下,将所述像素点的初始目标颜色作为所述像素点的目标颜色。
  6. 根据权利要求3所述的方法,其特征在于,所述处理类型包括闪烁光效,所述亮度信息包括第一亮度、第二亮度和第三亮度;
    所述基于所述亮度信息,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色,包括:
    在所述第一亮度大于所述第三亮度的情况下,根据所述第一亮度、所述第二亮度、所述第三亮 度以及预设的亮度半径,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色;或者,在所述第一亮度小于或等于所述第三亮度的情况下,在第一预设数值范围内生成随机数值;根据所述随机数值,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述随机数值,对所述初始目标颜色进行调整,得到所述目标部位中至少一个像素点的目标颜色,包括:
    在所述随机数值属于第二预设数值范围以内的情况下,根据所述随机数值和所述像素点在所述目标素材中对应的透明度,对所述像素点的初始目标颜色进行调整,得到所述像素点的目标颜色;或者,
    在所述随机数值属于第二预设数值范围以外的情况下,将所述像素点的初始目标颜色作为所述像素点的目标颜色。
  8. 根据权利要求2至7中任意一项所述的方法,其特征在于,所述根据所述美妆操作中被选中的颜色,对所述目标部位中至少一个像素点的原始颜色进行颜色查找,确定所述目标部位中至少一个像素点的初始目标颜色,包括:
    根据所述美妆操作中被选中的颜色,获取与所述被选中的颜色对应的颜色查找表,其中,所述颜色查找表中的输出颜色以渐变形式进行排列;
    在所述颜色查找表中分别查找与所述目标部位中至少一个像素点的原始颜色对应的输出颜色,作为所述目标部位中至少一个像素点的初始目标颜色。
  9. 根据权利要求1至8中任意一项所述的方法,其特征在于,所述将所述目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像,包括:
    根据预设融合强度,分别确定所述原始颜色的第一融合比例以及所述目标颜色的第二融合比例;
    根据所述第一融合比例和所述第二融合比例,将所述原始颜色与所述目标颜色进行融合,得到融合人脸图像。
  10. 根据权利要求1至9中任意一项所述的方法,其特征在于,所述响应于针对人脸图像的目标部位的美妆操作,提取所述人脸图像的目标部位中至少一个像素点的原始颜色,包括:
    获取所述目标部位对应的目标素材;
    根据所述目标素材中至少一个像素点的透明度,提取所述人脸图像的目标部位中至少一个像素点的原始颜色。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    对所述人脸图像中的目标部位进行识别,得到所述人脸图像中目标部位的初始位置;
    所述获取所述目标部位对应的目标素材,包括:
    根据所述目标部位,获取与所述目标部位对应的原始目标素材;
    将所述原始目标素材与预设人脸图像中的目标部位进行融合,得到标准素材图像;
    基于所述初始位置,对所述标准素材图像进行提取,得到目标素材。
  12. 根据权利要求1至11中任意一项所述的方法,其特征在于,所述美妆操作包括唇妆操作,所述目标部位包括嘴唇部位。
  13. 一种图像处理装置,其特征在于,包括:
    原始颜色提取模块,用于响应于针对人脸图像的目标部位的美妆操作,提取所述人脸图像的目标部位中至少一个像素点的原始颜色;
    亮度信息获取模块,用于获取所述目标部位中至少一个像素点的亮度信息;
    目标颜色确定模块,用于基于所述原始颜色以及所述亮度信息,确定所述目标部位中至少一个像素点的目标颜色;
    融合模块,用于将所述目标部位中至少一个像素点的原始颜色和目标颜色进行融合,得到融合人脸图像。
  14. 一种电子设备,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至12中任意一项所述的方法。
  15. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至12中任意一项所述的方法。
  16. 一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现权利要求1-12中的任一权利要求所述的方法。
PCT/CN2021/103249 2021-02-23 2021-06-29 图像处理方法及装置、电子设备和存储介质 WO2022179026A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP21927457.8A EP4207048A4 (en) 2021-02-23 2021-06-29 IMAGE PROCESSING METHOD AND DEVICE, ELECTRONIC DEVICE AND STORAGE MEDIUM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110203295.2 2021-02-23
CN202110203295.2A CN112767285B (zh) 2021-02-23 2021-02-23 图像处理方法及装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022179026A1 true WO2022179026A1 (zh) 2022-09-01

Family

ID=75703946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/103249 WO2022179026A1 (zh) 2021-02-23 2021-06-29 图像处理方法及装置、电子设备和存储介质

Country Status (3)

Country Link
EP (1) EP4207048A4 (zh)
CN (1) CN112767285B (zh)
WO (1) WO2022179026A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117522760A (zh) * 2023-11-13 2024-02-06 书行科技(北京)有限公司 图像处理方法、装置、电子设备、介质及产品
CN117670700A (zh) * 2023-12-08 2024-03-08 江西远赛医疗科技有限公司 图像处理方法、装置、电子设备及存储介质

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767285B (zh) * 2021-02-23 2023-03-10 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN112801916A (zh) * 2021-02-23 2021-05-14 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN113344836B (zh) * 2021-06-28 2023-04-14 展讯通信(上海)有限公司 人脸图像处理方法及装置、计算机可读存储介质、终端
CN113240760B (zh) * 2021-06-29 2023-11-24 北京市商汤科技开发有限公司 一种图像处理方法、装置、计算机设备和存储介质
CN113486962A (zh) * 2021-07-12 2021-10-08 深圳市慧鲤科技有限公司 图像生成方法及装置、电子设备和存储介质
CN113570581A (zh) * 2021-07-30 2021-10-29 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN113570583B (zh) * 2021-07-30 2024-06-07 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN113763287B (zh) * 2021-09-27 2024-09-17 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN113870400A (zh) * 2021-09-27 2021-12-31 北京市商汤科技开发有限公司 虚拟对象的生成方法及装置、电子设备和存储介质
CN113781359B (zh) * 2021-09-27 2024-06-11 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN113762212B (zh) * 2021-09-27 2024-06-11 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN114723600A (zh) * 2022-03-11 2022-07-08 北京字跳网络技术有限公司 美妆特效的生成方法、装置、设备、存储介质和程序产品
CN114418919B (zh) * 2022-03-25 2022-07-26 北京大甜绵白糖科技有限公司 图像融合方法及装置、电子设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000011145A (ja) * 1998-06-18 2000-01-14 Shiseido Co Ltd 口紅色変換システム
CN107610201A (zh) * 2017-10-31 2018-01-19 北京小米移动软件有限公司 基于图像处理的润唇方法及装置
CN107644396A (zh) * 2017-10-18 2018-01-30 维沃移动通信有限公司 一种唇色调整方法和装置
CN111369644A (zh) * 2020-02-28 2020-07-03 北京旷视科技有限公司 人脸图像的试妆处理方法、装置、计算机设备和存储介质
CN111784568A (zh) * 2020-07-06 2020-10-16 北京字节跳动网络技术有限公司 人脸图像处理方法、装置、电子设备及计算机可读介质
CN112767285A (zh) * 2021-02-23 2021-05-07 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4760999B1 (ja) * 2010-10-29 2011-08-31 オムロン株式会社 画像処理装置、画像処理方法、および制御プログラム
JP6808482B2 (ja) * 2016-12-28 2021-01-06 キヤノン株式会社 画像処理装置、画像処理方法、およびプログラム
CN107229905B (zh) * 2017-05-05 2020-08-11 广州视源电子科技股份有限公司 嘴唇渲染颜色的方法、装置及电子设备
CN107273837B (zh) * 2017-06-07 2019-05-07 广州视源电子科技股份有限公司 虚拟化妆的方法和系统
JP7200139B2 (ja) * 2017-07-13 2023-01-06 株式会社 資生堂 仮想顔化粧の除去、高速顔検出およびランドマーク追跡
CN107798652A (zh) * 2017-10-31 2018-03-13 广东欧珀移动通信有限公司 图像处理方法、装置、可读存储介质和电子设备
CN109584180A (zh) * 2018-11-30 2019-04-05 深圳市脸萌科技有限公司 人脸图像处理方法、装置、电子设备及计算机存储介质
CN109583385A (zh) * 2018-11-30 2019-04-05 深圳市脸萌科技有限公司 人脸图像处理方法、装置、电子设备及计算机存储介质
CN109859098B (zh) * 2019-01-15 2022-11-22 深圳市云之梦科技有限公司 人脸图像融合方法、装置、计算机设备及可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000011145A (ja) * 1998-06-18 2000-01-14 Shiseido Co Ltd 口紅色変換システム
CN107644396A (zh) * 2017-10-18 2018-01-30 维沃移动通信有限公司 一种唇色调整方法和装置
CN107610201A (zh) * 2017-10-31 2018-01-19 北京小米移动软件有限公司 基于图像处理的润唇方法及装置
CN111369644A (zh) * 2020-02-28 2020-07-03 北京旷视科技有限公司 人脸图像的试妆处理方法、装置、计算机设备和存储介质
CN111784568A (zh) * 2020-07-06 2020-10-16 北京字节跳动网络技术有限公司 人脸图像处理方法、装置、电子设备及计算机可读介质
CN112767285A (zh) * 2021-02-23 2021-05-07 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4207048A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117522760A (zh) * 2023-11-13 2024-02-06 书行科技(北京)有限公司 图像处理方法、装置、电子设备、介质及产品
CN117670700A (zh) * 2023-12-08 2024-03-08 江西远赛医疗科技有限公司 图像处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN112767285A (zh) 2021-05-07
CN112767285B (zh) 2023-03-10
EP4207048A4 (en) 2024-05-15
EP4207048A1 (en) 2023-07-05

Similar Documents

Publication Publication Date Title
WO2022179026A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN110675310B (zh) 视频处理方法、装置、电子设备及存储介质
WO2022179025A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN113160094A (zh) 图像处理方法及装置、电子设备和存储介质
CN110929651A (zh) 图像处理方法、装置、电子设备及存储介质
CN111553864B (zh) 图像修复方法及装置、电子设备和存储介质
WO2022227393A1 (zh) 图像拍摄方法及装置、电子设备和计算机可读存储介质
US20210256672A1 (en) Method, electronic device and storage medium for processing image
CN109472738B (zh) 图像光照校正方法及装置、电子设备和存储介质
CN111091610B (zh) 图像处理方法及装置、电子设备和存储介质
WO2023045941A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2023142645A1 (zh) 图像处理方法、装置、电子设备、存储介质和计算机程序产品
CN113570581A (zh) 图像处理方法及装置、电子设备和存储介质
WO2020233201A1 (zh) 图标位置确定方法和装置
WO2023045946A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2023045950A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN112613447A (zh) 关键点检测方法及装置、电子设备和存储介质
WO2023045961A1 (zh) 虚拟对象的生成方法及装置、电子设备和存储介质
CN113570583B (zh) 图像处理方法及装置、电子设备和存储介质
CN105447829B (zh) 图像处理方法及装置
US20220270313A1 (en) Image processing method, electronic device and storage medium
CN113762212B (zh) 图像处理方法及装置、电子设备和存储介质

Legal Events

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

Ref document number: 21927457

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021927457

Country of ref document: EP

Effective date: 20230330

NENP Non-entry into the national phase

Ref country code: DE