Image processing method, device, electronic device and storage medium

By providing the highlighting special configuration interface and dyeing area configuration functions in the image processing method, the cumbersome and unstable problems of image local information processing in the prior art are solved, and personalized highlighting and efficient processing of hair is achieved.

CN115100305BActive Publication Date: 2025-04-22BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210476183.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-04-22
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

The prior art is difficult to achieve refined processing of image local information, resulting in cumbersome processing, low efficiency and unstable effect.

Method used

Provide an image processing method. By displaying the highlighting special effect configuration interface, users can select and configure the dyeing area in the image preview area and enter the dyeing area configuration parameters to generate the dyeing preview image.

Benefits of technology

It realizes simple and fast hair dyeing, meets the personalized needs of users, and improves the processing efficiency and stability of the effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100305B_ABST
    Figure CN115100305B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide an image processing method, device, electronic device and storage medium. The method includes: in response to a received special effect configuration trigger operation for configuring a hair highlighting special effect, displaying a highlighting special effect configuration interface, wherein the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, and the highlighting configuration item at least includes a region configuration item for configuring a dyeing area; displaying a to-be-processed image for configuring a hair highlighting special effect in the image preview area; receiving a dyeing region configuration parameter input based on the region configuration item, and displaying a dyeing preview image after dyeing a target dyeing region corresponding to the dyeing region configuration parameter in the to-be-processed image in the image preview area. By inputting the dyeing region configuration parameter in the region configuration item, the target dyeing region of the hair can be automatically dyed, the interaction method is simple, the universality is strong, the image processing efficiency is high, and the processing effect is relatively stable, which improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to image processing technology, and more particularly to an image processing method, device, electronic device and storage medium. Background Art

[0002] In today's society, with the popularization of mobile terminals and the acceleration of the Internet, short videos, as a short, flat and fast way to spread Internet content, have gradually gained favor from major platforms and video creators. Short video materials are generally generated from images or video clips to be displayed. In order to enrich the display effect of short videos, special effects are often superimposed on the images in short video materials.

[0003] Related image processing methods are often unable to perform fine processing when processing local information in an image. For example, fine processing in an image often requires manual processing of local information in a single image. The entire processing process is very cumbersome and requires a lot of manpower costs, which is inefficient. In addition, since manual processing requires certain professionalism from the processing personnel, the effect of image processing varies from person to person, and this manual processing method is also difficult to meet the increasing demand for fine processing of images. Summary of the invention

[0004] The embodiments of the present disclosure provide an image processing method, device, electronic device and storage medium to meet the personalized needs of hair dyeing.

[0005] In a first aspect, an embodiment of the present disclosure provides an image processing method, including:

[0006] In response to a received special effect configuration trigger operation for configuring a hair highlighting special effect, displaying a highlighting special effect configuration interface, wherein the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, and the highlighting configuration item at least includes an area configuration item for configuring a dyeing area;

[0007] Displaying the image to be processed for configuring the hair highlighting special effect in the image preview area;

[0008] A dyeing area configuration parameter input based on the area configuration item is received, and a dyeing preview image after dyeing a target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed is displayed in the image preview area.

[0009] In a second aspect, the present disclosure also provides an image processing device, including:

[0010] an interface display module, configured to display a highlighting special effect configuration interface in response to a received special effect configuration trigger operation for configuring a hair highlighting special effect, wherein the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, wherein the highlighting configuration item at least includes an area configuration item for configuring a dyeing area;

[0011] A to-be-processed image display module, used to display the to-be-processed image for configuring the hair highlighting special effect in the image preview area;

[0012] The dyeing effect display module is used to receive the dyeing area configuration parameters input based on the area configuration items, and display the dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed in the image preview area.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method described in any embodiment of the present disclosure.

[0017] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the image processing method described in any embodiment of the present disclosure when executed.

[0018] The technical solution of the disclosed embodiment is to display a highlighting special effect configuration interface in response to a received special effect configuration trigger operation for configuring a hair highlighting special effect. Since the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, the highlighting configuration item at least includes a region configuration item for configuring a dyeing region, and can provide users with a function of selecting a hair dyeing region, and can interact with users to more accurately obtain user needs. The image to be processed for configuring the hair highlighting special effect is displayed in the image preview area, so that the user can intuitively view the image to be processed in the highlighting special effect configuration interface, and then receive the dyeing region configuration parameters input based on the region configuration items, and display a dyeing preview image after dyeing the target dyeing region corresponding to the dyeing region configuration parameters in the image to be processed in the image preview area, and can generate a dyeing preview image according to the user's dyeing region configuration parameters to display different hair highlighting effects. The technical solution disclosed in the present invention can automatically dye the selected area of ​​the hair only by the user inputting the dyeing area configuration parameters through the area configuration item. The interactive method is simple and has strong universality, which saves the user's manual processing time and improves the efficiency of generating hair highlighting special effects. It solves the technical problems of professional requirements for fine processing of local information of images in the prior art, time-consuming and labor-intensive, and unstable processing effects, and realizes simple and fast hair highlighting, meets the user's personalized hair dyeing needs, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 is a flowchart of an image processing method provided by an embodiment of the present disclosure;

[0021] Figure 2 is a flowchart of another image processing method provided by an embodiment of the present disclosure;

[0022] Figure 3 is a flowchart of another image processing method provided by an embodiment of the present disclosure;

[0023] Figure 4 is a flowchart of another image processing method provided by an embodiment of the present disclosure;

[0024] Figure 5 is a schematic diagram of a highlighting special effect configuration interface provided by an embodiment of the present disclosure;

[0025] Figure 6 is a structural block diagram of an image processing device provided by an embodiment of the present disclosure;

[0026] Figure 7 It is a schematic diagram of the structure of an electronic device for implementing the image processing method of an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0029] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0030] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0031] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0032] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0033] Figure 1A flow chart of an image processing method provided in an embodiment of the present disclosure is provided. The embodiment of the present disclosure is applicable to the case of hair highlighting. The method can be executed by an image processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0034] like Figure 1 As shown, the method of the embodiment of the present disclosure may specifically include:

[0035] S110. In response to a received special effects configuration trigger operation for configuring a hair highlighting special effect, display a highlighting special effects configuration interface.

[0036] The special effect configuration trigger operation may be a trigger operation for enabling the function of configuring parameters for the hair highlighting special effect. The highlighting special effect configuration interface may be a user interaction interface for implementing the operation logic of parameter configuration for the hair highlighting special effect.

[0037] Optionally, the highlighting special effect configuration interface may display, but is not limited to displaying, at least one highlighting configuration item. The highlighting configuration item may be understood as a parameter configuration control for setting the effect of the associated hair highlighting. In order to achieve the function of dyeing a specified area of ​​hair, in the embodiment of the present disclosure, the highlighting configuration item at least includes an area configuration item for configuring the dyeing area. The area configuration item may be understood as a control provided to the user to configure the dyeing area on the hair.

[0038] Optionally, the hair highlighting special effect configuration interface may also display an image preview area. The image preview area may include an image display control for acquiring an image to be processed and an image display area. Typically, the image display control may be an image capture control for enabling a camera to capture an image in real time and an image upload control for uploading an image from a target image library. The image display area may be used to display an image before the hair highlighting special effect and an image after the hair highlighting special effect is configured, so that the user can view the effect of the hair highlighting.

[0039] Furthermore, the image preview area may also be provided with an original image viewing control for viewing the image before applying the hair highlighting special effect, or a switching control for switching the display of the image before configuring the hair highlighting special effect and the image after configuring the hair highlighting special effect. That is, a control for switching the display of the image to be processed and the dyeing preview image. This allows the user to compare and view the image effects before configuring the hair highlighting special effect and after configuring the hair highlighting special effect at any time.

[0040] In the embodiment of the present disclosure, there are multiple ways to generate the special effect configuration trigger operation. As long as the operation can enable the function of parameter configuration of the hair highlighting special effect after being triggered, it is within the protection scope of the embodiment of the present disclosure. The specific way to generate the special effect configuration trigger operation is not limited here.

[0041] Exemplarily, the received special effect configuration trigger operation for configuring the hair highlighting special effect may include: receiving a control trigger operation acting on a preset special effect trigger control for enabling the hair highlighting special effect; or, inputting a preset special effect enabling command for enabling the hair highlighting special effect; or, receiving an interface opening operation for opening the highlighting special effect configuration interface, etc. The special effect enabling command may be a command in the form of machine language, or a command in the form of voice, or a command in the form of preset action, or a command in the form of touch track, etc.

[0042] S120: Displaying the image to be processed for configuring the hair highlighting effect in the image preview area.

[0043] Among them, the image to be processed may be an image for performing hair highlighting effects. As mentioned above, the image display control may include an image shooting control for enabling a shooting device to shoot an image in real time and / or an image upload control for uploading an image from a target image library. The image display area may be used to display an image acquired through the image display control. In an embodiment of the present disclosure, the image acquired through the image display control may be used as an image to be processed. Among them, the image upload control may be an operation control for uploading an image provided in the image preview area. Exemplarily, the image to be processed may be uploaded by clicking a preset image upload control. Optionally, the image to be processed may also be uploaded by dragging the image to be processed or a video including the image to be processed into the image preview area, so as to display the image to be processed for configuring the hair highlighting effects in the image preview area.

[0044] It should be noted that the image to be processed can be an independent image or an image in a video.

[0045] Optionally, displaying an image to be processed for configuring the hair highlight effect in the image preview area includes: receiving an image upload operation input based on an image upload control in the image preview area, displaying the uploaded image in the image preview area, and using the uploaded image as the image to be processed for configuring the hair highlight effect.

[0046] In the disclosed embodiment, the user uploads the image to be processed to the image preview area in the image preview area of ​​the hair highlight effect configuration interface through an image upload operation, and the image to be processed is then displayed in the image preview area so that the user can more intuitively confirm the configuration object for configuring the hair highlight effect.

[0047] Optionally, displaying an image to be processed for configuring the hair highlighting effect in the image preview area includes: receiving a video upload operation input based on a video upload control in the image preview area, displaying the uploaded video in the image preview area, and using an image in the uploaded video that meets preset conditions as the image to be processed for configuring the hair highlighting effect.

[0048] The video upload control may be an operation control for providing a video for uploading in the video preview area. The video upload operation may be an operation that triggers the video upload control to upload the video. For example, the video upload control may be triggered by clicking or pressing.

[0049] In the disclosed embodiment, the user uploads the video to be uploaded to the image preview area by triggering the video upload operation of the video upload control in the video preview area of ​​the highlight effect configuration interface, and displays the uploaded video in the image preview area.

[0050] Generally, a video contains multiple frames of images. In the embodiment of the present disclosure, images in the uploaded video that meet the preset conditions can be used as images to be processed for configuring the hair highlighting effect. The preset conditions can be set according to actual needs and are not specifically limited here. Exemplarily, the preset conditions can be all images in the video that contain the target processing object, or each frame of the video, or a preset number of images in the video or images within a preset playback time range. Specifically, each frame of the uploaded video can be recognized through the video preview area to determine the images in the uploaded video that meet the preset conditions, and the images in the uploaded video that meet the preset conditions can be used as images to be processed for configuring the hair highlighting effect.

[0051] S130, receiving a dyeing area configuration parameter input based on the area configuration item, and displaying in the image preview area a dyeing preview image after dyeing a target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed.

[0052] The dyeing area configuration parameter may be an area determination parameter for determining which area of ​​the hair in the image to be processed is to be dyed. For example, the dyeing area parameter may be represented by an area identifier, such as the whole head area, the outer ear hanging area, the inner ear hanging area, the left ear hanging area, and the right ear hanging area. The dyeing preview image may be the image to be processed after dyeing the area corresponding to the dyeing area configuration parameter in the image to be processed through the area configuration item.

[0053] In the disclosed embodiment, the user can input the dyeing area configuration parameters through the area configuration items in the highlighting special effect configuration interface, and then dye the area corresponding to the image to be processed and the area matching the dyeing area configuration parameters as the target dyeing area according to the dyeing area configuration parameters, and then display the dyeing preview image after dyeing in the image preview area so that the user can view the effect after dyeing.

[0054] In some embodiments, the color of the target dyeing area may be a fixed color set by the background default, or a randomly matched color, or a color determined based on a preset color matching rule, etc. The color determined based on the preset color matching rule may be a color determined based on the image background color, skin color, or historical dyeing data of the user in the image to be processed.

[0055] In order to better meet user needs, optionally, in another embodiment of the present disclosure, the highlight configuration item also includes a color configuration item and / or a transparency configuration item, etc., so that the user can perform personalized configuration on the color of the highlighted area and the transparency of the color.

[0056] In addition, the highlight configuration item may also include an object selection control for the processing object, so that the user can select the target processing object in the image to be processed. The advantage of such a setting is that when there are multiple processable objects in the image to be processed, the target processing object can be accurately selected. For example, when the image to be processed includes two processable hair areas, the object to be processed can be selected through the object selection control. It can be understood that the object selection control can be used to select a target processing object or multiple target processing objects.

[0057] In the disclosed embodiment, the highlighting special effect configuration interface may optionally include multiple area configuration items, each area configuration item corresponds to a dyeing area parameter, and each dyeing area configuration parameter corresponds to a dyeing area. The input dyeing area configuration parameter may be determined by selecting each area configuration item input. In other words, receiving the dyeing area configuration parameter input based on the area configuration item may be receiving a selection operation on multiple area configuration items displayed on the highlighting special effect configuration interface, and obtaining the dyeing area configuration parameter corresponding to the selected area configuration item.

[0058] The method of displaying the dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed in the image preview area can be dynamic display or static display, wherein the dynamic display can be displayed after superimposing preset dynamic elements on the dyeing preview image, or, the dynamic display can be displayed by generating a dynamic image based on the dyeing preview image.

[0059] The technical solution of the disclosed embodiment is to display a highlighting special effect configuration interface in response to a received special effect configuration trigger operation for configuring a hair highlighting special effect. Since the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, the highlighting configuration item at least includes a region configuration item for configuring a dyeing region, and can provide users with a function of selecting a hair dyeing region, and can interact with users to more accurately obtain user needs. The image to be processed for configuring the hair highlighting special effect is displayed in the image preview area, so that the user can intuitively view the image to be processed in the highlighting special effect configuration interface, and then receive the dyeing region configuration parameters input based on the region configuration items, and display a dyeing preview image after dyeing the target dyeing region corresponding to the dyeing region configuration parameters in the image to be processed in the image preview area, and can generate a dyeing preview image according to the user's dyeing region configuration parameters to display different hair highlighting effects. The technical solution disclosed in the present invention can automatically dye the selected area of ​​the hair only by the user inputting the dyeing area configuration parameters through the area configuration item. The interactive method is simple and has strong universality, which saves the user's manual processing time and improves the efficiency of generating hair highlighting special effects. It solves the technical problems of professional requirements for fine processing of local information of images in the prior art, time-consuming and labor-intensive, and unstable processing effects, and realizes simple and fast hair highlighting, meets the user's personalized hair dyeing needs, and improves the user experience.

[0060] Figure 2 A flowchart of another image processing method provided by an embodiment of the present disclosure. The technical solution of this embodiment is based on any optional technical solution in the embodiment of the present disclosure, and adds a highlight configuration item. Optionally, the highlight configuration item also includes a color configuration item and / or a transparency configuration item. In this way, the configuration of the color configuration item and / or the transparency configuration item can make the parameter configuration of hair dyeing more diversified.

[0061] Optionally, the image processing method of the embodiment of the present disclosure may further include: receiving a color configuration operation based on the color configuration item input; accordingly, the displaying in the image preview area a dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed may include: displaying in the image preview area a dyeing preview image after applying the corresponding target color of the color configuration operation to the target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed. Among them, the technical features that are the same or corresponding to those in the above-mentioned embodiments are not repeated.

[0062] like Figure 2 As shown, the image processing method of the embodiment of the present disclosure may specifically include:

[0063] S210. In response to a received special effects configuration trigger operation for configuring a hair highlighting special effect, a highlighting special effects configuration interface is displayed, wherein the highlighting special effects configuration interface displays an image preview area and at least one highlighting configuration item, and the highlighting configuration item includes at least an area configuration item for configuring a dyeing area.

[0064] S220: Displaying the image to be processed for configuring the hair highlighting effect in the image preview area.

[0065] S230: Receive dyeing area configuration parameters input based on the area configuration item.

[0066] S240: Receive a color configuration operation based on the color configuration item input.

[0067] Among them, the color configuration item is used to configure the color of the target dyeing area to be dyed, that is, the target color.

[0068] In the disclosed embodiment, the color configuration item may be displayed in a variety of ways in the highlighting special effect configuration interface, such as a color identification input box, a strip color card, a disc-shaped color selection card, and a color drop-down selection box. Exemplarily, there may be multiple ways to receive a color configuration operation based on the color configuration item input, such as receiving a color selection operation for a strip color card, a disc-shaped color selection card, or a color drop-down selection box; or receiving an operation of inputting a color identification for a color identification input box, etc. The color selection operation may be generated by clicking on the color, by scrolling the mouse after selecting the color configuration item, or by triggering a color switching control, etc.

[0069] S250, displaying, in the image preview area, a dyeing preview image after the target color corresponding to the color configuration operation is applied to the target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed.

[0070] Among them, the target color corresponding to the color parameter of the color configuration item in the area configuration item is applied to the target dyeing area corresponding to the dyeing area configuration parameter. It can be understood that the target dyeing area corresponding to the dyeing area configuration parameter is dyed with the target color corresponding to the color configuration operation.

[0071] When the user configures the hair highlight effect in the highlight effect configuration interface, the highlight effect configuration interface can set the default color parameters and / or transparency parameters corresponding to the area configuration items. The user can choose to adjust the color configuration item or the transparency configuration item individually, or can choose to adjust both the color configuration item and the transparency configuration item at the same time.

[0072] When the highlight configuration item includes a transparency configuration item, as an optional implementation, the image processing method of the embodiment of the present disclosure may further include: receiving a transparency configuration operation input based on the transparency configuration item; accordingly, displaying in the image preview area a dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed, includes: displaying in the image preview area a dyeing preview image after applying the target color transparency corresponding to the transparency configuration operation to the target color dyeing area corresponding to the dyeing area configuration parameter in the image to be processed.

[0073] The transparency configuration item is used to configure the color transparency of the color to be dyed in the target dyeing area, that is, the target color transparency.

[0074] Optionally, in the embodiment of the present disclosure, the target transparency configured by the user in the transparency configuration item of the highlight effect configuration interface is applied to the target color configured in the color configuration item, and then the target color is applied to the target dyeing area corresponding to the dyeing area configuration parameter, thereby displaying the dyeing preview image after the transparency of the target dyeing area is adjusted in the image preview area.

[0075] It should be noted that in the disclosed embodiment, the user can configure the color configuration item and the transparency configuration item at the same time. According to the target color input by the user based on the color configuration item and the color transparency input based on the transparency configuration item, a preview image of the target dyeing area of ​​the image to be processed is displayed after being dyed with the target color with the input color transparency.

[0076] Optionally, when the user configures highlights in the highlight effects configuration interface, the highlight effects configuration interface can also provide recommended colors for configuring hair highlights in the area configuration items and recommended color transparency corresponding to the recommended color parameters, providing a reference for the user to choose a more appropriate hair highlight effect.

[0077] The technical solution of the disclosed embodiment can not only configure the area for hair highlighting, but also further configure the color of the target dyeing area, so as to better meet the personalized needs of users. Moreover, on this basis, the adjustment of the target dyeing color by superimposing the color transparency can be made, so that the effect of hair highlighting is more natural, further improving the user experience.

[0078] Figure 3A flow chart of another image processing method provided by the embodiment of the present disclosure. The technical solution of this embodiment refines how to quickly and accurately generate a dye preview image on the basis of any optional technical solution in the embodiment of the present disclosure. Optionally, after receiving the dyeing area configuration parameters input based on the area configuration item, before displaying the dye preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed in the image preview area, it also includes: obtaining a regional mask texture map corresponding to the dyeing area configuration parameters, determining the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed according to the regional mask texture map, and dyeing the target dyeing area to generate a dye preview image. Among them, the technical features that are the same or corresponding to those in the aforementioned embodiments are not repeated here.

[0079] like Figure 3 As shown, the technical solution of this embodiment may specifically include:

[0080] S310. In response to a received special effects configuration trigger operation for configuring a hair highlighting special effect, a highlighting special effects configuration interface is displayed, wherein the highlighting special effects configuration interface displays an image preview area and at least one highlighting configuration item, and the highlighting configuration item includes at least an area configuration item for configuring a dyeing area.

[0081] S320: Displaying the image to be processed for configuring the hair highlighting effect in the image preview area.

[0082] S330: Receive a dyeing area configuration parameter input based on the area configuration item, and obtain an area mask texture map corresponding to the dyeing area configuration parameter.

[0083] The regional mask texture map includes a mask texture map of the entire hair region and a mask texture map of at least one local hair region.

[0084] Optionally, obtaining the regional mask texture corresponding to the dyeing region configuration parameter includes: identifying the image to be processed by a pre-trained neural network model corresponding to the dyeing region configuration parameter, and determining the regional mask texture map of the current image to be processed. Exemplarily, the regional mask texture map may include a mask texture map of the entire hair segmentation, a left outer ear mask texture map, a right outer ear mask texture map, a left inner ear mask texture map, and a right inner ear mask texture map.

[0085] In the disclosed embodiment, a neural network model can be trained for each staining region configuration parameter to identify the staining region corresponding to the staining region configuration parameter in the image to be processed. Specifically, the pre-trained neural network model can be an image processing model, and the image processing model can be obtained based on the training of the neural network structure, for example, CNN (Convolutional Neural Network) can be used to train the image processing model.

[0086] Before training the image processing model, a large number of images containing human faces and hair and regional mask texture images after image processing are collected as training samples. During the training process, the images containing human faces and hair are input into the image processing model to be trained, and the regional mask texture image after training is obtained by the image processing model to be trained. The output regional mask texture image and the regional mask texture image after image processing are used to calculate the loss through the loss function, and the parameters in the image processing model to be trained are adjusted according to the calculated loss. When it is detected that the loss function in the image processing model to be trained converges, the training of the image processing model to be trained is completed, and the image processing model is obtained.

[0087] The loss function of the image processing model may include but is not limited to: any one of a mean square error function, a mean absolute value error function and a cross entropy error function.

[0088] S340: Determine a target dyeing region corresponding to the dyeing region configuration parameter in the image to be processed according to the region mask texture map.

[0089] In the disclosed embodiment, the value in the R or a channel of the region mask texture map of the image to be processed can be obtained, and whether the pixel point in the region mask texture map belongs to the target highlighted area can be determined according to the value in the R or a channel of the region mask texture map. Exemplarily, the value in the R or a channel can be [0-1], where 0 indicates that it is not a highlighted area, and 1 indicates that it is a highlighted area.

[0090] Optionally, the target dyeing area in the image to be processed corresponding to the dyeing area configuration parameters is determined according to the area mask texture map. Specifically, each pixel to be dyed in the image to be processed is determined according to the UV coordinates of each pixel point belonging to the target highlighted area in the area mask texture map, and the area composed of each dyed pixel point in the image to be processed is determined as the target dyeing area corresponding to the dyeing area configuration parameters.

[0091] S350: Perform dyeing processing on the target dyeing area to generate a dyeing preview image.

[0092] For each pixel in the target dyeing area, the original color value of the pixel is fused with the color value of the color to be dyed of the target dyeing area to obtain the target color value of the pixel. Optionally, the original color value of the pixel is fused with the color value of the color to be dyed of the target dyeing area, including: the original color value of the pixel is fused with the color value of the color to be dyed of the target dyeing area according to a preset fusion operation rule, wherein the preset fusion operation rule includes at least one of a sum operation, a weighted sum operation, a product operation, and a weighted product operation.

[0093] When the target dyeing area is dyed and a dyeing preview image is generated, the image processing method of the embodiment of the present disclosure may optionally further include: adjusting the color of the target dyeing area to be dyed according to a preset color adjustment curve; and / or adjusting the color of the target dyeing area after dyeing according to a preset color adjustment curve. The advantage of such a setting is that it can increase the image contrast, for example, making bright areas brighter and dark areas darker, thereby obtaining a better smoothing effect, and then coloring the target dyeing area with the adjusted color to obtain a dyeing preview image.

[0094] Exemplarily, the preset color adjustment curve can be understood as a curve for adjusting the brightness or saturation of a color, for example, an adjustment curve generated based on a color look-up table (LUT).

[0095] Specifically, before dyeing the target dyeing area, the color of the target dyeing area to be dyed is adjusted according to a preset color adjustment curve, and / or, after dyeing the target dyeing area, the color of the dyed target dyeing area can be adjusted according to a preset color adjustment curve.

[0096] Exemplarily, after determining the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed, the color to be dyed of the target dyeing area is adjusted according to a preset color adjustment curve, and then, the target dyeing area is dyed based on the adjusted color to generate a dyeing preview image; or, after determining the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed, the target dyeing area is dyed, and then, the color of the dyed target dyeing area is adjusted according to the preset color adjustment curve, and a dyeing preview image is generated based on the adjusted color; or, after determining the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed, the color to be dyed of the target dyeing area is adjusted according to the preset color adjustment curve, and then, the target dyeing area is dyed based on the adjusted color, and then, the color of the dyed target dyeing area is adjusted according to the preset color adjustment curve, and a dyeing preview image is generated based on the adjusted color.

[0097] S360, displaying in the image preview area a dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed.

[0098] It can be understood that the dyeing preview image generated by executing the aforementioned steps is the dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed.

[0099] In the embodiment of the present disclosure, after receiving a special effect configuration trigger operation for configuring a hair highlighting special effect, in response to the received special effect configuration trigger operation for configuring a hair highlighting special effect, a highlighting special effect configuration interface is displayed. A user views a to-be-processed image of a hair highlighting special effect in an image preview area in the highlighting special effect configuration interface, and can intuitively select a hair area in the to-be-processed image through the image preview area of ​​the highlighting special effect configuration interface, and then input a dyeing area configuration parameter in the area configuration item, and then input the dyeing area configuration parameter in the area configuration item, and then obtain a corresponding area mask texture map through a pre-trained neural network model, and then determine a target dyeing area corresponding to the dyeing area configuration parameter according to the area mask texture map, and further refine the dyeing area in the hair through the area mask texture map, and at the same time, accurately locate the target dyeing area corresponding to the dyeing area configuration parameter according to the area mask texture map, so as to dye the target dyeing area, and display a dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameter in the to-be-processed image in the image preview area, thereby improving the refinement of the hair highlighting special effect and realizing refined highlighting of each area of ​​the hair.

[0100] Figure 4A flowchart of another image processing method provided for the third embodiment of the present disclosure. The technical solution of this embodiment is based on any optional technical solution in the embodiments of the present disclosure, and further refines how to perform masking processing on the facial area to more accurately ensure the small dyeing effect. Optionally, the dyeing processing of the target dyeing area includes: determining a facial mask texture map of the facial area in the image to be processed, and dyeing the target dyeing area according to the facial mask texture map. Among them, the technical features that are the same or corresponding to those in the aforementioned embodiments are not repeated here.

[0101] like Figure 4 As shown, the technical solution of this embodiment may specifically include:

[0102] S410, in response to a received special effects configuration trigger operation for configuring a hair highlighting special effect, displaying a highlighting special effects configuration interface, wherein the highlighting special effects configuration interface displays an image preview area and at least one highlighting configuration item, wherein the highlighting configuration item at least includes an area configuration item for configuring a dyeing area.

[0103] S420: Displaying the image to be processed for configuring the hair highlighting special effect in the image preview area.

[0104] S430: Receive a dyeing area configuration parameter input based on the area configuration item, and obtain an area mask texture map corresponding to the dyeing area configuration parameter.

[0105] S440: Determine a target dyeing region corresponding to the dyeing region configuration parameter in the image to be processed according to the region mask texture map.

[0106] S450, determining a facial mask texture map of the facial area in the image to be processed, performing dyeing processing on the target dyeing area according to the facial mask texture map, and generating a dyeing preview image.

[0107] Optionally, the image to be processed is identified by a pre-trained neural network model to determine the regional mask texture map of the current image to be processed. Alternatively, the facial region of the image to be processed is identified by a facial recognition algorithm, and the facial region is regarded as a non-stained region, and the facial mask texture map is obtained by setting the pixel values ​​of the non-stained region to 0 or 1.

[0108] The facial mask texture map at least includes the boundary area between the facial area and the hair in the image to be processed, such as the forehead area or the ear area. When the target dyeing area is dyed, the disclosed embodiment also uses the facial mask texture map to cover the facial area in the current image to be processed, thereby protecting the facial area and preventing the facial area from being dyed.

[0109] Optionally, the target dyeing area is dyed according to the facial mask texture map, including: determining an overlapping area between the target dyeing area and the facial mask texture map, and dyeing an area of ​​the target dyeing area outside the overlapping area.

[0110] Optionally, according to the above-mentioned embodiment of the present disclosure, the UV coordinates of the pixel points of the target dyeing area in the image to be processed are obtained, and the UV coordinates of each pixel point of the facial mask texture map are also obtained, and the facial area in the image to be processed is determined by the UV coordinates of each pixel point in the facial mask texture map, and then, the UV coordinates of the pixel points of the target dyeing area in the image to be processed and the facial area are matched, and the area corresponding to the successfully matched UV coordinates is used as the overlapping area of ​​the target dyeing area and the facial mask texture map, and the area of ​​the target dyeing area except the overlapping area is dyed.

[0111] Optionally, in another embodiment of the present disclosure, after obtaining the UV coordinates of each pixel in the facial mask texture map and the UV coordinates of the pixel in the target dyeing area in the image to be processed, the UV coordinates of the pixel in the target dyeing area in the current image to be processed and the UV coordinates of each pixel in the facial mask texture map are directly matched, and the area corresponding to the UV coordinates of the successfully matched pixel points is taken as the overlapping area of ​​the target dyeing area and the facial mask texture map, and the area of ​​the target dyeing area except the overlapping area is dyed.

[0112] Optionally, the dyeing processing of the area in the target dyeing area except the overlapping area includes: for each pixel point in the area in the target dyeing area except the overlapping area, fusing the original color value of the pixel point with the color value of the target dyeing area to be dyed, so as to obtain the target color value of the pixel point.

[0113] The original color value may be the original color value of the pixel in the target dyeing area. The color value to be dyed may be the color value that needs to be dyed for the hair. For example, it may be the color value of the target color corresponding to the color configuration operation.

[0114] Optionally, the original color value of the pixel point is fused with the color value of the target dyeing area to be dyed, including: the original color value of the pixel point is fused with the color value of the target dyeing area to be dyed according to a preset fusion operation rule, wherein the preset fusion operation rule includes at least one of a sum operation, a weighted sum operation, a product operation and a weighted product operation.

[0115] Optionally, in another embodiment of the present disclosure, for each pixel in the target dyeing area except the overlapping area, the color value of the pixel to be dyed may be used as the target color value.

[0116] S460, receiving a dyeing area configuration parameter input based on the area configuration item, and displaying in the image preview area a dyeing preview image after dyeing a target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed.

[0117] As mentioned above, the dyeing preview image generated by executing the above steps is the dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed.

[0118] In the disclosed embodiment, upon receiving a special effect configuration trigger operation for configuring a hair highlighting special effect, a highlighting special effect configuration interface is displayed in response to the received special effect configuration trigger operation for configuring a hair highlighting special effect. The user views the to-be-processed image of the hair highlighting special effect in the image preview area in the highlighting special effect configuration interface, and can intuitively select the hair area to be highlighted in the to-be-processed image through the image preview area of ​​the highlighting special effect configuration interface, and then input the dyeing area configuration parameters in the area configuration item, and then input the dyeing area configuration parameters in the area configuration item, and then obtain the corresponding area mask texture map through the pre-trained neural network model, and then obtain the facial mask texture map, and then more accurately locate the dyeing area except the overlapping area in the target dyeing area corresponding to the dyeing area configuration parameters according to the area mask texture map and the facial mask texture map, and then protect the facial area and prevent the facial area from being dyed, thereby solving the problem of possible infection of the forehead skin when the hair is highlighted, improving the degree of refinement of the hair highlighting special effect, and realizing the refined highlighting of the target dyeing area of ​​the hair.

[0119] Figure 5 A schematic diagram of a highlighting special effect configuration interface provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the highlighting special effect configuration interface includes area configuration items and an image preview area (ie, a preview window).

[0120] Among them, the preview window includes: an image upload control, a video upload control, an image selection control, a refresh control, and an image display area for displaying preview images. The user can click the image upload control in the image preview window to select an image to upload, and then the image uploaded by the user can be displayed in the image display area; if the image uploaded by the user is a video, select the video button control to display the video uploaded by the user in the image display area, and the user can select an image in the video for processing or automatically identify the image in the video for processing based on the preset logic. After the user configures the corresponding target dyeing area, target color, and target color transparency in the highlighting configuration item, the user can generate a preview dyeing preview image according to the user-configured target dyeing area, target color, and target color transparency by clicking the refresh control, and display the dyeing preview image in the image display area.

[0121] Among them, the highlight configuration items include: local hair highlight area (such as Figure 5 The user can select the target dyeing area through the configuration items of the local hair highlighting area in the preview window, or can select the dyeing position of the image to be processed displayed in the image display area to deselect the configuration items of the local hair highlighting area corresponding to the selected dyeing position. The user can enter the color value to be dyed in the color input bar, or select the color value to be dyed, that is, the target color, in the color selector provided in the highlighting special effect configuration interface. The user can enter the target color transparency in the transparency input bar, or select the target color transparency in the transparency selector provided in the highlighting special effect configuration interface.

[0122] For example, assuming that according to the "hp_ger_channel_ids" configuration of the algorithm model, five separate regional mask texture maps corresponding to the hair area of ​​the image to be processed can be returned, namely the left outer ear mask texture map mask0, the right outer ear mask texture map mask1, the left inner ear mask texture map mask2, and the right inner ear mask texture map mask3. Among them, the fifth mask texture map is always the mask texture map mask4 of the entire hair segmentation. Then, when sampling in the shader, the value [0-1] in the r channel of the regional mask texture map is obtained, 0 indicates that it is not a highlighted area (i.e., the target dyeing area, and 1 indicates that it is a highlighted area. Further, the color value of the target color can be color-adjusted to obtain a better smoothing effect, and finally the stripe dyeing area is colorized, and in the image preview area, a dyeing preview image is displayed after the target color and target color transparency corresponding to the color and transparency input bar are applied to the target color dyed by the target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed.

[0123] Since the area returned by the regional mask texture map may cover the forehead and make the forehead also have color, in order to deal with this situation, the technical solution of the embodiment of the present disclosure provides a layer of mask protection for the cheeks, and uses the facial mask texture map to prevent the skin from being colored, thereby ensuring the accuracy of the hair highlighting effects and achieving refined hair highlighting.

[0124] Figure 6 FIG. 1 is a schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure. Figure 6 As shown, the device specifically includes: an interface display module 610, a to-be-processed image display module 620 and a dyeing effect display module 630.

[0125] Among them, the interface display module 610 is used to respond to the special effects configuration trigger operation received for configuring the hair highlighting special effects, and display the highlighting special effects configuration interface, wherein the highlighting special effects configuration interface displays an image preview area and at least one highlighting configuration item, and the highlighting configuration item at least includes an area configuration item for configuring the dyeing area; the to-be-processed image display module 620 is used to display the to-be-processed image for configuring the hair highlighting special effects in the image preview area; the dyeing effect display module 630 is used to receive the dyeing area configuration parameters input based on the area configuration items, and display the dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the to-be-processed image in the image preview area.

[0126] The technical solution of the disclosed embodiment is to display a highlighting special effect configuration interface in response to a received special effect configuration trigger operation for configuring a hair highlighting special effect. Since the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, the highlighting configuration item at least includes a region configuration item for configuring a dyeing region, and can provide users with a function of selecting a hair dyeing region, and can interact with users to more accurately obtain user needs. The image to be processed for configuring the hair highlighting special effect is displayed in the image preview area, so that the user can intuitively view the image to be processed in the highlighting special effect configuration interface, and then receive the dyeing region configuration parameters input based on the region configuration items, and display a dyeing preview image after dyeing the target dyeing region corresponding to the dyeing region configuration parameters in the image to be processed in the image preview area, and can generate a dyeing preview image according to the user's dyeing region configuration parameters to display different hair highlighting effects. The technical solution disclosed in the present invention can automatically dye the selected area of ​​the hair only by the user inputting the dyeing area configuration parameters through the area configuration item. The interactive method is simple and has strong universality, which saves the user's manual processing time and improves the efficiency of generating hair highlighting special effects. It solves the technical problems of professional requirements for fine processing of local information of images in the prior art, time-consuming and labor-intensive, and unstable processing effects, and realizes simple and fast hair highlighting, meets the user's personalized hair dyeing needs, and improves the user experience.

[0127] Optionally, the to-be-processed image display module 620 is specifically used for:

[0128] receiving an image upload operation inputted by an image upload control in the image preview area, displaying the uploaded image in the image preview area, and using the uploaded image as an image to be processed for configuring a hair highlighting effect; or,

[0129] A video upload operation inputted from a video upload control in the image preview area is received, the uploaded video is displayed in the image preview area, and an image in the uploaded video that meets a preset condition is used as an image to be processed for configuring a hair highlighting effect.

[0130] Optionally, the highlight configuration item also includes a color configuration item and / or a transparency configuration item.

[0131] Optionally, the device further comprises:

[0132] A color configuration module, used for receiving a color configuration operation based on the color configuration item input;

[0133] Accordingly, the dyeing effect display module 630 can also be used for:

[0134] In the image preview area, a dyeing preview image is displayed after the target color corresponding to the color configuration operation is applied to the target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed.

[0135] Optionally, the device further comprises:

[0136] A transparency configuration module, used for receiving a transparency configuration operation input based on the transparency configuration item;

[0137] Accordingly, the dyeing effect display module 630 is further specifically used for:

[0138] In the image preview area, a dyeing preview image is displayed after the target color transparency corresponding to the transparency configuration operation is applied to the target color dyeing area in the to-be-processed image that is dyed with the target color corresponding to the dyeing area configuration parameter.

[0139] Optionally, the device may further include:

[0140] A region mask module is used to obtain a region mask texture map corresponding to the dyeing region configuration parameter after receiving the dyeing region configuration parameter input based on the region configuration item and before displaying the dyeing preview image after dyeing the target dyeing region corresponding to the dyeing region configuration parameter in the image to be processed in the image preview area, determine the target dyeing region corresponding to the dyeing region configuration parameter in the image to be processed according to the region mask texture map, and dye the target dyeing region to generate a dyeing preview image.

[0141] Optionally, the target mask texture map includes a mask texture map of the entire hair area and a mask texture map of at least one local hair area.

[0142] Optionally, the area mask module is used to:

[0143] A facial mask texture map of a facial area in the image to be processed is determined, and the target dyeing area is dyed according to the facial mask texture map.

[0144] Optionally, the area mask module may be specifically used for:

[0145] An overlapping area between the target dyeing area and the facial mask texture map is determined, and a dyeing process is performed on an area of ​​the target dyeing area outside the overlapping area.

[0146] Optionally, the area mask module may be further used for:

[0147] For each pixel in the target dyeing area except the overlapping area, the original color value of the pixel is merged with the color value of the target dyeing area to be dyed to obtain the target color value of the pixel.

[0148] Optionally, the area mask module may also be used for:

[0149] The original color value of the pixel point is combined with the color value of the target dyeing area to be dyed according to a preset fusion operation rule, wherein the preset fusion operation rule includes at least one of a sum operation, a weighted sum operation, a product operation and a weighted product operation.

[0150] Optionally, the device further comprises:

[0151] The color adjustment module is used to adjust the color of the target dyeing area to be dyed according to a preset color adjustment curve; and / or adjust the color of the target dyeing area after dyeing according to a preset color adjustment curve.

[0152] The image processing device provided in the embodiments of the present disclosure can execute the image processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the image processing method.

[0153] It is worth noting that in the embodiment of the above-mentioned image processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.

[0154] Figure 7 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 7 , which shows an electronic device (eg, Figure 7 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0155] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An edit / output (I / O) interface 705 is also connected to the bus 704.

[0156] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0157] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0158] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0159] The electronic device provided by the embodiment of the present disclosure and the image processing method provided by the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0160] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the image processing method provided by the above embodiments is implemented.

[0161] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0162] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0163] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0164] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0165] In response to a received special effect configuration trigger operation for configuring a hair highlighting special effect, displaying a highlighting special effect configuration interface, wherein the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, and the highlighting configuration item at least includes an area configuration item for configuring a dyeing area;

[0166] Displaying the image to be processed for configuring the hair highlighting special effect in the image preview area;

[0167] A dyeing area configuration parameter input based on the area configuration item is received, and a dyeing preview image after dyeing a target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed is displayed in the image preview area.

[0168] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0169] The flow diagram and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow diagram or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or the flow diagram, and the combination of the square boxes in the block diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0170] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0171] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0172] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0173] According to one or more embodiments of the present disclosure, [Example 1] provides an image processing method, the method comprising:

[0174] In response to a received special effect configuration trigger operation for configuring a hair highlighting special effect, displaying a highlighting special effect configuration interface, wherein the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, and the highlighting configuration item at least includes an area configuration item for configuring a dyeing area;

[0175] Displaying the image to be processed for configuring the hair highlighting special effect in the image preview area;

[0176] A dyeing area configuration parameter input based on the area configuration item is received, and a dyeing preview image after dyeing a target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed is displayed in the image preview area.

[0177] According to one or more embodiments of the present disclosure, [Example 2] provides an image processing method, the method comprising:

[0178] Optionally, displaying the image to be processed for configuring the hair highlighting special effect in the image preview area includes:

[0179] receiving an image upload operation inputted by an image upload control in the image preview area, displaying the uploaded image in the image preview area, and using the uploaded image as an image to be processed for configuring a hair highlighting effect; or,

[0180] A video upload operation inputted from a video upload control in the image preview area is received, the uploaded video is displayed in the image preview area, and an image in the uploaded video that meets a preset condition is used as an image to be processed for configuring a hair highlighting effect.

[0181] According to one or more embodiments of the present disclosure, [Example 3] provides an image processing method, the method comprising:

[0182] Optionally, the highlight configuration item also includes a color configuration item and / or a transparency configuration item.

[0183] According to one or more embodiments of the present disclosure, [Example 4] provides an image processing method, the method comprising:

[0184] Optionally, receiving a color configuration operation based on the color configuration item input;

[0185] The displaying in the image preview area a dyed preview image after dyeing the target dyed area corresponding to the dyed area configuration parameter in the image to be processed includes:

[0186] In the image preview area, a dyeing preview image is displayed after the target color corresponding to the color configuration operation is applied to the target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed.

[0187] According to one or more embodiments of the present disclosure, [Example 5] provides an image processing method, the method comprising:

[0188] Receiving a transparency configuration operation based on the transparency configuration item input;

[0189] The displaying in the image preview area a dyed preview image after dyeing the target dyed area corresponding to the dyed area configuration parameter in the image to be processed includes:

[0190] In the image preview area, a dyeing preview image is displayed after the target color transparency corresponding to the transparency configuration operation is applied to the target color dyeing area in the to-be-processed image that is dyed with the target color corresponding to the dyeing area configuration parameter.

[0191] According to one or more embodiments of the present disclosure, [Example 6] provides an image processing method, the method comprising:

[0192] Optionally, after receiving the dyeing area configuration parameters input based on the area configuration items and before displaying in the image preview area a dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed, the method further includes:

[0193] A regional mask texture map corresponding to the dyeing region configuration parameters is obtained, a target dyeing region corresponding to the dyeing region configuration parameters in the image to be processed is determined according to the regional mask texture map, and the target dyeing region is dyed to generate a dyeing preview image.

[0194] According to one or more embodiments of the present disclosure, [Example 7] provides an image processing method, the method comprising:

[0195] Optionally, the target mask texture map includes a mask texture map of the entire hair area and a mask texture map of at least one local hair area.

[0196] According to one or more embodiments of the present disclosure, [Example 8] provides an image processing method, the method comprising:

[0197] Optionally, before dyeing the target dyeing area, the method further includes:

[0198] A facial mask texture map of a facial area in the image to be processed is determined, and the target dyeing area is dyed according to the facial mask texture map.

[0199] According to one or more embodiments of the present disclosure, [Example 9] provides an image processing method, the method comprising:

[0200] Optionally, the dyeing process is performed on the target dyeing area according to the facial mask texture map, including:

[0201] An overlapping area between the target dyeing area and the facial mask texture map is determined, and a dyeing process is performed on an area of ​​the target dyeing area except the overlapping area.

[0202] According to one or more embodiments of the present disclosure, [Example 10] provides an image processing method, the method comprising:

[0203] Optionally, the dyeing process is performed on the area in the target dyeing area except the overlapping area, including:

[0204] For each pixel in the target dyeing area except the overlapping area, the original color value of the pixel is merged with the color value of the target dyeing area to be dyed to obtain the target color value of the pixel.

[0205] According to one or more embodiments of the present disclosure, [Example 11] provides an image processing method, the method comprising:

[0206] Optionally, the original color value of the pixel point is merged with the color value of the target dyeing area to be dyed, including:

[0207] The original color value of the pixel point is combined with the color value of the target dyeing area to be dyed according to a preset fusion operation rule, wherein the preset fusion operation rule includes at least one of a sum operation, a weighted sum operation, a product operation and a weighted product operation.

[0208] According to one or more embodiments of the present disclosure, [Example 12] provides an image processing method,

[0209] Optionally, the method further comprises: adjusting the color of the target dyeing area to be dyed according to a preset color adjustment curve; and / or,

[0210] The color of the dyed target dyeing area is adjusted according to a preset color adjustment curve.

[0211] According to one or more embodiments of the present disclosure, [Example 13] provides an image processing device, the device comprising:

[0212] an interface display module, configured to display a highlighting special effect configuration interface in response to a received special effect configuration trigger operation for configuring a hair highlighting special effect, wherein the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, wherein the highlighting configuration item at least includes an area configuration item for configuring a dyeing area;

[0213] A to-be-processed image display module, used to display the to-be-processed image for configuring the hair highlighting special effect in the image preview area;

[0214] The dyeing effect display module is used to receive the dyeing area configuration parameters input based on the area configuration items, and display the dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed in the image preview area.

[0215] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0216] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0217] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. An image processing method, characterized in that: include: In response to a received special effect configuration trigger operation for configuring a hair highlighting special effect, displaying a highlighting special effect configuration interface, wherein the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, and the highlighting configuration item at least includes an area configuration item for configuring a dyeing area; Displaying the image to be processed for configuring the hair highlighting special effect in the image preview area; receiving a dyeing region configuration parameter input based on the region configuration item, and displaying in the image preview area a dyeing preview image after dyeing a target dyeing region corresponding to the dyeing region configuration parameter in the image to be processed; After receiving the dyeing area configuration parameters input based on the area configuration items, and before displaying in the image preview area a dyeing preview image after dyeing the target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed, the method further includes: Acquire a region mask texture map corresponding to the dyeing region configuration parameter, determine a target dyeing region corresponding to the dyeing region configuration parameter in the image to be processed according to the region mask texture map, perform dyeing processing on the target dyeing region, and generate a dyeing preview image; The regional mask texture map includes a mask texture map of the entire hair region and a mask texture map of at least one local hair region.

2. The image processing method according to claim 1, characterized in that: The displaying of the image to be processed for configuring the hair highlighting special effect in the image preview area includes: receiving an image upload operation inputted by an image upload control in the image preview area, displaying the uploaded image in the image preview area, and using the uploaded image as an image to be processed for configuring a hair highlighting effect; or, A video upload operation inputted from a video upload control in the image preview area is received, the uploaded video is displayed in the image preview area, and an image in the uploaded video that meets a preset condition is used as an image to be processed for configuring a hair highlighting effect.

3. The image processing method according to claim 1, characterized in that: The highlight configuration item also includes a color configuration item and / or a transparency configuration item.

4. The image processing method according to claim 3, characterized in that: Also includes: receiving a color configuration operation based on the color configuration item input; The displaying in the image preview area a dyed preview image after dyeing the target dyed area corresponding to the dyed area configuration parameter in the image to be processed includes: In the image preview area, a dyeing preview image is displayed after the target color corresponding to the color configuration operation is applied to the target dyeing area corresponding to the dyeing area configuration parameter in the image to be processed.

5. The image processing method according to claim 3, characterized in that: Also includes: Receiving a transparency configuration operation based on the transparency configuration item input; The displaying in the image preview area a dyed preview image after dyeing the target dyed area corresponding to the dyed area configuration parameter in the image to be processed includes: In the image preview area, a dyeing preview image is displayed after the target color transparency corresponding to the transparency configuration operation is applied to the target color dyeing area in the to-be-processed image that is dyed with the target color corresponding to the dyeing area configuration parameter.

6. The image processing method according to claim 1, characterized in that: The dyeing process of the target dyeing area comprises: A facial mask texture map of a facial area in the image to be processed is determined, and the target dyeing area is dyed according to the facial mask texture map.

7. The image processing method according to claim 6, characterized in that: The dyeing process of the target dyeing area according to the facial mask texture map comprises: An overlapping area between the target dyeing area and the facial mask texture map is determined, and a dyeing process is performed on an area of ​​the target dyeing area except the overlapping area.

8. The image processing method according to claim 7, characterized in that: The dyeing process is performed on the area of ​​the target dyeing area except the overlapping area, comprising: For each pixel in the target dyeing area except the overlapping area, the original color value of the pixel is merged with the color value of the target dyeing area to be dyed to obtain the target color value of the pixel.

9. The image processing method according to claim 8, characterized in that: The original color value of the pixel point is merged with the color value of the target dyeing area to be dyed, including: The original color value of the pixel point is combined with the color value of the target dyeing area to be dyed according to a preset fusion operation rule, wherein the preset fusion operation rule includes at least one of a sum operation, a weighted sum operation, a product operation and a weighted product operation.

10. The image processing method according to claim 1, characterized in that: Also includes: Adjusting the color of the target dyeing area according to a preset color adjustment curve; and / or, The color of the dyed target dyeing area is adjusted according to a preset color adjustment curve.

11. An image processing device, characterized in that: include: an interface display module, configured to display a highlighting special effect configuration interface in response to a received special effect configuration trigger operation for configuring a hair highlighting special effect, wherein the highlighting special effect configuration interface displays an image preview area and at least one highlighting configuration item, wherein the highlighting configuration item at least includes an area configuration item for configuring a dyeing area; A to-be-processed image display module, used to display the to-be-processed image for configuring the hair highlighting special effect in the image preview area; a dyeing effect display module, used for receiving dyeing area configuration parameters input based on the area configuration items, and displaying in the image preview area a dyeing preview image after dyeing a target dyeing area corresponding to the dyeing area configuration parameters in the image to be processed; A region mask module is used to obtain a region mask texture map corresponding to the dyeing region configuration parameter after receiving the dyeing region configuration parameter input based on the region configuration item and before displaying a dyeing preview image after dyeing the target dyeing region corresponding to the dyeing region configuration parameter in the image to be processed in the image preview area, determine the target dyeing region corresponding to the dyeing region configuration parameter in the image to be processed according to the region mask texture map, and dye the target dyeing region to generate a dyeing preview image; the region mask texture map includes a mask texture map of the entire hair region and a mask texture map of at least one local hair region.

12. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described in any one of claims 1 to 10.

13. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the image processing method according to any one of claims 1 to 10 when executed by a computer processor.