Image processing method and device, electronic equipment and medium

The image processing method simplifies photo editing by allowing users to select image areas and input prompt words, enabling automated editing through large language models, thus making it accessible to non-professionals.

CN119228950APending Publication Date: 2024-12-31VIVO MOBILE COMM CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411378495.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Current photo editing methods, such as using the magic wand in PS, are complicated and require manual operations, making them inaccessible to users without professional retouching skills.

Method used

An image processing method that allows users to select an image area and input retouching prompt words through an editing dialog window, utilizing large language models for automated image processing, simplifying the editing process.

Benefits of technology

Enables users to easily retouch images without specialized skills, improving convenience and quality of photo editing by automating complex operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228950A_ABST
    Figure CN119228950A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and device, electronic equipment and a medium, and belongs to the technical field of image processing.The image processing method comprises the steps that under the condition that area selection input of a to-be-processed image is received, an image editing dialogue window is displayed; and under the condition that an image retouching prompt word input in the image editing dialogue window is received, image processing indicated by the image retouching prompt word is executed on an image in the to-be-edited image area selected by the area selection input.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and specifically to an image processing method, device, electronic device and medium. Background Art

[0002] People often use the photo taking and photo editing functions in their daily lives. The current commonly used photo editing methods are similar to using the magic wand in PS to select a specified area, generate different layers, and then manually perform photo editing operations. It can be seen that this photo editing method has the problem of complicated photo editing steps. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and medium, which can simplify the image editing process.

[0004] In a first aspect, an embodiment of the present application provides an image processing method, comprising:

[0005] In case of receiving a region selection input of the image to be processed, displaying an image editing dialog window;

[0006] When receiving the image editing prompt word input in the image editing dialog window, the image processing indicated by the image editing prompt word is performed on the image in the image area to be edited selected by the area selection input.

[0007] In a second aspect, an embodiment of the present application provides an image processing device, including:

[0008] A display module, for displaying an image editing dialog window when receiving an input for selecting a region of an image to be processed;

[0009] The processing module is used to, upon receiving the image editing prompt word input in the image editing dialog window, perform the image processing indicated by the image editing prompt word on the image in the image area to be edited selected by the area selection input.

[0010] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0011] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0012] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.

[0013] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.

[0014] In the embodiment of the present application, since the user can select the area to be processed by the area selection input, it is helpful to accurately locate the area to be retouched. At the same time, since the image editing dialog window can also be displayed when the area selection input of the image to be processed is received, the user can input the retouching prompt word in the image editing dialog window to trigger the image processing indicated by the retouching prompt word to be performed on the image in the image area to be edited selected by the area selection input. In this process, since the user only needs to input the retouching prompt word to realize the retouching processing of the selected area in the image to be processed in a specified manner, the retouching process is simplified and the convenience of retouching is improved. In addition, the user does not need specific professional retouching skills to realize the retouching processing of the selected area in the image to be processed in a specified manner, thereby reducing the threshold for using the retouching function, so that users who do not have relevant retouching skills can also use this image processing method to process more satisfactory images. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a flowchart of an image processing method provided by some embodiments of the present application;

[0016] Figure 2 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0017] Figure 3 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0018] Figure 4 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0019] Figure 5 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0020] Figure 6a is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0021] Figure 6b is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0022] Figure 6c is a schematic diagram of the back side of the folding screen electronic device of the present application;

[0023] Figure 6d is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0024] Figure 7 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0025] Figure 8 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0026] Fig. 9 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0027] Fig.10 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0028] Fig.11 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0029] Fig.12 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0030] Fig.13 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0031] Fig.14 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0032] Fig.15 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0033] Fig.16 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0034] Fig.17is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0035] Fig.18 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0036] Fig.19 is a schematic diagram of a person before image processing in some embodiments of the present application;

[0037] Fig. 20 is a schematic diagram of a person after image processing in some embodiments of the present application;

[0038] Fig.21 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0039] Fig. 22 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0040] Fig.23 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0041] Fig.24 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0042] Fig.25 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0043] Fig.26 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0044] Fig. 27 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0045] Fig.28 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0046] Fig.29 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0047] Fig.30 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0048] Fig.31 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0049] Fig.32 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0050] Fig.33 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0051] Fig.34 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0052] Fig.35 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0053] Fig.36 is a schematic diagram of an interface for performing an image processing process based on an image processing method provided in some embodiments of the present application;

[0054] Fig.37 is a structural schematic diagram of an image processing device provided by some embodiments of the present application;

[0055] Fig.38 is a schematic diagram of the structure of an electronic device provided by some embodiments of the present application;

[0056] Fig.39 A schematic diagram of the hardware structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0058] The terms "first", "second", etc. in the specification of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship. The logo in the present application is a text, symbol, image, etc. used to indicate information, and a control or other container can be used as a carrier for displaying information, including but not limited to a text logo, a symbol logo, and an image logo.

[0059] In the following, in conjunction with the accompanying drawings, an image processing method, device, electronic device and medium provided by the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0060] It should be noted that the image processing method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, and vehicle-mounted electronic devices. In some embodiments of the present application, the image processing method provided in the embodiments of the present application is described by taking the electronic device as the execution subject to execute the image processing method as an example.

[0061] The image processing method provided in the embodiment of the present application can be applied to various scenarios where image retouching is required. One specific application scenario is a retouching scenario of adding accessories to the wrist area of ​​a portrait image. Another specific application scenario is a retouching scenario of adjusting the hair color of the hair area in a portrait image. Figure 1 , a flow chart of an image processing method provided in an embodiment of the present application, the image processing method comprises the following steps:

[0062] Step 101: When receiving an input for selecting a region of an image to be processed, display an image editing dialog window.

[0063] The image to be processed may be an image to be processed in various photo editing scenarios. For example, after a user captures an image, when the captured image needs to be edited, the captured image may be used as the image to be processed, and then the image to be processed may be processed based on the method provided in the embodiment of the present application. For another example, a user may obtain an image from the Internet or an album, and use the obtained image as the image to be processed, and then the image to be processed may be processed based on the method provided in the embodiment of the present application.

[0064] The above-mentioned area selection input may be a selection input by the user through various touch modes, for example, it may be a selection input by the user through the knuckles on the screen, or it may be a selection input by the user through the fingertips on the screen. The knuckle input specifically means: the user bends his fingers and uses the knuckles to touch the screen for input, for example, see Figure 3 Shown is a schematic diagram of user's knuckle-based input.

[0065] For example, see Figure 3 In the photo editing scene where accessories are added to the wrist area of ​​a portrait image, users can circle the area using the area selection input. Figure 3 The wrist area in step 101 is the area selection input by the user. Figure 3 The circle selection input of the wrist area in Figure 3 The dotted area 301 in the figure is the area selected by the area selection input. Meanwhile, the displaying of the image editing dialog window in the above step 101 may specifically refer to: displaying the image editing dialog window in a specific area of ​​the screen; Figure 3 In the illustrated embodiment, the image editing dialog window is displayed in the area below the image to be processed.

[0066] For another example, see Figure 6a In the photo editing scene where you want to adjust the hair color of a portrait image, you can circle the area using the area selection input. Figure 6a The hair area in step 101 is the area selection input by the user. Figure 6a The hair area in the image is selected as input, where Figure 6a The dotted area in the image selection input is the area selected by the area selection input. Meanwhile, the displaying of the image editing dialog window in the above step 101 may specifically refer to: displaying the image editing dialog window in a specific area of ​​the screen. Specifically, the position of displaying the image editing dialog window may be determined according to the screen type of the electronic device, for example, see Figure 5 For a vertical screen electronic device, the screen can be split into a first display area 806 and a second display area 807, wherein the first display area 806 displays the image to be processed, and the second display area 807 displays the image editing dialog window. For another example, see Figure 6b For a folding screen electronic device, the two screen areas of the folding screen electronic device may be respectively determined as a first display area 806 and a second display area 807, wherein the first display area 806 displays the image to be processed, and the second display area 807 displays the image editing dialog window. Figure 6c for Figure 6bThe back view of the foldable screen electronic device shown in FIG. 8 includes a first screen 810 and a second screen 811. The first display area 806 is the display area of ​​the first screen 810, and the second display area 807 is the display area of ​​the second screen 811. Figure 6d For another folding screen electronic device, the two screen areas of the folding screen electronic device can be respectively determined as a first display area 806 and a second display area 807, wherein the first display area 806 displays the image to be processed, and the second display area 807 displays the image editing dialog window. Figure 8 For a large-screen electronic device, its screen area can be divided into a first display area 806 and a second display area 807, the first display area 806 displays the image to be processed, and the second display area 807 displays the image editing dialog window, wherein the large-screen electronic device can be a folding screen electronic device, or other non-folding screen electronic devices such as a tablet computer. When the large-screen electronic device can be a folding screen electronic device, the first display area 806 and the second display area 807 are respectively two screen areas of the folding screen electronic device.

[0067] The above-mentioned image editing dialogue window can be various dialogue windows, for example, various artificial intelligence (AI) dialogue windows, or text dialogue windows, voice assistant dialogue windows, etc.

[0068] Step 102: upon receiving a picture editing prompt word input in the image editing dialog window, performing image processing indicated by the picture editing prompt word on the image in the image area to be edited selected by the area selection input.

[0069] Among them, the above-mentioned photo editing prompt words can be prompt words input by the user in the form of text or voice based on the image editing dialogue window. The execution subject of the above-mentioned image processing indicated by the photo editing prompt words on the image in the image area to be edited selected by the area selection input can be various large language models (LLM) for image processing, wherein the large language model refers to a deep learning model trained with a large amount of data, wherein the large language model can handle a variety of natural language tasks, such as text classification, question and answer, dialogue, image processing, etc. In the embodiment of the present application, the image processing step in step 102 can be implemented based on the image processing function of the large language model. The prompt words refer to input instructions or key words provided when interacting with the large language model, which are intended to specify the tasks that the large language model should perform. The prompt words are a bridge for communication between the user and the large language model, enabling the large language model to understand the content in the prompt words and make corresponding responses accordingly.

[0070] See also Figure 5 In a photo editing scene of adding accessories to the wrist part of a portrait image, when the photo editing prompt in step 102 is "add a round watch", performing the image processing indicated by the photo editing prompt on the image in the image area to be edited selected by the area selection input in step 102 may include: Figure 4 A circular watch is generated in the wrist area selected by the user in the portrait image shown, such as Figure 5 The image shown is an image obtained after the image processing indicated by the photo editing prompt word is performed on the image in the image area to be edited selected by the area selection input.

[0071] See also Figure 7 In the photo editing scene where you want to adjust the hair color of a portrait image, see Fig. 9 When the image editing prompt in step 102 is "dye the hair area black", performing the image processing indicated by the image editing prompt on the image in the image area to be edited selected by the area selection input in step 102 may include: Figure 7 The hair region 601 of the portrait image shown is dyed black.

[0072] In this embodiment, since the user can select the area to be processed by the area selection input, it is helpful to accurately locate the area to be retouched. At the same time, since the image editing dialog window can also be displayed when the area selection input of the image to be processed is received, the user can input the retouching prompt word in the image editing dialog window to trigger the image processing indicated by the retouching prompt word to be performed on the image in the image area to be edited selected by the area selection input. In this process, since the user only needs to input the retouching prompt word to realize the retouching processing of the selected area in the image to be processed in a specified manner, the retouching process is simplified and the convenience of retouching is improved. In addition, the user does not need specific professional retouching skills to realize the retouching processing of the selected area in the image to be processed in a specified manner, thereby reducing the threshold for using the retouching function, so that users who do not have relevant retouching skills can also use this image processing method to process more satisfactory images.

[0073] Optionally, before displaying the image editing dialog window, the method further includes:

[0074] displaying at least one image retouching option matching the image area to be edited selected by the area selection input;

[0075] The display image editing dialog window includes:

[0076] upon receiving an option selection input for one of the at least one photo editing options, displaying the image editing dialogue window;

[0077] The performing of the image processing indicated by the image editing prompt word on the image in the to-be-edited image area selected by the area selection input comprises:

[0078] According to the photo retouching function indicated by the photo retouching option selected by the option selection input, the image processing indicated by the photo retouching prompt word is performed on the image in the image area to be edited selected by the area selection input.

[0079] The above-mentioned photo editing options may be options with specific photo editing functions, and the corresponding photo editing functions may be triggered based on the photo editing options. Different photo editing options correspond to different photo editing functions. The photo editing options may be photo editing options corresponding to various common photo editing functions, for example, an accessory adding option, a skin color adjustment option, a hair color adjustment option, etc.

[0080] The at least one retouching option is matched with the image area to be edited, wherein different image areas to be edited may correspond to different "at least one retouching option". For example, in a retouching scene of adding accessories to the wrist area of ​​a portrait image, the at least one retouching option may include: an accessories adding option, a skin color adjustment option, a skin repair option, etc. For another example, in a retouching scene of adjusting the hair color of the hair area of ​​a portrait image, the at least one retouching option may include: a hair color adjustment option, an accessories adding option, a hairstyle adjustment option, etc.

[0081] Since the above-mentioned photo editing option corresponds to a photo editing function, and when using a certain photo editing function to process an image, the user is usually required to input more processing details in order to produce a photo editing effect that satisfies the user. Therefore, the user can input specific photo editing details through the above-mentioned photo editing prompt words.

[0082] See also Figure 4 In the editing scene of adding accessories to the wrist of a portrait image, when the editing option selected in the option selection input is the "add accessories" option 303, please refer to Figure 5 If the photo editing prompt is "add a round watch", then the photo editing function indicated by the photo editing option selected by the option selection input, and the image processing indicated by the photo editing prompt word are performed on the image in the image area to be edited selected by the area selection input. Specifically, it can refer to: adding a round watch accessory to the wrist according to the accessory adding function indicated by the accessory adding option.

[0083] See also Figure 7In a photo editing scene for adjusting the hair color of a hair area in a portrait image, when the selected photo editing option in the option selection input is the "hair color adjustment" option 602, refer to Fig. 9 , if the photo editing prompt is "dye the hair area black", then performing the image processing indicated by the photo editing prompt on the image in the image area to be edited selected by the area selection input according to the photo editing function indicated by the photo editing prompt may specifically refer to: performing the image processing indicated by the photo editing prompt according to the hair color adjustment function indicated by the hair color adjustment option Figure 7 The hair region 601 of the portrait image shown is dyed black.

[0084] In this embodiment, by displaying at least one photo retouching option that matches the image area to be edited selected by the area selection input before displaying the image editing dialog window, it is convenient for the user to select the photo retouching option corresponding to the desired photo retouching function from the displayed photo retouching options. In this way, the candidate can perform the image processing indicated by the photo retouching prompt word on the image in the image area to be edited selected by the area selection input according to the photo retouching function indicated by the photo retouching option selected by the option selection input. In this process, since the user does not need to perform complicated manual photo retouching operations, the photo retouching process is further simplified.

[0085] Optionally, the image editing dialogue window includes guiding information, and the guiding information is used to guide the image editor to input a prompt word for image editing;

[0086] The guidance information includes: prompt word input description information and at least one prompt word option;

[0087] Among them, a prompt word option indicates a prompt word for editing photos recommended to image editors;

[0088] The method further comprises:

[0089] In the case of receiving information input in the prompt word input area in the image editing dialogue window, determining the information input in the prompt word input area as the image editing prompt word input by the image editor in the image editing dialogue window;

[0090] Alternatively, when a prompt word selection input is received for one of the at least one prompt word options, the photo editing prompt word indicated by the prompt word option selected by the prompt word selection input is determined as the photo editing prompt word input by the image editor in the image editing dialog window.

[0091] The above-mentioned prompt word input description information can be used to prompt the image editor to select a prompt word option, or to prompt the image editor to input the editing prompt word in the image editing dialog window. Different editing scenes have different corresponding "prompt word input description information and at least one prompt word option".

[0092] See also Figure 7 In a photo editing scene for adjusting the hair color of a hair area in a portrait image, when the selected photo editing option in the option selection input is the "hair color adjustment" option 602, refer to Figure 8 , the following “prompt word input description information” may be displayed: You can use text description to tell me what color you want to dye your hair, or you can make a quick selection from the following recommendations. At the same time, the following prompt word options may be displayed: red option 801, gray option 802, and black option 803. The image editing dialogue window may also include an AI dialogue window 808, a voice control 809, an AI assistant avatar logo 804, and a window closing control 805, wherein the image editor may manually input the photo editing prompt word through the AI ​​dialogue window 808 and the voice control 809, and at the same time, the image editing dialogue window may be closed through the window closing control 805. In this way, the image editor may complete the input of the photo editing prompt word by selecting the displayed prompt word options, for example, see Fig. 9 , when the image editor selects the "black" option 803, it can be determined that the image editing prompt word input by the image editor is "dye the hair black" 901. Fig. 9 , during the process of performing the photo editing action of dyeing hair black, a photo editing progress bar 902 may be displayed. Fig.10 After the photo editing action of dyeing the hair black is completed, the message "Completed, you can also circle other places on the image to continue creative adjustments" can be displayed to prompt the image editor to edit other places. Fig.11 , when the image editor continues to select the neck area, such as Fig.12 As shown, the following editing options can be displayed: "Add a necklace" option 1201 and "Add a red lining" option 1202. If the image editor selects the "Add a necklace" option 1201, the following options can be displayed according to the editing progress. Fig.13 The progress bar 902 of the photo editing is shown, and after the photo editing is completed, the Fig.14 The "Completed" prompt message is shown.

[0093] For another example, in a photo editing scene where accessories are added to the wrist part of a portrait image, when the selected photo editing option selected by the option selection input is "Accessory Addition Option", the following "Prompt Word Input Description Information" may be displayed: You can use a text description to tell me what accessories you want to add to the wrist part, or you can make a quick selection from the following recommendations. At the same time, the following prompt word options may be displayed: Add a round watch option, add a gold bracelet option, and add a jade bracelet option. And the image editing dialogue window may also include an AI dialogue window and a voice control. In this way, the image editor can complete the input of the photo editing prompt word by selecting the displayed prompt word options. For example, when the image editor selects "Add a round watch option", it can be determined that the photo editing prompt word entered by the image editor is "Add a round watch". In addition, when the recommended prompt word options do not include the photo editing prompt words that the image editor wants to enter, the image editor can also enter the photo editing prompt words in the form of text or voice through the AI ​​dialogue window or voice control. For example, the image editor can enter the following photo editing prompt words through the AI ​​dialogue window or voice control: "Add a square watch."

[0094] In this embodiment, by making the image editing dialog window include guiding information, the image editor can be guided to select the prompt word option, or the image editor can be prompted to enter the photo editing prompt word in the image editing dialog window, thereby conveniently guiding the image editor to quickly enter the photo editing prompt word.

[0095] Optionally, the image area to be edited selected by the area selection input includes a wrist area, a neck area or a forehead area;

[0096] The displaying of at least one image retouching option matching the image area to be edited selected by the area selection input includes:

[0097] Display at least one of the following photo editing options: accessory adding option, skin tone adjustment option, skin repair option.

[0098] Among them, the skin repair option can be used to perform various skin repairs on the area selected by the area selection input, for example, scar repair, wound repair, acne repair, birthmark repair and all possible situations that require skin repair.

[0099] See also Figure 3In some embodiments of the present application, when the image area to be edited selected by the area selection input is the wrist area, at least one of the following photo editing options may be displayed: an accessory adding option, a skin color adjustment option, and a skin repair option, so as to facilitate performing photo editing operations such as adding accessories, adjusting skin color, or repairing skin in the wrist area. In this case, the accessory adding option may be used to add various accessories suitable for wearing in the wrist area, such as watches, bracelets, and bangles.

[0100] See also Fig. 22 In some embodiments of the present application, when the image area to be edited selected by the area selection input is the neck area 2201, at least one of the following photo editing options may be displayed: accessory adding option 2203, skin color adjustment option 2204, skin repair option 2205, so as to facilitate performing photo editing operations such as adding accessories, adjusting skin color, or repairing skin in the neck area 2201. In this case, the accessory adding option may be used to add various accessories suitable for wearing in the neck area, such as necklaces, pendants, etc.

[0101] See also Fig.28 In some embodiments of the present application, when the image area to be edited selected by the area selection input is the forehead area 2801, at least one of the following photo editing options may be displayed: accessory adding option 2803, skin color adjustment option 2804, skin repair option 2805, so as to facilitate performing photo editing operations such as adding accessories, adjusting skin color, or repairing skin in the forehead area 2801. In this case, the accessory adding option can be used to add various forehead ornaments suitable for wearing in the forehead area, wherein the forehead ornament is a kind of ornament, which is mainly worn on the forehead. For example, in some embodiments of the present application, the forehead ornament may include a pendant-type forehead ornament, a tassel-type forehead ornament, a necklace-type forehead ornament, a hair-insertion forehead ornament, etc.

[0102] In this embodiment, by displaying at least one of the following photo editing options: an accessories adding option, a skin color adjusting option, and a skin repairing option, it is convenient to perform photo editing operations such as adding accessories, adjusting skin color, or repairing skin on the image area to be edited selected by area selection input, so as to enrich the diversity of photo editing operations.

[0103] Optionally, the image area to be edited selected by the area selection input includes a hair area;

[0104] The displaying of at least one image retouching option matching the image area to be edited selected by the area selection input comprises:

[0105] Display at least one of the following photo editing options: hair color adjustment option, accessory addition option, hairstyle adjustment option.

[0106] See also Figure 6aIn some embodiments of the present application, when the image area to be edited selected by the area selection input is the hair area 601, at least one of the following photo editing options may be displayed: hair color adjustment option 602, accessories adding option 603, hairstyle adjustment option 604, so as to facilitate performing photo editing operations such as hair color adjustment, accessories adding or hairstyle adjustment in the hair area. In this case, the accessories adding option may be used to add various accessories suitable for wearing in the hair area, such as a headscarf, a hat, etc.

[0107] In this embodiment, by displaying at least one of the following photo editing options: hair color adjustment option, accessory addition option, hairstyle adjustment option, it is convenient to perform photo editing operations such as hair color adjustment, accessory addition or hairstyle adjustment on the hair area, so as to enrich the diversity of photo editing operations on the hair area.

[0108] Optionally, when the photo editing option selected by the option selection input is an accessory adding option, the photo editing prompt includes the accessory type and accessory attribute of the accessory to be added; the image area to be edited in the image to be edited after image processing includes an accessory image corresponding to the accessory type and accessory attribute;

[0109] In the case where the photo editing option selected by the option selection input is a skin color adjustment option, the photo editing prompt word includes the skin color type and skin color attribute to be adjusted; the skin color type and skin color attribute of the skin color of the image area to be edited of the person in the image to be edited after image processing are the skin color type and skin color attribute included in the photo editing prompt word;

[0110] When the photo editing option selected by the option selection input is a skin repair option, the photo editing prompt word includes the name of the skin object to be repaired; and the image area to be edited of the person in the image to be edited after image processing does not include the skin object to be repaired.

[0111] In some embodiments of the present application, when the image area to be edited selected by the area selection input is the wrist area, and the photo editing option selected by the option selection input is the accessory adding option, when the photo editing prompt is "add a round watch", the accessory type is "watch", and the accessory attribute is "round". In this case, the image area to be edited in the image to be edited after image processing includes a round watch.

[0112] In some embodiments of the present application, when the image area to be edited selected by the area selection input is the neck area, and the photo editing option selected by the option selection input is the skin color adjustment option, when the photo editing prompt is "adjust the skin color through the neck to light yellow", the skin color type is yellow, and the skin color attribute is "light yellow".

[0113] In some embodiments of the present application, when the image area to be edited selected by the area selection input is the neck area, and the photo retouching option selected by the option selection input is the skin repair option, when the photo retouching prompt is "remove birthmark on the neck", the name of the skin object to be repaired is the birthmark.

[0114] In this embodiment, since the image editor can input information such as the type, attribute or name of the object to be adjusted through the photo editing prompt words, this helps the electronic device to accurately understand the image editor's photo editing intentions, thereby improving the photo editing effect.

[0115] Optionally, before displaying the image editing dialog window, the method further includes:

[0116] Performing image segmentation on the image to be processed to obtain at least two human body part regions and a part name of each human body part region;

[0117] Calculating the intersection-over-union ratio of the image region to be edited selected by the region selection input and each human body part region;

[0118] Determine the name of the human body region having the largest intersection-over-union ratio with the image region to be edited selected by the region selection input as the region name of the image region to be edited selected by the region selection input;

[0119] Before displaying the image editing dialog window, the method further includes:

[0120] The area name of the image area to be edited selected by the area selection input is displayed.

[0121] The above-mentioned intersection-and-union ratio may refer to the ratio of "the area of ​​the intersection of the image area to be edited selected by the region selection input and the human body part area" to "the area of ​​the union of the image area to be edited selected by the region selection input and the human body part area". When there is no intersection between a certain human body part area and the image area to be edited selected by the region selection input, the intersection-and-union ratio of the human body part area and the image area to be edited selected by the region selection input is 0. When a certain human body part area completely overlaps with the image area to be edited selected by the region selection input, the intersection-and-union ratio of the human body part area and the image area to be edited selected by the region selection input is 1.

[0122] In some embodiments of the present application, the region name of the image region to be edited selected by the region selection input may be displayed in the image editing dialog window. Figure 3 When the region selection inputs the wrist region of the region name of the image region to be edited, "wrist" can be displayed in the image editing dialog window. For another example, see Fig.16When the area selection inputs the hair area of ​​the area name of the selected image area to be edited, a "hair" logo 1602 can be displayed in the image editing dialog window.

[0123] In this embodiment, since the image to be processed may include multiple human body part areas, and different human body part areas have different part names, when the image editor selects the image area to be edited selected by the area selection input through the area selection input, it may cause the image area to be edited selected by the area selection input to intersect with more than two human body part areas. When the image editor selects the area to be edited, the image editor usually selects the corresponding area along the edge of the area to be edited. The image area to be edited selected by the area selection input selected in this way usually has a large common area with the area to be edited. Therefore, in order to accurately determine the part name of the area to be edited by the image editor, the intersection and union ratio between the image area to be edited selected by the area selection input and each human body part area in the image to be processed can be calculated respectively, and the category of the human body part area with the largest intersection and union ratio with the image area to be edited selected by the area selection input can be determined as the part name. This is conducive to improving the accuracy of the determined part name.

[0124] Optionally, before displaying at least one photo editing option matching the image area to be edited selected by the area selection input, the method further includes:

[0125] Inputting the region name prompt word into the image editing option recommendation model, and outputting at least one image editing option matching the human body part corresponding to the region name of the image region to be edited selected by the region selection input;

[0126] The area name prompt includes the area name of the image area to be edited selected by the area selection input.

[0127] Among them, the photo editing option recommendation model can be various AI recommendation models.

[0128] Specifically, the electronic device can pre-construct a sentence template, so that after receiving the area selection input, the area name of the image area to be edited selected by the area selection input can be embedded into the sentence template, thereby obtaining the area name prompt. For example, the sentence template can be: "May I ask for" + {"area name of the circled area"} + "What are the photo editing operations that can be performed", in this case, when the area name of the image area to be edited selected by the area selection input is "wrist area", the {"area name of the circled area"} in the sentence template can be replaced with "wrist", and after the replacement, the following area name prompt can be obtained: "May I ask what are the photo editing operations that can be performed on the wrist", and then the large language model outputs the answers of "adding accessories", "skin color adjustment" and "skin retouching", and the system displays the corresponding photo retouching options in the image editing dialog window in the form of photo retouching options as photo retouching recommendations, and also prompts the user to enter more detailed photo retouching requirements in the dialog box.

[0129] For another example, when the area name of the image area to be edited selected by the area selection input is "hair area", you can replace {"area name of the circled area"} in the sentence template with "hair". After the replacement, you can get the following area name prompt: "What are the photo editing operations that can be performed on the hair?" Then, the large language model outputs the answers of "hair color adjustment", "accessories addition" and "hair style adjustment". The system displays the corresponding photo editing options in the image editing dialog window as photo editing recommendations, and also prompts the user to enter more detailed photo editing requirements in the dialog box.

[0130] In this embodiment, the area name prompt word is input into the photo retouching option recommendation model to obtain at least one photo retouching option output by the photo retouching option recommendation model that matches the human body part corresponding to the area name of the image area to be edited selected by the area selection input. Since the photo retouching option recommendation model can determine the corresponding photo retouching option based on the area name of the image area to be edited selected by the area selection input, this is conducive to improving the accuracy of the determined photo retouching options.

[0131] Optionally, performing the image processing indicated by the photo retouching prompt word on the image in the to-be-edited image area selected by the area selection input according to the photo retouching function indicated by the photo retouching option selected by the option selection input includes:

[0132] When a ratio of a first area of ​​the image region to be edited to a second area of ​​a human body region corresponding to the image region to be edited is less than an area ratio threshold, performing the image processing indicated by the image editing prompt word on the image in the image region to be edited selected by the area selection input according to the image editing function indicated by the image editing option selected by the option selection input;

[0133] The method further comprises:

[0134] When the ratio of the first area of ​​the image area to be edited to the second area of ​​the human body part area corresponding to the image area to be edited is greater than or equal to the area ratio threshold, the photo retouching function indicated by the selected photo retouching option is input according to the option selection, and the image processing indicated by the photo retouching prompt word is performed on the image in the human body part area corresponding to the image area.

[0135] Specifically, when the area selected by the image editor based on the area selection input is only a partial area of ​​a certain human body part area, the image editor may only want to perform local photo retouching processing on the selected local area, and does not want to perform photo retouching processing on the entire human body part area. Therefore, in some embodiments of the present application, an area ratio threshold can be set. When the ratio of the first area of ​​the selected image area to be edited to the second area of ​​the human body part area is less than the area ratio threshold, only the image area to be edited is retouched. Correspondingly, when the ratio of the first area of ​​the selected image area to be edited to the second area of ​​the human body part area is greater than or equal to the area ratio threshold, the human body part area where the image area to be edited is located can be retouched as a whole, which is conducive to further and accurately understanding the image editor's photo retouching intention.

[0136] Among them, the value of the area ratio threshold can be set as needed. For example, in some embodiments of the present application, the area ratio threshold can be 0.3. For example, in other embodiments of the present application, the area ratio threshold can be 0.4.

[0137] In some embodiments of the present application, Fig.15 is the image to be processed, Fig.16 The dotted area 1601 in FIG. 1 is the image area to be edited. Fig.16 It can be seen that the image area to be edited is a part of the hair area, see Fig.17 , the image editing prompt word input by the image editor through the image editing dialogue is: "Please dye your hair black", when the ratio of the first area to the second area is less than the area ratio threshold, refer to Fig.17 , you can automatically add qualifiers to the image editor dialog, and the modified text will be displayed directly in the dialog box: "Please dye the "circled" hair area black." Finally, the large language model performs local retouching on the image, and the modification result is to partially dye the hair in the circled area instead of modifying the entire hair area. See Fig.18 , which is the retouched image.

[0138] In other embodiments of the present application, Fig.19The dotted area 1901 in the figure is the image area to be edited. Fig.19 It can be seen that the image area to be edited is a partial area of ​​the hair area, and the requirement information input by the image editor through the dialog box is: "Please dye the hair black". When the ratio of the first area to the second area is greater than or equal to the area ratio threshold, Fig. 20 As shown, you can directly dye the entire hair area black.

[0139] In this embodiment, by setting an area ratio threshold, and when the ratio of the first area of ​​the image area to be edited to the second area of ​​the human body part area corresponding to the image area to be edited is less than the area ratio threshold, the photo retouching function indicated by the photo retouching option selected by the option selection input is performed, and the image processing indicated by the photo retouching prompt word is performed on the image in the image area to be edited selected by the area selection input; when the ratio of the first area of ​​the image area to be edited to the second area of ​​the human body part area corresponding to the image area to be edited is greater than or equal to the area ratio threshold, the photo retouching function indicated by the photo retouching option selected by the option selection input is performed, and the image processing indicated by the photo retouching prompt word is performed on the image in the human body part area corresponding to the image area. This is conducive to further accurately understanding the image editor's photo retouching intention, thereby improving the image editor's satisfaction with the photo retouching results.

[0140] Optionally, the photo editing prompt includes first photo editing requirement information of a first area and second photo editing requirement information of a second area, the first area is the image area to be edited selected by the area selection input, and the second area is the area of ​​the human body part corresponding to the image area to be edited except the image area to be edited; the first photo editing requirement information includes a first image processing, and the second photo editing requirement information includes a second image processing; wherein the first image processing is different from the second image processing;

[0141] The step of performing the image processing indicated by the photo editing prompt word on the image in the to-be-edited image area selected by the area selection input according to the photo editing function indicated by the photo editing option selected by the option selection input comprises:

[0142] The first image processing is performed on the image of the first area, and the second image processing is performed on the image of the second area.

[0143] Specifically, since the area selected by the image editor based on area selection input is only a partial area of ​​a certain human body part area, in order to meet the personalized photo editing needs of some image editors, when the image editor inputs the photo editing requirement information for the first area and the second area respectively through photo editing prompt words, the first image processing can be performed on the image of the first area, and the second image processing can be performed on the image of the second area.

[0144] For example, when the first area selected by the area selection input is a partial area of ​​the hair area, the photo retouching option is a hair color adjustment option, the first photo retouching requirement information is red, and the second photo retouching requirement information is yellow, then the hair in the first area can be dyed red, and at the same time, the hair in the second area can be dyed yellow.

[0145] For another example, when the first area selected by the area selection input is a partial area in the neck area, the photo retouching option is a skin repair option, the first photo retouching requirement information is scar removal, and the second photo retouching requirement information is acne removal, then the scars in the first area can be removed, and at the same time, the acne in the second area can be removed.

[0146] In this embodiment, different image processing is performed on the first area and the second area respectively in response to the photo editing prompt word, which is helpful to meet the personalized photo editing needs of some image editors.

[0147] Optionally, in a case where the photo retouching option selected by the option selection input is an accessory adding option, performing the image processing indicated by the photo retouching prompt word on the image in the image area to be edited selected by the area selection input according to the photo retouching function indicated by the photo retouching option selected by the option selection input includes:

[0148] A first outline of the image area to be edited selected by inputting along the area selection is displayed, and a first accessory image matching the shape of the first outline is displayed; the first outline is the outline of the first outline;

[0149] After inputting the first outline of the image area to be edited along the area selection and displaying the first accessory image matching the shape of the first outline, the method further includes:

[0150] When receiving a selection input to the original image switching control, updating the first accessory image to a first outline;

[0151] When receiving a contour adjustment input for the first contour line, updating the first contour line to a second contour line;

[0152] along a second outline of the second outline, displaying a second accessory image matching the shape of the second outline;

[0153] The first contour line and the second contour line are different in at least one of the following: shape and length.

[0154] See also Fig.25 In the process of processing the image to be processed, the following controls can be displayed in the upper area of ​​the image to be processed: original image switching control 203, modification control 205, exit AI magic modification control 201, cancel this modification control 202, use this modification control 203 and save control 206. In this way, the image editor can automatically intervene in the image processing process based on these controls to improve the image editing effect.

[0155] The first accessory image may be any decorative image, such as a necklace, earrings, bracelet, or forehead ornament. After the first accessory image is generated, if the image editor believes that the shape or size of the first accessory image does not meet expectations, the original image switching control 203 may be selected and input. After the image editor selects and inputs the original image switching control 203, the image to be processed before the image is modified may be displayed, and the shape and size of the image area to be edited may be displayed through the first contour line. Fig.25 , the first contour line is Fig.25 At this time, the image editor can change the physical properties of the first contour line such as shape and size through contour adjustment input, and when receiving the contour adjustment input for the first contour line, Fig.25 The first contour line in is updated to Fig.26 Then, a second accessory image matching the shape of the second contour line 2601 can be displayed along a second contour of the second contour line 2601 .

[0156] In this implementation, after generating the first accessory image, the image editor may further change the outline of the decoration through the original image switching control and the outline adjustment input, thereby helping to further improve the image editor's satisfaction with the photo editing results.

[0157] Optionally, the image to be processed includes a person;

[0158] In a case where the image area to be edited is the neck area of ​​the character, the first accessory image is an image of a necklace of a first length, and the second accessory image is an image of a necklace of a second length, and the first length and the second length are different;

[0159] When the image area to be edited is the ear area of ​​the character, the first accessory image is an image of an earring of a third length, and the second accessory image is an image of an earring of a fourth length, and the third length is different from the fourth length;

[0160] When the image area to be edited is the forehead area of ​​the character, the first accessory image is an image of a forehead ornament of a fifth length, and the second accessory image is an image of a forehead ornament of a sixth length, and the fifth length is different from the sixth length;

[0161] When the image area to be edited is the hair area of ​​the character, the first accessory image is an image of a hat of a first size, and the second accessory image is an image of a hat of a second size, and the first size and the second size are different.

[0162] The above-mentioned image to be processed includes a person, which may specifically mean that the image to be processed is an image including a person. For example, see Figure 2 , the image to be processed may include Figure 2 For another example, see Figure 6a , the image to be processed may include Figure 6a Images of cartoon characters in.

[0163] See also Fig. 22 In some embodiments of the present application, the image area to be edited is the neck area of ​​the character, and the prompt word options include "add necklace option", see Fig.23 , when the image editor selects "Add Necklace Option" through the prompt word selection input, such as Fig.24 The first outline of the image area to be edited can be selected along the area selection input, and a necklace matching the shape of the first outline line is displayed. At this time, if the image editor wants to increase the length of the necklace, he can select the input and click Fig.25 The original image switching control 203 in the image can be displayed after clicking the original image switching control 203. Fig.25 In the image before photo editing shown in the figure, the image editor can drag the first contour line downwards through the contour adjustment input until it reaches a satisfactory length. In this process, the first contour line is updated to the second contour line along with the dragging operation of the image editor. For example, Fig.26 The dotted line is the second contour line obtained after the image editor drags. After the first contour line is updated to the second contour line, the electronic device can automatically add the length change information to the editing prompt word, and the original editing prompt word "add necklace" is modified to "lengthen the necklace downward". The system automatically inputs the newly generated editing prompt word into the large language model, and the large language model processes it in the background. At this time, the image editor clicks the modification control 205 to obtain Fig. 27 The final modification result is shown.

[0164] In some embodiments of the present application, the image area to be edited is the ear area of ​​the character, and the prompt word options include "add earring option". When the image editor selects "add earring option" through the prompt word selection input, the first outline of the image area to be edited selected by the area selection input can be displayed along the area selection input, and the earrings matching the shape of the first outline can be displayed. At this time, if the image editor wants to increase the length of the earring, the original image switching control 203 can be clicked by selecting the input. After clicking the original image switching control 203, the image before the image modification can be displayed. The image editor can drag the first outline downward through the contour adjustment input until it is dragged to a satisfactory length. In this process, the first outline is updated to the second outline with the dragging operation of the image editor. After the first outline is updated to the second outline, the electronic device can automatically add the length change information to the original dialogue, and the original dialogue "add earring" is changed to "lengthen the earring length downward". The system automatically inputs the newly generated dialogue into the large language model, and the large language model is processed in the background. At this time, the image editor clicks the modification control 205 again to obtain the final modification result.

[0165] See also Fig.28 In some embodiments of the present application, the image area to be edited is the forehead area 2801 of the character, and the prompt word options include an "add forehead decoration" option 2803. When the image editor selects the "add forehead decoration" option 2803 through the prompt word selection input, as shown in FIG. Fig.29 As shown, the first outline of the image area to be edited can be selected along the area selection input, and the forehead ornament 2901 matching the shape of the first outline line is displayed. At this time, if the image editor wants to shorten the length of the forehead ornament 2901, the original image switching control 203 can be clicked by selecting the input. After clicking the original image switching control 203, the image before the photo editing can be displayed. The image editor can drag the first outline line upwards through the outline adjustment input until it is dragged to a satisfactory length. In this process, Fig.30 The first contour line in the image is updated as the image editor drags. Fig.31 After the first contour line is updated to the second contour line, the electronic device can automatically add the length change information to the original editing prompt word, and the original editing prompt word "increase the forehead decoration" is changed to "shorten the length of the forehead decoration upwards". The system automatically inputs the newly generated dialogue into the large language model, and the large language model processes it in the background. At this time, the image editor clicks the modification control 205 to obtain the final modification result, such as Fig.32 shown.

[0166] In some embodiments of the present application, the image area to be edited is the hair area of ​​the character, and the prompt word options include "add hat option". When the image editor selects "add hat option" through the prompt word selection input, the first outline of the image area to be edited selected by the area selection input can be displayed along the area selection input. The hat matching the shape of the first outline line is displayed. At this time, if the image editor wants to change the size of the hat, the original image switching control 203 can be clicked by selecting the input. After clicking the original image switching control 203, the image before the image editing can be displayed. The image editor can drag the first outline downward through the outline adjustment input until it is dragged to a satisfactory length. In this process, the first outline is updated to the second outline with the dragging operation of the image editor. After the first outline is updated to the second outline, the electronic device can automatically add the length change information to the original dialogue, and the original dialogue "add hat" is changed to "increase hat size". The system automatically inputs the newly generated dialogue into the large language model, and the large language model is processed in the background. At this time, the image editor clicks the modification control 205 again to obtain the final modification result.

[0167] In this embodiment, after generating the first accessory image, the image editor can further change the length or size of the decoration through the original image switching control and the outline adjustment input. The user can flexibly adjust the length or size of the decoration through simple operations of clicking and dragging, which is conducive to further improving the image editor's satisfaction with the photo editing results.

[0168] Optionally, displaying the image editing dialog window includes:

[0169] Display the image to be processed in the first display area 806, and display the image editing dialog window in the second display area 807;

[0170] Among them, the first display area 806 and the second display area 807 are different areas of the same display screen of the electronic device, or the first display area 806 is at least a partial screen area of ​​the first display screen of the folding screen device, and the second display area 807 is at least a partial screen area of ​​the second display screen of the folding screen device.

[0171] like Figure 5 As shown, in some embodiments of the present application, the first display area 806 and the second display area 807 may be two areas formed by splitting the electronic device into upper and lower screens. Figure 8 As shown, in some embodiments of the present application, the first display area 806 and the second display area 807 may also be two areas formed by splitting the electronic device into left and right screens. Figure 8As shown, in some embodiments of the present application, for a folding screen device, the first display area 806 is at least a partial screen area of ​​a first display screen of the folding screen device, and the second display area 807 is at least a partial screen area of ​​a second display screen of the folding screen device.

[0172] In this implementation, since the corresponding first display area 806 and second display area 807 can be determined according to the screen type of the electronic device, and the image to be processed is displayed in the first display area 806, and the image editing dialog window is displayed in the second display area 807, this is conducive to improving the display effect of the image to be processed and the image editing dialog window.

[0173] Optionally, the area selection input includes at least one of the following: fingertip touch input and knuckle touch input.

[0174] In this implementation, since the image editor can select the area through fingertip touch input and knuckle touch input, this is helpful to improve the convenience of the area selection process.

[0175] Optionally, in the case where the area selection input includes the knuckle touch input, the knuckle touch input includes an input of tapping the screen with a knuckle and circling an area along a reference direction from the tapping position.

[0176] In this implementation, since many functions in the electronic device are triggered by the image editor's sliding input on the screen based on the fingertips, in order to avoid erroneous triggering of other functions not related to the photo editing process during the photo editing process, in an embodiment of the present application, the above-mentioned area selection input can be an input in which the image editor circles the image to be processed based on the knuckles. Since fingertip input and knuckle input are two different types of input for electronic devices, other functions related to the fingertip input will not usually be erroneously triggered during the image editor's input through the knuckles, which is beneficial to the accuracy of the electronic device's understanding of the image editor's intentions.

[0177] Optionally, after receiving the image editing prompt word input in the image editing dialogue window, the method further includes:

[0178] Display recommended photo editing tips;

[0179] The photo editing recommendation prompt information includes at least one of the following: first photo editing recommendation prompt information, second photo editing recommendation prompt information;

[0180] The first photo editing recommendation prompt information is used to prompt the image editor to continue selecting an image area for image editing, and the second photo editing recommendation prompt information is photo editing prompt information recommended to the image editor for at least one recommended image area that matches the image processing indicated by the photo editing prompt word.

[0181] The first photo editing recommendation prompt information and the second photo editing recommendation prompt information may have a certain association with the photo editing prompt word, for example, see Fig.35 When the photo editing prompt is "add a red hat", the following first photo editing recommendation prompt information can be displayed: "You can add a red necklace around your neck, and you can also add a pair of red earrings on your ears", and at the same time, the second photo editing recommendation prompt information includes the following two options: add a red necklace option 3501, and add a pair of red earrings option 3502.

[0182] For another example, see Fig.36 When the photo editing prompt is "dye your hair blue", the following first photo editing recommendation prompt information can be displayed: "You can add a blue necklace around your neck, and you can also add a pair of blue earrings on your ears", and at the same time, the second photo editing recommendation prompt information includes the following two options: add a blue necklace option 3601, and add a pair of blue earrings option 3602.

[0183] It is understandable that after the image editing recommendation prompt information is displayed, the image editor can directly select the image editing recommendation prompt information to quickly edit the image. In addition, the user can also manually input subsequent image editing operations through the image editing dialog window. For example, see Fig.35 , image editors can directly select Fig.35 Add a red necklace option 3501 in Fig.35 Add a red necklace to the neck of the character in . For another example, see Fig.36 , image editors can directly select Fig.36 Add a pair of blue earrings option 3602 to Fig.36 For example, users can also add a pair of blue earrings to the ears of the characters in Fig.35 In the image editing dialog window, manually enter "Add a gold necklace" to Fig.35 Add a gold necklace to the character's neck.

[0184] In some embodiments of the present application, when the image editor selects the wrist area through the area selection input and receives the editing prompt word "add round watch" input in the image editing dialog window, the first editing recommendation prompt information and the second editing recommendation prompt information can be displayed. At this time, if the image editor still wants to add a headdress to the hair area of ​​the character, the image editor can continue to select the hair area of ​​the character and input the editing prompt word "add headdress". In this way, when the image editor completes the input of the editing prompt word "add headdress", see Fig.33 , a round watch can be automatically generated in the wrist area of ​​the character, and at the same time, a headdress 3301 can be added to the hair area of ​​the character.

[0185] In some embodiments of the present application, when the image editor selects the wrist area through the area selection input and receives the editing prompt word "add round watch" input in the image editing dialog window, the first editing recommendation prompt information can be displayed. At this time, if the image editor also wants to add a forehead ornament to the forehead area of ​​the character, the image editor can continue to select the forehead area of ​​the character and input the editing prompt word "add forehead ornament". In this way, when the image editor completes the input of the editing prompt word "add forehead ornament", please refer to Fig.34 , a round watch can be automatically generated in the wrist area of ​​the character, and at the same time, a forehead ornament 3401 can be added to the forehead area of ​​the character.

[0186] In this embodiment, after receiving the photo editing prompt word input in the image editing dialog window, the photo editing recommendation prompt information is displayed. In this way, the image editor can choose to continue selecting the image area as needed, or select the photo editing option in the photo editing prompt information, which is convenient for the user to select the corresponding prompt function to perform the photo editing operation according to his or her own photo editing habits.

[0187] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, an image processing device executing the image processing method is taken as an example to illustrate the image processing device provided in the embodiment of the present application.

[0188] See also Fig.37 , Fig.37 The following is a schematic diagram of the structure of an image processing device 3700 provided in an embodiment of the present application. The image processing device 3700 includes:

[0189] Display module 3701, used for displaying an image editing dialog window when receiving an input for selecting a region of an image to be processed;

[0190] The processing module 3702 is used to perform the image processing indicated by the photo editing prompt word on the image in the image area to be edited selected by the area selection input when receiving the photo editing prompt word input in the image editing dialog window.

[0191] Optionally, the display module 3701 is further configured to display at least one image retouching option matching the image area to be edited selected by the area selection input;

[0192] The display module 3701 is further configured to display the image editing dialog window when receiving an option selection input for one of the at least one image editing options;

[0193] The processing module 3702 is specifically configured to perform the image processing indicated by the photo editing prompt word on the image in the image area to be edited selected by the area selection input according to the photo editing function indicated by the photo editing option selected by the option selection input.

[0194] Optionally, the image editing dialogue window includes guiding information, and the guiding information is used to guide the image editor to input a prompt word for image editing;

[0195] The guidance information includes: prompt word input description information and at least one prompt word option;

[0196] Among them, a prompt word option indicates a prompt word for editing photos recommended to image editors;

[0197] The device also includes:

[0198] a determination module, configured to, upon receiving information input in a prompt word input area in the image editing dialog window, determine the information input in the prompt word input area as a photo editing prompt word input by an image editor in the image editing dialog window;

[0199] Alternatively, the determination module is used to, upon receiving a prompt word selection input for one of the at least one prompt word options, determine the photo editing prompt word indicated by the prompt word option selected by the prompt word selection input as the photo editing prompt word input by the image editor in the image editing dialog window.

[0200] Optionally, the image area to be edited selected by the area selection input includes a wrist area, a neck area or a forehead area;

[0201] The display module 3701 is specifically used to display at least one of the following photo editing options: an accessories adding option, a skin color adjustment option, and a skin repair option.

[0202] Optionally, the image area to be edited selected by the area selection input includes a hair area;

[0203] The display module 3701 is specifically used to display at least one of the following photo editing options: a hair color adjustment option, an accessories adding option, and a hairstyle adjustment option.

[0204] Optionally, when the photo editing option selected by the option selection input is an accessory adding option, the photo editing prompt includes the accessory type and accessory attribute of the accessory to be added; the image area to be edited in the image to be edited after image processing includes an accessory image corresponding to the accessory type and accessory attribute;

[0205] In the case where the photo editing option selected by the option selection input is a skin color adjustment option, the photo editing prompt word includes the skin color type and skin color attribute to be adjusted; the skin color type and skin color attribute of the skin color of the image area to be edited of the person in the image to be edited after image processing are the skin color type and skin color attribute included in the photo editing prompt word;

[0206] When the photo editing option selected by the option selection input is a skin repair option, the photo editing prompt word includes the name of the skin object to be repaired; and the image area to be edited of the person in the image to be edited after image processing does not include the skin object to be repaired.

[0207] Optionally, the device further comprises:

[0208] A segmentation module, used for performing image segmentation on the image to be processed to obtain at least two human body part regions and a part name of each human body part region;

[0209] A calculation module, used for calculating the intersection-and-union ratio of the image region to be edited selected by the region selection input and each human body part region;

[0210] A determination module, used for determining the part name of the human body part region having the largest intersection-over-union ratio with the image region to be edited selected by the region selection input as the region name of the image region to be edited selected by the region selection input;

[0211] The display module 3701 is specifically used to display the area name of the image area to be edited selected by the area selection input.

[0212] Optionally, the device further comprises:

[0213] A recommendation module, configured to input a region name prompt word into a photo editing option recommendation model, and output at least one photo editing option matching a human body part corresponding to the region name of the image region to be edited selected by the region selection input;

[0214] The area name prompt includes the area name of the image area to be edited selected by the area selection input.

[0215] Optionally, the processing module 3702 is specifically configured to, when a ratio of a first area of ​​the image area to be edited to a second area of ​​a human body part area corresponding to the image area to be edited is less than an area ratio threshold, perform the image processing indicated by the image retouching prompt word on the image in the image area to be edited selected by the area selection input according to the image retouching function indicated by the image retouching option selected by the option selection input;

[0216] The processing module 3702 is also used to, when the ratio of the first area of ​​the image area to be edited to the second area of ​​the human body part area corresponding to the image area to be edited is greater than or equal to the area ratio threshold, select the photo retouching function indicated by the selected photo retouching option input according to the option, and perform the image processing indicated by the photo retouching prompt word on the image in the human body part area corresponding to the image area.

[0217] Optionally, the photo editing prompt includes first photo editing requirement information of a first area and second photo editing requirement information of a second area, the first area is the image area to be edited selected by the area selection input, and the second area is the area of ​​the human body part corresponding to the image area to be edited except the image area to be edited; the first photo editing requirement information includes a first image processing, and the second photo editing requirement information includes a second image processing; wherein the first image processing is different from the second image processing;

[0218] The processing module 3702 is specifically configured to perform the first image processing on the image of the first area, and perform the second image processing on the image of the second area.

[0219] Optionally, in the case where the photo editing option selected by the option selection input is an accessory adding option, the processing module 3702 is specifically configured to display a first accessory image matching the shape of the first contour line along a first contour of the image area to be edited selected by the area selection input; the first contour line is a contour line of the first contour;

[0220] The device also includes:

[0221] an updating module, configured to update the first accessory image to a first contour line upon receiving a selection input to the original image switching control;

[0222] The updating module is further configured to update the first contour line to a second contour line when receiving a contour adjustment input for the first contour line;

[0223] The display module 3701 is further configured to display a second accessory image matching the shape of the second contour line along a second contour of the second contour line;

[0224] The first contour line and the second contour line are different in at least one of the following: shape and length.

[0225] Optionally, the image to be processed includes a person;

[0226] In a case where the image area to be edited is the neck area of ​​the character, the first accessory image is an image of a necklace of a first length, and the second accessory image is an image of a necklace of a second length, and the first length and the second length are different;

[0227] When the image area to be edited is the ear area of ​​the character, the first accessory image is an image of an earring of a third length, and the second accessory image is an image of an earring of a fourth length, and the third length is different from the fourth length;

[0228] When the image area to be edited is the forehead area of ​​the character, the first accessory image is an image of a forehead ornament of a fifth length, and the second accessory image is an image of a forehead ornament of a sixth length, and the fifth length is different from the sixth length;

[0229] When the image area to be edited is the hair area of ​​the character, the first accessory image is an image of a hat of a first size, and the second accessory image is an image of a hat of a second size, and the first size and the second size are different.

[0230] Optionally, the display module 3701 is specifically configured to display the image to be processed in the first display area 806 and to display an image editing dialog window in the second display area 807;

[0231] Among them, the first display area 806 and the second display area 807 are different areas of the same display screen of the electronic device, or the first display area 806 is at least a partial screen area of ​​the first display screen of the folding screen device, and the second display area 807 is at least a partial screen area of ​​the second display screen of the folding screen device.

[0232] Optionally, the area selection input includes at least one of the following: fingertip touch input and knuckle touch input.

[0233] Optionally, in the case where the area selection input includes the knuckle touch input, the knuckle touch input includes an input of tapping the screen with a knuckle and circling an area along a reference direction from the tapping position.

[0234] Optionally, the display module 3701 is further used to display image editing recommendation prompt information;

[0235] The photo editing recommendation prompt information includes at least one of the following: first photo editing recommendation prompt information, second photo editing recommendation prompt information;

[0236] The first photo editing recommendation prompt information is used to prompt the image editor to continue selecting an image area for image editing, and the second photo editing recommendation prompt information is photo editing prompt information recommended to the image editor for at least one recommended image area that matches the image processing indicated by the photo editing prompt word.

[0237] In this embodiment, since the user can select the area to be processed by the area selection input, it is helpful to accurately locate the area to be retouched. At the same time, since the image editing dialog window can also be displayed when the area selection input of the image to be processed is received, the user can input the retouching prompt word in the image editing dialog window to trigger the image processing indicated by the retouching prompt word to be performed on the image in the image area to be edited selected by the area selection input. In this process, since the user only needs to input the retouching prompt word to realize the retouching processing of the selected area in the image to be processed in a specified manner, the retouching process is simplified and the convenience of retouching is improved. In addition, the user does not need specific professional retouching skills to realize the retouching processing of the selected area in the image to be processed in a specified manner, thereby reducing the threshold for using the retouching function, so that users who do not have relevant retouching skills can also use this image processing method to process more satisfactory images.

[0238] The image processing device 3700 in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0239] The image processing device 3700 in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0240] The image processing device 3700 provided in the embodiment of the present application can realize Figure 1 The various processes implemented in the method embodiment achieve the same technical effect and will not be described again here to avoid repetition.

[0241] In some embodiments, Fig.38 As shown, an embodiment of the present application further provides an electronic device 3800, including a processor 3801, a memory 3802, and a program or instruction stored in the memory 3802 and executable on the processor 3801. When the program or instruction is executed by the processor 3801, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0242] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0243] Fig.39 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.

[0244] The electronic device 3900 includes but is not limited to: a radio frequency unit 3901, a network module 3902, an audio output unit 3903, an input unit 3904, a sensor 3905, a display unit 3906, a user input unit 3907, an interface unit 3908, a memory 3909, and a processor 3910 and other components.

[0245] The display unit 3906 is used to display an image editing dialog window when receiving an input for selecting a region of the image to be processed;

[0246] The processor 3910 is configured to, upon receiving a photo editing prompt word input in the image editing dialog window, perform image processing indicated by the photo editing prompt word on the image in the image area to be edited selected by the area selection input.

[0247] Optionally, the display unit 3906 is used to display at least one image retouching option matching the image area to be edited selected by the area selection input;

[0248] The display unit 3906 is configured to display the image editing dialog window when receiving an option selection input for one of the at least one image editing options;

[0249] The processor 3910 is used to perform the image processing indicated by the photo editing prompt word on the image in the image area to be edited selected by the area selection input according to the photo editing function indicated by the photo editing option selected by the option selection input.

[0250] Optionally, the image editing dialogue window includes guiding information, and the guiding information is used to guide the image editor to input a prompt word for image editing;

[0251] The guidance information includes: prompt word input description information and at least one prompt word option;

[0252] Among them, a prompt word option indicates a prompt word for editing photos recommended to image editors;

[0253] The processor 3910 is configured to, upon receiving information input in the prompt word input area in the image editing dialog window, determine the information input in the prompt word input area as the image editing prompt word input by the image editor in the image editing dialog window;

[0254] Alternatively, the processor 3910 is used to, upon receiving a prompt word selection input for one of the at least one prompt word options, determine the photo editing prompt word indicated by the prompt word option selected by the prompt word selection input as the photo editing prompt word entered by the image editor in the image editing dialog window.

[0255] Optionally, the image area to be edited selected by the area selection input includes a wrist area, a neck area or a forehead area;

[0256] The display unit 3906 is used to display at least one of the following photo editing options: an accessories adding option, a skin color adjustment option, and a skin repairing option.

[0257] Optionally, the image area to be edited selected by the area selection input includes a hair area;

[0258] The display unit 3906 is used to display at least one of the following photo editing options: a hair color adjustment option, an accessories adding option, and a hairstyle adjustment option.

[0259] Optionally, when the photo editing option selected by the option selection input is an accessory adding option, the photo editing prompt includes the accessory type and accessory attribute of the accessory to be added; the image area to be edited in the image to be edited after image processing includes an accessory image corresponding to the accessory type and accessory attribute;

[0260] In the case where the photo editing option selected by the option selection input is a skin color adjustment option, the photo editing prompt word includes the skin color type and skin color attribute to be adjusted; the skin color type and skin color attribute of the skin color of the image area to be edited of the person in the image to be edited after image processing are the skin color type and skin color attribute included in the photo editing prompt word;

[0261] When the photo editing option selected by the option selection input is a skin repair option, the photo editing prompt word includes the name of the skin object to be repaired; and the image area to be edited of the person in the image to be edited after image processing does not include the skin object to be repaired.

[0262] Optionally, the processor 3910 is used to perform image segmentation on the image to be processed to obtain at least two human body part regions and a part name of each human body part region;

[0263] The processor 3910 is used to calculate the intersection-over-union ratio between the image region to be edited selected by the region selection input and each human body part region;

[0264] The processor 3910 is used to determine the body part name of the human body part region having the largest intersection-over-union ratio with the image region to be edited selected by the region selection input as the region name of the image region to be edited selected by the region selection input;

[0265] The display unit 3906 is used to display the area name of the image area to be edited selected by the area selection input.

[0266] Optionally, the processor 3910 is configured to input a region name prompt word into a photo editing option recommendation model, and output at least one photo editing option that matches a human body part corresponding to the region name of the image region to be edited selected by the region selection input;

[0267] The area name prompt includes the area name of the image area to be edited selected by the area selection input.

[0268] Optionally, the processor 3910 is configured to, when a ratio of a first area of ​​the image area to be edited to a second area of ​​a human body part area corresponding to the image area to be edited is less than an area ratio threshold, perform the image processing indicated by the image retouching prompt word on the image in the image area to be edited selected by the area selection input according to the image retouching function indicated by the image retouching option selected by the option selection input;

[0269] The processor 3910 is used to, when a ratio of a first area of ​​the image area to be edited to a second area of ​​a human body part area corresponding to the image area to be edited is greater than or equal to an area ratio threshold, perform the image processing indicated by the photo editing prompt word on the image in the human body part area corresponding to the image area according to the photo editing function indicated by the photo editing option selected by the option selection input.

[0270] Optionally, the photo editing prompt includes first photo editing requirement information of a first area and second photo editing requirement information of a second area, the first area is the image area to be edited selected by the area selection input, and the second area is the area of ​​the human body part corresponding to the image area to be edited except the image area to be edited; the first photo editing requirement information includes a first image processing, and the second photo editing requirement information includes a second image processing; wherein the first image processing is different from the second image processing;

[0271] The processor 3910 is configured to perform the first image processing on the image of the first area, and perform the second image processing on the image of the second area.

[0272] Optionally, in a case where the photo retouching option selected by the option selection input is an accessory adding option, the processor 3910 is configured to display a first accessory image matching the shape of the first contour line along a first contour of the image area to be edited selected by the area selection input; the first contour line is a contour line of the first contour;

[0273] The processor 3910 is configured to update the first accessory image to a first contour line when receiving a selection input to the original image switching control;

[0274] The processor 3910 is configured to update the first contour line to a second contour line when receiving a contour adjustment input for the first contour line;

[0275] The processor 3910 is configured to display a second accessory image matching the shape of the second contour line along a second contour of the second contour line;

[0276] The first contour line and the second contour line are different in at least one of the following: shape and length.

[0277] Optionally, the image to be processed includes a person;

[0278] In a case where the image area to be edited is the neck area of ​​the character, the first accessory image is an image of a necklace of a first length, and the second accessory image is an image of a necklace of a second length, and the first length and the second length are different;

[0279] When the image area to be edited is the ear area of ​​the character, the first accessory image is an image of an earring of a third length, and the second accessory image is an image of an earring of a fourth length, and the third length is different from the fourth length;

[0280] When the image area to be edited is the forehead area of ​​the character, the first accessory image is an image of a forehead ornament of a fifth length, and the second accessory image is an image of a forehead ornament of a sixth length, and the fifth length is different from the sixth length;

[0281] When the image area to be edited is the hair area of ​​the character, the first accessory image is an image of a hat of a first size, and the second accessory image is an image of a hat of a second size, and the first size and the second size are different.

[0282] Optionally, the display unit 3906 is used to display the image to be processed in the first display area 806 and display an image editing dialog window in the second display area 807;

[0283] Among them, the first display area 806 and the second display area 807 are different areas of the same display screen of the electronic device, or the first display area 806 is at least a partial screen area of ​​the first display screen of the folding screen device, and the second display area 807 is at least a partial screen area of ​​the second display screen of the folding screen device.

[0284] Optionally, the area selection input includes at least one of the following: fingertip touch input and knuckle touch input.

[0285] Optionally, in the case where the area selection input includes the knuckle touch input, the knuckle touch input includes an input of tapping the screen with a knuckle and circling an area along a reference direction from the tapping position.

[0286] Optionally, the display unit 3906 is used to display image editing recommendation prompt information;

[0287] The photo editing recommendation prompt information includes at least one of the following: first photo editing recommendation prompt information, second photo editing recommendation prompt information;

[0288] The first photo editing recommendation prompt information is used to prompt the image editor to continue selecting an image area for image editing, and the second photo editing recommendation prompt information is photo editing prompt information recommended to the image editor for at least one recommended image area that matches the image processing indicated by the photo editing prompt word.

[0289] Those skilled in the art will appreciate that the electronic device 3900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 3910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.39 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0290] It should be understood that in the embodiment of the present application, the input unit 3904 may include a graphics processor (Graphics Processing Unit, GPU) 39041 and a microphone 39042, and the graphics processor 39041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 3906 may include a display panel 39061, and the display panel 39061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 3907 includes a touch panel 39071 and other input devices 39072. The touch panel 39071 is also called a touch screen. The touch panel 39071 may include two parts: a touch detection device and a touch controller. Other input devices 39072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0291] The memory 3909 can be used to store software programs and various data. The memory 3909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 3909 may include a volatile memory or a non-volatile memory, or the memory 3909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 3909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0292] The processor 3910 may include one or more processing units; optionally, the processor 3910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 3910.

[0293] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0294] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0295] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0296] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0297] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0298] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0299] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image processing method, characterized in that: include: In case of receiving a region selection input of the image to be processed, displaying an image editing dialog window; When receiving the image editing prompt word input in the image editing dialog window, the image processing indicated by the image editing prompt word is performed on the image in the image area to be edited selected by the area selection input.

2. The method according to claim 1, characterized in that Before displaying the image editing dialog window, the method further includes: displaying at least one image retouching option matching the image area to be edited selected by the area selection input; The display image editing dialog window includes: upon receiving an option selection input for one of the at least one photo editing options, displaying the image editing dialogue window; The performing of the image processing indicated by the image editing prompt word on the image in the to-be-edited image area selected by the area selection input comprises: According to the photo retouching function indicated by the photo retouching option selected by the option selection input, the image processing indicated by the photo retouching prompt word is performed on the image in the image area to be edited selected by the area selection input.

3. The method according to claim 2, characterized in that The image editing dialog window includes guiding information, and the guiding information is used to guide the image editor to input a prompt word for image editing; The guidance information includes: prompt word input description information and at least one prompt word option; Among them, a prompt word option indicates a prompt word for editing photos recommended to image editors; The method further comprises: In the case of receiving information input in the prompt word input area in the image editing dialogue window, determining the information input in the prompt word input area as the image editing prompt word input by the image editor in the image editing dialogue window; Alternatively, when a prompt word selection input is received for one of the at least one prompt word options, the photo editing prompt word indicated by the prompt word option selected by the prompt word selection input is determined as the photo editing prompt word input by the image editor in the image editing dialog window.

4. The method according to claim 2, characterized in that: The image area to be edited selected by the area selection input includes a wrist area, a neck area or a forehead area; The displaying of at least one image retouching option matching the image area to be edited selected by the area selection input includes: Display at least one of the following photo editing options: accessory adding option, skin tone adjustment option, skin repair option.

5. The method according to claim 2, characterized in that: The image area to be edited selected by the area selection input includes a hair area; The displaying of at least one image retouching option matching the image area to be edited selected by the area selection input comprises: Display at least one of the following photo editing options: hair color adjustment option, accessory addition option, hairstyle adjustment option.

6. The method according to claim 3, 4 or 5, characterized in that: In the case where the photo editing option selected by the option selection input is an accessory adding option, the photo editing prompt includes the accessory type and accessory attribute of the accessory to be added; the image area to be edited in the image to be edited after image processing includes an accessory image corresponding to the accessory type and accessory attribute; In the case where the photo editing option selected by the option selection input is a skin color adjustment option, the photo editing prompt word includes the skin color type and skin color attribute to be adjusted; the skin color type and skin color attribute of the skin color of the image area to be edited of the person in the image to be edited after image processing are the skin color type and skin color attribute included in the photo editing prompt word; In the case where the photo retouching option selected in the option selection input is a skin repair option, the photo retouching prompt word includes the name of the skin object to be repaired; The image region to be edited of the person in the image to be edited after image processing does not include a skin object to be repaired.

7. The method according to claim 2, characterized in that Before displaying the image editing dialog window, the method further includes: Performing image segmentation on the image to be processed to obtain at least two human body part regions and a part name of each human body part region; Calculating the intersection-over-union ratio of the image region to be edited selected by the region selection input and each human body part region; Determine the name of the human body region having the largest intersection-over-union ratio with the image region to be edited selected by the region selection input as the region name of the image region to be edited selected by the region selection input; Before displaying the image editing dialog window, the method further includes: The area name of the image area to be edited selected by the area selection input is displayed.

8. The method according to claim 7, characterized in that Before displaying at least one image editing option matching the image area to be edited selected by the area selection input, the method further includes: Inputting the region name prompt word into the image editing option recommendation model, and outputting at least one image editing option matching the human body part corresponding to the region name of the image region to be edited selected by the region selection input; The area name prompt includes the area name of the image area to be edited selected by the area selection input.

9. The method according to claim 2, characterized in that: The step of performing the image processing indicated by the photo retouching prompt word on the image in the to-be-edited image area selected by the area selection input according to the photo retouching function indicated by the photo retouching option selected by the option selection input comprises: When a ratio of a first area of ​​the image region to be edited to a second area of ​​a human body region corresponding to the image region to be edited is less than an area ratio threshold, performing the image processing indicated by the image editing prompt word on the image in the image region to be edited selected by the area selection input according to the image editing function indicated by the image editing option selected by the option selection input; The method further comprises: When the ratio of the first area of ​​the image area to be edited to the second area of ​​the human body part area corresponding to the image area to be edited is greater than or equal to the area ratio threshold, the photo retouching function indicated by the selected photo retouching option is input according to the option selection, and the image processing indicated by the photo retouching prompt word is performed on the image in the human body part area corresponding to the image area.

10. The method according to claim 2, characterized in that The image editing prompt includes first image editing requirement information of a first area and second image editing requirement information of a second area, the first area is the image area to be edited selected by the area selection input, and the second area is the area of ​​the human body part corresponding to the image area to be edited except the image area to be edited; the first image editing requirement information includes a first image processing, and the second image editing requirement information includes a second image processing; wherein the first image processing is different from the second image processing; The step of performing the image processing indicated by the photo retouching prompt word on the image in the to-be-edited image area selected by the area selection input according to the photo retouching function indicated by the photo retouching option selected by the option selection input comprises: The first image processing is performed on the image of the first area, and the second image processing is performed on the image of the second area.

11. The method according to claim 2, characterized in that In a case where the photo retouching option selected by the option selection input is an accessory adding option, performing the image processing indicated by the photo retouching prompt word on the image in the to-be-edited image area selected by the area selection input according to the photo retouching function indicated by the photo retouching option selected by the option selection input includes: A first outline of the image area to be edited selected by inputting along the area selection is displayed, and a first accessory image matching the shape of the first outline is displayed; the first outline is the outline of the first outline; After inputting the first outline of the image area to be edited along the area selection and displaying the first accessory image matching the shape of the first outline, the method further includes: When receiving a selection input of the original image switching control, updating the first accessory image to a first contour line; When receiving a contour adjustment input for the first contour line, updating the first contour line to a second contour line; along a second outline of the second outline, displaying a second accessory image matching the shape of the second outline; The first contour line and the second contour line are different in at least one of the following: shape and length.

12. The method according to claim 11, characterized in that The image to be processed includes a person; In a case where the image area to be edited is the neck area of ​​the character, the first accessory image is an image of a necklace of a first length, and the second accessory image is an image of a necklace of a second length, and the first length and the second length are different; When the image area to be edited is the ear area of ​​the character, the first accessory image is an image of an earring of a third length, and the second accessory image is an image of an earring of a fourth length, and the third length is different from the fourth length; When the image area to be edited is the forehead area of ​​the character, the first accessory image is an image of a forehead ornament of a fifth length, and the second accessory image is an image of a forehead ornament of a sixth length, and the fifth length is different from the sixth length; When the image area to be edited is the hair area of ​​the character, the first accessory image is an image of a hat of a first size, and the second accessory image is an image of a hat of a second size, and the first size and the second size are different.

13. The method according to claim 1, characterized in that The display image editing dialog window includes: Display the image to be processed in the first display area, and display the image editing dialog window in the second display area; Among them, the first display area and the second display area are different areas of the same display screen of the electronic device, or the first display area is at least a partial screen area of ​​a first display screen of a folding screen device, and the second display area is at least a partial screen area of ​​a second display screen of the folding screen device.

14. The method according to claim 1, characterized in that The area selection input includes at least one of the following: fingertip touch input and knuckle touch input.

15. The method according to claim 14, characterized in that In the case where the area selection input includes the knuckle touch input, the knuckle touch input includes an input of tapping the screen with a knuckle and circling an area along a reference direction from the tapping position.

16. The method according to claim 1, characterized in that After receiving the image editing prompt word input in the image editing dialogue window, the method further includes: Display recommended photo editing tips; The photo editing recommendation prompt information includes at least one of the following: first photo editing recommendation prompt information, second photo editing recommendation prompt information; The first photo editing recommendation prompt information is used to prompt the image editor to continue selecting an image area for image editing, and the second photo editing recommendation prompt information is photo editing prompt information recommended to the image editor for at least one recommended image area that matches the image processing indicated by the photo editing prompt word.

17. An image processing device, characterized in that: include: A display module, for displaying an image editing dialog window when receiving an input for selecting a region of an image to be processed; The processing module is used to, upon receiving the image editing prompt word input in the image editing dialogue window, perform the image processing indicated by the image editing prompt word on the image in the image area to be edited selected by the area selection input.

18. The device according to claim 17, characterized in that The display module is further configured to display at least one image editing option matching the image area to be edited selected by the area selection input; The display module is further configured to display the image editing dialog window when receiving an option selection input for one of the at least one image editing options; The processing module is specifically configured to perform the image processing indicated by the photo editing prompt word on the image in the image area to be edited selected by the area selection input according to the photo editing function indicated by the photo editing option selected by the option selection input.

19. The device according to claim 18, characterized in that The image editing dialog window includes guiding information, and the guiding information is used to guide the image editor to input a prompt word for image editing; The guidance information includes: prompt word input description information and at least one prompt word option; Among them, a prompt word option indicates a prompt word for editing photos recommended to image editors; The device also includes: a determination module, configured to, upon receiving information input in a prompt word input area in the image editing dialog window, determine the information input in the prompt word input area as a photo editing prompt word input by an image editor in the image editing dialog window; Alternatively, the determination module is used to, upon receiving a prompt word selection input for one of the at least one prompt word options, determine the photo editing prompt word indicated by the prompt word option selected by the prompt word selection input as the photo editing prompt word input by the image editor in the image editing dialog window.

20. The device according to claim 18, characterized in that The image area to be edited selected by the area selection input includes a wrist area, a neck area or a forehead area; The display module is specifically used to display at least one of the following photo editing options: an accessories adding option, a skin color adjustment option, and a skin repairing option.

21. The device according to claim 18, characterized in that The image area to be edited selected by the area selection input includes a hair area; The display module is specifically used to display at least one of the following photo editing options: a hair color adjustment option, an accessories adding option, and a hairstyle adjustment option.

22. The device according to claim 19, 20 or 21, characterized in that In the case where the photo editing option selected by the option selection input is an accessory adding option, the photo editing prompt includes the accessory type and accessory attribute of the accessory to be added; the image area to be edited in the image to be edited after image processing includes an accessory image corresponding to the accessory type and accessory attribute; In the case where the photo editing option selected by the option selection input is a skin color adjustment option, the photo editing prompt word includes the skin color type and skin color attribute to be adjusted; the skin color type and skin color attribute of the skin color of the image area to be edited of the person in the image to be edited after image processing are the skin color type and skin color attribute included in the photo editing prompt word; In the case where the photo editing option selected in the option selection input is a skin repair option, the photo editing prompt word includes the name of the skin object to be repaired; The image region to be edited of the person in the image to be edited after image processing does not include a skin object to be repaired.

23. The device according to claim 18, characterized in that The device also includes: A segmentation module, used for performing image segmentation on the image to be processed to obtain at least two human body part regions and a part name of each human body part region; A calculation module, used for calculating the intersection-and-union ratio of the image region to be edited selected by the region selection input and each human body part region; A determination module, used for determining the part name of the human body part region having the largest intersection-over-union ratio with the image region to be edited selected by the region selection input as the region name of the image region to be edited selected by the region selection input; The display module is specifically used to display the area name of the image area to be edited selected by the area selection input.

24. The device according to claim 23, characterized in that The device also includes: A recommendation module, configured to input a region name prompt word into a photo editing option recommendation model, and output at least one photo editing option matching a human body part corresponding to the region name of the image region to be edited selected by the region selection input; The area name prompt includes the area name of the image area to be edited selected by the area selection input.

25. The device according to claim 18, characterized in that The processing module is specifically configured to, when a ratio of a first area of ​​the image region to be edited to a second area of ​​a human body part region corresponding to the image region to be edited is less than an area ratio threshold, perform the image processing indicated by the image retouching prompt word on the image in the image region to be edited selected by the area selection input according to the image retouching function indicated by the image retouching option selected by the option selection input; The processing module is also used to, when a ratio of a first area of ​​the image area to be edited to a second area of ​​a human body part area corresponding to the image area to be edited is greater than or equal to an area ratio threshold, perform the image processing indicated by the photo retouching prompt word on the image in the human body part area corresponding to the image area according to the photo retouching function indicated by the selected photo retouching option input according to the option selection.

26. The device according to claim 18, characterized in that The image editing prompt includes first image editing requirement information of a first area and second image editing requirement information of a second area, the first area is the image area to be edited selected by the area selection input, and the second area is the area of ​​the human body part corresponding to the image area to be edited except the image area to be edited; the first image editing requirement information includes a first image processing, and the second image editing requirement information includes a second image processing; wherein the first image processing is different from the second image processing; The processing module is specifically configured to perform the first image processing on the image of the first area, and perform the second image processing on the image of the second area.

27. The device according to claim 18, characterized in that In the case where the photo editing option selected by the option selection input is an accessory adding option, the processing module is specifically configured to display a first accessory image matching the shape of the first contour line along a first contour of the image area to be edited selected by the area selection input; The first contour line is the contour line of the first contour; The device also includes: An updating module, configured to update the first accessory image to a first contour line upon receiving a selection input to the original image switching control; The updating module is further configured to update the first contour line to a second contour line when receiving a contour adjustment input for the first contour line; The display module is further configured to display a second accessory image matching the shape of the second contour line along a second contour of the second contour line; The first contour line and the second contour line are different in at least one of the following: shape and length.

28. The device according to claim 27, characterized in that The image to be processed includes a person; In a case where the image area to be edited is the neck area of ​​the character, the first accessory image is an image of a necklace of a first length, and the second accessory image is an image of a necklace of a second length, and the first length and the second length are different; When the image area to be edited is the ear area of ​​the character, the first accessory image is an image of an earring of a third length, and the second accessory image is an image of an earring of a fourth length, and the third length is different from the fourth length; When the image area to be edited is the forehead area of ​​the character, the first accessory image is an image of a forehead ornament of a fifth length, and the second accessory image is an image of a forehead ornament of a sixth length, and the fifth length is different from the sixth length; When the image area to be edited is the hair area of ​​the character, the first accessory image is an image of a hat of a first size, and the second accessory image is an image of a hat of a second size, and the first size and the second size are different.

29. The device according to claim 17, characterized in that The display module is specifically used to display the image to be processed in the first display area, and to display an image editing dialogue window in the second display area; Among them, the first display area and the second display area are different areas of the same display screen of the electronic device, or the first display area is at least a partial screen area of ​​a first display screen of a folding screen device, and the second display area is at least a partial screen area of ​​a second display screen of the folding screen device.

30. The device according to claim 17, characterized in that The area selection input includes at least one of the following: fingertip touch input and knuckle touch input.

31. The device according to claim 30, characterized in that In the case where the area selection input includes the knuckle touch input, the knuckle touch input includes an input of tapping the screen with a knuckle and circling an area along a reference direction from the tapping position.

32. The device according to claim 17, characterized in that The display module is also used to display the recommended prompt information for photo editing; The photo editing recommendation prompt information includes at least one of the following: first photo editing recommendation prompt information, second photo editing recommendation prompt information; The first photo editing recommendation prompt information is used to prompt the image editor to continue selecting an image area for image editing, and the second photo editing recommendation prompt information is photo editing prompt information recommended to the image editor for at least one recommended image area that matches the image processing indicated by the photo editing prompt word.

33. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the image processing method according to any one of claims 1 to 16 are implemented.

34. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the image processing method according to any one of claims 1 to 16 are implemented.

Citation Information

Cited By

  • Multimedia resource generation method and device, electronic equipment and storage medium

    CN120264087A

  • Video generation method and device, equipment and medium

    CN120769107A

  • Information processing method and device

    CN121543710A

  • Image editing method and electronic device

    WO2026170763A1