Image processing method, electronic device and computer program product
By displaying reference color materials on electronic devices to adjust image color tones, and combining semantic analysis and face protection, the cumbersome color tone adjustment problem in existing technologies is solved, enabling fast and personalized image color tone adjustment and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-12-16
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, adjusting image tones is a cumbersome process for users, making it difficult to quickly obtain the desired tone and resulting in a poor user experience.
By displaying an interface containing the first image and controls on electronic devices, responding to user operations, adjusting image tones using reference color materials, and supporting semantic analysis and face protection, it achieves personalized color tone migration for different purposes, provides color tone templates and inspiration recommendations, and simplifies the color tone adjustment process.
It enables fast and personalized image tone adjustment, enhances user experience, simplifies the tone adjustment process, and improves the accuracy and efficiency of tone adjustment.
Smart Images

Figure CN121937552A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing technology, and in particular relates to image processing methods, electronic devices and computer program products. Background Technology
[0002] With the increasing intelligence of electronic devices, their functions are becoming more and more diverse. For example, electronic devices can provide various image processing functions, allowing users to process images to obtain images that meet their needs. In particular, when a user sees an image with a favorite color tone in daily life or social situations, they may want to achieve the same color tone in their own image. However, because the current color tone adjustment process is cumbersome, users cannot quickly obtain the desired color tone, resulting in a poor user experience. Summary of the Invention
[0003] This application provides an image processing method, electronic device, and computer program product that allows users to quickly adjust the color tone of images, meet their personalized needs, and improve the user experience.
[0004] In a first aspect, embodiments of this application provide an image processing method applied to an electronic device, the image processing method comprising: The electronic device displays a first interface; the first interface includes a first image and a first control, the first image including a first target and a second target; In response to a first operation on the first control, the electronic device displays a second interface; the second interface includes a second image, which is obtained by adjusting the tone of the first image based on a reference tone material, wherein the tone shift of the first target in the second image is different from the tone shift of the second target.
[0005] In the image processing method provided above, when the electronic device displays a first interface containing a first image and a first control, the electronic device can adjust the tone of the first image based on the user's operation of the first control and according to the reference tone material. This allows the user to quickly adjust the tone of the first image through the first control, simplifying the tone adjustment process and quickly obtaining the image with the desired tone, thus meeting the user's personalized needs. In addition, when the electronic device adjusts the tone of the first image according to the reference tone material, it can perform tone migration of different degrees on different targets in the first image, that is, it can perform tone adjustment of different targets to different degrees, which can improve the image effect after tone adjustment and enhance the user experience.
[0006] For example, the hue includes one or more of saturation, hue, brightness, and contrast.
[0007] It should be noted that tone transfer refers to applying the hue (e.g., saturation, hue, brightness, contrast) of a reference hue image to a first image, so that the first image achieves a visual color effect similar to that of the reference hue image. The degree of tone transfer refers to the intensity of applying the hue of the reference hue image to the first image. The degree of tone transfer can range from 0% to 100%. 0% can mean completely preserving the original hue of the first image without any tone transfer. 100% can mean completely applying the hue of the reference hue image, meaning the first image fully reflects the hue of the reference hue image. Other values, such as 50%, can mean applying 50% of the hue of the reference hue image to the first image, meaning the adjusted hue of the first image can be 50% of the hue of the reference hue image. For example, the adjusted saturation of the first image could be 50% of the saturation of the reference hue image, the adjusted hue of the first image could be 50% of the hue of the reference hue image, the adjusted brightness of the first image could be 50% of the brightness of the reference hue image, and the adjusted contrast of the first image could be 50% of the contrast of the reference hue image.
[0008] For example, the degree of tone shift of the first target in the second image being different from the degree of tone shift of the second target includes one or more of the following: The degree of saturation migration of the first target is different from that of the second target; The degree of hue migration of the first target is different from that of the second target; The degree of brightness transfer of the first target is different from the degree of brightness transfer of the second target; The degree of contrast shift of the first target is different from that of the second target.
[0009] It should be understood that when adjusting the tone of the first image based on reference tone material, the electronic device can perform semantic analysis on the first image to determine the semantic regions corresponding to the first image. Additionally, the electronic device can perform semantic analysis on the reference image corresponding to the reference tone material to determine the reference semantic regions corresponding to the reference tone material. For each semantic region of the first image, the electronic device can determine the reference semantic region corresponding to that semantic region and adjust the tone of that semantic region based on the tone corresponding to that reference semantic region. This allows for tone adjustment of each semantic region of the first image based on semantic information, improving the accuracy of tone adjustment and enhancing the user experience. A semantic region can be a region corresponding to one or more targets in the first image.
[0010] In one embodiment, when adjusting the hue of each semantic region of a first image based on semantic information, for each semantic region of the first image, when determining a reference semantic region corresponding to that semantic region, the electronic device can further determine the similarity between the semantic region and the reference semantic region, such as at least one of semantic similarity, color similarity, or brightness similarity. After determining the similarity between the semantic region and the reference semantic region, the electronic device can determine the degree of hue transfer corresponding to the semantic region based on the similarity, and adjust the hue of the semantic region based on the degree of hue transfer corresponding to the semantic region. Specifically, when the similarity between the semantic region and the reference semantic region is high, the degree of hue transfer corresponding to the semantic region can be high, making the hue of the highly similar target more similar to the hue of similar targets in the reference image, achieving hue transfer between similar targets, such as achieving hue transfer between skies or between oceans. When the similarity between the semantic region and the reference semantic region is low, or when there is no reference semantic region corresponding to the semantic region in the reference image, the degree of tone transfer corresponding to the semantic region can be low. This can reduce the influence of the tone of the reference image on targets with low similarity in the first image, thereby avoiding tone distortion of targets with low similarity, improving the fidelity of targets with low similarity, and enhancing the image effect after tone adjustment.
[0011] In another embodiment, when adjusting the tone of the first image based on reference tone material, if the first image includes a person, such as a person's face, the electronic device can perform face protection. Face protection can refer to reducing the influence of the reference image's tone on the face when the reference image corresponding to the reference tone material does not contain a face, thereby improving the fidelity of the face after tone adjustment and thus enhancing the image effect after tone adjustment. Conversely, when the reference image corresponding to the reference tone material contains a face, the tone of the face in the first image can be adjusted based on the tone of the face in the reference image, making the skin tone of the face in the first image similar to that in the reference image, which can meet user needs and improve user experience.
[0012] For example, before the electronic device displays the first interface, the image processing method further includes: The electronic device displays a third interface; the third interface includes the first image and a second control, the second control being used to trigger the electronic device to adjust the tone of the first image; In response to a click on the second control, the electronic device displays the first interface.
[0013] It should be understood that when performing image processing in a gallery app, the second control can be a button corresponding to the tone shift function. When performing image processing in a camera app, the second control can be a button corresponding to the AI filter function. That is, this image processing method can be built into a gallery app on an electronic device, for example, it can be used as a tone shift function within the gallery app. When a user views an image through a gallery app, the user can edit and optimize the image using the relevant functions of the gallery app; for example, the user can adjust the image's tone using the tone shift function within the gallery app.
[0014] Alternatively, this image processing method can be built into the camera application of an electronic device, for example, as an AI filter function within the camera application. When a user takes an image through the camera application, the user can use the camera application's AI filter function to adjust the tone of the preview image, making it easier for the user to obtain the desired tone of the image through the camera application, thus expanding the functionality of the camera application.
[0015] In some embodiments, the electronic device displaying a second interface in response to a first operation on the first control includes: In response to a first operation on the first control, the electronic device displays a fourth interface; the fourth interface includes at least one candidate image. In response to a selection operation on the fourth interface, the electronic device displays the second interface; the reference tone material includes a third image, which is an image among the at least one candidate image, and the third image is the image selected by the selection operation.
[0016] For example, in response to a selection operation on the fourth interface, the electronic device displays the second interface, including: In response to a selection operation on the fourth interface, the electronic device displays a fifth interface; the fifth interface includes the third image and the third control. In response to a second operation on the third control, the electronic device displays the second interface.
[0017] In the image processing method provided in this embodiment, the first control can be an extraction control. This extraction control can be used to trigger an extraction function, or it can be referred to as adding an image color picking function. The extraction function can refer to the electronic device extracting tones from other images and using the extracted tones as reference tones to adjust the tones of the first image. The other images can be images selected by the user. That is, the user can select a third image with the desired tones based on the extraction control, and then use the tones of the third image to adjust the tones of the first image, for example, by transferring the tones of the third image to the first image, making the tones of the first image similar to the tones of the third image selected by the user, thus meeting the user's personalized needs and improving the user experience.
[0018] For example, in response to a second operation on the third control, the electronic device displays the second interface, including: In response to a third operation on the third image, the electronic device determines a third target corresponding to the third operation; the third target is a portion of the target in the third image. In response to a second operation on the third control, the electronic device displays the second interface; the reference color material includes the third target.
[0019] In the image processing method provided in this embodiment, when a user selects a reference image and adjusts the tone of the first image, the user can select a local area of the reference image, such as a third target in the reference image, to adjust the tone of the first image according to the tone of the third target in the reference image, so that the adjusted first image can meet the user's personalized needs and improve the user experience.
[0020] In one embodiment, the image processing method further includes: The electronic device saves the reference color material as a first color template and displays the first color template in the first interface and / or the second interface.
[0021] In the image processing method provided in this embodiment, when the user selects a reference image or a third target of the reference image to adjust the tone of the first image, after the user selects the reference image or the third target, the electronic device can automatically save the reference image and / or the tone of the reference image as a first tone template, or save the third target and / or the tone of the third target as a first tone template. This not only facilitates the user's subsequent multiple uses, but also allows the user to quickly select the desired tone by selecting the first tone template, thereby quickly adjusting the tone of the image, improving the tone adjustment efficiency, and enhancing the user experience.
[0022] For example, when saving a reference image and / or the tone of the reference image as a first tone template, or saving a third target and / or the tone of the third target as a first tone template, the electronic device can set the name of the first tone template by default, and can highlight the first tone template in the interface, such as displaying the image corresponding to the first tone template and the name of the first tone template, so that the user can understand the saved first tone template.
[0023] In other embodiments, the reference tone material includes a fourth image and / or the tone corresponding to the fourth image, wherein the fourth image is an image recommended by the electronic device based on the first image.
[0024] In the image processing method provided in this embodiment, the first control can be an inspiration recommendation control. This inspiration recommendation control can be used to trigger an inspiration recommendation function. The inspiration recommendation function refers to the electronic device automatically determining a color tone material that matches the first image and using this matching color tone material as a reference color tone material to adjust the color tone of the first image. That is, the user can use the inspiration recommendation control to recommend color tone materials and adjust the color tone of the first image based on the recommended color tone materials. This achieves automatic color tone recommendation, improves the speed of color tone adjustment, and enhances the user experience.
[0025] For example, the image processing method further includes: the electronic device displaying the fourth image in the first control.
[0026] In the image processing method provided in this embodiment, after determining the reference tone material based on the inspiration recommendation function, in order to facilitate the user's understanding of the reference tone material recommended by the inspiration recommendation function, the electronic device can display the fourth image corresponding to the reference tone material in the first control (i.e., the inspiration recommendation control).
[0027] For example, after the electronic device displays the fourth image in the first control, the image processing method further includes: In response to a fourth operation on the first control, the electronic device saves the reference tone material as a second tone template and displays the second tone template in the first interface and / or the second interface.
[0028] In the image processing method provided in this embodiment, when the fourth image corresponding to the reference tone material is displayed in the inspiration recommendation control, if the user wants to save the reference tone material so that the image tone can be quickly adjusted later based on the reference tone material, the user can perform a fourth operation on the inspiration recommendation control. The fourth operation can be a long press operation. After detecting the long press operation of the inspiration recommendation control, the electronic device can save the reference tone material as a second tone template, or the electronic device can display a save control on the interface. For example, the electronic device can display a save control near the inspiration recommendation control to facilitate the user's operation of the save control to save the reference tone material. That is, the user can click the save control to save the reference tone material as a second tone template, so that the user can directly select the second tone template later to quickly adjust the image tone.
[0029] In some embodiments, before the electronic device displays the second interface, the image processing method further includes: The electronic device determines a first similarity between the image corresponding to the reference tone material and the first image, and determines a first tone migration degree based on the first similarity; The electronic device adjusts the hue of the first image based on the reference hue material and the first hue shift degree to obtain the second image.
[0030] In the image processing method provided in this embodiment, when adjusting the tone of the first image according to the reference tone material, the electronic device can determine the degree of first tone migration corresponding to the first image based on the first similarity between the first image and the image corresponding to the reference tone material, such as at least one of semantic similarity, color similarity, or brightness similarity, and can adjust the tone of the first image according to the degree of first tone migration corresponding to the first image, which can improve the image effect after tone adjustment and enhance the user experience.
[0031] For example, the first similarity can be the overall similarity between the first image and the image corresponding to the reference tone material. The first tone migration degree can be the overall tone migration degree of the first image, wherein the higher the first tone migration degree is when the first image and the image corresponding to the reference tone material are more similar, the lower the first tone migration degree is when the first image and the image corresponding to the reference tone material are less similar. That is, the electronic device can adjust the tone of each target in the first image according to the first tone migration degree. For example, when adjusting the tone of target B1 in the first image according to the tone of target A1 in the image corresponding to the reference tone material, the electronic device can adjust the tone of target B1 according to the first tone migration degree and the tone of target A1. When adjusting the tone of target B2 in the first image according to the tone of target A2 in the image corresponding to the reference tone material, the electronic device can adjust the tone of target B2 according to the first tone migration degree and the tone of target A2.
[0032] For example, the first similarity may include the similarity corresponding to each target. The first tone migration degree may include the tone migration degree corresponding to each target. The similarity corresponding to each target may be the same or different. The tone migration degree corresponding to each target may be the same or different. Wherein, for each target in the first image, the similarity corresponding to that target may refer to the similarity between that target and similar targets in the image corresponding to the reference tone material. The tone migration degree corresponding to that target can be determined based on the similarity between that target and similar targets in the image corresponding to the reference tone material. For example, when target B1 in the first image is similar to target A1 in the image corresponding to the reference tone material, the electronic device can determine the tone migration degree corresponding to target B1 based on the similarity between target B1 and target A1. It should be understood that, for target B3 in the first image, when there is no target similar to target B3 in the image corresponding to the reference tone material, the electronic device can determine the tone migration degree corresponding to target B3 based on the overall similarity between the first image and the image corresponding to the reference tone material.
[0033] In some embodiments, the second interface further includes an adjustment bar; after the electronic device displays the second interface, the image processing method further includes: In response to a sliding operation on the adjustment bar, the electronic device adjusts the hue of the second image.
[0034] For example, the electronic device adjusting the hue of the second image in response to a sliding operation on the adjustment bar includes: In response to a fifth operation on the second image, the electronic device determines a fourth target corresponding to the fifth operation; the fourth target is a portion of the target in the second image. In response to a sliding operation on the adjustment bar, the electronic device adjusts the hue of the fourth target.
[0035] In the image processing method provided in this embodiment, after adjusting the tone of the first image based on the reference tone material, the electronic device can display an adjustment bar (or a migration degree adjustment bar) on the interface. The adjustment bar may include a slider. The adjustment bar can be used to adjust the degree of tone migration. That is, the user can adjust the overall tone migration degree of the first image or the tone migration degree of a certain local target in the first image by sliding the slider in the adjustment bar, so that the adjusted image can meet the user's personalized needs and improve the user experience.
[0036] In other embodiments, after the electronic device displays the first interface, the image processing method further includes: In response to a sixth operation on the first image, the electronic device determines a fifth target corresponding to the sixth operation; the fifth target is a portion of the targets in the first image. In response to a first operation on the first control, the electronic device displays a second interface, including: In response to a first operation on the first control, the electronic device displays the second interface; the second interface includes a second image, which is obtained by adjusting the hue of the fifth target of the first image based on the reference hue material.
[0037] In the image processing method provided in this embodiment, when adjusting the tone of the first image, the user can choose to adjust the tone of a specific target (i.e., the fifth target) in the first image to meet the user's personalized adjustment needs and improve the user experience. Specifically, when adjusting the tone of the fifth target in the first image, the user can choose to adjust the tone of the fifth target in the first image based on the tone of a reference image or the tone of a specific target in the reference image. Alternatively, the user can use an inspiration recommendation function to automatically recommend reference tone materials to adjust the tone of the fifth target in the first image.
[0038] In some embodiments, the first interface further includes at least one color template, and the image processing method further includes: In response to the selection operation of a third tone template, the electronic device adjusts the tone of the first image according to the third tone template; the third tone template is one of the at least one tone template.
[0039] In the image processing method provided in this embodiment, when a tone template is stored, the electronic device can also display the tone template on the interface when displaying the first image, so that the user can directly select a tone template to quickly adjust the tone of the first image or the tone of a target in the first image according to the tone corresponding to the tone template. This not only enables the reuse of tone but also improves the efficiency of image tone adjustment and enhances the user experience.
[0040] For example, in response to a selection operation of a third tone template, the electronic device adjusts the tone of the first image according to the third tone template, including: In response to the selection operation of the third tone template, the electronic device acquires the image corresponding to the third tone template and determines the second similarity between the image corresponding to the third tone template and the first image; The electronic device determines the degree of second tone migration corresponding to the first image based on the second similarity, and adjusts the tone of the first image based on the third tone template and the degree of second tone migration.
[0041] In the image processing method provided in this embodiment, when adjusting the tone of the first image according to the third tone template selected by the user, the electronic device can determine the second similarity between the image corresponding to the third tone template and the first image, such as at least one of semantic similarity, color similarity, or brightness similarity, and can determine the degree of second tone migration corresponding to the first image according to the second similarity, so as to adjust the tone of the first image according to the degree of second tone migration, which can improve the image effect after tone adjustment and improve the user experience.
[0042] For example, the second similarity can be the overall similarity between the first image and the image corresponding to the third tone template. The degree of second tone migration can be the overall tone migration degree of the first image. Specifically, the more similar the first image and the image corresponding to the third tone template are, the higher the degree of second tone migration can be; conversely, the less similar the first image and the image corresponding to the third tone template are, the lower the degree of second tone migration can be. That is, the electronic device can adjust the tone of each target in the first image according to the degree of second tone migration. For example, when adjusting the tone of target B1 in the first image based on the tone of target C1 in the image corresponding to the third tone template, the electronic device can adjust the tone of target B1 based on the degree of second tone migration and the tone of target C1. Similarly, when adjusting the tone of target B2 in the first image based on the tone of target C2 in the image corresponding to the third tone template, the electronic device can adjust the tone of target B2 based on the degree of second tone migration and the tone of target C2.
[0043] For example, the second similarity may include the similarity corresponding to each target. The second tone migration degree may include the tone migration degree corresponding to each target. The similarity corresponding to each target may be the same or different. The tone migration degree corresponding to each target may be the same or different. Wherein, for each target in the first image, the similarity corresponding to that target may refer to the similarity between that target and similar targets in the image corresponding to the third tone template. The tone migration degree corresponding to that target can be determined based on the similarity between that target and similar targets in the image corresponding to the third tone template. For example, when target B1 in the first image is similar to target C1 in the image corresponding to the third tone template, the electronic device can determine the tone migration degree corresponding to target B1 based on the similarity between target B1 and target C1. It should be understood that, for target B3 in the first image, when there is no target similar to target B3 in the image corresponding to the third tone template, the electronic device can determine the tone migration degree corresponding to target B3 based on the overall similarity between the first image and the image corresponding to the third tone template.
[0044] In some embodiments, the first interface and the second interface are interfaces of a gallery application.
[0045] In the image processing method provided in this embodiment, the image processing method can be built into a gallery application in an electronic device. For example, it can be used as a tone shifting function in a gallery application, so that when a user views a first image through a gallery application, he or she can adjust the tone of the first image through the tone shifting function in the gallery application.
[0046] In other embodiments, the first interface and the second interface are preview interfaces of a camera application, and the first image and the second image are preview images in the preview interface.
[0047] In the image processing method provided in this embodiment, the image processing method can be built into a camera application in an electronic device. For example, it can be used as an AI filter function in a camera application, so that when a user takes an image through the camera application, the color tone of the preview image can be adjusted through the AI filter function of the camera application. When the preview image is displayed according to the adjusted color tone, if the user performs a shooting operation, a captured image with the adjusted color tone can be obtained.
[0048] In one embodiment, the electronic device displaying a second interface in response to a first operation on the first control includes: In response to a first operation on the first control, the electronic device displays a first window; the first window includes at least one color template; In response to the selection of a fourth color template, the electronic device displays the preview interface; the preview interface includes a second image, which is obtained by adjusting the color of the first image based on the reference color material, the reference color material including the fourth color template, the fourth color template being one of the at least one color template.
[0049] In the image processing method provided in this embodiment, after launching the camera application, the electronic device can display a preview interface corresponding to the camera application, and display the preview image and buttons corresponding to the AI filter function in the preview interface. When the user wants to adjust the tone of the preview image, the user can click the button corresponding to the AI filter function. After detecting the click operation of the button corresponding to the AI filter function, the electronic device can display a first window, which may include one or more tone templates, allowing the user to quickly adjust the tone of the preview image by selecting a tone template, thereby improving the user experience.
[0050] For example, at least one color template in the first window includes color templates saved in the gallery application.
[0051] In the image processing method provided in this embodiment, the camera application and the gallery application can share tone templates, which makes it convenient for users to use tone templates saved in the gallery application in the camera application, improves the speed of tone adjustment of preview images in the camera application, and enhances the user experience.
[0052] In another embodiment, the electronic device displaying a second interface in response to a first operation on the first control includes: In response to a first operation on the first control, the electronic device displays a first window; the first window includes a fourth control; In response to a click on the fourth control, the electronic device displays a sixth interface; the sixth interface includes at least one candidate image. In response to a selection operation in the sixth interface, the electronic device displays the preview interface; the preview interface includes a second image, which is obtained by adjusting the tone of the first image based on the reference tone material, the reference tone material includes a fifth image, which is an image among the at least one candidate image, and the fifth image is the image selected by the selection operation.
[0053] For example, before the electronic device displays the preview interface in response to a selection operation on the sixth interface, the image processing method further includes: The electronic device saves the reference color material as a fifth color template.
[0054] In the image processing method provided in this embodiment, the fourth control can be the add button corresponding to the tone transfer card. When the camera application displays the preview interface, the user can select the fifth image with the desired tone based on the add button corresponding to the tone transfer card. The user can then adjust the tone of the preview image based on the tone of the fifth image, for example, transferring the tone of the fifth image to the preview image so that the tone of the preview image is similar to the tone of the fifth image selected by the user, thus meeting the user's personalized needs and improving the user experience. Furthermore, after the user selects the fifth image, the electronic device can automatically save the fifth image and / or its tone as a fifth tone template. This not only facilitates multiple subsequent uses by the user but also allows the user to quickly select the desired tone by choosing the fifth tone template, thereby quickly adjusting the image's tone, improving tone adjustment efficiency, and enhancing the user experience.
[0055] In one embodiment, after the electronic device displays the second interface, the image processing method further includes: In response to the shooting operation, the electronic device saves the second image as the captured image.
[0056] In the image processing method provided in this embodiment, after adjusting the tone of the preview image according to the tone template or the fifth image selected by the user, the electronic device can save the tone-adjusted preview image as the captured image after the user performs the shooting operation, thereby meeting the user's need to obtain a captured image with a personalized tone and improving the user experience.
[0057] In a second aspect, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the image processing method described in any one of the first aspects above.
[0058] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by an electronic device, causes the electronic device to implement the image processing method described in any one of the first aspects above.
[0059] Fourthly, embodiments of this application provide a computer program product, which includes a computer program. When the computer program is executed by an electronic device, it causes the electronic device to implement the image processing method described in any one of the first aspects above.
[0060] It is understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0061] Figure 1A This is a schematic diagram of the structure of the electronic device to which the image processing method provided in the embodiments of this application is applicable; Figure 1B This is a schematic diagram of the software architecture to which the image processing method provided in this application is applicable; Figure 2A This illustration shows a schematic diagram of an application scenario provided in an embodiment of this application; Figure 2B This illustration shows another schematic diagram of application scenario one provided by the embodiments of this application; Figures 3 to 6 This is a schematic diagram of application scenario two provided in the embodiments of this application; Figure 7 and Figure 8 This is another schematic diagram of application scenario two provided in the embodiments of this application; Figure 9 This is another schematic diagram of application scenario two provided in the embodiments of this application; Figure 10 This is another schematic diagram of application scenario two provided in the embodiments of this application; Figure 11 This is another schematic diagram of application scenario two provided in the embodiments of this application; Figure 12 This is a schematic diagram of the display operation prompt 1 provided in the embodiment of this application; Figure 13 This is another schematic diagram of application scenario two provided in the embodiments of this application; Figure 14 This is a schematic diagram of application scenario three provided in the embodiments of this application; Figure 15 This is a schematic diagram of the software architecture to which the image processing method provided in this application is applicable; Figure 16 This is a schematic flowchart of the image processing method provided in the embodiments of this application; Figure 17 This is a schematic diagram illustrating data sharing between the gallery application and the camera application provided in this embodiment of the application; Figure 18 This is a schematic flowchart of the image processing method provided in the embodiments of this application. Detailed Implementation
[0062] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0063] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0064] In the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0065] References to "one embodiment" or "some embodiments" as described in this application specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in another embodiment," "in yet another embodiment," etc., appearing in different parts of this application specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0066] Furthermore, the term "multiple" mentioned in the embodiments of this application should be interpreted as two or more.
[0067] The steps involved in the image processing method provided in this application are merely examples, and not all steps are mandatory, nor are all information or message contents required. They can be added or removed as needed during use. The same step or step or message with the same function in this application can be referenced and learned from each other in different embodiments.
[0068] The business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0069] With the increasing intelligence of electronic devices, their functions are becoming more and more diverse. For example, electronic devices can provide various image processing functions, allowing users to process images to obtain images that meet their needs. In particular, when a user sees an image with a favorite color tone in daily life or social situations, they may want to achieve the same color tone in their own image. However, the cumbersome process of color adjustment prevents users from quickly obtaining the desired color tone, resulting in a poor user experience.
[0070] To address the aforementioned problems, embodiments of this application provide an image processing method, an electronic device, and a computer program product. In this method, the electronic device can display a first interface including a first image and a first control. The first image includes a first target and a second target. In response to a first operation on the first control, the electronic device displays a second interface. The second interface includes a second image, which is obtained by adjusting the tone of the first image based on reference tone material. The degree of tone migration of the first target in the second image is different from the degree of tone migration of the second target. That is, after detecting a user's operation on the first control, the electronic device can adjust the tone of the first image according to the reference tone material to obtain the second image, and can display the second image on the second interface. This allows the user to quickly adjust the tone of the first image through the first control, simplifying the tone adjustment process and quickly obtaining the image with the desired tone, thus meeting the user's personalized needs. Furthermore, when the electronic device adjusts the tone of the first image according to the reference tone material, it can perform tone adjustments with different degrees of migration on different targets in the first image, improving the image effect after tone adjustment, enhancing the user experience, and possessing strong usability and practicality.
[0071] In this application embodiment, the electronic device can be a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), desktop computer, etc. This application embodiment does not impose any restrictions on the specific type of electronic device.
[0072] The following first describes the electronic device involved in the embodiments of this application. Please refer to... Figure 1A , Figure 1A A schematic diagram of an electronic device 100 is shown.
[0073] Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a camera 191, and a display screen 192, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a proximity sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0074] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0075] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0076] Electronic device 100 implements display functions through a GPU, a display screen 192, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 192 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0077] The display screen 192 is used to display images, videos, etc. The display screen 192 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 192, where N is a positive integer greater than 1.
[0078] Electronic device 100 can perform shooting functions through ISP, camera 191, video codec, GPU, display 192 and application processor.
[0079] The ISP is used to process the data fed back by the camera 191.
[0080] Camera 191 is used to capture still images or videos. In some embodiments, electronic device 100 may include one or N cameras 191, where N is a positive integer greater than 1.
[0081] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0082] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 192.
[0083] Touch sensor 180K, also known as a "touch device," is used in some embodiments. In one embodiment, touch sensor 180K may be disposed on display screen 192, forming a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to an application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 192. In other embodiments, touch sensor 180K may also be disposed on the surface of electronic device 100, in a different location than display screen 192.
[0084] The electronic device 100 provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems used in industry, such as operating systems developed based on OpenHarmony, like HarmonyOS; or other operating systems, such as Android™, iOS mobile operating systems; it can also be various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; or it can be a future new operating system, such as an AI operating system based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of the electronic device 100, utilize and run hardware and software resources, and provide public services to organize user interaction. In the electronic device 100, the operating system connects downwards to the physical devices at the hardware layer and provides a runtime environment for application software upwards.
[0085] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer includes a suite of software providing various services to application developers, or frameworks providing services such as databases, multimedia, and graphics, or capabilities such as distributed scheduling and system scaling. For example, the middleware layer may include a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the system's core capabilities, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer may include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.
[0086] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. The basic functions implemented by the electronic device 100 provided in this application embodiment can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of this application embodiment under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of this application embodiment under other specific operating systems, such as Android™.
[0087] Please see Figure 1B , Figure 1B This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.
[0088] like Figure 1B As shown, the software architecture of the electronic device 100 can be divided into several layers. In some embodiments, from bottom to top, they are: kernel layer, system service layer, framework layer, and application layer. The layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional granularity.
[0089] The kernel layer can include the kernel abstraction layer, kernel subsystems, and driver subsystems.
[0090] The Kernel Abstraction Layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.
[0091] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS (Lite Operating System), etc.
[0092] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.
[0093] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems: The system's basic capability subsystem set provides fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. This set may include distributed soft bus, distributed data management, distributed task scheduling, and Ark multi-language runtime; it may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI subsystem.
[0094] Basic software service subsystem set: provides public and general software services; the basic software service subsystem set may include event notification subsystem, telephone service subsystem, multimedia subsystem, etc.
[0095] Enhanced software service subsystem suite: Provides differentiated enhanced software services for different devices; the enhanced software service subsystem suite may include smart screen proprietary business subsystem, wearable proprietary business subsystem, IoT proprietary business subsystem, etc.
[0096] Hardware service subsystem set: Provides hardware services; the hardware service subsystem set may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.
[0097] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.
[0098] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.
[0099] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication RPC (Remote Procedure Call), and StarFlash communication capabilities.
[0100] Ark Multilingual Runtime is a unified compilation runtime platform designed to support the joint compilation and execution of multiple programming languages and multiple chip platforms.
[0101] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The framework layer includes: the ArkUI framework (which provides a complete infrastructure for UI development of system applications, including UI functions such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may have different operating systems, and the APIs they support may also differ.
[0102] For example, the ArkUI framework can include a creation framework and an image framework. The creation framework can provide an effects interface for tone transfer (e.g., an AI filter effects interface) and an AI filter color-tracking algorithm. The image framework can store tonal information of an image. Gallery and camera apps can call the AI filter effects interface of the creation framework to invoke the AI filter color-tracking algorithm. This algorithm applies the tones corresponding to the reference tones to the image requiring tone adjustment and encodes the image containing the tones corresponding to the reference tones into the image framework. For example, the image can be encoded into a high-efficiency image file format (HEIF) to save the tonal information of the image through the image framework. Reference tones can include reference images and / or the tones of reference images. The reference images in the reference tones can be preset images or images selected by the user. For example, preset images can include preset cyberpunk city images, blue sky and white cloud images, sunset images, seaside street images, ancient building images, or city wall images, etc. Preset images can be stored in gallery apps and / or media libraries, etc. The image selected by the user can be an image from a stock photo application. The hue corresponding to the reference image in the reference hue material can refer to the hue extracted from the reference image.
[0103] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. The HarmonyOS API includes the Audio API (audio service), Push API (push service), and Account API (account service), among others.
[0104] Applications at the application layer can include system applications and extended / third-party applications. System applications can include desktop, control bar, settings, contacts, camera, gallery, etc., while extended / third-party applications can include social applications, travel applications, etc. Gallery applications can integrate the image processing methods provided in the embodiments of this application. For example, the image processing method provided in the embodiments of this application can be a tone shifting function in the gallery application. When a user views an image through the gallery application, the user can adjust the tone of the image through the tone shifting function. For example, the tone of the image can be adjusted based on the tone of a reference image selected by the user from the gallery application, or the tone of the image can be adjusted based on the tone of a reference image determined by the electronic device from preset images. Similarly, camera applications can integrate the image processing methods provided in the embodiments of this application. For example, the image processing method provided in the embodiments of this application can be an AI filter function in the camera application. When a user takes a picture through the camera application, the user can adjust the tone of the preview image in the camera application through the AI filter function, and after performing the shooting operation, the user can obtain the tone-adjusted captured image. That is, when the user views the captured image, the tone of the captured image is the tone adjusted during the preview process.
[0105] In the image processing method provided in this application embodiment, when an electronic device displays an interface containing a certain image (hereinafter referred to as the original image), the interface can also display a control for obtaining reference tone material (hereinafter referred to as the first control). The first control can be used to trigger the acquisition of reference tone material to adjust the tone of the original image according to the reference tone material. That is, when a user wants to adjust the tone of the original image, the user can obtain the reference tone material by operating the first control. The electronic device can adjust the tone of the original image according to the reference tone material, so that the user can quickly obtain the tone of the original image through the first control, which can simplify the tone adjustment process and quickly obtain the image with the desired tone, meeting the user's personalized needs. In addition, when the electronic device adjusts the tone of the original image according to the reference tone material, it can perform tone migration of different degrees on different targets in the original image, that is, it can perform tone adjustment of different targets to different degrees, which can improve the image effect after tone adjustment and improve the user experience. Here, tone can include saturation, hue, brightness, and contrast, etc. The tone material can include an image and / or the tone corresponding to the image, etc. The image in the tone material can be a preset image or an image selected by the user. For example, preset images may include preset cyberpunk city images, blue sky and white cloud images, sunset images, seaside street images, ancient architectural images, or city wall images, etc. Preset images can be stored in gallery applications and / or media libraries, etc. Images selected by the user can be images from gallery applications. The color tone corresponding to an image in the color tone material can refer to a color tone extracted from the image.
[0106] For example, when adjusting the tone of an original image based on reference tone material, the electronic device can perform semantic analysis on the original image to determine the semantic regions corresponding to the original image. Additionally, the electronic device can also perform semantic analysis on the reference image corresponding to the reference tone material to determine the semantic regions corresponding to the reference tone material (for ease of understanding, these can be referred to as reference semantic regions). For each semantic region of the original image, the electronic device can determine the reference semantic region corresponding to that semantic region and adjust the tone of that semantic region based on the tone corresponding to the reference semantic region. This allows for tone adjustment of each semantic region of the original image based on semantic information, improving the accuracy of tone adjustment and enhancing the user experience. It should be understood that semantic regions may include regions corresponding to various subjects in the image and / or regions corresponding to various background elements (e.g., sky, grass, or beach). A semantic region may be a region corresponding to one or more targets in the image.
[0107] For example, when the original image includes sky 1, person 1, and tree 1, and the reference image corresponding to the determined reference tone material includes sky 2, person 2, and tree 2, the electronic device can adjust the tone of sky 1 in the original image according to the tone corresponding to sky 2 in the reference tone material, adjust the tone of person 1 in the original image according to the tone corresponding to person 2 in the reference tone material, and adjust the tone of tree 1 in the original image according to the tone corresponding to tree 2 in the reference tone material.
[0108] For example, when adjusting the tone of each region of the original image based on semantic information, for each semantic region of the original image, when determining the corresponding reference semantic region, the electronic device can also determine the similarity between the semantic region and the reference semantic region, such as at least one of semantic similarity, color similarity, or brightness similarity. After determining the similarity between the semantic region and the reference semantic region, the electronic device can determine the degree of tone transfer corresponding to the semantic region based on the similarity, and adjust the tone of the semantic region according to the degree of tone transfer. Specifically, when the similarity between the semantic region and the reference semantic region is high, the degree of tone transfer corresponding to the semantic region can be high, making the tone of the highly similar target more similar to the tone of similar targets in the reference image, thus achieving tone transfer between similar targets, such as tone transfer between skies or between oceans. When the similarity between the semantic region and the reference semantic region is low, or when there is no reference semantic region corresponding to the semantic region in the reference image, the degree of tone transfer corresponding to the semantic region can be low. This reduces the influence of the tone of the reference image on targets with low similarity in the original image, avoids tone distortion of targets with low similarity, improves the fidelity of targets with low similarity, and enhances the image effect after tone adjustment.
[0109] For example, when adjusting the tone of an original image based on a reference tone image, an electronic device can reduce the degree of tone migration corresponding to target A. Target A can be a target in the reference image, and there is no similar target in the original image. This reduces the influence of the tone of target A, which is not present in the original image, on the tone of the original image, thereby improving the fidelity of the adjusted image and enhancing its overall effect. For instance, when the reference image corresponding to the reference tone image includes a blue sea, but the original image does not contain a sea, when adjusting the tone of the original image based on the reference tone image, the tone of the original image can be adjusted according to the dominant tone of the reference image, thus reducing the degree of tone migration of the sea, and consequently, reducing the degree of tone migration of the blue color.
[0110] It should be understood that tone transfer refers to applying the hue (e.g., saturation, hue, brightness, contrast) of a reference hue image to the original image, so that the original image achieves a visual color effect similar to the reference image corresponding to the reference hue image. The degree of tone transfer refers to the intensity of applying the hue corresponding to the reference hue image to the original image. The degree of tone transfer can range from 0% to 100%. 0% can mean completely preserving the original image's original hue without tone transfer. 100% can mean fully applying the hue corresponding to the reference hue image, meaning the original image completely reflects the hue corresponding to the reference hue image. Other values, such as 50%, can mean applying 50% of the hue corresponding to the reference hue image to the original image, meaning the adjusted hue of the original image can be 50% of the hue corresponding to the reference hue image. For example, the adjusted saturation of the original image is 50% of the saturation corresponding to the reference hue image, the adjusted hue of the original image is 50% of the hue corresponding to the reference hue image, the adjusted brightness of the original image is 50% of the brightness corresponding to the reference hue image, and the adjusted contrast of the original image is 50% of the contrast corresponding to the reference hue image. 70% can refer to applying 70% of the color tone corresponding to the reference color material to the original image.
[0111] Please see Figure 2A , Figure 2A This illustration shows a schematic diagram of an application scenario provided by an embodiment of this application. This application scenario uses a reference image corresponding to a reference tone material as... Figure 2A The image 210 shown in (a) is used as an example for illustration.
[0112] For example, when the original image needs to be toned, Figure 2A When performing semantic analysis on image 220 as shown in (b) above, the electronic device can determine that image 220 includes region 221 corresponding to clouds and region 222 corresponding to trees. Additionally, when performing semantic analysis on image 210, the electronic device can determine that image 210 includes region 211 corresponding to clouds and region 212 corresponding to trees.
[0113] At this point, the electronic device can determine that region 221 corresponding to the cloud in image 220 is similar to region 211 corresponding to the cloud in image 210, and the similarity is high. It also determines that region 222 corresponding to the tree in image 220 is similar to region 212 corresponding to the tree in image 210, and the similarity is high. Therefore, the electronic device can adjust the main color tone of image 220 based on the main color tone of image 210, and can adjust the color tone of region 221 corresponding to the cloud in image 220 based on the color tone of region 211 corresponding to the cloud in image 210, and can adjust the color tone of region 222 corresponding to the tree in image 220 based on the color tone of region 212 corresponding to the tree in image 210. For example, the effect of adjusting the color tone of image 220 based on the color tone of image 210 can be as follows: Figure 2A As shown in (c) in the figure.
[0114] For example, the original image being adjusted is Figure 2A When image 230 is shown in (d) above, the electronic device performs semantic analysis on image 230 and determines that image 230 includes region 231 corresponding to the sun, region 232 corresponding to the person, and region 233 corresponding to the sign. At this time, the electronic device can determine that there is no region in image 210 similar to region 231 corresponding to the sun in image 230, no region in image 210 similar to region 232 corresponding to the person in image 230, and no region in image 210 similar to region 233 corresponding to the sign in image 230. Therefore, the electronic device can adjust the main color tone of image 230 based on the main color tone of image 210. For example, the effect of adjusting the main color tone of image 230 based on the main color tone of image 210 can be as follows: Figure 2A As shown in (e), tonal distortion of the sun, people and signs in image 230 can be avoided, and the effect of tonal adjustment of image 230 can be improved.
[0115] In one embodiment, when adjusting the tone of the original image based on reference tone material, if the original image includes a person, such as a person's face, the electronic device can perform face protection. Face protection can refer to reducing the influence of the reference image's tone on the face when the reference image corresponding to the reference tone material does not contain a face, thereby improving the fidelity of the face after tone adjustment and thus enhancing the overall image quality. Conversely, when the reference image corresponding to the reference tone material contains a face, the tone of the face in the original image can be adjusted based on the tone of the face in the reference image, making the skin tone of the face in the original image similar to that in the reference image, thus meeting user needs and improving the user experience.
[0116] Please see Figure 2B , Figure 2B This illustration shows another schematic diagram of application scenario one provided by the embodiments of this application.
[0117] For example, the reference image corresponding to the reference tone material can be Figure 2B Image 240 is shown in (a) above. The original image that needs to be toned is... Figure 2BWhen performing semantic analysis on image 250 as shown in (b), the electronic device determines that image 250 contains region 251 corresponding to a person, and that region 251 contains a face, and also determines that image 250 contains region 252 corresponding to clouds and region 253 corresponding to trees. Furthermore, when performing semantic analysis on image 240, the electronic device determines that image 240 contains region 241 corresponding to a person, and that region 241 contains a face, and also determines that image 240 contains region 242 corresponding to clouds and region 243 corresponding to trees.
[0118] At this point, the electronic device can determine that region 251 corresponding to the person in image 250 is similar to region 241 corresponding to the person in image 240, and the similarity is high. It can also determine that region 252 corresponding to the cloud in image 250 is similar to region 242 corresponding to the cloud in image 240, and the similarity is high. Furthermore, it can determine that region 253 corresponding to the tree in image 250 is similar to region 243 corresponding to the tree in image 240, and the similarity is high. Therefore, the electronic device can adjust the main color tone of image 250 based on the main color tone of image 240, and can adjust the color tone of region 251 corresponding to the person in image 250 based on the color tone of the face in region 241 corresponding to the person in image 240. For example, the electronic device can adjust the color tone of the face in region 251 corresponding to the person in image 250 based on the color tone of the face in region 241 corresponding to the person in image 240. Furthermore, the electronic device can adjust the hue of region 252 in image 250 corresponding to clouds based on the hue of region 242 in image 240, and can adjust the hue of region 253 in image 250 corresponding to trees based on the hue of region 243 in image 240. For example, the effect of adjusting the hue of image 250 based on the hue of image 240 can be as follows: Figure 2B As shown in (c) in the figure.
[0119] For example, the reference image corresponding to the reference tone material can be Figure 2BImage 260 is shown in (d) above. The electronic device performs semantic analysis on image 260 and determines that image 260 contains region 262 corresponding to clouds and region 263 corresponding to trees, thus determining that image 260 does not contain people. At this point, the electronic device can determine that region 252 corresponding to clouds in image 250 is similar to region 262 corresponding to clouds in image 260, and the similarity is high. It also determines that region 253 corresponding to trees in image 250 is similar to region 263 corresponding to trees in image 260, and the similarity is high. However, it determines that there is no region in image 260 similar to region 251 corresponding to people in image 250. Therefore, the electronic device can adjust the main color tone of image 250 based on the main color tone of image 260, and can adjust the color tone of region 252 corresponding to clouds in image 250 based on the color tone of region 262 corresponding to clouds in image 260, and can adjust the color tone of region 253 corresponding to trees in image 250 based on the color tone of region 263 corresponding to trees in image 260. However, electronic devices can avoid adjusting the hue of region 251 corresponding to the person in image 250. For example, they can adjust the hue of region 251 corresponding to the person in image 250 without considering the hue of region 262 corresponding to the clouds or region 263 corresponding to the trees in image 260, thus preventing hue distortion of the person's face in image 250. For example, the effect of adjusting the hue of image 250 based on the hue of image 260 could be as follows: Figure 2B As shown in (e) in the diagram.
[0120] From the above Figure 2A As can be seen, in the embodiments of this application, when adjusting the tone of different images based on the same reference tone material, images with different tone adjustment effects can be obtained, and as described above... Figure 2B It is understood that when adjusting the tone of the same image based on different reference tone materials, images with different tone adjustment effects can be obtained. That is, in the embodiments of this application, different tone adjustment effects can be achieved on different images based on the same reference tone material, and different tone adjustment effects can be achieved on the same image using different reference tone materials, which can meet the personalized needs of users and improve the user experience.
[0121] For example, the image processing method provided in this application embodiment can be integrated into an image processing application, for example, as an optional function in the image processing application (e.g., tone shifting function). When processing an image through an image processing application, the tone of the image can be adjusted through the tone shifting function.
[0122] The image processing application can be a post-processing application suitable for photography, that is, an application that can process images obtained from photography. Alternatively, the image processing application can be an application suitable for beautifying everyday images. It should be understood that the image processing application can be an application specifically for image processing, or an application that includes image processing functions. This application embodiment does not impose specific limitations on this and can be determined according to the actual scenario.
[0123] For example, the image processing method provided in this application embodiment can be built into the gallery application of an electronic device, for example, as an optional function in the gallery application (e.g., tone shifting function). When a user views an image through the gallery application, the user can edit and optimize the image using the relevant functions of the gallery application, such as adjusting the tone of the image using the tone shifting function in the gallery application.
[0124] For example, the image processing method provided in this application embodiment can be built into the camera application of an electronic device, for example, as an optional function of the camera application (e.g., an AI filter function). When a user takes an image through the camera application, the user can adjust the tone of the preview image through the AI filter function of the camera application. When the preview image is displayed according to the adjusted tone, if the user performs a shooting operation, the tone of the captured image can be the adjusted tone.
[0125] For example, the image processing method provided in this application embodiment can be built into an electronic device as a system function provided by the electronic device, and can be called by one or more applications in the electronic device to adjust the color tone of the image. For example, when a user views an image through an application A, application A can call the image processing method provided in this application embodiment based on the user's relevant operations to process the image and adjust the color tone of the image.
[0126] The image processing method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings and specific application scenarios.
[0127] Please see Figures 3 to 6 , Figures 3 to 6 This diagram illustrates an application scenario two provided by an embodiment of this application. Application scenario two is illustrated by taking the image processing method provided by this application embodiment as an example of being built into a gallery application. That is, in application scenario two, the image processing method provided by this application embodiment can be an optional function in a gallery application, such as a tone shift function. When a user views an image in a gallery application, they can adjust the tone of the image through the tone shift function.
[0128] like Figure 3As shown in (a), when a user views an image through the gallery application, the electronic device can display an interface 310 corresponding to the gallery application. Interface 310 may include an image 311 and buttons 312 corresponding to editing functions. When the user wants to adjust the tone of image 311, the user can click the button 312 corresponding to the editing function. Additionally, interface 310 may also include buttons for sharing, saving, deleting, and viewing more functions, as well as thumbnails of images in the gallery application. The images in the gallery application may include one or more of the following: images captured by a camera application, images saved from other applications, or screenshots.
[0129] like Figure 3 As shown in (b), after detecting a click on button 312 corresponding to the editing function, the electronic device can display an interface 320 corresponding to the gallery application. Interface 320 may include an image 311 and a button 321 corresponding to the AI image editing function. The AI image editing function can be one type of editing function. The AI image editing function may include one or more image editing functions, such as tone shifting, removal, image enlargement, and background processing. The user can click the button 321 corresponding to the AI image editing function. Interface 320 may also include buttons corresponding to cropping, adjustment, filters, drawing, and saving functions.
[0130] like Figure 3 As shown in (c), after detecting a click on button 321 corresponding to the AI image editing function, the electronic device can display the gallery application interface 330. Interface 330 may include image 311 and button 331 corresponding to the tone shift function. The user can click button 331 to activate the tone shift function and adjust the tone of image 311. Interface 330 may also include buttons for other AI image editing functions such as removal, image expansion, and background processing, as well as a save button.
[0131] like Figure 3As shown in (d), after detecting an operation that clicks the button 331 corresponding to the tone shift function, the electronic device can display the interface 340 corresponding to the gallery application. The interface 340 may include an image 311 and a first control for obtaining reference tone materials. For example, the first control may include an inspiration recommendation control 341 and an extraction control 342, etc. The inspiration recommendation control 341 can be used to trigger the inspiration recommendation function. The inspiration recommendation function can refer to the electronic device automatically determining a tone material that matches the image 311 and using the tone material that matches the image 311 as a reference tone material to adjust the tone of the image 311. The extraction control 342 can be used to trigger the extraction function, or it can be called adding an image color picking function. The extraction function can refer to the electronic device extracting tones from other images and using the extracted tones as reference tone materials to adjust the tone of the image 311. Other images can be images selected by the user. It should be understood that the interface 340 may also include various functions corresponding to the AI image editing function and a thumbnail of the image 311, for example... Figure 3 The original image shown in (d) allows users to quickly understand the original color tone of image 311 by displaying the original image.
[0132] In some embodiments, when displaying interface 340, that is, when displaying the inspiration recommendation control 341 and the extraction control 342 on interface 340, such as Figure 3 As shown in (d), when a user wants to select an image to adjust the hue of image 311 according to the hue of the selected image, the user can click the extraction control 342.
[0133] like Figure 3 As shown in (e), after detecting a click on the extraction control 342, the electronic device can display an interface 350, which may include one or more candidate images. Additionally, the interface 350 may include a search box, allowing the user to search for images and quickly select a desired reference image. The candidate images displayed in the interface 350 may be thumbnails of candidate images. The candidate images displayed in the interface 350 may include images from a gallery application and / or may include preset images. It should be understood that preset images can be specifically determined according to the actual scenario, and this embodiment does not limit this. For example, preset images may include cyberpunk city images, blue sky and white cloud images, sunset images, seaside street images, ancient building images, or city wall images, etc. The user can select a reference image in the interface 350, that is, select an image with the desired color tone. For example, as... Figure 3 As shown in (e), when the image with the desired color tone is image 351, the user can click on image 351.
[0134] like Figure 3As shown in (f), after detecting a click on image 351, the electronic device can display interface 360, which may include image 351 presented as a large image and add button 361. When the user wants to adjust the tone of image 311 according to the tone of image 351, the user can click add button 361.
[0135] After detecting the click of the add button 361, the electronic device can determine that image 351 is the reference image. At this time, the electronic device can extract the hue of the reference image (i.e., image 351) and adjust the hue of image 311 according to the hue of image 351. For example, the electronic device can transfer the hue of image 351 to image 311 so that the hue of image 311 is similar to that of image 351.
[0136] In one embodiment, when a user selects a reference image and adjusts the tone of image 311, after the user selects the reference image, for example, after detecting the click of the add button 361, the electronic device can automatically save the reference image (e.g., image 351) and / or the tone of the reference image as a tone template. This not only facilitates multiple subsequent uses by the user but also allows the user to quickly select the desired tone by choosing the tone template, thereby quickly adjusting the tone of the image, improving the efficiency of tone adjustment, and enhancing the user experience. For example, when saving the reference image and / or the tone of the reference image as a tone template, the electronic device can set a default name for the tone template and highlight it in the interface, making it easy for the user to understand the saved tone template. It should be understood that the specific method of highlighting is not limited in this embodiment and can be determined according to the actual scenario. For example, it can be highlighted by thickening the border or by flashing the border, etc. The following will use highlighting by thickening the border as an example for illustrative explanation.
[0137] For example, such as Figure 3 As shown in (g), after detecting an action of clicking the add button 361, the electronic device can display interface 370, which may include image 311. Additionally, when saving a reference image (e.g., image 351) and / or the hue of the reference image as a hue template 371, the electronic device can set the name of the hue template 371 to hue AA by default and can highlight the hue template 371 in interface 370. For example, the electronic device can highlight the hue template 371 behind the original image. It should be understood that displaying the hue template 371 in interface 370 can mean displaying the reference image corresponding to the hue template 371 and / or the name of the hue template 371. The following will exemplify this by displaying the reference image corresponding to the hue template 371 and the name of the hue template 371.
[0138] It should be noted that the above description of displaying the tone template 371 behind the original image is merely illustrative and should not be construed as a limitation on the embodiments of this application. In the embodiments of this application, the specific position of the tone template 371 in the interface 370 can be determined according to the actual scenario. For example, the tone template 371 can be displayed behind the extraction control 342 and in front of the original image, or it can be displayed below the extraction control 342, and so on. The following will use the example of displaying the tone template 371 behind the original image for illustrative explanation.
[0139] like Figure 3 As shown in (g), during the process of adjusting the tone of image 311 based on reference tone material (e.g., the tone of image 351), to facilitate user understanding of the tone adjustment process, the electronic device can display a prompt box 372 in interface 370. The prompt box 372 may include a prompt message 1 and a close button. The prompt message 1 can be used to indicate that tone adjustment is in progress. For example, prompt message 1 may include "Tone adjustment in progress." The close button can be used to close the prompt box 372. That is, when the prompt box 372 is displayed, the electronic device can close the prompt box 372 based on the user's click of the close button. It should be understood that even if the prompt box 372 is not closed, the electronic device can also automatically close the prompt box 372 after the tone adjustment is completed.
[0140] In addition, to enhance the display effect and improve the user experience during the color tone adjustment process, the electronic device can display animated effects while adjusting the color tone of image 311 based on reference color tone materials. Figure 3 Animation display is not shown in (g) of the image. It should be understood that the specific method of animation display can be determined according to the actual scene, and the embodiments of this application do not limit it. For example, one or more light spots can be displayed in the image 311, and the changes of each light spot can be displayed (such as the flashing of the light spot), or a flowing light curve can be displayed in the image 311, which can diffuse outward from the center of the image 311, and so on.
[0141] like Figure 3As shown in (h), after adjusting the tone of image 311 according to the tone of image 351, the electronic device can display interface 380. Interface 380 may include image 381, which is the image obtained after adjusting the tone of image 311 according to the tone of image 351. For example, interface 380 may also include a prompt box 382, which may include prompt information 2. Prompt information 2 can be used to indicate that the tone adjustment has been completed. For example, prompt information 2 may include "Tone applied". It should be understood that interface 380 may also include buttons for saving, previous step, and next step functions.
[0142] It should be noted that when interface 380 includes a prompt box 382, after displaying the prompt box 382, the electronic device can automatically close the prompt box 382 after a preset time interval of 1. Alternatively, the prompt box 382 can include a close button. The electronic device can close the prompt box 382 after detecting an operation of clicking the close button in the prompt box 382. After closing the prompt box 382, the interface 380 displayed by the electronic device can be as follows: Figure 3 As shown in (i) in the diagram.
[0143] In one embodiment, when adjusting the hue of image 311 based on the hue of image 351, the electronic device can determine the degree of hue shift corresponding to image 311, and adjust the hue of image 311 according to the degree of hue shift corresponding to image 311 to obtain image 381. The degree of hue shift can be from 0% to 100%.
[0144] For example, an electronic device can determine the degree of tone shift corresponding to image 311 based on the overall similarity between image 351 and image 311, such as at least one of overall semantic similarity, color similarity, or brightness similarity. The degree of tone shift corresponding to image 311 can be the overall tone shift of image 311. Specifically, the more similar images 311 and 351 are, the higher the degree of tone shift corresponding to image 311 can be; the less similar images 311 and 351 are, the lower the degree of tone shift corresponding to image 311 can be. That is, the electronic device can adjust the tone of each target in image 311 based on the degree of tone shift corresponding to image 311.
[0145] For example, the electronic device can determine the similarity between each target in image 351 and similar targets in image 311, and can determine the degree of tone migration corresponding to each target in image 311 based on the similarity of each target in image 311. That is, the degree of tone migration corresponding to image 311 can include the degree of tone migration corresponding to each target in image 311. In other words, the electronic device can adjust the tone of each target in image 311 based on the degree of tone migration corresponding to each target in image 311. The degree of tone migration corresponding to each target in image 311 may be the same or different.
[0146] The following example uses the tone shift degree corresponding to image 311 as the overall tone shift degree of image 311 for illustration.
[0147] like Figure 3 (h) and Figure 3 As shown in (i), after adjusting the tone of image 311 according to the tone of image 351, the electronic device can display a migration level adjustment bar 383 in interface 380. The migration level adjustment bar 383 may include a slider. The migration level adjustment bar 383 can be used to adjust the degree of tone migration. That is, the user can adjust the overall tone migration level of image 381, or adjust the tone migration level of a certain local area of image 381, by sliding the slider in the migration level adjustment bar 383, so that the adjusted image 381 can meet the user's personalized needs and improve the user experience. It should be understood that when displaying the tone-adjusted image 381 in interface 380, the electronic device can display the migration level adjustment bar 383 according to the tone migration level corresponding to image 381. The tone migration level indicated by the migration level adjustment bar 383 corresponds to the tone migration level corresponding to image 381. Figure 3 (h) and Figure 3 In example (i), image 381 is illustrated with a 50% hue shift. That is, image 381 is an image obtained by adjusting the hue of image 311 based on 50% of the hue of image 351.
[0148] like Figure 4As shown in (a), when the migration level adjustment bar 383 is displayed in interface 380, if the user wants to adjust the tone migration level corresponding to image 381, for example, if the user wants to increase the tone migration level corresponding to image 381, the user can slide the slider in the migration level adjustment bar 383 to the right. After detecting the operation of sliding the slider, the electronic device can determine the adjusted tone migration level based on the slid slider, and adjust the tone of image 381 based on the adjusted tone migration level and the tone of image 351. For example, when the user slides the slider to the far right of the migration level adjustment bar 383, the electronic device can determine that the adjusted tone migration level of image 381 is 100% based on the slid slider, and can adjust the tone of image 381 based on the adjusted tone migration level (i.e., 100%) of image 381 and the tone of image 351, for example, the adjusted image 381 can be as follows: Figure 4 As shown in (b) above. Similarly, when a user wants to reduce the degree of tone shift corresponding to image 381, the user can slide the slider in the shift level adjustment bar 383 to the left.
[0149] It should be understood that the electronic device can determine the adjusted tone shift level based on the slider's position within the shift level adjustment bar 383. For example, when the slider is at the far left of the shift level adjustment bar 383, the electronic device can determine the adjusted tone shift level to be 0. For example, when the slider is in the middle of the shift level adjustment bar 383, the electronic device can determine the adjusted tone shift level to be 50%. When the slider is at the far right of the shift level adjustment bar 383, the electronic device can determine the adjusted tone shift level to be 100%. When the slider is at one-quarter of the shift level adjustment bar 383, the electronic device can determine the adjusted tone shift level to be 25%. When the slider is at three-quarters of the shift level adjustment bar 383, the electronic device can determine the adjusted tone shift level to be 75%, and so on.
[0150] In one embodiment, when the interface 380 displays the tonal shift adjustment bar 383, if the user wants to adjust the tonal shift level of a certain local area of the image 381, for example, if the user wants to adjust the tonal shift level of the tree 3811 on the right, such as... Figure 4 As shown in (c), the user can click on any location in tree 3811. Figure 4 As shown in (d), after detecting an operation that clicks on a certain location of tree 3811, the electronic device can determine the area corresponding to tree 3811, and can determine the area corresponding to tree 3811 as the local area that needs to be adjusted for the degree of tone shift, and can highlight the area corresponding to tree 3811.
[0151] It should be understood that the above-described method of selecting a local area by clicking is only an illustrative explanation and should not be construed as a limitation on the embodiments of this application. In the embodiments of this application, other operations can also be used to select a local area, such as selecting by circling or sliding.
[0152] like Figure 4 As shown in (d), after clicking tree 3811, the user can slide the slider in the migration level adjustment bar 383. For example, when the user wants to increase the tone migration level corresponding to tree 3811, the user can slide the slider in the migration level adjustment bar 383 to the right. After detecting the operation of sliding the slider in the migration level adjustment bar 383, the electronic device can determine the adjusted tone migration level of tree 3811 based on the slid slider, and adjust the tone of tree 3811 based on the adjusted tone migration level of tree 3811 and the tone of image 351. For example, when the user slides the slider to the far right of the migration level adjustment bar 383, the electronic device can determine that the adjusted tone migration level of tree 3811 is 100% based on the slid slider, and can adjust the tone of tree 3811 based on the adjusted tone migration level of tree 3811 (i.e., 100%) and the tone of image 351. For example, the adjusted tree 3811 can be like this: Figure 4 As shown in (e) in the diagram. Wherein, Figure 4 The tone migration level indicated by the migration level adjustment bar 383 in (e) is the tone migration level adjusted by tree 3811.
[0153] In another embodiment, when a user selects a reference image to adjust the tone of image 311, the user can select a local area of the reference image to adjust the tone of image 311 according to the tone of the local area of the reference image, so that the adjusted image 311 can meet the user's personalized needs and improve the user experience.
[0154] For example, such as Figure 5 As shown in (a), when an electronic device displays an interface 360 containing an image 351 and an add button 361 based on a user's relevant operation, for example based on... Figure 3 The operation of clicking to extract control 342 shown in (d) is as follows: Figure 3 When the user clicks on image 351 as shown in (e) and the interface 360 is displayed, if the user wants to adjust the color tone of image 311 according to the color tone of a certain local area of image 351, such as the color tone of cloud 3511, the user can click on any position of cloud 3511.
[0155] like Figure 5As shown in (b), after detecting an operation that clicks on a location of cloud 3511, the electronic device can determine the area corresponding to cloud 3511 and highlight that area. Additionally, after clicking cloud 3511, the user can click the add button 361 to adjust the tone of image 311 according to the tone of cloud 3511.
[0156] like Figure 5 As shown in (c), after detecting a click on the add button 361, the electronic device can display an interface 510, which may include an image 311 and a prompt box 511. The prompt box 511 may include a prompt message (e.g., "Tone is being applied") and a close button. Furthermore, after detecting a click on the add button 361, the electronic device can extract the tint of the cloud 3511 from the image 351 based on the area corresponding to the cloud 3511, and adjust the tint of the image 311 according to the tint of the cloud 3511.
[0157] For example, after detecting the click of the add button 361, the electronic device can automatically save the reference image (i.e., image 351) and / or the tone of the reference image as a tone template, or can save the local image corresponding to cloud 3511 in image 351 and / or the tone of cloud 3511 as a tone template. This not only makes it convenient for users to use it multiple times in the future, but also allows users to quickly select the desired tone by selecting the tone template, thereby quickly adjusting the tone of the image, improving the tone adjustment efficiency, and enhancing the user experience. Figure 5 Example (c) is given by saving the hue of cloud 3511 as hue template 512.
[0158] like Figure 5 As shown in (c), when saving the hue of cloud 3511 as hue template 512, the electronic device can set the name of hue template 512 to hue BB by default and display hue template 512 in interface 510. For example, the electronic device can display a partial image corresponding to hue template 512 and the name of hue template 512 behind the original image.
[0159] It should be noted that, in order to improve the display effect and enhance the user experience during the color tone adjustment process, the electronic device can display animated effects while adjusting the color tone of image 311 according to the color tone of cloud 3511. Figure 5Animation display is not shown in (c) of the image. It should be understood that the specific method of animation display can be determined according to the actual scene, and the embodiments of this application do not limit it. For example, one or more light spots can be displayed in image 311, and the changes of each light spot can be displayed, or a flowing light curve can be displayed in image 311, which can diffuse outward from the center of image 311, and so on.
[0160] like Figure 5 As shown in (d), after adjusting the tone of image 311 according to the tone of cloud 3511, the electronic device can display interface 520, which may include image 521 and migration level adjustment bar 522. Image 521 is the image obtained after adjusting the tone of image 311 according to the tone of cloud 3511. Migration level adjustment bar 522 can be used to indicate the degree of tone migration corresponding to image 311. Figure 5 Example (d) is given by taking the hue shift of image 311 as 100% as an example. That is, image 521 can be an image obtained by adjusting the hue of image 311 according to 100% of the hue of cloud 3511. In addition, interface 520 may also include a button for saving, a button for the previous step, and a button for the next step.
[0161] It should be understood that after adjusting the tone of image 311 according to the tone of cloud 3511, the electronic device can also display a prompt box on interface 520, which may include prompt information 2 (e.g., "Tone applied"). Figure 5 (d) in the diagram does not show the prompt box containing prompt message 2.
[0162] In another embodiment, when a user selects a reference image to adjust the tone of image 311, the user can choose to adjust the tone of a specific local region 1 of image 311. Specifically, when selecting to adjust the tone of local region 1 of image 311, the user can select a reference image to directly adjust the tone of local region 1 of image 311 based on the tone of the reference image. Alternatively, after selecting a reference image, the user can also select a specific local region 2 of the reference image to adjust the tone of local region 1 of image 311 based on the tone of local region 2 of the reference image.
[0163] For example, when adjusting the tone of a local region 1 of image 311 directly based on the tone of a reference image, the electronic device can determine each local region of the reference image and the similarity between each local region of the reference image and local region 1 of image 311, such as at least one of semantic similarity, color similarity, or brightness similarity. Subsequently, the electronic device can determine the local region 3 among the local regions of the reference image that is most similar to local region 1 of image 311, and adjust the tone of local region 1 of image 311 based on the tone of local region 3. This adjustment of the tone of local region 1 based on the similarity between local regions improves the accuracy of tone adjustment, making the tone-adjusted image better meet the user's personalized needs and enhance the user experience.
[0164] It should be noted that the above-described method of adjusting the tone of a local region 1 of image 311 based on the tone of the local region 3 in the reference image that is most similar to local region 1 of image 311 is merely an illustrative explanation and should not be construed as a limitation on the embodiments of this application. In the embodiments of this application, the electronic device can adjust the tone of a local region 1 of image 311 based on the overall tone of image 351. Alternatively, the electronic device can adjust the tone of a local region 1 of image 311 based on the tone of any other region of image 351. The following will exemplify the method of adjusting the tone of a local region 1 of image 311 based on the tone of the local region 3 in the reference image that is most similar to local region 1 of image 311.
[0165] For example, such as Figure 6 As shown in (a), after detecting a click on button 331 corresponding to the tone shift function, the electronic device can display interface 340. Interface 340 may include image 311, inspiration recommendation control 341, and extraction control 342. When displaying interface 340, if the user wants to adjust the tone of a local area of image 311, for example, if the user wants to adjust the tone of tree 3111 in image 311, the user can click on any position of tree 3111. Figure 6 As shown in (b), after clicking tree 3111, the user can click extraction control 342. Upon detecting the click on tree 3111, the electronic device can highlight tree 3111. It should be understood that after detecting both the click on tree 3111 and the click on extraction control 342, the electronic device can determine that the user wants to adjust the tone of tree 3111 in image 311.
[0166] like Figure 6As shown in (c), after detecting a click on the extraction control 342, the electronic device can display an interface 610, which may include one or more candidate images. The candidate images are presented as thumbnails. When the interface 610 is displayed, the user can select a desired reference image. For example, the user can click on image 611.
[0167] like Figure 6 As shown in (d), after detecting a click on image 611, the electronic device can display interface 620, which may include image 611 presented as a large image and add button 621. When displaying interface 620, if the user wants to adjust the color tone of tree 3111 in image 311 directly based on the color tone of image 611, the user can click add button 621.
[0168] like Figure 6 As shown in (e), after detecting a click on the add button 621, the electronic device can display an interface 630, which may include an image 311 and a prompt box 631. The prompt box 631 may include a prompt message (e.g., "Tone is being applied") and a close button.
[0169] For example, after detecting the operation of the add button 621, the electronic device can also automatically save the reference image (i.e., image 611) and / or the hue of the reference image as a hue template 632, and can set the name of the hue template 632 to hue CC by default, and can highlight the hue template 632 in the interface 630. For example, as Figure 6 As shown in (e), the electronic device can highlight the reference image corresponding to tone template 632 and the name of tone template 632 behind the original image.
[0170] Furthermore, after detecting a click on the add button 621, the electronic device can extract the hue from image 611 and adjust the hue of image 311 based on the extracted hue. For example, the electronic device can determine that the tree in image 611 is most similar to tree 3111 in image 311. Therefore, the electronic device can extract the hue of the tree from image 611 and adjust the hue of tree 3111 in image 311 based on the hue of the tree.
[0171] It should be noted that, in order to improve the display effect and enhance the user experience during the color tone adjustment process, the electronic device can display animated effects while adjusting the color tone of tree 3111 based on the extracted color tone. Figure 6Animation display is not shown in (e) of the diagram. For example, one or more light spots can be displayed in the tree 3111, and the changes of each light spot can be displayed (such as the flashing of the light spot), or a flowing light curve can be displayed in the tree 3111, which can diffuse outward from the center of the tree 3111, and so on.
[0172] like Figure 6 As shown in (f), after adjusting the hue of tree 3111 according to the hue of the tree in image 611, the electronic device can display interface 640. Interface 640 may include image 641, prompt box 642, and migration level adjustment bar 643. Image 641 is the image after adjusting the hue of tree 3111 in image 311 according to the hue of the tree in image 611. Figure 6 Example (f) is illustrated by adjusting the hue of tree 3111 in image 311 according to 100% of the hue of tree 3111 in image 611. Figure 6 The migration level adjustment bar 643 shown in (f) can be used to indicate the hue migration level corresponding to tree 3111. The prompt box 642 may include prompt information 2 (e.g., "Hue applied"). Additionally, the interface 640 may also include buttons for saving, previous, and next steps.
[0173] Or, such as Figure 6 As shown in (g), when displaying interface 620, if a user wants to adjust the tone of the tree 3111 in image 311 based on the tone of a local area in image 611, such as the tone of the cloud 6111, the user can click on any position of the cloud 6111. Figure 6 As shown in (h), after clicking cloud 6111, the user can click the add button 621. Furthermore, after detecting the click on cloud 6111, the electronic device can highlight cloud 6111.
[0174] like Figure 6 As shown in (i), after detecting a click on the add button 621, the electronic device can display an interface 650, which may include an image 311 and a prompt box 651. The prompt box 651 may include a prompt message (e.g., "Tone is being applied") and a close button.
[0175] For example, after detecting the operation of the add button 621, the electronic device can also automatically save the reference image (e.g., cloud 6111 in image 611) and / or the hue of the reference image as a hue template 652, and can set the name of the hue template 652 to hue DD by default, and can highlight the hue template 652 in the interface 650. For example, as Figure 6As shown in (i), the electronic device can highlight the reference image corresponding to tone template 652 and the name of tone template 652 behind the original image. It should be understood that after detecting the operation of the add button 621, the electronic device can also automatically save the reference image (e.g., image 611) and / or the tone of the reference image as a tone template.
[0176] In addition, after detecting the click of the add button 621, the electronic device can extract the hue of the cloud 6111 from the image 611 and adjust the hue of the tree 3111 in the image 311 according to the hue of the cloud 6111.
[0177] It should be noted that, in order to improve the display effect and enhance the user experience during the color tone adjustment process, the electronic device can display animated effects while adjusting the color tone of tree 3111 based on the color tone of cloud 6111. Figure 6 Animation is not shown in (i). For example, one or more light spots can be displayed in tree 3111, and the changes of each light spot can be displayed (such as the flashing of the light spot), or a flowing light curve can be displayed in tree 3111, which can spread outward from the center of tree 3111, and so on.
[0178] like Figure 6 As shown in (j), after adjusting the hue of tree 3111 according to the hue of cloud 6111, the electronic device can display interface 660. Interface 660 may include image 661, prompt box 662, and migration level adjustment bar 663. Image 661 is the image after adjusting the hue of tree 3111 in image 311 according to the hue of cloud 6111. Figure 6 Example (j) is given by adjusting the hue of tree 3111 in image 311 by 100% based on the hue of cloud 6111. Figure 6 The migration level adjustment bar 663 shown in (j) can be used to indicate the hue migration level corresponding to tree 3111. The prompt box 662 may include prompt information 2 (e.g., "Hue applied"). Additionally, the interface 660 may also include buttons for saving, previous, and next steps.
[0179] Please see Figure 7 and Figure 8 , Figure 7 and Figure 8 This illustration shows another schematic diagram of application scenario two provided in the embodiments of this application.
[0180] In other embodiments, when displaying interface 340, that is, when displaying interface 340 containing the inspiration recommendation control 341 and the extraction control 342, such as Figure 7As shown in (a), when a user wants to adjust the tone of image 311 based on the inspiration recommendation function, the user can click the inspiration recommendation control 341.
[0181] After detecting a click on the inspiration recommendation control 341, the electronic device can determine a color tone material that matches the image 311, and can designate the color tone material matching the image 311 as reference color tone material 1. Furthermore, the color tone of the image 311 can be adjusted based on reference color tone material 1. For example, Figure 7 As shown in (b), during the process of adjusting the hue of image 311 according to reference hue material 1, the electronic device can display interface 710, which may include image 311 and a prompt box 711. The prompt box 711 may include prompt message 1 (e.g., "Hue application") and a close button. The close button can be used to close the prompt box 711.
[0182] It should be understood that the above-described method of directly determining the color tone material matching image 311 as reference color tone material 1 after determining the color tone material matching image 311 to adjust the color tone of image 311 is merely an illustrative explanation and should not be construed as a limitation on the embodiments of this application. In the embodiments of this application, after determining the color tone material matching image 311 (for ease of understanding, it can be referred to as recommended color tone material 1 below), the electronic device can display recommended color tone material 1 in interface 340 for the user to confirm whether to adjust the color tone of image 311 according to recommended color tone material 1. For example, the electronic device can display a window in interface 340, which may include recommended color tone material 1, such as the image corresponding to recommended color tone material 1. The window may also include a confirmation button and a cancel button. The confirmation button can be used to confirm the adjustment of the color tone of image 311 according to recommended color tone material 1. The cancel button can be used to refuse the adjustment of the color tone of image 311 according to recommended color tone material 1. That is, when the user confirms the adjustment of the color tone of image 311 according to recommended color tone material 1, the user can click the confirmation button. After detecting a click on the "Confirm" button, the electronic device can designate the recommended color tone material 1 as the reference color tone material 1 and adjust the color tone of image 311 according to the reference color tone material 1. If the user does not wish to adjust the color tone of image 311 according to the recommended color tone material 1, the user can click the "Cancel" button. After detecting a click on the "Cancel" button, the electronic device may choose not to designate the recommended color tone material 1 as the reference color tone material 1, meaning it may not adjust the color tone of image 311 according to the recommended color tone material 1.
[0183] After clicking the cancel button, the electronic device can close the window displaying recommended color tone material 1. The user can then click the inspiration recommendation control 341 to obtain a new recommended color tone material 2. Recommended color tone material 2 may be different from recommended color tone material 1. That is, after detecting a click on the inspiration recommendation control 341, the electronic device can continue to determine the recommended color tone material 2 that matches image 311 and continue to display it for the user to confirm whether to adjust the color tone of image 311 according to the recommended color tone material 2. For example, the electronic device can display a window in interface 340, which may include the image corresponding to recommended color tone material 2, a confirm button, and a cancel button. When the user does not want to adjust the color tone of image 311 according to recommended color tone material 2, the user can click the cancel button. After clicking the cancel button, the electronic device can close the window displaying recommended color tone material 2. The user can then click the inspiration recommendation control 341 to obtain a new recommended color tone material 3. Recommended color tone material 3 may be different from recommended color tone material 2, and recommended color tone material 3 may also be different from recommended color tone material 1. That is, after detecting the click on the inspiration recommendation control 341, the electronic device can continue to determine the recommended color tone material 3 that matches the image 311, and continue to display the recommended color tone material 3 for the user to confirm whether to adjust the color tone of the image 311 according to the recommended color tone material 3.
[0184] It should be noted that the embodiments of this application do not limit the specific method by which the electronic device determines the recommended tone material matching image 311, and can be determined according to the actual scenario. For example, the electronic device may include multiple candidate images. The electronic device can determine the similarity between image 311 and each candidate image (e.g., at least one of semantic similarity, color similarity, or brightness similarity), and can determine the candidate image 1 that is most similar to image 311 based on the similarity, so as to determine candidate image 1 and / or the tone corresponding to candidate image 1 as recommended tone material 1. For example, after determining candidate image 1, candidate image 1 can be determined as recommended tone material 1. If the tone of image 311 is adjusted according to recommended tone material 1, the electronic device can extract the tone corresponding to recommended tone material 1 (i.e., candidate image 1), and adjust the tone of image 311 according to the tone corresponding to recommended tone material 1. For example, the electronic device can extract and save the tone corresponding to each candidate image in advance. After determining candidate image 1, the electronic device can determine the tone corresponding to candidate image 1 as recommended tone material 1. If the color tone of image 311 is adjusted according to the recommended color tone material 1, the electronic device can directly adjust the color tone of image 311 according to the color tone corresponding to the recommended color tone material 1. It should be understood that the alternative images may include one or more preset images, and / or may include one or more reference images selected by the user.
[0185] If the user refuses to adjust the tone of image 311 according to recommended tone material 1 and continues to click the inspiration recommendation control 341, the electronic device can continue to determine alternative image 2 based on similarity, and can determine alternative image 2 and / or the tone corresponding to alternative image 2 as recommended tone material 2. The similarity between alternative image 2 and image 311 can be lower than the similarity between alternative image 1 and image 311, but higher than the similarity between other alternative images and image 311. Similarly, if the user refuses to adjust the tone of image 311 according to recommended tone material 2 and continues to click the inspiration recommendation control 341, the electronic device can continue to determine alternative image 3 based on similarity, and determine alternative image 3 and / or the tone corresponding to alternative image 3 as recommended tone material 3. The similarity between alternative image 3 and image 311 can be lower than the similarity between alternative image 2 and image 311, but higher than the similarity between other alternative images (excluding alternative image 1) and image 311.
[0186] The following example illustrates how, after determining the color tone material that matches image 311, the color tone material that matches image 311 is directly selected as the reference color tone material.
[0187] It should be understood that, in order to improve the display effect and enhance the user experience during the color tone adjustment process, the electronic device may display animation effects while adjusting the color tone of image 311 based on reference color tone material 1. Figure 7 Animation display is not shown in (b) of the image. The specific method of animation display can be determined according to the actual scene, and this application embodiment does not limit it. For example, one or more light spots can be displayed in the image 311, and the changes of each light spot can be displayed, or a flowing light curve can be displayed in the image 311, which can diffuse outward from the center of the image 311, and so on.
[0188] For example, after determining reference color tone material 1 based on the inspiration recommendation function, to help users understand the reference color tone material 1 recommended by the inspiration recommendation function, such as... Figure 7 As shown in (b), the electronic device can display the reference image corresponding to the reference tone material 1 in the inspiration recommendation control 341.
[0189] like Figure 7As shown in (c), after adjusting the tone of image 311 according to reference tone material 1, the electronic device can display interface 720. Interface 720 includes image 721 and prompt box 722. Image 721 is the image obtained after adjusting the tone of image 311 according to reference tone material 1. For example, image 721 can be the image after adjusting the tone of image 311 to the tone corresponding to reference tone material 1. Prompt box 722 can include prompt information 2 (e.g., "Tone applied"). It should be understood that after displaying prompt box 722, the electronic device can automatically close prompt box 722 after a preset time interval of 1. Alternatively, prompt box 722 includes a close button. Figure 7 (not shown in (c)) The electronic device can close the prompt box after detecting that the close button in the prompt box 722 has been clicked. The interface 720 after closing the prompt box 722 can be as follows: Figure 7 As shown in (d) in the figure.
[0190] In one embodiment, when adjusting the hue of image 311 based on reference hue material 1, the electronic device can determine the degree of hue migration corresponding to image 311. This allows the electronic device to adjust the hue of image 311 based on the degree of hue migration corresponding to image 311 when adjusting the hue of image 311 based on reference hue material 1. It should be understood that the specific details of how the electronic device determines the degree of hue migration corresponding to image 311 when adjusting the hue of image 311 based on reference hue material 1 can refer to the aforementioned description of how the electronic device determines the degree of hue migration corresponding to image 311 when adjusting the hue of image 311 based on the hue of image 351. For example, the electronic device can determine the degree of hue migration corresponding to image 311 based on the similarity between the reference image corresponding to reference hue material 1 and image 311. Furthermore, the specific details of how the electronic device adjusts the hue of image 311 based on the degree of hue migration corresponding to image 311 when adjusting the hue of image 311 based on reference hue material 1 can refer to the aforementioned description of how the electronic device adjusts the hue of image 311 based on the degree of hue migration corresponding to image 311 when adjusting the hue of image 311 based on the hue of image 351, and will not be repeated here.
[0191] For example, such as Figure 7 (c) and Figure 7 As shown in (d) above, interface 720 may also include a migration level adjustment bar 723. The migration level adjustment bar 723 can be used to adjust the degree of tonal migration. Specifically, when image 721 is displayed in interface 720, the electronic device can display the migration level adjustment bar 723 according to the tonal migration level corresponding to image 721. The tonal migration level indicated by the migration level adjustment bar 723 corresponds to the tonal migration level corresponding to image 721. It should be understood that... Figure 7 (c) and Figure 7 (d) in the example is taken as an example where the tone shift of image 721 is 100%.
[0192] Furthermore, after adjusting the tone of image 311 based on reference tone material 1, the electronic device can adjust the tone migration level of image 721 based on operations of the migration level adjustment bar 723. For example, the electronic device can increase the tone migration level of image 721 by sliding the slider in the migration level adjustment bar 723 to the right. For example, the electronic device can decrease the tone migration level of image 721 by sliding the slider in the migration level adjustment bar 723 to the left.
[0193] It should be understood that the specific content of the electronic device adjusting the tone migration level of image 721 based on the operation of the slider in the migration level adjustment bar 723 can be referred to the relevant description of the electronic device adjusting the tone migration level of image 381 based on the operation of the slider in the migration level adjustment bar 383, which will not be repeated here.
[0194] In another embodiment, after adjusting the tone of image 311 based on reference tone material 1, the electronic device can also adjust the tone shift degree of a local area of image 721 based on user operations. The specific details of the electronic device adjusting the tone shift degree of a local area of image 721 based on user operations can be found in the aforementioned description of the electronic device adjusting the tone shift degree of a local area of image 381 based on user operations, and will not be repeated here. For example, after adjusting the tone of image 311 based on reference tone material 1, i.e., when image 721 and the shift degree adjustment bar 723 are displayed on interface 720, when the user wants to adjust the tone shift degree of a local area of image 721, the user can click on that local area and then slide the slider in the shift degree adjustment bar 723 to adjust the tone shift degree of that local area.
[0195] In one embodiment, when adjusting the tone of image 311 using the inspiration recommendation function, the user can choose to adjust the tone of a specific area of image 311. For example, when displaying interface 340, if the user wants to adjust the tone of a specific area of image 311, such as when the user wants to adjust the tone of tree 3111 in image 311, ... Figure 7 As shown in (e), the user can click on any location in tree 3111. Figure 7As shown in (f), after clicking tree 3111, the user can click the inspiration recommendation control 341. Upon detecting both the click on tree 3111 and the click on inspiration recommendation control 341, the electronic device can determine that the user wants to adjust the color tone of tree 3111 in image 311. Furthermore, after detecting the click on tree 3111, the electronic device can identify the local area corresponding to tree 3111 and highlight that local area.
[0196] After detecting a click on the inspiration recommendation control 341, the electronic device can determine a color tone material that matches the image 311, and can designate this matching color tone material as reference color tone material 2. Alternatively, the electronic device can determine a color tone material that matches the tree 3111 in the image 311, and can designate this matching color tone material as reference color tone material 2. After determining reference color tone material 2, the electronic device can adjust the color tone of the tree 3111 in the image 311 based on reference color tone material 2. For example, as... Figure 7 As shown in (g), during the process of adjusting the hue of tree 3111 according to reference hue material 2, the electronic device can display interface 730, which may include image 311 and prompt box 731. Prompt box 731 may include prompt message 1 (e.g., "Hue application") and a close button. The close button can be used to close prompt box 731.
[0197] It should be noted that, in order to improve the display effect and enhance the user experience during the color tone adjustment process, the electronic device can display animation effects while adjusting the color tone of tree 3111 based on reference color tone material 2. Figure 7 Animation display is not shown in (g) of the diagram. For example, one or more light spots can be displayed in tree 3111, and the changes of each light spot can be displayed, or a flowing light curve can be displayed in tree 3111, which can diffuse outward from the center of tree 3111, and so on.
[0198] For example, after determining reference color tone material 2 based on the inspiration recommendation function, to help users understand the reference color tone material 2 recommended by the inspiration recommendation function, such as... Figure 7 As shown in (g), the electronic device can display the reference image corresponding to the reference tone material 2 in the inspiration recommendation control 341.
[0199] like Figure 7As shown in (h), after adjusting the tone of tree 3111 in image 311 according to reference tone material 2, the electronic device can display interface 740. Interface 740 includes image 741 and prompt box 742. Image 741 is the image obtained after adjusting the tone of tree 3111 in image 311 according to reference tone material 2. For example, image 741 can be the image after adjusting the tone of tree 3111 in image 311 to the tone corresponding to reference tone material 2. Prompt box 742 can include prompt information 2 (e.g., "Tone applied"). After displaying prompt box 742, the electronic device can automatically close prompt box 742 after a preset time interval of 1. Alternatively, prompt box 742 includes a close button. Figure 7 (not shown in (h)) The electronic device can close the prompt box 742 after detecting that the close button in the prompt box 742 has been clicked. The interface 740 after closing the prompt box 742 can be as follows: Figure 7 As shown in (i) in the diagram.
[0200] In addition, such as Figure 7 (h) and Figure 7 As shown in (i), interface 740 may also include a migration level adjustment bar 743. The migration level adjustment bar 743 can be used to adjust the degree of tonal migration. The tonal migration level indicated by the migration level adjustment bar 743 corresponds to the tonal migration level of image 741. It should be understood that... Figure 7 (h) and Figure 7 (i) is illustrated by taking the image 741 with a tone shift of 100% as an example.
[0201] In one embodiment, after adjusting the tone of image 311 based on a reference tone image recommended by the inspiration recommendation function, for example, after adjusting the tone of image 311 based on reference tone image 1, for example, after obtaining... Figure 7 Image 721 shown in (d) or obtained Figure 7 Following image 741 shown in (i), if the user is dissatisfied with the tone of image 721 or image 741, the user can continue to click the inspiration recommendation control 341 to re-recommend reference tone materials through the inspiration recommendation function to adjust the tone of image 721 or image 741. The following will use image 721 as an example for illustrative explanation.
[0202] like Figure 8 As shown in (a), after obtaining image 721, if the user is not satisfied with the tone of image 721, the user can continue to click the inspiration recommendation control 341 to re-recommend reference tone materials through the inspiration recommendation function to adjust the tone of image 721.
[0203] After detecting a click on the inspiration recommendation control 341, the electronic device can further determine the color tone material matching the image 721, and can designate the color tone material matching the image 721 as reference color tone material 3. Furthermore, the color tone of the image 721 can be adjusted based on the reference color tone material 3. For example, Figure 8 As shown in (b), during the process of adjusting the hue of image 721 according to reference hue material 3, the electronic device can display interface 810, which may include image 721 and a prompt box 811. The prompt box 811 may include a prompt message 1 (e.g., "Hue application") and a close button. The close button can be used to close the prompt box 811.
[0204] In addition, such as Figure 8 As shown in (b), after determining the reference color material 3, the electronic device can update the reference image displayed by the inspiration recommendation control 341 based on the reference color material 3. For example, the electronic device can display the reference image corresponding to the reference color material 3 in the inspiration recommendation control 341.
[0205] like Figure 8 As shown in (c), after adjusting the tone of image 721 according to reference tone material 3, the electronic device can display interface 820. Interface 820 includes image 821, which is the image obtained after adjusting the tone of image 721 according to reference tone material 3. For example, image 821 can be an image after adjusting the tone of image 721 to the tone corresponding to reference tone material 3. After adjusting the tone of image 721 according to reference tone material 3, the electronic device can also display a prompt box on interface 820. The prompt box can include prompt information 2 (e.g., "Tone applied"). Figure 8 The prompt box containing prompt message 2 is not shown in (c) of the diagram.
[0206] For example, when adjusting the tone of image 721 according to reference tone material 3, the electronic device can determine the degree of tone shift corresponding to image 721. Therefore, when adjusting the tone of image 721 according to reference tone material 3, the electronic device can adjust the tone of image 721 according to the degree of tone shift corresponding to image 721 to obtain image 821. When displaying image 821 on interface 820, the electronic device can display a tone shift adjustment bar 822 according to the degree of tone shift corresponding to image 821. The degree of tone shift indicated by the tone shift adjustment bar 822 corresponds to the degree of tone shift corresponding to image 821. It should be understood that... Figure 8 Example (c) is given by taking the image 821 with a tone shift of 100% as an example.
[0207] In one embodiment, when the inspiration recommendation control 341 displays a reference image corresponding to a certain reference tone material, for example, ... Figure 8 As shown in (c), when the reference image corresponding to the reference color material 3 is displayed in the inspiration recommendation control 341, if the user wants to save the reference color material 3 so that the color tone of the image can be quickly adjusted according to the reference color material 3 later, the user can long press the inspiration recommendation control 341.
[0208] It should be understood that "long press" on the inspiration recommendation control 341 can mean that the duration of touching the inspiration recommendation control 341 is greater than or equal to a preset duration of 2. The preset duration of 2 can be determined according to the actual scenario, and this embodiment does not limit it. For example, the preset duration of 2 can be determined to be any duration such as 2 seconds, 3 seconds, or 4 seconds, depending on the actual scenario.
[0209] like Figure 8 As shown in (d) above, after detecting a long press operation on the inspiration recommendation control 341, the electronic device can display a save control 823 on the interface 820. For example, the electronic device can display the save control 823 near the inspiration recommendation control 341 to facilitate user operation of the save control 823 to save the reference tone material 3. Alternatively, the electronic device can display the save control 823 above the inspiration recommendation control 341. The save control 823 can be used to save the reference tone material 3 corresponding to the reference image displayed in the inspiration recommendation control 341.
[0210] It should be noted that the display of the save control 823 above the inspiration recommendation control 341 is merely illustrative and should not be construed as a limitation on the embodiments of this application. In this embodiment, the electronic device can display the save control 823 at any location on the interface 820. Furthermore, the description above of the electronic device displaying the save control 823 on the interface 820 after detecting a long press on the inspiration recommendation control 341, and saving the reference color material 3 based on the click operation on the save control 823, is merely illustrative and should not be construed as a limitation on the embodiments of this application. In this embodiment, after detecting a long press on the inspiration recommendation control 341, the electronic device can also directly save the reference color material 3 as a color template.
[0211] When a user wants to save reference color material 3, such as Figure 8As shown in (d), the user can click the save control 823. After detecting the click operation of the save control 823, the electronic device can save the reference tone material 3 as a tone template 824, so that the user can directly select the tone template 824 to quickly adjust the tone of the image. For example, when saving the reference tone material 3 as a tone template 824, the electronic device determines the name of the tone template 824 by default, or the user can customize the name of the tone template 824. The following will illustrate the example of the user customizing the name of the tone template 824.
[0212] For example, such as Figure 8 As shown in (e), after detecting a click on the save control 823, the electronic device can display window 825 in interface 820. Window 825 may include a title (e.g., a name), an input box, an OK button, and a Cancel button. The input box can be used for the user to enter a name for the color template 824. The OK button can be used to confirm the name. The Cancel button can be used to cancel the name. Figure 8 As shown in (e), after the user completes the naming of the tone template 824, for example, after entering tone EE in the input box, the user can click the OK button. After detecting the click of the OK button, the electronic device can save the reference tone material 3 as tone template 824 and determine the name of tone template 824 as tone EE.
[0213] like Figure 8 As shown in (f), after the reference tone material 3 is saved as tone template 824, in order to make it easier for users to understand the saved tone template 824, the electronic device can highlight the tone template 824 in the interface 820. For example, the reference image corresponding to tone template 824 and the name of tone template 824 can be highlighted behind the original image.
[0214] In some embodiments, after saving a color template, the user can manage the color template, such as renaming or deleting it. For example, ... Figures 3 to 6 As shown, after saving the user-selected reference image and / or the hue of the reference image as a hue template, or as... Figure 8 As shown, after saving the reference color tone material corresponding to the reference image displayed by the inspiration recommendation control 341 as a color tone template, the electronic device can display the color tone template on the interface. When displaying the color tone template, the electronic device can rename or delete the color tone template based on relevant user operations.
[0215] Please see Figure 9 , Figure 9This illustration shows another schematic diagram of application scenario two provided by the embodiments of this application. This schematic diagram will be illustrated by taking the example of displaying the tone template 824 in the interface 820 after saving the reference tone material 3 as tone template 824.
[0216] like Figure 9 As shown in (a), after saving the color template 824, when the electronic device displays the color template 824 on the interface 820, it can also display a prompt box 910. The prompt box 910 can include a prompt message 3 and a close button. The prompt message 3 can be used to prompt the user to manage the color template 824 through relevant operations, for example, the prompt message 3 can include long press to manage. The close button can be used to close the prompt box 910. After the prompt box 910 is displayed on the interface 820, the electronic device can close the prompt box 910 after detecting the operation of clicking the close button in the prompt box 910. Alternatively, after the prompt box 910 is displayed on the interface 820, the electronic device can automatically close the prompt box 910 at a preset time interval of 3. Alternatively, after the prompt box 910 is displayed on the interface 820, the electronic device can close the prompt box 910 based on the user's click operation on any position in the interface 820, and so on. The preset time interval 3 can be determined according to the actual scenario, and this embodiment does not limit it. For example, the preset duration 3 can be determined to be any duration such as 1 second, 2 seconds, or 3 seconds, depending on the actual scenario. The following example illustrates how, after the electronic device detects the click of the close button in the prompt box 910 after displaying the prompt box 910 in the interface 820, it closes the prompt box 910.
[0217] It should be noted that the specific position of the prompt box 910 in the interface 820 can be determined according to the actual scenario, and this application embodiment does not impose any restrictions on this. For example, to help users understand that the prompt box 910 is used to prompt users to manage the color template 824, the electronic device can display the prompt box 910 near the color template 824. For example, the electronic device can display the prompt box 910 above the color template 824, or it can display the prompt box 910 below the color template 824, and so on. Figure 9 Example (a) is illustrated by displaying a tooltip 910 above a color swatch 824.
[0218] like Figure 9 As shown in (a), after displaying the prompt 910, the user can click the close button in the prompt 910.
[0219] like Figure 9 As shown in (b), after detecting an action of clicking the close button in the prompt box 910, the electronic device closes the prompt box 910.
[0220] like Figure 9 As shown in (b), when the color template 824 is displayed in the interface 820, the user can long press the color template 824 if they want to rename or delete it.
[0221] like Figure 9 As shown in (c), after detecting a long press operation on tone template 824, the electronic device can display an operation box 920 in interface 820. Operation box 920 may include a rename control and a delete control. When the user wants to rename tone template 824, the user can click the rename control in operation box 920.
[0222] It should be noted that the specific position of the operation box 920 within the interface 820 can be determined according to the actual scenario, and this embodiment does not impose any limitations on this. For example, to facilitate user understanding that the color template 824 is being managed, the electronic device can display the operation box 920 near the color template 824. For instance, the electronic device can display the operation box 920 above the color template 824, or it can display the operation box 920 below the color template 824, and so on. Figure 9 Example (c) is illustrated by displaying an operation box 920 above a color swatch 824.
[0223] like Figure 9 As shown in (d), after detecting a click on the rename control in the operation box 920, the electronic device can display a window 930 on the interface 820. The window 930 may include a title (e.g., rename), an input box, an OK button, and a Cancel button. The input box allows the user to re-enter a name for the color template 824. The OK button confirms the renaming. The Cancel button cancels the renaming. The user can enter a new name for the color template 824 through the input box, for example, entering color FF, and then click the OK button in window 930 after entering color FF.
[0224] like Figure 9 As shown in (e), after detecting the operation of clicking the OK button in window 930, the electronic device can change the name of the hue template 824 to hue FF.
[0225] like Figure 9 As shown in (e), after renaming the color template 824 to Color FF, when the user wants to delete the color template 824, the user can long press the color template 824.
[0226] like Figure 9As shown in (f), after detecting a long press operation on tone template 824, the electronic device can display an operation box 920 in interface 820. Operation box 920 may include a rename control and a delete control. When the user wants to delete tone template 824, the user can click the delete control in operation box 920.
[0227] like Figure 9 As shown in (g), after detecting an operation to delete a control in the click operation box 920, the electronic device can delete the tone template 824. After deleting the tone template 824, the electronic device may not display the reference image corresponding to the tone template 824 or the name of the tone template 824 on the interface 820.
[0228] In other embodiments, when the electronic device has tone templates, after detecting an operation that clicks the button 331 corresponding to the tone migration function, the electronic device can display the inspiration recommendation control 341 and the extraction control 342, as well as the tone template. When displaying the tone template, the user can directly select a tone template to adjust the tone of image 311 or a specific area of image 311 based on the selected tone template. That is, when the electronic device has tone templates—for example, when one or more tone templates are preset in the electronic device, and / or after saving tone templates based on user-related operations—after detecting an operation that clicks the button 331 corresponding to the tone migration function, the electronic device can display the inspiration recommendation control 341 and the extraction control 342 on the interface, and can also display the tone template. This allows the user to directly select a tone template to quickly adjust the tone of an image or a specific area of an image based on the tone corresponding to that tone template. This not only enables the reuse of tone but also improves the efficiency of image tone adjustment and enhances the user experience.
[0229] For example, when an electronic device has multiple color templates, when displaying color templates, if the interface cannot fully display all color templates, the electronic device can display some color templates on the interface, and can display other color templates on the interface based on relevant user operations (such as swiping operations).
[0230] It should be noted that when displaying color templates, the electronic device can determine the display order of the color templates and display them on the interface according to this order. Specifically, color templates displayed earlier in the order can be displayed on the interface earlier and closer to the first control (e.g., extraction control 342). Color templates displayed later in the order can be displayed later and farther from the first control (e.g., extraction control 342).
[0231] It should be understood that the display order of the color templates can be determined according to the specific actual scenario, and this application embodiment does not impose any restrictions on this.
[0232] For example, an electronic device can determine the display order of tone templates based on their storage time. For instance, the closer a tone template's storage time is to the current moment, the earlier it can be displayed. Conversely, the further back in time a tone template's storage time is from the current moment, the later it can be displayed. For example, the current moment could refer to the moment the button corresponding to the tone shift function is clicked.
[0233] For example, an electronic device can determine the display order of a tone template based on the similarity between the tone template and the image currently displayed on the interface (e.g., at least one of semantic similarity, color similarity, or brightness similarity). For instance, the more similar a tone template is to the image currently displayed on the interface, the earlier the tone template can be displayed; conversely, the less similar a tone template is to the image currently displayed on the interface, the later the tone template can be displayed.
[0234] For example, an electronic device can determine the display order of a color tone template based on its usage frequency. For instance, the higher the usage frequency of a color tone template, the earlier it can be displayed; conversely, the lower the usage frequency, the later it can be displayed. The usage frequency of a color tone template can refer to the number of times a user has used that template to adjust the image's color tone while it is being displayed.
[0235] Please see Figure 10 , Figure 10 This illustration shows another schematic diagram of application scenario two provided by the embodiments of this application. The schematic diagram is illustrated by taking an electronic device having a color template 1, a color template 2, a color template 3, a color template 4 and a color template 5, wherein the name of color template 1 is color 1, the name of color template 2 is color 2, the name of color template 3 is color 3, the name of color template 4 is color 4 and the name of color template 5 is color 5 as an example.
[0236] It should be noted that tone template 1, tone template 2, tone template 3, tone template 4 and tone template 5 can be preset tone templates, or they can be tone templates saved based on relevant user operations (such as selecting a reference image to adjust the tone of an image, or saving reference tone materials recommended by the inspiration recommendation function), or some can be preset tone templates and others can be tone templates saved based on relevant user operations.
[0237] like Figure 10 As shown in (a), when a user views image 1011 through the gallery application, the electronic device can display the gallery application interface 1010 based on the user's clicks on the buttons corresponding to the editing function and the AI image editing function. Interface 1010 may include image 1011 and a button 1012 corresponding to the tone shift function. When the user wants to adjust the tone of image 1011, the user can click the button 1012 corresponding to the tone shift function. It should be understood that the specific content of the interface 1010 displayed by the electronic device based on the user's clicks on the buttons corresponding to the editing function and the AI image editing function can be referred to the foregoing. Figure 3 (a) to Figure 3 The relevant description of (c) in the text.
[0238] like Figure 10 As shown in (b), after detecting an operation that clicks the button 1012 corresponding to the tone shift function, the electronic device can display an interface 1020. The interface 1020 may include an image 1011, an inspiration recommendation control 1021, an extraction control 1022, a thumbnail (i.e., the original image) corresponding to image 1011, and multiple tone templates, such as tone template 1, tone template 2, and tone template 3. When the user wants to view other tone templates not displayed in the interface 1020, the user can swipe the tone template to the left.
[0239] like Figure 10 As shown in (c), after detecting a leftward swipe of a color template, the electronic device can display other color templates not currently displayed on interface 1020. For example, color templates 3, 4, and 5 can be displayed on interface 1020. When color templates 3, 4, and 5 are displayed on interface 1020, if the user wants to view color template 2, as shown in (c), the electronic device can display other color templates not currently displayed on interface 1020. Figure 10 As shown in (c), users can slide the color swatch to the right.
[0240] like Figure 10 As shown in (d), after detecting a rightward sliding of the tone template, the electronic device can display tone template 2 in interface 1020. For example, tone template 2, tone template 3, and tone template 4 can be displayed in interface 1020. When tone templates 2, 3, and 4 are displayed in interface 1020, if the user wants to adjust the tone of image 1011 according to tone template 2, the user can click on tone template 2. After detecting the click on tone template 2, the electronic device can adjust the tone of image 1011 according to the tone corresponding to tone template 2.
[0241] like Figure 10 As shown in (e), during the process of adjusting the hue of image 1011 according to the hue corresponding to hue template 2, in order to help users understand the hue adjustment process, the electronic device can display a prompt box 1023 in interface 1020. The prompt box 1023 may include prompt information 1 (e.g., "Hue application") and a close button.
[0242] like Figure 10 As shown in (f), after adjusting the hue of image 1011 according to the hue corresponding to hue template 2, the electronic device can display interface 1030. Interface 1030 may include image 1031, which is the image obtained after adjusting the hue of image 1011 according to the hue of hue template 2. For example, interface 1030 may also include a prompt box 1032, which may include prompt information 2 (e.g., "hue applied").
[0243] It should be noted that when adjusting the hue of image 1011 according to the hue corresponding to hue template 2, the electronic device can determine the degree of hue migration corresponding to image 1011, and adjust the hue of image 1011 according to the degree of hue migration corresponding to image 1011 and the hue corresponding to hue template 2 to obtain image 1031.
[0244] For example, the electronic device can determine the similarity between the reference image corresponding to tone template 2 and image 1011, such as at least one of semantic similarity, color similarity, or brightness similarity, and can determine the degree of tone migration corresponding to image 1011 based on the similarity. Specifically, the more similar image 1011 is to the reference image corresponding to tone template 2, the higher the degree of tone migration corresponding to image 1011 can be; conversely, the less similar image 1011 is to the reference image corresponding to tone template 2, the lower the degree of tone migration corresponding to image 1011 can be. It should be understood that the specific details of the electronic device determining the degree of tone migration corresponding to image 1011 based on the similarity between the reference image corresponding to tone template 2 and image 1011 can be found in the aforementioned description of the electronic device determining the degree of tone migration corresponding to image 311 when adjusting the tone of image 311 based on the tone of image 351.
[0245] It should be noted that when determining the degree of tone migration of an image based on the similarity between the reference image corresponding to the tone template and the image to be adjusted, the electronic device can determine different degrees of tone migration when adjusting the tone of different images based on the same tone template, so as to adjust the tone of different images according to different degrees of tone migration.
[0246] For example, the electronic device can determine the degree of tone migration corresponding to tone template 2, and can determine the degree of tone migration corresponding to image 1011 based on the degree of tone migration corresponding to tone template 2. The degree of tone migration corresponding to tone template 2 can be determined according to the actual scenario, and this embodiment does not limit this. For example, the electronic device can directly set the degree of tone migration corresponding to tone template 2 to a preset value (e.g., 50% or 60%), meaning that when adjusting the tone of different images according to tone template 2, the electronic device can adjust the tone of different images according to the degree of tone migration corresponding to tone template 2 (e.g., 50% or 60%). For example, the electronic device can determine the degree of tone migration corresponding to tone template 2 based on the degree of tone migration set by the user when saving tone template 2, meaning that when adjusting the tone of different images according to tone template 2, the electronic device can adjust the tone of different images according to the degree of tone migration set by the user. The degree of tone migration set by the user can refer to the final degree of tone migration selected by the user when adjusting the image according to tone template 2 after saving tone template 2 as a tone template. For example, an electronic device can determine the degree of tone migration corresponding to tone template 2 when adjusting the tone of an image for the next time, based on the degree of tone migration selected by the user when adjusting the tone of an image using tone template 2 last time.
[0247] like Figure 10 As shown in (f), after adjusting the tone of image 1011 according to the tone corresponding to tone template 2, the electronic device can display a tone shift adjustment bar 1033 in interface 1030. The tone shift level indicated by the tone shift adjustment bar 1033 corresponds to the tone shift level corresponding to image 1031. It should be understood that... Figure 10 In section (f), the example given is that the tone shift of image 1031 is 50%.
[0248] In one embodiment, when a color tone template is already displayed on the interface, after saving the color tone template based on relevant user operations—for example, operations related to adjusting the color tone of an image based on a user's selection of a reference image, or operations related to saving reference color tone materials recommended by the inspiration recommendation function—the electronic device can display the currently saved color tone template on the interface. When displaying the currently saved color tone template on the interface, the electronic device can insert the currently saved color tone template before other color tone templates to prioritize its display. For example, when displaying color tone templates after the original image, the electronic device can directly display the currently saved color tone template after the original image and before all other color tone templates, making it easier for users to understand the currently saved color tone template and improving the user experience.
[0249] In another embodiment, to facilitate quick selection of tone templates for adjusting image tones, the electronic device can set a default upper limit on the number of tone templates, or the user can customize this limit to prevent an excessive number of tone templates from hindering quick selection. After setting the upper limit, the electronic device can determine the number of saved tone templates when saving them. When the number of saved tone templates reaches the upper limit, the electronic device can display a prompt message 4 to inform the user that the upper limit has been reached, allowing the user to understand the saving status and improving the user experience.
[0250] It should be understood that the specific value of the upper limit of the quantity can be determined according to the actual scenario, and the embodiments of this application do not impose any restrictions on this. For example, the specific value of the upper limit of the quantity can be any value such as 8, 10, or 15, depending on the actual scenario.
[0251] Please see Figure 11 , Figure 11 This illustration shows another schematic diagram of application scenario two provided by the embodiments of this application. The schematic diagram is illustrated by taking an electronic device having a color template 1, a color template 2, a color template 3, a color template 4 and a color template 5, wherein the name of color template 1 is color 1, the name of color template 2 is color 2, the name of color template 3 is color 3, the name of color template 4 is color 4 and the name of color template 5 is color 5 as an example.
[0252] like Figure 11 As shown in (a), when a user views image 1111 through the gallery application, the electronic device can display the gallery application's interface 1110 based on the user's clicks on the buttons corresponding to the editing function, the AI retouching function, and the tone shifting function. Interface 1110 may include image 1111, an inspiration recommendation control 1112, an extraction control 1113, a thumbnail of image 1111 (i.e., the original image), and multiple tone templates, such as tone template 1, tone template 2, and tone template 3. The specific content of interface 1110 displayed by the electronic device based on the user's clicks on the buttons corresponding to the editing function, the AI retouching function, and the tone shifting function can be referred to the aforementioned... Figure 3 (a) to Figure 3 (c) in, and Figure 10 (a) to Figure 10 The relevant description is shown in (b) in the figure.
[0253] like Figure 11As shown in (a), when the user wants to adjust the tone of image 1111 through the Inspiration Recommendation function on the display interface 1110, the user can click the Inspiration Recommendation control 1112. After detecting the click on the Inspiration Recommendation control 1112, the electronic device can determine the tone material that matches image 1111, and determine the tone material that matches image 1111 as reference tone material 4, and can adjust the tone of image 1111 according to reference tone material 4.
[0254] like Figure 11 As shown in (b), during the process of adjusting the hue of image 1111 based on reference hue material 4, the electronic device can display interface 1120, which may include image 1111 and a prompt box 1121. The prompt box 1121 may include prompt message 1 (e.g., "Hue application") and a close button. Additionally, after determining reference hue material 4, the electronic device can display a reference image corresponding to reference hue material 4 in the inspiration recommendation control 1112.
[0255] like Figure 11 As shown in (c), after adjusting the tone of image 1111 according to reference tone material 4, the electronic device can display interface 1130. Interface 1130 may include image 1131 and a tone shift adjustment bar 1132. Image 1131 may be the image obtained after adjusting the tone of image 1111 according to reference tone material 4. The tone shift degree indicated by tone shift adjustment bar 1132 corresponds to the tone shift degree corresponding to image 1131. It should be understood that... Figure 11 (c) in the example uses an image 1131 with a 100% degree of tone shift. When the inspiration recommendation control 1112 displays the reference tone material 4, the user can long-press the inspiration recommendation control 1112 to save the reference tone material 4.
[0256] like Figure 11As shown in (d), after detecting a long press operation on the inspiration recommendation control 1112, the electronic device can display a save control 1133 in the interface 1130. For example, the electronic device can display the save control 1133 above the inspiration recommendation control 1112. After the save control 1133 is displayed in the interface 1130, the user can click on the save control 1133. After detecting the click operation on the save control 1133, the electronic device can save the reference tone material 4 as a tone template 1134, so that the user can directly select the tone template 1134 to quickly adjust the tone of the image. For example, when saving the reference tone material 4 as the tone template 1134, the electronic device determines the name of the tone template 1134 by default, or the user can customize the name of the tone template 1134. The following example illustrates this by setting the name of the tone template 1134 to tone 6 by default.
[0257] like Figure 11 As shown in (e), after saving the reference tone material 4 as tone template 1134, to facilitate user understanding of the saved tone template 1134, the electronic device can highlight the tone template 1134 in the interface 1130. For example, it can directly highlight the reference image corresponding to tone template 1134 and the name of tone template 1134 behind the original image, allowing users to quickly understand the currently saved tone template and improving the user experience. Figure 11 As shown in (e), in interface 1130, the original image, tone template 1134 (i.e., tone template named tone 6), tone template 1 (i.e., tone template named tone 1), and tone template 2 (i.e., tone template named tone 2) can be displayed sequentially after the extraction control 1113.
[0258] like Figure 11 As shown in (f), after saving the tone template 1134, when the electronic device determines that the number of tone templates has reached the upper limit, the electronic device can display a prompt box 1135. The prompt box 1135 can include prompt information 4, for example, prompt information 4 can be "The number of tone templates has reached the upper limit".
[0259] In some embodiments, when using the tone shift function, the electronic device can determine whether it is the first time using the tone shift function. If it is determined that it is the first time using the tone shift function, the electronic device can display operation prompts corresponding to the tone shift function on the interface to explain the tone shift function, making it easier for users to quickly understand how to use the tone shift function, reducing the difficulty of tone shifting operations, improving the efficiency of tone shifting, and enhancing the user experience.
[0260] In one embodiment, after detecting a click on the Inspiration Recommendation control 341, the electronic device can determine whether it is the first time the Inspiration Recommendation function has been used. If it is determined to be the first time, the electronic device can first display operation prompt 1 on the interface 340 to explain the Inspiration Recommendation function, facilitating a quick understanding of its use by the user, reducing the difficulty of tone transfer operations, improving tone transfer efficiency, and enhancing the user experience. If it is determined that it is not the first time the Inspiration Recommendation function has been used, the electronic device can directly identify a tone material matching the image 311 and designate it as a reference tone material, adjusting the tone of the image 311 based on the reference tone material. The specific method by which the electronic device determines whether it is the first time the Inspiration Recommendation function has been used can be determined according to the actual scenario, and this embodiment does not limit this.
[0261] For example, operation prompt 1 may include one or more prompting steps. When operation prompt 1 includes multiple prompting steps, the electronic device can automatically display each prompting step of operation prompt 1 when displaying operation prompt 1. For example, the electronic device can first display the first prompting step of operation prompt 1. After displaying the first prompting step of operation prompt 1, the electronic device can automatically display the second prompting step of operation prompt 1 at a preset time interval of 4. After displaying the second prompting step of operation prompt 1, the electronic device can automatically display the third prompting step of operation prompt 1 at a preset time interval of 3, and so on, until the last prompting step of operation prompt 1 is displayed. The preset time interval 4 can be determined according to the actual scenario, and this embodiment of the application does not limit it. For example, the preset time interval 4 can be any length such as 3 seconds, 5 seconds, or 10 seconds, depending on the actual scenario.
[0262] For example, when operation prompt 1 includes multiple prompting steps, the electronic device can display each prompting step of operation prompt 1 based on the user's relevant actions. For instance, the electronic device can first display the first prompting step of operation prompt 1. When displaying the first prompting step of operation prompt 1, the user can perform a left swipe to view the next prompting step of operation prompt 1, i.e., the second prompting step of operation prompt 1. When displaying the second prompting step of operation prompt 1, the user can perform a right swipe to view the previous prompting step of operation prompt 1, i.e., the first prompting step of operation prompt 1, or can perform a left swipe to view the next prompting step of operation prompt 1, i.e., the third prompting step of operation prompt 1, and so on.
[0263] The following example illustrates how an electronic device displays operation prompts 1 based on the user's left or right swipe gesture.
[0264] Please see Figure 12 , Figure 12 A schematic diagram of the display operation prompt 1 provided in an embodiment of this application is shown. The schematic diagram illustrates the electronic device displaying an interface 340 after detecting the operation of the button 331 corresponding to the tone shift function. The interface 340 includes an image 311, an inspiration recommendation control 341, and an extraction control 342.
[0265] like Figure 12 As shown in (a), when the electronic device displays interface 340, the user can click the Inspiration Recommendation control 341. After detecting the click on the Inspiration Recommendation control 341, the electronic device can determine whether it is the first time the Inspiration Recommendation function has been used.
[0266] like Figure 12 As shown in (b), when the inspiration recommendation function is used for the first time, the electronic device can display window 1210 in interface 340, and can display the first prompt step of operation prompt 1 in window 1210. Operation prompt 1 may include a title (e.g., "Tone Transfer"), prompt information 5 (e.g., "Click inspiration recommendation to automatically match the best color scheme. You can also click "+" to transfer tones from other images"), sample image 1211, sample control 1212 corresponding to inspiration recommendation control 341, progress indicator control 1213, and confirmation button 1214 (e.g., ... Figure 12 (e.g., "Got it" shown in (b)). The progress indicator control 1213 can be used to indicate the display progress of operation prompt 1. The first prompt step of operation prompt 1 can be used to prompt the user to click the inspiration recommendation control 341 to use the inspiration recommendation function. For example, the electronic device can display the operation of clicking the example control 1212 corresponding to the inspiration recommendation control 341 in window 1210 to prompt the user that they can use the inspiration recommendation function by clicking the inspiration recommendation control 341.
[0267] After displaying the first step of Operation Prompt 1 in window 1210, when the user wants to view the next step of Operation Prompt 1, i.e., when the user wants to view the second step of Operation Prompt 1, such as... Figure 12 As shown in (c), the user can perform a swipe-left operation in window 1210.
[0268] After detecting a leftward swipe, the electronic device can display the second prompt step of operation prompt 1 in window 1210. For example... Figure 12 As shown in (d) in the example, the second prompt step of operation prompt 1 can be to display a reference image example in the example control 1212. The reference image example can be a color tone material recommended by the inspiration recommendation function.
[0269] After displaying the reference image example in example control 1212, when the user wants to view the next prompt step of operation prompt 1, that is, when the user wants to view the third prompt step of operation prompt 1, such as... Figure 12 As shown in (d) in the diagram, the user can continue to perform the leftward swipe operation in window 1210.
[0270] When the reference image example is displayed in example control 1212, after detecting a leftward swipe operation, the electronic device can display the third prompt step of operation prompt 1 in window 1210. For example... Figure 12 As shown in (e), the third prompting step of operation prompt 1 may be to display a halo 1215 around the example control 1212 to indicate that a hue application is in progress. That is, the third prompting step of operation prompt 1 may be used to indicate that the hue of the example image 1211 is being adjusted according to the hue of the reference image example.
[0271] After displaying a halo 1215 around example control 1212, when the user wants to continue viewing the next example step of operation prompt 1, that is, when the user wants to view the fourth prompt step of operation prompt 1, such as... Figure 12 As shown in (e), the user can continue to perform the leftward swipe operation in window 1210.
[0272] When a halo 1215 is displayed around the example control 1212, after a leftward swipe operation is detected, the electronic device can display the fourth prompt step of operation prompt 1 in window 1210. For example... Figure 12 As shown in (f), the fourth prompt step of operation prompt 1 may be to display a color-adjusted sample image 1216 in window 1210. The sample image 1216 may be an image whose color tone has been adjusted based on the color tone of the reference image example displayed in sample control 1212.
[0273] like Figure 12 As shown in (f), after the user understands the inspiration recommendation function, the user can click the confirmation button 1214, for example, click "OK". After detecting the "OK" click, the electronic device can close window 1210, that is, display as shown in (f). Figure 12 Interface 340 is shown in (a) of the diagram.
[0274] In another embodiment, after detecting a click on the extraction control 342, the electronic device can determine whether it is the first time the extraction function has been used. If it is determined to be the first time, the electronic device can first display operation prompt 2 on the interface 340 to explain the extraction function, facilitating a quick understanding of its use by the user, reducing the difficulty of tone transfer operations, improving tone transfer efficiency, and enhancing the user experience. If it is determined that it is not the first time the extraction function has been used, the electronic device can directly display an interface containing one or more candidate images for the user to select a reference image. The specific method by which the electronic device determines whether it is the first time the extraction function has been used can be determined according to the actual scenario, and this embodiment does not impose any limitations on this.
[0275] Similarly, operation prompt 2 may include a title (e.g., "Tone Transfer"), prompt information 6 (e.g., "Click on the inspiration recommendation to automatically match the best color scheme. You can also click on "+" to transfer tones from other images"), sample image, sample control corresponding to extraction control 342, progress indicator control, and confirmation button (e.g., "OK"), etc.
[0276] For example, operation prompt 2 may include one or more prompting steps. When operation prompt 2 includes multiple prompting steps, the electronic device can automatically display each prompting step of operation prompt 2 when displaying operation prompt 2. For example, the electronic device can first display the first prompting step of operation prompt 2. After displaying the first prompting step of operation prompt 2, the electronic device can automatically display the second prompting step of operation prompt 2 at a preset time interval of 5. After displaying the second prompting step of operation prompt 2, the electronic device can automatically display the third prompting step of operation prompt 2 at a preset time interval of 5, and so on, until the last prompting step of operation prompt 2 is displayed. The preset time interval of 5 can be determined according to the actual scenario, and this embodiment of the application does not limit it. For example, the preset time interval of 5 can be any length such as 3 seconds, 5 seconds, or 10 seconds, depending on the actual scenario.
[0277] For example, when operation prompt 2 includes multiple prompting steps, the electronic device can display each prompting step of operation prompt 2 based on the user's relevant actions. For instance, the electronic device can first display the first prompting step of operation prompt 2. When displaying the first prompting step of operation prompt 2, the user can perform a left swipe to view the next prompting step of operation prompt 2, i.e., the second prompting step of operation prompt 2. When displaying the second prompting step of operation prompt 2, the user can perform a right swipe to view the previous prompting step of operation prompt 2, i.e., the first prompting step of operation prompt 2, or they can perform a left swipe to view the next prompting step of operation prompt 2, i.e., the third prompting step of operation prompt 2, and so on.
[0278] It should be noted that the specific display process of operation prompt 2 can be referred to the display process of operation prompt 1, and will not be repeated here.
[0279] It should be understood that the above-described actions—such as the electronic device determining whether it is the first time using the inspiration recommendation function after detecting a click on the inspiration recommendation control 341, and displaying operation prompt 1 upon first use of the inspiration recommendation function; and the electronic device determining whether it is the first time using the extraction function after detecting a click on the extraction control 342, and displaying operation prompt 2 upon first use of the extraction function—are merely illustrative and should not be construed as limiting the embodiments of this application. In this embodiment, the electronic device may also determine whether it is the first time using the tone shift function after detecting a click on the button 331 corresponding to the tone shift function, and display operation prompt 1 and operation prompt 2 upon determining that it is the first time using the tone shift function. For example, the electronic device may first display the steps of operation prompt 1. After displaying the steps of operation prompt 1, the electronic device may then display the steps of operation prompt 2. Alternatively, the electronic device may first display the steps of operation prompt 2. After displaying the steps of operation prompt 2, the electronic device may then display the steps of operation prompt 1.
[0280] In some embodiments, the tone shifting feature of the gallery application can support cross-device applications. That is, for electronic devices A and B that support tone shifting, the tone of an image in electronic device A can be applied to an image in electronic device B, or the tone of an image in electronic device B can be applied to an image in electronic device A, thus achieving cross-device tone shifting and improving the user experience.
[0281] For example, when a user wants to apply the color tone of an image from electronic device A to an image from electronic device B, the user can activate the cross-device color tone transfer function on both electronic devices A and B. It should be understood that this application embodiment does not limit the specific method of activating the cross-device color tone transfer function, and can determine it according to the actual scenario. For example, electronic device A may have a function switch corresponding to the cross-device color tone transfer function, and the user can activate the cross-device color tone transfer function of electronic device A through the function switch. Similarly, electronic device B may have a function switch corresponding to the cross-device color tone transfer function, and the user can activate the cross-device color tone transfer function of electronic device B through the function switch. Alternatively, electronic devices A and B can always have the cross-device color tone transfer function enabled by default.
[0282] In this scenario, after activating the cross-device tone transfer function on electronic device A, when a user views image 1 through the gallery application on electronic device A, if the user wants to adjust the tone of image 2 on electronic device B based on the tone of image 1, the user can perform a preset gesture 1 on image 1. After detecting the preset gesture 1, electronic device A can extract the tone of image 1 and save it, for example, by saving the tone of image 1 as lookup table (LUT) information.
[0283] After performing preset gesture 1 on image 1, the user can open image 2 in the gallery application of electronic device B and perform preset gesture 2 on image 2. After electronic device B detects preset gesture 2, it can obtain the color tone corresponding to image 1 from electronic device A, such as obtaining the LUT information corresponding to image 1. Based on the LUT information corresponding to image 1, it can apply the color tone of image 1 to image 2, realizing cross-device color tone transfer and improving the user experience.
[0284] It should be noted that preset gesture 1 and preset gesture 2 can be determined according to the actual scenario, and this application embodiment does not limit them. For example, preset gesture 1 can be determined as a gesture of grabbing twice in the air, and preset gesture 2 can be a gesture of releasing twice in the air, so as to achieve cross-device tone transfer without the user touching electronic device A and electronic device B, which can expand the application scenarios of tone transfer and improve the user experience.
[0285] In one embodiment, both electronic device A and electronic device B are equipped with a low-power swing camera and a low-power NPU. After electronic device A initiates the cross-device tone transfer function, electronic device A can capture the user's gestures using its swing camera and use the NPU to recognize the gesture image 1 captured by the swing camera to determine whether a preset gesture 1 has been detected, such as whether a double-grab gesture has been detected. Based on the NPU's detection results, electronic device A can determine whether to perform cross-device tone transfer, that is, whether to extract the tone of image 1.
[0286] Similarly, after electronic device B initiates the cross-device tone transfer function, electronic device B can capture the user's gestures using a swing camera and use the NPU to recognize the gesture image 2 captured by the swing camera to determine whether a preset gesture 2 has been detected, such as whether a double-release gesture has been detected. Based on the NPU's detection results, electronic device B can determine whether to perform cross-device tone transfer, that is, whether to adjust the tone of image 2 according to the tone of image 1.
[0287] Please see Figure 13 , Figure 13 This illustration shows another schematic diagram of application scenario two provided in the embodiments of this application. The schematic diagram is illustrated by taking cross-device tone migration between electronic device 1300 and electronic device 1400 as an example, and both electronic device 1300 and electronic device 1400 have enabled the cross-device tone migration function.
[0288] like Figure 13 As shown in (a), when a user views image 1311 through the gallery application of electronic device 1300, electronic device 1300 can display the interface 1310 corresponding to the gallery application, which may include image 1311. Additionally, interface 1310 may also include buttons for editing, sharing, favorites, deleting, viewing more, and thumbnails of images in the gallery application.
[0289] When image 1311 is displayed on interface 1310 of electronic device 1300, if a user wants to adjust the hue of a certain image in electronic device 1400 based on the hue of image 1311, the user can perform a preset gesture 1 on image 1311, such as performing a double-grab gesture on image 1311. After detecting the preset gesture 1, electronic device 1300 can extract the hue of image 1311 and save the hue of image 1311 as LUT information.
[0290] like Figure 13As shown in (b), the user can view image 1411 through the gallery application of electronic device 1400. That is, electronic device 1400 can display the interface 1410 corresponding to the gallery application, and interface 1410 can include image 1411. In addition, interface 1410 may also include buttons for editing, sharing, favorites, deletion, and viewing more, as well as thumbnails of images in the gallery application.
[0291] like Figure 13 As shown in (b), when image 1411 is displayed in interface 1410, when the user wants to apply the hue of image 1311 to image 1411, after performing preset gesture 1 on image 1311, the user can perform preset gesture 2 on image 1411, for example, the user can perform a gesture of releasing twice on image 1411.
[0292] After detecting the preset gesture 2, the electronic device 1400 can obtain the hue of the image 1311 from the electronic device 1300, such as obtaining the LUT information corresponding to the image 1311, and can adjust the hue of the image 1411 according to the LUT information corresponding to the image 1311 so as to apply the hue of the image 1311 to the image 1411.
[0293] like Figure 13 As shown in (c), during the process of adjusting the tone of image 1411 based on the tone of image 1311, to facilitate user understanding of the tone adjustment process, electronic device 1400 can display a prompt box 1412 in interface 1410. The prompt box 1412 may include a prompt message 1 and a close button. The prompt message 1 can be used to indicate that tone adjustment is in progress. For example, prompt message 1 may include "Tone adjustment in progress". The close button can be used to close the prompt box 1412.
[0294] In addition, to improve the display effect and enhance the user experience during the color tone adjustment process, the electronic device can display animated effects while adjusting the color tone of image 1411 based on the color tone of image 1311. Figure 13 Animation display is not shown in (c) of the image. It should be understood that the specific method of animation display can be determined according to the actual scene, and the embodiments of this application do not limit it. For example, one or more light spots can be displayed in image 1411, and the changes of each light spot can be displayed (such as the flashing of the light spot), or a flowing light curve can be displayed in image 1411, which can diffuse outward from the center of image 1411, and so on.
[0295] like Figure 13As shown in (d), after adjusting the hue of image 1411 according to the hue of image 1311, electronic device 1400 can display interface 1420, which may include image 1421 and prompt box 1422. Image 1421 is the image obtained after adjusting the hue of image 1411 according to the hue of image 1311. Prompt box 1422 may include prompt message 2 (e.g., "Hue applied") to inform the user that the hue adjustment has been completed. In addition, interface 1420 may also include a thumbnail corresponding to image 1421 and thumbnails of other images in the gallery application.
[0296] Please see Figure 14 , Figure 14 This diagram illustrates an application scenario three provided by an embodiment of this application. Application scenario three will be exemplified by the image processing method provided by this application embodiment being built into a camera application. Specifically, in application scenario three, the image processing method provided by this application embodiment can be an optional function provided by the camera application, such as a personalized color chart function or an AI filter function. The following explanation uses the AI filter function as an example. That is, when taking a picture through the camera application, the user can adjust the tone of the preview image using the AI filter function.
[0297] like Figure 14 As shown in (a), after launching the camera application, the electronic device can display a preview interface 1430 corresponding to the camera application, and can display a preview image 1431 and a button 1432 corresponding to the AI filter function in the preview interface 1430. When the user wants to adjust the tone of the preview image 1431, the user can click the button 1432 corresponding to the AI filter function. In addition, the preview interface 1410 can also display shooting modes such as flash, night scene, portrait, photo, video, professional, and more, a thumbnail of the last captured image, and other shooting functions (such as resizing or flash).
[0298] like Figure 14As shown in (b), after detecting a click on button 1432 corresponding to the AI filter function, the electronic device can display window 1433. Window 1433 may include a tone template (or tone migration card, exemplified below), a close button 1434, and an add button 1435 corresponding to the tone migration card. The close button 1434 can be used to close window 1433. The add button 1435 corresponding to the tone migration card can be used to add a tone template. The tone templates displayed in window 1433 can be characterized by their names; that is, window 1433 can display the names of each tone template. In addition, for each tone template, window 1433 may also include tone information corresponding to that tone template, such as the value corresponding to color temperature, the value corresponding to saturation, and the value corresponding to light and shadow. It should be understood that the display of tone information such as the value corresponding to color temperature, the value corresponding to saturation, and the value corresponding to light and shadow in window 1433 is only an illustrative explanation and should not be construed as a limitation on the embodiments of this application. In this embodiment of the application, when displaying the hue template in window 1433, the hue information corresponding to the hue template may not be displayed, or other hue information corresponding to the hue template may be displayed, such as the numerical value corresponding to the hue, the numerical value corresponding to the saturation, and the numerical value corresponding to the brightness.
[0299] For example, the tone template displayed in window 1433 may include one or more of the following: a tone template preset in the electronic device, a tone template saved in the gallery application, and a tone template added in the camera application. Suppose that the electronic device has preset tone template 1 (e.g., named Nature), tone template 2 (e.g., named Film), tone template 3 (e.g., named Cinema), and tone template 4 (e.g., named Anime), and the user saves tone template 5 (e.g., named Tone AA) through the gallery application. Figure 14 As shown in (b), window 1433 may display tone template 1 (e.g., natural) and tone information corresponding to tone template 1 (e.g., N160810), tone template 2 (e.g., film) and tone information corresponding to tone template 2 (e.g., F010105), tone template 3 (e.g., movie) and tone information corresponding to tone template 3 (e.g., C170806), tone template 4 (e.g., animation) and tone information corresponding to tone template 4 (e.g., A120605), and tone template 5 (e.g., tone AA) and tone information corresponding to tone template 5 (e.g., S081007).
[0300] It should be noted that after detecting a click on button 1432 corresponding to the AI filter function, the electronic device can also display window 1436, which can display the tone information corresponding to the currently used tone template. Assuming the currently used tone template is tone template 1 (i.e., Natural), as shown... Figure 14 As shown in (b), the electronic device can display the color temperature (e.g., 16), saturation (e.g., 08), and lighting (e.g., 10) corresponding to the hue template 1 in window 1436. Additionally, window 1436 also displays other operation buttons, such as return, refresh, and view more.
[0301] Users can select a desired color tone template in window 1433 to adjust the color tone of the preview image 1431. For example, as Figure 14 As shown in (c), when a user wants to adjust the tone of the preview image 1431 according to the tone of tone template 3 (i.e., the movie), the user can click on tone template 3 in window 1433. Figure 14 As shown in (d), after detecting the operation of clicking the hue template 3, the electronic device can adjust the hue of the preview image 1431 according to the hue of the hue template 3. That is, the hue of the preview image 1431 displayed in the preview interface 1430 is the hue adjusted according to the hue of the hue template 3.
[0302] In one embodiment, such as Figure 14 As shown in (e), when a user wants to add a color template, the user can click the add button 1435 corresponding to the color migration card.
[0303] like Figure 14 As shown in (f), after detecting an action of clicking the add button 1435 corresponding to the tone migration card, the electronic device can display interface 1440, which may include one or more candidate images. Additionally, interface 1440 may include a search box, allowing the user to search for images and quickly select a desired reference image. The candidate images displayed in interface 1440 can be thumbnails of candidate images. The candidate images displayed in interface 1440 may include images from a gallery application and / or preset images. The user can select a reference image in interface 1440, i.e., select an image with the desired tone. For example, as... Figure 14 As shown in (f), when the image with the desired color tone is image 1441, the user can click on image 1441.
[0304] like Figure 14 As shown in (g), after detecting a click on image 1441, the electronic device can display interface 1450, which may include image 1441 presented as a large image and add button 1451. When the user wants to save the tone of image 1441 as a tone template, the user can click add button 1451.
[0305] After detecting a click on the "Add" button 1451, the electronic device can extract the hue of image 1441 and save it as hue template 6. When saving the hue of image 1441 as hue template 6, the electronic device can set a default name for hue template 6, for example, it can set the default name for hue template 6 to "hue GG". Figure 14 As shown in (h), after detecting the click of the add button 1451, the electronic device can return to the preview interface 1430 containing window 1433, and can display the name of the tone template 6 and the tone information corresponding to the tone template 6 (e.g., M080507) in window 1433. Here, 08 can be the color temperature value, 05 can be the saturation value, and 07 can be the light and shadow value.
[0306] like Figure 14 As shown in (h), when a user wants to adjust the hue of the preview image 1431 based on the hue of hue template 6 (i.e., the added hue GG), the user can click on hue template 6 in window 1433. Figure 14 As shown in (i), after detecting an operation to click on tone template 6, the electronic device can adjust the tone of the preview image 1431 according to the tone of tone template 6. That is, after detecting an operation to click on tone template 6, the electronic device can close window 1433 to fully display the preview interface 1430, and the tone of the preview image 1431 displayed in the preview interface 1430 is the tone adjusted according to the tone of tone template 6.
[0307] In another embodiment, after extracting the hue of image 1441, the electronic device can directly adjust the hue of preview image 1431 based on the hue of image 1441. Additionally, after extracting the hue of image 1441, the electronic device can save image 1441 and / or the hue of image 1441 as a hue template 6. That is, when the user wants to select a reference image to adjust the hue of the preview image based on the hue of the reference image, such as... Figure 14 As shown in (e), users can click the Add button 1435 corresponding to the tone migration card. Figure 14 As shown in (f), after detecting an action of clicking the add button 1435 corresponding to the tone migration card, the electronic device can display interface 1440, which may include one or more candidate images. When the image for which the user wants the tone is image 1441, the user can click on image 1441. Figure 14As shown in (g), after detecting a click on image 1441, the electronic device can display interface 1450, which may include image 1441 presented as a large image and an add button 1451. The user can click the add button 1451. After detecting a click on the add button 1451, the electronic device can extract the hue of image 1441 and adjust the hue of preview image 1431 based on the hue of image 1441. For example, as... Figure 14 As shown in (i), after detecting the click of the add button 1451, the electronic device can close window 1433 to fully display the preview interface 1430, and the hue of the preview image 1431 displayed in the preview interface 1430 is the hue adjusted according to the hue of image 1441. Additionally, after extracting the hue of image 1441, the electronic device can save image 1441 and / or the hue of image 1441 as a hue template 6. When saving image 1441 and / or the hue of image 1441 as hue template 6, the electronic device can set the name of hue template 6 by default, for example, the name of hue template 6 can be set to hue GG by default. After the user clicks the button 1432 corresponding to the AI filter function again, as... Figure 14 As shown in (h), the electronic device can display window 1433, which may include color template 6.
[0308] For example, a tone template saved in a camera application can be applied to a gallery application. For instance, after saving tone template 6, when the tone migration function is activated in the gallery application, such as when the user clicks the button corresponding to the tone migration function, the electronic device can display inspiration recommendation controls, extraction controls, and tone templates in the gallery application's interface. The tone template in the gallery application can include tone template 6.
[0309] It should be noted that after adjusting the hue of the preview image 1431 according to the hue template selected by the user, that is, after the preview image 1431 displayed in the preview interface 1430 has the hue corresponding to the hue template, the electronic device can save the preview image with the hue corresponding to the hue template as the captured image after the user performs the shooting operation. That is, when the user views the captured image through the gallery application, the hue of the captured image can be the hue corresponding to the hue template.
[0310] Similarly, after adjusting the hue of the preview image 1431 according to the reference image selected by the user, that is, after the preview image 1431 displayed in the preview interface 1430 has the hue corresponding to the reference image, the electronic device can save the preview image with the hue corresponding to the reference image as the captured image after the user performs the shooting operation. That is, when the user views the captured image through the gallery application, the hue of the captured image can be the hue corresponding to the reference image.
[0311] The image processing method provided in the embodiments of this application will be described below in conjunction with the above application scenarios.
[0312] Please see Figure 15 , Figure 15 A second schematic diagram illustrates the software architecture to which the image processing method provided in this application is applicable.
[0313] like Figure 15 As shown, the software architecture of an electronic device can include a gallery application, a camera application, a media library, a creative framework, and an image framework. The gallery and camera applications are used for user interaction. The media library is used to manage various images. The creative framework provides interfaces for tone-shifting effects (e.g., AI filter effects interfaces) and AI filter color-tracking algorithms. The image framework stores tonal information of images.
[0314] For example, a gallery application may include a basic business module, an enhanced business module, a gallery editing module, an AI filter module, a gallery data base, and a system API. The basic business module can provide features such as photo page functionality, album page functionality, and large image page functionality. The large image page functionality can provide large image previews. The enhanced business module can provide features such as categorized album functionality, time-based functionality, and search functionality. The gallery editing module can provide functions such as cropping, adjustment, filters, and AI retouching. The AI retouching function can provide functions such as magic removal and tone shifting. The AI filter module can provide functions such as generating / deleting and using. The generating function can be used to generate tone templates. The deleting function can be used to delete tone templates. The using function can be used to apply tone templates. The gallery data base can provide media data caching, event notifications, and album data. Media data caching and album data can be obtained from the media library. The system API can provide AI filter effector interfaces and swing capabilities. Swing capabilities can be used for swing awareness, such as for recognizing preset gestures.
[0315] For example, a camera application may include a product layer, a features layer, and a common layer. The product layer may be used to provide a top bar, preview area, adjustment area, mode area, and bottom bar. The features layer may be used to provide shooting modes, portrait mode, AI filter modes, and mode parameters. The common layer may be used to provide feature management, mode mapping, camera services, and communication.
[0316] For example, a media library may include a MediaLibraryService. The MediaLibraryService is primarily responsible for managing and providing a unified access interface for media files (such as images, videos, and audio) on electronic devices. Specifically, the MediaLibraryService can provide query functionality, allowing users to retrieve relevant image data from a database.
[0317] The creation framework can include an interface layer, an image processing layer, and an algorithm layer. The interface layer can include effects factory management components and effects interfaces, such as an AI filter effects interface. The algorithm layer can include an AI filter color-tracking algorithm. Gallery and camera applications can call the AI filter effects interface of the creation framework to invoke the AI filter color-tracking algorithm. This algorithm applies the hue corresponding to the reference hue material to image 1, which requires hue adjustment. Image 1, containing the hue information of the reference image, can be encoded into the image frame, for example, by using a high-efficiency image file format (HEIF) to save its hue information within the image frame.
[0318] For example, when a user views Image 1 through the Gallery app (i.e., during a large-scale preview of Image 1), the user can click the tone shift function in the Gallery editing module and select a reference image. After selecting a reference image, the AI filter module can retrieve the corresponding data from the Gallery data base and call the AI filter effects interface in the Gallery app based on that data. After calling the AI filter effects interface in the Gallery app, it can call the effects interface in the creation framework (e.g., the AI filter effects interface) to invoke the AI filter color tracking algorithm, obtain the tone information of the reference image, and adjust the tone of Image 1 accordingly. Furthermore, after obtaining the tone information of the reference image, the AI filter module can also generate a tone template based on the reference image and / or its tone information. Additionally, during the large-scale preview of Image 1 in the Gallery app, the AI filter module can also obtain the editing data for Image 1. After obtaining the tone information of the reference image, the AI filter module can write the tone information of the reference image into Image 1 to update the editing data of Image 1, and can encode Image 1 into the image frame.
[0319] For example, when a user views image 1 through the Gallery app, specifically during a large-scale preview of image 1, the user can apply the color tone of a reference image to image 1 using a preset gesture. That is, if the preset gesture is detected during the large-scale preview of image 1, an event notification can be sent to the Gallery Database. Based on this event notification, the Gallery Database can call the Swing Ability interface, which in turn calls the effects interface of the Creation Framework. This, in turn, uses the effects interface of the Creation Framework to invoke an AI filter color-tracking algorithm to obtain the color tone information of the reference image and adjust the color tone of image 1.
[0320] For example, when a user previews an image through a camera app, that is, when the camera app displays the preview image, after the user selects a certain tone template or a certain reference image, that is, after triggering the AI filter mode, the camera app can call the effects interface of the choreography framework, and through the effects interface of the choreography framework, call the AI filter color tracking algorithm to obtain the tone information of the tone template or the reference image, so as to adjust the tone of the preview image.
[0321] It should be noted that the tone shifting function, AI filter module, and AI filter effector interface in the gallery application, the AI filter mode in the camera application, and the effector interface and AI filter color tracking algorithm in the creation framework can be new functions or modules added based on the image processing method provided in the embodiments of this application. Furthermore, the large image preview, event notifications, and swing ability in the gallery application, the top bar, preview area, mode area, shooting mode, portrait mode, mode parameters, feature management, camera services and communication in the camera application, and HEIF encoding in the image framework can be modifications of existing functions or modules to enable the gallery application to display and apply tone shifting functions, or to enable the camera application to display and apply tone templates.
[0322] The image processing method provided in this application embodiment will be described below with reference to the software architecture described above. Please refer to... Figure 16 , Figure 16 A schematic flowchart of an image processing method provided in an embodiment of this application is shown. This schematic flowchart is illustrated by taking the example of a user selecting a reference image for tone adjustment.
[0323] like Figure 16 As shown, the image processing method may include: S10, trigger tone shift.
[0324] It should be understood that when a user views image 1 through the gallery app, the user can click the button corresponding to the editing function. After clicking the editing function button, the gallery app interface will display the button corresponding to the AI retouching function, which the user can click. After clicking the AI retouching function button, the gallery app interface will display the button corresponding to the tone shift function, which the user can click to trigger tone shifting.
[0325] S11, Display extraction control After triggering the tone shift, i.e., after clicking the button corresponding to the tone shift function, the gallery editing module in the gallery application will display an extraction control in the gallery application interface. Users can click the extraction control to select a reference image.
[0326] S12. Display the reference image.
[0327] It should be understood that after clicking the extract control, the media library and picture frames can display one or more candidate images in the gallery application's interface. These candidate images can be displayed as thumbnails. After displaying the candidate images, the user can select a reference image with the desired color tone from the candidate images. After the user selects a reference image, the media library and picture frames can display the reference image. An add button can also be displayed while the reference image is being displayed. The user can click the add button to confirm transferring the color tone of the reference image to image 1.
[0328] S13, Read the editing data of image 1.
[0329] S14, Return to edit data.
[0330] After detecting a click on the "Add" button, the AI Filters module in the Gallery app can read the editing data for Image 1, for example, by requesting it from the Media Library. The Media Library can retrieve the editing data for Image 1 from its database and return it to the AI Filters module. This editing data may include the pixel map corresponding to Image 1, as well as tags such as faces or objects within Image 1.
[0331] S15. Extract the color tone from the reference image.
[0332] S16, Return to hue information.
[0333] It should be understood that when determining to adjust the hue of Image 1 based on the hue of a reference image, for example after detecting a click on the "Add" button, the AI filter module can extract the hue from the reference image. For instance, the AI filter module can obtain a reference image from a media library and pass it to the choreography framework to extract its hue. After obtaining the reference image, the choreography framework can call the AI filter color-tracking algorithm through the effects interface to obtain the hue information of the reference image, such as the LUT information corresponding to the reference image. After obtaining the hue information of the reference image, the choreography framework can return the hue information of the reference image to the AI filter module. For example, when extracting the hue of the reference image, the corresponding pixel map and labels such as faces or objects in the reference image can also be extracted.
[0334] S17. Write tone information to image 1.
[0335] After obtaining the tonal information of the reference image, the AI filter module can write the tonal information of the reference image into Image 1 to adjust the tonal hue of Image 1. For example, the AI filter module can send the tonal information of the reference image to the image frame. After obtaining the tonal information of the reference image, the image frame can write the tonal information of the reference image into Image 1.
[0336] S18. Create a thumbnail of the reference image and save the thumbnail to the gallery sandbox.
[0337] It should be understood that when a user selects a reference image to adjust the tone of Image 1, the AI filter module can create a thumbnail of the reference image and save the thumbnail to the gallery sandbox, such as to the database within the gallery sandbox. This means the tone of the reference image can be saved as a tone template, allowing the user to subsequently adjust the image's tone by selecting the template. However, if a thumbnail of the reference image has already been created by extracting the tone during a previous large-image preview, the AI filter module does not need to create a new thumbnail; it can simply add a gallery editing association flag to link the thumbnail.
[0338] Please see Figure 17 , Figure 17 This illustration shows a diagram illustrating data sharing between a gallery application and a camera application provided in an embodiment of this application.
[0339] like Figure 17As shown, after saving data such as thumbnails of reference images to the database in the gallery sandbox, the gallery app can act as a data provider and, through the DataShareExtensionAbility, share data from the gallery sandbox database to shared memory, such as sharing a ResultSet in shared memory, to achieve data sharing between the gallery app and other applications (such as the camera app). Specifically, the camera app can access the data in shared memory through the DataShareHelper. For example, the camera app's large image component can use the DataShareHelper to retrieve color templates saved by the gallery app and display the retrieved data (such as color templates saved by the gallery app) in the camera app, allowing users to use color templates saved in the gallery app within the camera app.
[0340] In addition, the camera app and the gallery app can perform inter-process communication (IPC). When the camera app and the gallery app communicate via IPC, the camera app can add, delete, modify, or view data such as tone templates stored in the gallery sandbox.
[0341] S19. Update the edit data of image 1.
[0342] S20, Return the updated results.
[0343] S21, Return: Creation successful.
[0344] After adjusting the tone of Image 1 based on the tone information of the reference image, the AI filter module can update the editing data of Image 1. For example, the AI filter module can send the tone-adjusted editing data corresponding to Image 1 to the media library. After obtaining the adjusted editing data corresponding to Image 1, the media library can update the editing data of Image 1 in the media library. For example, the media library can update the images (photos) table, modify the zzk_id field, and update the large image file corresponding to Image 1, etc. After the update is complete, the media library can send the update result to the AI filter module. After determining that the editing data of Image 1 has been successfully updated based on the update result, the AI filter module can return a tone migration success message to the image library editing module. After receiving the tone migration success message returned by the AI filter module, the image library editing module can display the tone-adjusted Image 1 to the user.
[0345] Please see Figure 18 , Figure 18 A schematic flowchart of the image processing method provided in an embodiment of this application is shown in Figure 2. Figure 18 As shown, the image processing method may include: S1801, The electronic device displays a first interface; the first interface includes a first image and a first control, the first image including a first target and a second target.
[0346] S1802, In response to a first operation on the first control, the electronic device displays a second interface; the second interface includes a second image, which is obtained by adjusting the tone of the first image based on a reference tone material, and the tone shift degree of the first target in the second image is different from the tone shift degree of the second target.
[0347] For example, hue may include one or more of saturation, hue, lightness, and contrast. The degree of hue migration of the first target in the second image differing from that of the second target includes one or more of the following: the degree of saturation migration of the first target differs from that of the second target; the degree of hue migration of the first target differs from that of the second target; the degree of lightness migration of the first target differs from that of the second target; and the degree of contrast migration of the first target differs from that of the second target.
[0348] For example, when adjusting the tone of a first image based on reference tone material, the electronic device can perform semantic analysis on the first image to determine the semantic regions corresponding to the first image. Additionally, the electronic device can also perform semantic analysis on a reference image corresponding to the reference tone material to determine the reference semantic regions corresponding to the reference tone material. For each semantic region of the first image, the electronic device can determine a reference semantic region corresponding to that semantic region and adjust the tone of that semantic region based on the tone corresponding to the reference semantic region. This allows for tone adjustment of each semantic region of the first image based on semantic information, improving the accuracy of tone adjustment and enhancing the user experience. It should be understood that semantic regions may include regions corresponding to various subjects in the image and / or regions corresponding to various background elements (e.g., sky, grass, or beach).
[0349] It should be understood that the specific details of how the electronic device adjusts the tone of each semantic region of the first image based on semantic information can be found in the aforementioned... Figure 2A The electronic device shown adjusts the hues of clouds and trees in image 220, or adjusts the hues of the sun, people, and signs in image 230, based on reference image 240, or may refer to the aforementioned description. Figure 2B The electronic device shown adjusts the tones of people, clouds, and trees in image 250 according to reference image 240 or reference image 260.
[0350] In some embodiments, the image processing method can be applied to a gallery application, such as a tone shifting function within the gallery application. The first interface and the second interface can be the interfaces of the gallery application. For example, the first interface can be... Figure 3 The interface shown is 340. Figure 10 The interface shown is 1020 or Figure 11 The interface shown is 1110, etc. The second interface can be... Figure 3 The interface shown is 380. Figure 10 The interface shown is 1030 or Figure 11 The interface shown is 1130, etc.
[0351] It should be noted that the specific content of the first interface displayed on the electronic device can be referred to the aforementioned... Figure 3 The description of the display interface 340 shown will not be repeated here. For example, when an electronic device displays an image in a gallery application, the electronic device can display interface 1 (e.g., based on the click operation of the button corresponding to the editing function) based on the click operation of the button. Figure 3 The interface shown (320) includes a button corresponding to the AI image editing function. Subsequently, the electronic device can display a third interface based on the click operation of the button corresponding to the AI image editing function; the third interface may include a first image and a second control, where the second control is used to trigger the electronic device to adjust the tone of the first image. For example, the third interface could be... Figure 3 In the interface 330 shown, the second control can be a button 331 corresponding to the tone shift function. When displaying the third interface, the electronic device can display the first interface based on the click operation of the second control.
[0352] In one embodiment, the first control may include an extraction control, which allows a user to select a reference image by clicking, and adjust the tone of the first image based on the tone of the reference image. That is, after detecting a first operation on the first control, the electronic device may display a fourth interface; the fourth interface may include at least one candidate image. When displaying the fourth interface, the electronic device may, based on the selection operation on the third image in the fourth interface, determine the third image and / or its tone as a reference tone material, and adjust the tone of the first image accordingly.
[0353] It should be noted that the specific details of how the electronic device adjusts the tone of the first image based on the tone of the reference image selected by the user can be found in the aforementioned [reference]. Figure 3 The electronic device shown describes how the user selects image 351 to adjust the hue of image 311 according to the hue of image 351.
[0354] In another embodiment, when adjusting the tone of the first image by selecting the tone of a reference image, the user can select a target in the reference image to adjust the tone of the first image based on the tone of that target. That is, when displaying the third image, the electronic device can determine the third target corresponding to the third operation based on the third operation on the third image, and determine the third target and / or the tone of the third target as reference tone material to adjust the tone of the first image.
[0355] It should be understood that the specific details of how the electronic device adjusts the tone of the first image based on the tone of a target in the reference image can be referred to the foregoing. Figure 5 The electronic device shown adjusts the hue of image 311 according to the hue of cloud 3511.
[0356] For example, after determining a reference image and / or its hue, or a specific target within the reference image and / or the hue of a specific target within the reference image, as reference hue material, the electronic device can save the reference hue material as a first hue template. This allows users to conveniently reuse the hue of the reference image or the hue of a specific target within the reference image, improving the user experience. After saving the reference hue material as the first hue template, the electronic device can display the first hue template on a first interface and / or a second interface, allowing users to easily understand the currently saved hue template. It should be understood that the specific content of the first hue template displayed by the electronic device on the first interface and / or the second interface can be referred to the foregoing. Figure 3 or Figure 5 The electronic device shown displays a description related to hue AA or hue BB.
[0357] In another embodiment, the first control may include an inspiration recommendation control, which allows the user to adjust the tone of the first image by clicking. For example, upon detecting a first operation on the first control, the electronic device determines a fourth image based on the first image and may use the fourth image and / or its tone as a reference tone image to adjust the tone of the first image accordingly. Furthermore, when the fourth image and / or its tone is determined as the reference tone image, the electronic device may also display the fourth image in the first control, allowing the user to easily understand the currently recommended tone and improving the user experience.
[0358] It should be noted that the specific details of how the electronic device adjusts the tone of the first image based on the user's click on the inspiration recommendation control can be found in the aforementioned section. Figure 7 Related descriptions.
[0359] For example, when displaying the fourth image in the first control, the electronic device can save the fourth image and / or its color tone as a second color tone template based on the user's operation on the first control. This allows the user to easily reuse the color tone of the fourth image later, improving the user experience. After saving the fourth image and / or its color tone as the second color tone template, the electronic device can display the second color tone template in the first and / or second interfaces, allowing the user to easily understand the currently saved color tone template. It should be understood that the specific content of the electronic device saving the fourth image and / or its color tone as the second color tone template and displaying the second color tone template in the first and / or second interfaces can be referred to the foregoing. Figure 8 and Figure 9 The description of the saved hue EE is shown below.
[0360] In one embodiment, when adjusting the tone of a first image based on reference tone material, such as a reference image or tone material recommended by inspiration, the electronic device can determine a first similarity between the image corresponding to the reference tone material and the first image, and can determine a first tone migration degree based on the first similarity, thereby adjusting the tone of the first image based on the reference tone material and the first tone migration degree. The specific details of how the electronic device determines the first tone migration degree based on the first similarity can be found in the aforementioned description of determining the tone migration degree corresponding to image 311.
[0361] For example, after adjusting the tone of the first image to obtain the second image, the electronic device may also display an adjustment bar when displaying the second image on the second interface. When the adjustment bar is displayed, the electronic device can adjust the tone of the second image based on a sliding operation on the adjustment bar.
[0362] For example, when the adjustment bar is displayed, the user can adjust the hue of a target in the second image based on the adjustment bar. For instance, when the second image and the adjustment bar are displayed in the second interface, the electronic device can determine the fourth target corresponding to the fifth operation on the second image; the fourth target can be a portion of the target in the second image. Subsequently, the electronic device can adjust the hue of the fourth target based on a sliding operation on the adjustment bar.
[0363] It should be noted that the electronic device adjusts the overall tone of the second image and the specific tone of a target within the second image based on the sliding operation of the adjustment bar. For details, please refer to the aforementioned... Figure 4 The description of the hue of the adjusted image 381 and the hue of the tree 3811 in the adjusted image 381.
[0364] In one embodiment, the user can also choose to adjust the tone of a local target in the first image. For example, when displaying the first interface, the electronic device can determine the fifth target corresponding to the sixth operation on the first image; the fifth target is a partial target in the first image. Subsequently, the electronic device can obtain reference tone material based on the first operation on the first control, and adjust the tone of the fifth target according to the reference tone material to obtain the second image. For example, the user-selected reference image and / or the tone of the reference image can be determined as the reference tone material, or a target in the user-selected reference image and / or the tone of a target in the reference image can be determined as the reference tone material, or the tone material recommended by the inspiration recommendation can be determined as the reference tone material to adjust the tone of the fifth target.
[0365] It should be understood that the specific details of the electronic device adjusting the tone of the fifth target in the first image can be referred to the aforementioned... Figure 6 or Figure 7 The description of the hue of the adjustment tree 3111 shown.
[0366] In another embodiment, when the electronic device has a color tone template, the first interface may further include at least one color tone template when it is displayed. After displaying at least one color tone template, the electronic device can adjust the color tone of the first image based on a selection operation of a third color tone template; the third color tone template is one of the at least one color tone template. The specific details of how the electronic device adjusts the color tone of the first image based on the selected color tone template can be found in the foregoing. Figure 10 The description shown is related to adjusting the hue of image 1011 according to hue 2.
[0367] For example, when adjusting the hue of a first image according to a third hue template, the electronic device can determine a second similarity between the image corresponding to the third hue template and the first image, and can determine the degree of second hue migration corresponding to the first image based on the second similarity, so as to adjust the hue of the first image according to the third hue template and the degree of second hue migration.
[0368] In one embodiment, after saving a color tone template, the user can manage the saved color tone template. The specific details of how the user manages the saved color tone template can be found in the foregoing. Figure 9 Related descriptions.
[0369] In another embodiment, the tone transfer function of the gallery application can support cross-device applications. That is, for electronic devices A and B that support tone transfer, the tone of an image on electronic device A can be applied to an image on electronic device B, or the tone of an image on electronic device B can be applied to an image on electronic device A, thereby achieving cross-device tone transfer, expanding the application scenarios of tone transfer, and improving the user experience. It should be understood that the specific details of cross-device tone transfer can be referred to the foregoing. Figure 13 Related descriptions.
[0370] In other embodiments, the image processing method can be applied to camera applications, such as AI filter functions within a camera application. The first interface and the second interface can be preview interfaces of the camera application. For example, the first interface can be... Figure 14 Interface 1430 is shown in (a) above. The second interface can be... Figure 14 Interface 1430 shown in (d) is, or is Figure 14 Interface 1430 is shown in (i) above. The first control can be... Figure 14 The button 1432 corresponding to the AI filter function shown in (a) is shown in the image.
[0371] In one embodiment, when the image processing method is applied to a camera application, after detecting a first operation on a first control, the electronic device can display a first window; the first window includes at least one tone template. Subsequently, the electronic device can obtain reference tone material based on a selection operation of a fourth tone template in the first window. The reference tone material may include the fourth tone template, and the tone of the first image can be adjusted according to the fourth tone template to obtain a second image. The first window can be... Figure 14 The window shown is 1433.
[0372] It should be understood that the specific details of how the electronic device adjusts the tone of the first image based on the user-selected fourth tone template can be referred to the aforementioned... Figure 14 The electronic device shown adjusts the hue of the first image based on the user's selection of hue template 3 (i.e., movie) or hue template 6 (i.e., hue GG).
[0373] For example, at least one color template in the first window may include a color template saved by the user in the gallery application.
[0374] In another embodiment, the first window may further include a fourth control, such as Figure 14The tonal migration card shown corresponds to the add button 1435. When the first window is displayed, the electronic device can display a sixth interface based on a click operation on the fourth control; the sixth interface includes at least one candidate image. Subsequently, the electronic device can acquire reference tonal material based on a selection operation in the sixth interface, where the reference tonal material may include a fifth image, to adjust the tonal value of the first image to obtain a second image. Additionally, the electronic device can save the fifth image and / or its tonal value as a tonal template.
[0375] It should be noted that the electronic device selects a reference image based on the user clicking the "Add" button in the first window, and adjusts the tone of the first image according to the tone of the reference image. The specific details of this adjustment can be found in the aforementioned... Figure 14 Middle (e) to Figure 14 The relevant description of (i) in the text will not be repeated here.
[0376] In one embodiment, after adjusting the tone of the preview image in the preview interface, the electronic device can save the tone-adjusted second image as the captured image when the user performs a shooting operation. That is, when the user views the captured image in the gallery application, the tone of the captured image is the tone adjusted based on the tone template or the tone of a reference image.
[0377] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0378] Corresponding to the image processing method described in the above embodiments, this application also provides an image processing apparatus, the various modules of which can correspondingly implement the various steps of the image processing method.
[0379] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0380] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0381] This application also provides an electronic device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, it causes the electronic device to perform the steps in any of the above-described method embodiments. Exemplarily, the structure of the electronic device can be as follows: Figure 1A As shown.
[0382] This application also provides a chip system, which includes a memory and a processor. The processor executes a computer program stored in the memory to implement the steps in any of the above method embodiments.
[0383] In some embodiments, the chip system may be a single chip or a chip module consisting of multiple chips. The chip system includes one or more processors.
[0384] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the steps in any of the above-described method embodiments.
[0385] This application provides a computer program product, which includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps in any of the above method embodiments.
[0386] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form. The computer-readable storage medium can include at least: any entity or device capable of carrying computer program code to a device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0387] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0388] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0389] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0390] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0391] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. An image processing method, characterized in that, The image processing method, applied to electronic devices, includes: The electronic device displays a first interface; the first interface includes a first image and a first control, the first image including a first target and a second target; In response to a first operation on the first control, the electronic device displays a second interface; the second interface includes a second image, which is obtained by adjusting the tone of the first image based on a reference tone material, wherein the tone shift of the first target in the second image is different from the tone shift of the second target.
2. The image processing method according to claim 1, characterized in that, The hue includes one or more of saturation, hue, brightness, and contrast; The degree of tone shift of the first target in the second image is different from the degree of tone shift of the second target, including one or more of the following: The degree of saturation migration of the first target is different from that of the second target; The degree of hue migration of the first target is different from that of the second target; The degree of brightness transfer of the first target is different from the degree of brightness transfer of the second target; The degree of contrast shift of the first target is different from that of the second target.
3. The image processing method according to any one of claims 1 to 2, characterized in that, Before the electronic device displays the first interface, the image processing method further includes: The electronic device displays a third interface; the third interface includes the first image and a second control, the second control being used to trigger the electronic device to adjust the tone of the first image; In response to a click on the second control, the electronic device displays the first interface.
4. The image processing method according to any one of claims 1 to 3, characterized in that, In response to a first operation on the first control, the electronic device displays a second interface, including: In response to a first operation on the first control, the electronic device displays a fourth interface; the fourth interface includes at least one candidate image. In response to a selection operation on the fourth interface, the electronic device displays the second interface; the reference tone material includes a third image, which is an image among the at least one candidate image, and the third image is the image selected by the selection operation.
5. The image processing method according to claim 4, characterized in that, In response to a selection operation on the fourth interface, the electronic device displays the second interface, including: In response to a selection operation on the fourth interface, the electronic device displays a fifth interface; the fifth interface includes the third image and the third control. In response to a second operation on the third control, the electronic device displays the second interface.
6. The image processing method according to claim 5, characterized in that, In response to a second operation on the third control, the electronic device displays the second interface, including: In response to a third operation on the third image, the electronic device determines a third target corresponding to the third operation; the third target is a portion of the target in the third image. In response to a second operation on the third control, the electronic device displays the second interface; the reference color material includes the third target.
7. The image processing method according to any one of claims 4 to 6, characterized in that, The image processing method further includes: The electronic device saves the reference color material as a first color template and displays the first color template in the first interface and / or the second interface.
8. The image processing method according to any one of claims 1 to 3, characterized in that, The reference color tone material includes the fourth image and / or the color tone corresponding to the fourth image, wherein the fourth image is an image recommended by the electronic device based on the first image.
9. The image processing method according to claim 8, characterized in that, The image processing method further includes: The electronic device displays the fourth image in the first control.
10. The image processing method according to claim 9, characterized in that, After the electronic device displays the fourth image in the first control, the image processing method further includes: In response to a fourth operation on the first control, the electronic device saves the reference tone material as a second tone template and displays the second tone template in the first interface and / or the second interface.
11. The image processing method according to any one of claims 1 to 10, characterized in that, Before the electronic device displays the second interface, the image processing method further includes: The electronic device determines a first similarity between the image corresponding to the reference tone material and the first image, and determines a first tone migration degree based on the first similarity; The electronic device adjusts the hue of the first image based on the reference hue material and the first hue shift degree to obtain the second image.
12. The image processing method according to any one of claims 1 to 11, characterized in that, The second interface further includes an adjustment bar; after the electronic device displays the second interface, the image processing method further includes: In response to a sliding operation on the adjustment bar, the electronic device adjusts the hue of the second image.
13. The image processing method according to claim 12, characterized in that, In response to a sliding operation on the adjustment bar, the electronic device adjusts the hue of the second image, including: In response to a fifth operation on the second image, the electronic device determines a fourth target corresponding to the fifth operation; the fourth target is a portion of the target in the second image. In response to a sliding operation on the adjustment bar, the electronic device adjusts the hue of the fourth target.
14. The image processing method according to any one of claims 1 to 13, characterized in that, After the electronic device displays the first interface, the image processing method further includes: In response to a sixth operation on the first image, the electronic device determines a fifth target corresponding to the sixth operation; the fifth target is a portion of the targets in the first image. In response to a first operation on the first control, the electronic device displays a second interface, including: In response to a first operation on the first control, the electronic device displays the second interface; the second interface includes a second image, which is obtained by adjusting the hue of the fifth target of the first image based on the reference hue material.
15. The image processing method according to any one of claims 1 to 14, characterized in that, The first interface further includes at least one tone template, and the image processing method further includes: In response to the selection operation of a third tone template, the electronic device adjusts the tone of the first image according to the third tone template; the third tone template is one of the at least one tone template.
16. The image processing method according to claim 15, characterized in that, In response to the selection operation of a third color tint template, the electronic device adjusts the tint of the first image according to the third color tint template, including: In response to the selection operation of the third tone template, the electronic device acquires the image corresponding to the third tone template and determines the second similarity between the image corresponding to the third tone template and the first image; The electronic device determines the degree of second tone migration corresponding to the first image based on the second similarity, and adjusts the tone of the first image based on the third tone template and the degree of second tone migration.
17. The image processing method according to any one of claims 1 to 16, characterized in that, The first interface and the second interface are the interfaces of the gallery application.
18. The image processing method according to any one of claims 1 to 16, characterized in that, The first interface and the second interface are preview interfaces for the camera application, and the first image and the second image are preview images in the preview interfaces.
19. The image processing method according to claim 18, characterized in that, In response to a first operation on the first control, the electronic device displays a second interface, including: In response to a first operation on the first control, the electronic device displays a first window; the first window includes at least one color template; In response to the selection of a fourth color template, the electronic device displays the preview interface; the preview interface includes a second image, which is a color adjustment of the first image based on the reference color material, the reference color material including the fourth color template, the fourth color template being one of the at least one color template.
20. The image processing method according to claim 19, characterized in that, At least one color template in the first window includes a color template saved in the gallery application.
21. The image processing method according to claim 18, characterized in that, In response to a first operation on the first control, the electronic device displays a second interface, including: In response to a first operation on the first control, the electronic device displays a first window; the first window includes a fourth control; In response to a click on the fourth control, the electronic device displays a sixth interface; the sixth interface includes at least one candidate image. In response to a selection operation in the sixth interface, the electronic device displays the preview interface; the preview interface includes a second image, which is obtained by adjusting the tone of the first image based on the reference tone material, the reference tone material includes a fifth image, which is an image among the at least one candidate image, and the fifth image is the image selected by the selection operation.
22. The image processing method according to claim 21, characterized in that, Before the electronic device displays the preview interface in response to a selection operation on the sixth interface, the image processing method further includes: The electronic device saves the reference color material as a fifth color template.
23. The image processing method according to any one of claims 18 to 22, characterized in that, After the electronic device displays the second interface, the image processing method further includes: In response to the shooting operation, the electronic device saves the second image as the captured image.
24. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the electronic device to implement the image processing method as described in any one of claims 1 to 23.
25. A computer program product, the computer program product comprising a computer program, characterized in that, When the computer program is executed by the electronic device, the electronic device performs the image processing method as described in any one of claims 1 to 23.