Method and electronic device for retouching

CN122597228APending Publication Date: 2026-08-18HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510176532.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,用户在使用参考图像对待修图像进行修图时,需要比较繁琐的交互步骤,且应用场景有限

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597228A_ABST
    Figure CN122597228A_ABST
Patent Text Reader

Abstract

The present application provides a method and an electronic device for image retouching. In the method, when a reference image is used to retouch a to-be-retouched image, the electronic device can apply the visual information (such as light and shadow, composition, color, etc.) of the reference image to the to-be-retouched image, so that the result of the retouching is consistent with the effect of the reference image. Alternatively, the electronic device can also apply the retouching techniques corresponding to the reference image to the to-be-retouched image, thereby improving the speed and efficiency of the retouching. In addition, the technical solution does not limit the specific retouching scene, so that the application range of the retouching is more extensive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and more specifically, to a method and electronic device for image retouching. Background Technology

[0002] Currently, users frequently need to use electronic devices for image editing. For example, users may use one or more reference images to edit the image they want to modify, achieving their desired result. However, using reference images for editing involves relatively cumbersome interactive steps and has limited application scenarios.

[0003] Therefore, how to conveniently use reference images for image retouching has become a technical problem that needs to be solved. Summary of the Invention

[0004] This application provides a method and electronic device for image editing, which can improve the speed and efficiency of image editing for users, and also make the application scope of image editing more extensive.

[0005] In a first aspect, a method for image retouching is provided, applied to a first electronic device, comprising: acquiring a first reference image, wherein the first reference image has first information, the first information including visual information of the first reference image, and / or a first set of retouching techniques corresponding to the first reference image, the first set of retouching techniques including at least one retouching technique; and when retouching a second image using the first reference image, applying the first information to the second image to obtain a third image.

[0006] For example, the first reference image may be obtained by the first electronic device by retouching other images, or it may be received directly from other electronic devices.

[0007] For example, the image editing techniques in the first set of image editing techniques may be those saved when the first reference image is obtained by using the image editing techniques, or they may be image editing techniques that can achieve the display effect of the first reference image by analyzing the first reference image.

[0008] This visual information may include light and shadow information, composition information, color information, etc.

[0009] In some examples, when the first set of image editing techniques includes multiple techniques, these techniques may also have a preset order. When applying this first set of image editing techniques to other images, the other images can be edited in the preset order or the order selected by the user. For example, the first set of image editing techniques may include techniques A, B, and C in that order. When using this first set of image editing techniques to edit other images, the other images can be edited in the order of techniques A, B, and C.

[0010] Alternatively, the multiple retouching techniques included in the first set of retouching techniques may not be in any particular order, and this application embodiment does not limit this.

[0011] It should be understood that when the first electronic device applies the first information to the second image, it may apply part of the first information to the second image or apply all of the first information to the second image.

[0012] Based on the embodiments of this application, in image-to-image retouching, the first electronic device can apply the visual information of the reference image to the image to be retouched, ensuring that the retouched result is consistent with the effect of the reference image. Alternatively, the electronic device can also apply retouching techniques corresponding to the reference image to the image to be retouched, thereby improving the speed and efficiency of image-to-image retouching. Furthermore, this technical solution is not limited to specific retouching scenarios, making the application scope of image-to-image retouching wider.

[0013] In some implementations, before using the first reference image to retouch the second image, the method further includes: determining from a plurality of reference images to use the first reference image to retouch the second image.

[0014] For example, the first electronic device may include multiple reference images.

[0015] Based on the embodiments of this application, when retouching an image, the first electronic device can first determine a first reference image for retouching from multiple reference images, so that the electronic device can determine which reference image to use.

[0016] In some implementations, determining a first reference image from a plurality of reference images includes: performing feature matching from the plurality of reference images based on first feature information of the second image to determine whether to use the first reference image for image retouching of the second image.

[0017] For example, the first feature information may be the image content, style, etc., of the second image as a whole.

[0018] It should be understood that when the electronic device uses the first feature information of the second image to perform feature matching from multiple reference images, it seeks the reference image with the highest matching degree with the first feature information of the second image, so that the matched reference image is most similar to the second image.

[0019] In this way, by matching the reference image based on the feature information of the second image, a first reference image similar to the second image can be found, which can result in better image editing effect and better meet the user's preferences.

[0020] In some implementations, before performing feature matching from multiple reference images based on the first feature information of the second image, the method further includes: determining a region in the second image to be retouched based on a first operation performed by the user in the second image, wherein the first feature information is characteristic information in the region to be retouched.

[0021] For example, the first operation can be an operation such as smearing, drawing circles, drawing lines, or clicking.

[0022] For example, if the area to be retouched is the area where the portrait is located, then matching will be prioritized from the reference image containing the portrait.

[0023] Based on the embodiments of this application, the first electronic device can determine the area to be edited in the second image according to the user's operation in the second image, and perform feature matching from multiple reference images according to the feature information of the area to be edited, so as to determine the first reference image to be used to edit the second image, thereby making the obtained first reference image similar to or the same as the area to be edited, and thus making the editing effect better.

[0024] In some implementations, when using the first reference image to retouch the second image, applying the first information to the second image to obtain a third image includes: when using the first reference image to retouch the second image, applying the first information to the area of ​​the second image to be retouched to obtain the third image.

[0025] Based on the embodiments of this application, after matching a suitable first reference image, the first information of the first reference image can be applied to the area to be retouched to complete the retouching process of the area to be retouched. This allows for local retouching of the second image, improving the flexibility of the retouching process.

[0026] In some implementations, the first feature information includes image content.

[0027] In other examples, the first feature information may also include other content, such as the style of the image.

[0028] In some implementations, the step of using the first reference image to retouch the second image includes: retouching the second image through a first application.

[0029] Based on the embodiments of this application, the first electronic device can perform image editing on the second image through a first application to improve the flexibility of image editing.

[0030] In some implementations, the step of retouching the second image through the first application includes: retouching the second image by calling an interface provided by the first application.

[0031] Based on the embodiments of this application, for the image editing techniques provided by the third-party application included in the first reference image, the first electronic device can call the open interface of the third-party application to implement the image editing techniques, thereby improving the diversity of image editing techniques and enriching the image editing effect.

[0032] In some implementations, the first electronic device calls the interface provided by the first application to perform image retouching on the second image, including: the first electronic device sending the second image and an image retouching technique identifier sequence to the first application, wherein the image retouching technique identifier sequence includes at least one image retouching technique identifier, and the image retouching technique identifier corresponds one-to-one with an image retouching technique; and receiving the third image sent by the first application.

[0033] The first application can perform image retouching on the second image based on the image retouching technique identifier sequence to obtain a third image, and then return the retouched third image to the first electronic device.

[0034] It should be understood that in this case, the first application can perform image retouching on the second image as a whole.

[0035] In some examples, the first electronic device also needs to send the image editing area location information to the first application, so that the first application can perform image editing processing on the area indicated by the image editing area location information.

[0036] It should be understood that this location information can be coordinate information.

[0037] In some cases, the location information of the retouched area may include the location information of the entire area of ​​the second image, or it may include the location information of a portion of the second image.

[0038] In some cases, the first application can also identify the retouching area of ​​the second image. For example, when the second image includes a portrait, and the retouching technique identifier sequence includes retouching techniques used to retouch portraits (such as skin smoothing, eye enlargement, etc.), the first application can determine that the area to be retouched is the area where the face is located.

[0039] It should also be understood that the first electronic device needs the user's authorization before calling the first application to edit the second image. With the user's permission, the first electronic device calls the first application to edit the second image.

[0040] In some examples, the first electronic device may also obtain in advance from the first application the identifier of the retouching technique of the first reference image, and write the retouching technique (or identifier) ​​into the image file of the first reference image, such as in the metadata of the image file, or it may associate the retouching technique (or identifier) ​​with the first reference image.

[0041] In some implementations, the first reference image is obtained by retouching a first application.

[0042] For example, the first application is a third-party application. When the first reference image is obtained by the first application through image editing, the electronic device needs to call the interface of the first application to perform image editing on other images in the future.

[0043] In some implementations, when displaying the first reference image or the third image, the first electronic device is further configured to display an identifier of the first application, the identifier indicating that at least some of the retouching techniques corresponding to the first reference image or the third image were obtained through retouching by the first application.

[0044] In this way, the user can determine that the first reference image or the third image was obtained by retouching with the assistance of the first application.

[0045] In other examples, the first electronic device may also display a joint logo of another logo used for photo editing functions and the logo of the first application.

[0046] In some implementations, the first reference image is an image obtained by retouching using the first set of retouching techniques.

[0047] In other examples, the first reference image can also be the original, unedited image, in which case the first electronic device can also simulate image editing techniques.

[0048] In some implementations, obtaining the first reference image includes: using the first set of image editing techniques to edit the fourth image to obtain the first reference image.

[0049] Based on the embodiments of this application, the first electronic device can use a first set of image retouching techniques to retouch the fourth image according to the user's operation, so as to obtain a first reference image. In this way, the first electronic device can save the user's image retouching process, which is beneficial for subsequent batch image retouching.

[0050] In some implementations, the first set of image editing techniques consists of image editing techniques obtained by analyzing the first reference image that can achieve the display effect of the first reference image.

[0051] Based on the embodiments of this application, the first electronic device can simulate image retouching techniques according to the display effect of the reference image, so as to determine the simulated image retouching techniques.

[0052] In some implementations, the first information includes the first set of image retouching techniques. When retouching the second image using the first reference image, applying the first information to the second image to obtain a third image includes: when retouching the second image using the first reference image, applying target image retouching techniques included in the first set of retouching techniques to the second image to obtain a third image. The target image retouching techniques are some or all of the at least one set of retouching techniques.

[0053] Based on the embodiments of this application, when the first electronic device uses the first reference image to perform image retouching on the second image, some or all of the image retouching techniques corresponding to the first reference image can be applied to the second image, thereby improving the diversity of the retouching results.

[0054] In some implementations, before applying the target retouching techniques included in the first set of retouching techniques to the second image, the method further includes: determining the target retouching techniques in response to a user's selection action.

[0055] Based on the embodiments of this application, users can choose which image editing techniques to apply, thereby improving the flexibility of the image editing results.

[0056] In some implementations, the visual information includes at least one of light and shadow information, composition information, or color information.

[0057] In other examples, the visual information may also include other information, which is not limited in the embodiments of this application.

[0058] In some implementations, when using the first reference image to retouch the second image, applying the first information to the second image to obtain a third image includes: when using the first reference image to retouch the second image, applying the visual information of the first image content in the first reference image to the second image content in the second image, wherein the first image content and the second image content are of the same type.

[0059] In some implementations, the first image content is obtained by semantic recognition of the first reference image, and the second image content is obtained by semantic recognition of the second image.

[0060] For example, the first image contains a portrait, and the second image also contains a portrait. Or, the first image contains a building, and the second image also contains a building.

[0061] For example, if the visual information is color information, the first electronic device applies the first color of the first image content to the second image content in the second image, thereby ensuring that the color information of the edited image is consistent with the color information of the reference image. Alternatively, the visual information may also include lighting information, composition information, etc.

[0062] It should be understood that the first color can be obtained through color information analysis of the first reference image. Based on the embodiments of this application, an electronic device can apply the color of the first image content in the first reference image to the second image content in the second image. The first image content and the second image content are of the same type, which can make image editing more interesting, and the edited image maintains the same visual information as the reference image, thereby improving the user experience.

[0063] In some implementations, the metadata of the first reference image includes the first information, or the first reference image is associated with the first information.

[0064] For example, the first information can be stored as a file in a specific format, which can be associated with a first reference image, so that the file in the specific format can be obtained through the first reference image to determine the corresponding first information.

[0065] In some implementations, acquiring the first reference image includes receiving the first reference image sent by a second electronic device.

[0066] In a second aspect, an image retouching apparatus is provided, comprising modules for implementing the image retouching method as described in the first aspect and any possible implementation thereof.

[0067] Thirdly, an electronic device is provided, comprising: one or more processors; one or more memories; said one or more memories storing one or more programs that, when executed by said one or more processors, cause the image retouching method as described in the first aspect and any possible implementation thereof to be performed.

[0068] Fourthly, a chip is provided, the chip including a processor and a communication interface, the communication interface being used to receive signals and transmit the signals to the processor, the processor processing the signals such that the image retouching method as described in the first aspect and any possible implementation thereof is executed.

[0069] Fifthly, a readable storage medium is provided, wherein instructions are stored therein, which, when executed on an electronic device, cause the image retouching method as described in the first aspect and any possible implementation thereof to be performed.

[0070] Sixthly, a program product is provided, the program product including program code, which, when run on an electronic device, causes the image retouching method as described in the first aspect and any possible implementation thereof to be executed. Attached Figure Description

[0071] Figure 1 This is a schematic structural diagram of the electronic device provided in the embodiments of this application.

[0072] Figure 2 This is a schematic diagram of obtaining a reference image provided in an embodiment of this application.

[0073] Figure 3 This is a schematic diagram illustrating how a reference image is used to retouch other images, as provided in an embodiment of this application.

[0074] Figure 4 This is a schematic diagram of another method for obtaining a reference image, provided in an embodiment of this application.

[0075] Figure 5 This is a schematic flowchart of a process for matching a reference image and retouching other images, provided in an embodiment of this application.

[0076] Figure 6 This is a schematic diagram of a set of GUIs provided in the embodiments of this application.

[0077] Figure 7 This is a schematic diagram of a set of GUIs provided in the embodiments of this application.

[0078] Figure 8 This is a schematic diagram of a set of GUIs provided in the embodiments of this application.

[0079] Figure 9 This is a schematic diagram of an image editing method provided in an embodiment of this application.

[0080] Figure 10 This is a schematic flowchart of an image retouching method provided in an embodiment of this application.

[0081] Figure 11 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0082] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0083] The image editing method in this application embodiment can be applied to smartphones, wearable devices, smart TVs, tablets, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, in-vehicle devices, foldable devices, Internet of Things (IoT) devices, augmented reality devices, virtual reality devices, etc.

[0084] Figure 1 A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 may include processor 110, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, camera 193, display screen 194, pressure sensor 180A, and touch sensor 180K, etc.

[0085] 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.

[0086] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0087] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0088] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0089] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Bluetooth low energy (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0090] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0091] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 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.

[0092] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1. In this embodiment, the display screen 194 can be used to display a gallery, as well as various image editing results, etc.

[0093] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 may also calculate the touch position based on the detection signal from pressure sensor 180A.

[0094] Touch sensor 180K can be disposed on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen". Touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be disposed on the surface of electronic device 100, in a different location than display screen 194.

[0095] Before introducing the technical solutions of the embodiments of this application, some technical terms that may be involved in this application will be introduced as follows.

[0096] Image editing using a reference image: This method of editing an image using a reference image is called image editing using a reference image.

[0097] Semantic information in images: In the field of image processing, semantic information refers to the content of an image and the understanding of its meaning. Semantic information allows us to distinguish different objects within the image. For example, if an image contains buildings and people, semantic recognition can yield semantic information about the buildings, the people, and so on.

[0098] Currently, users frequently need to use electronic devices for image editing. For example, users may use one or more reference images to edit the image they want to modify, achieving their desired result. However, using reference images for editing involves relatively cumbersome interactive steps and has limited application scenarios.

[0099] In view of this, embodiments of this application provide a method and electronic device for image editing to improve the speed and efficiency of image editing, and have a wide range of applications.

[0100] The following will combine Figures 2 to 9 This application introduces the technical solution for image editing based on images provided in its embodiments.

[0101] For example, Figure 2 This is a schematic diagram illustrating an embodiment of obtaining a reference image provided in this application. For example... Figure 2 As shown, assuming image A is the original image taken by the user, the user can perform a series of retouching operations on image A to obtain image B, which serves as a reference image. Afterwards, the electronic device can save image B and the retouching operations performed to obtain image B from image A.

[0102] For example, a user uses editing techniques 1, 2, and 3 to edit image A to obtain image B.

[0103] It should be understood that the image editing techniques may include adjusting brightness and contrast, applying filters, cropping, blurring, slimming, removing moles, enlarging eyes, smoothing skin, whitening, etc. The specific form of the image editing techniques is not limited in the embodiments of this application.

[0104] For example, the photo editing technique 1 can be for slimming, the photo editing technique 2 can be for skin smoothing, and the photo editing technique 3 can be for adding filters.

[0105] It should be understood that image editing techniques 1, 2, and 3 can form a set of image editing techniques. When storing image B, the electronic device also stores the set of image editing techniques used to obtain image B from image A.

[0106] For example, the set of image editing techniques can serve as metadata for image B, or the set of image editing techniques can be associated with image B, through which the set of image editing techniques can be obtained.

[0107] For example, an electronic device can convert the collection of photo editing techniques into a file in a specific format, which can serve as metadata for the image, or the file can be associated with image B.

[0108] It should be understood that image B and the corresponding set of image editing techniques can be used to build an image editing toolbox for electronic devices. Subsequently, electronic devices can use the reference images in this image editing toolbox to edit other images.

[0109] It should be understood that when displaying image B, the electronic device can also display a corresponding identifier 1. For example, identifier 1 can be used to indicate that image B was edited. The electronic device can also send image B and the corresponding set of editing techniques to other electronic devices, so that other electronic devices can also use the set of editing techniques corresponding to image B to edit other images.

[0110] In some implementations, the electronic device may also select a portion of the image editing techniques included in the above-mentioned set of image editing techniques as the image editing techniques corresponding to image B, based on the user's choice.

[0111] For example, a user selects editing techniques 1 and 2 as the editing techniques corresponding to image B. Then, the image B stored in the electronic device corresponds to editing techniques 1 and 2. These editing techniques 1 and 2 can serve as metadata for image B, or they can be associated with image B, allowing access to these techniques through image B.

[0112] It should also be understood that the image editing toolkit may include other reference images, which may be obtained by the user through image editing, received by the electronic device from other devices, or obtained by the electronic device from the network.

[0113] In this application embodiment, the specific number of retouching techniques included in the retouching technique set corresponding to a reference image is not limited. In some examples, the retouching technique set corresponding to other reference images may also include only one retouching technique, such as whitening or blurring.

[0114] In some implementations, for reference images received by the electronic device from other devices, or reference images obtained by the electronic device from the network, the electronic device can also simulate a set of corresponding image editing techniques based on their display effects.

[0115] For example, an electronic device can simulate the use of filters, skin smoothing, eye enlargement, and other image editing techniques based on its display effect. Then, the electronic device can use these techniques as reference data for the reference image. This allows it to use the same editing techniques to achieve a similar display effect when editing other images using the reference image.

[0116] It is understood that the embodiments of this application do not limit the type of content in image A. The above description uses image A as an example of a human portrait. In other examples, the content included in image A may be buildings, flowers, pets, landscapes, objects, etc.

[0117] The following will combine Figure 3 This section describes the process of retouching other images using a reference image. Figure 3 In this technical solution, users can select a reference image to edit other images.

[0118] For example, Figure 3 This is a schematic diagram illustrating how a reference image is used to retouch other images, as provided in an embodiment of this application. For example... Figure 3 As shown, users can select image B as a reference image and use image B to edit other images.

[0119] In some examples, the electronic device can store image B as a reference image. Later, during image retouching, the user can select image B to batch-retouch images C, D, and E. In this case, the electronic device can apply the set of retouching techniques corresponding to image B to images C, D, and E to perform retouching processing on them. Thus, the retouched result has the same overall style as image B.

[0120] It should be understood that an electronic device can acquire data in a specific format from image B to obtain the set of retouching techniques. Alternatively, the electronic device can also acquire data associated with image B to determine the set of retouching techniques.

[0121] It is understandable that if the set of image editing techniques includes multiple techniques, and these techniques have a specific order, then when all the image editing techniques corresponding to image B are applied to other images, their order can be the same as the original order.

[0122] For example, if image A is edited using editing techniques 1, 2, and 3 in that order to obtain image B, then when image B is used as a reference image to edit image C, the same order of editing techniques 1, 2, and 3 is used to edit image C.

[0123] In some examples, electronic devices can store image B as a reference image. Later, when a user chooses to use image B to batch edit images C, D, and E, they can also choose to apply some editing techniques from the set of techniques corresponding to image B to images C, D, and E. This allows for more flexible and diverse editing results.

[0124] In this way, users only need to edit a small number of images, and can then easily use the edited images to edit other images, thus improving the speed and efficiency of image editing. Furthermore, this method ensures that the edited images maintain a consistent style with the reference image, helping to preserve the consistency of the editing results.

[0125] In other examples, electronic devices can also apply the set of retouching techniques from reference image B to other images through different interactive methods.

[0126] For example, an electronic device displays a reference image B. When it detects that the user's gesture changes from gesture 1 to gesture 2, it can trigger the electronic device to obtain the set of image editing techniques corresponding to the reference image B. The user can select the image to be edited by gesture 3 (such as swiping a finger to one side). When it detects that the user's gesture changes from gesture 2 to gesture 1, the set of image editing techniques corresponding to the reference image B can be applied to the image to be edited.

[0127] For example, changing gesture 1 to gesture 2 can be understood as the user's action of "grabbing" or "clenching a fist," and changing gesture 2 to gesture 1 can be understood as the gesture changing from "clenching a fist" to "opening." In this way, the user's grabbing and releasing allows the set of image editing techniques corresponding to the reference image B to be applied to the image to be edited.

[0128] It should be understood that electronic devices can detect a user's gestures through cameras (such as front-facing cameras).

[0129] In some cases, users may browse images they like from the internet or social media platforms and save them to their electronic devices. These images can then be used as reference images for editing other images.

[0130] For example, Figure 4 This is a schematic diagram of another method for obtaining a reference image, provided in an embodiment of this application.

[0131] like Figure 4 As shown, the image F1 can be an image saved by the user from a network or social platform, or the image F1 can be received by the electronic device from another electronic device.

[0132] After the electronic device saves image F1, it can analyze image F1 based on user actions to simulate a set of image editing techniques that can achieve the same display effect as image F1. The electronic device can then convert this set of editing techniques into a file in a specific format. This file can serve as metadata for image F1, or it can be associated with image F1. Similarly, image F1 with the set of editing techniques can serve as a reference image in the electronic device's image editing toolbox, allowing the user to subsequently select image F1 with the set of editing techniques to edit other images.

[0133] For example, this set of photo editing techniques may include photo editing technique A, photo editing technique B, and photo editing technique C.

[0134] In other examples, if image F1 is an edited image, the electronic device can analyze image F1 to simulate a set of editing techniques that can achieve the display effect of image F1.

[0135] For example, the electronic device may include a model for analyzing an image F1 to obtain a set of image editing techniques that produce the same display effect as image F1.

[0136] For example, an electronic device can perform image analysis on the image F1 to obtain at least some of the information such as light and shadow information, color information, semantic information, composition information, and filter information of the image F1, and simulate a set of image retouching techniques that can achieve the same display effect as the image F1 based on the above at least some information.

[0137] In some examples, users can select image F1 to perform batch retouching on images B, C, and D. This allows the retouched images to display in a manner similar to that of image F1.

[0138] In other examples, after the electronic device saves the image F1, subsequent users can extract the target information of the image F1 and apply it to other images when using the image F1 as a reference image for retouching.

[0139] It should be understood that the target information may include composition information, color information, lighting information, filter information, etc.

[0140] Electronic devices can apply one or more of the aforementioned target information to other images based on the user's selection.

[0141] For example, when using image F1 to edit other images, the electronic device can display the target information, including composition information, color information, lighting information, and filter information. When the user selects composition information, the electronic device can apply the composition information of image F1 to other images.

[0142] The above combination Figure 2 , Figure 4 This paper introduces a technical solution for electronic devices to acquire reference images. In some cases, the electronic device can also match the reference image with the feature information of the image to be repaired to obtain the most suitable reference image, and then use this reference image to perform image retouching. The following section will combine... Figure 5 This technical solution will be introduced.

[0143] For example, Figure 5 This is a schematic flowchart illustrating a process of matching a reference image and retouching other images, provided in an embodiment of this application. For example... Figure 5 As shown, the method 200 can be applied to electronic devices, and the method 200 may include steps 210 to 240.

[0144] 210. The electronic device determines the area to be retouched in the target image based on the user's operation A on the target image A.

[0145] The target image A can be the image to be repaired.

[0146] For example, operation A may include clicking, smearing, drawing circles, drawing lines, etc. For instance, if the target image A includes a human face, when the electronic device detects that the user is smearing on the face, it can determine that the area to be retouched is the face area smeared by the user.

[0147] Alternatively, when an electronic device detects that a user is applying something to their face, it can determine that the area to be edited is related to the area the user applied. For example, even if the user doesn't apply something to the entire face, it can still be determined that the area to be edited is the region containing the face.

[0148] It should be understood that the area to be repaired can be a part of the target image A or the entire target image A; this application embodiment does not limit this. 220, the electronic device identifies the image content in the area to be repaired.

[0149] For example, an electronic device can identify the image content in the area to be edited through semantic recognition. For instance, the identified image content may include faces, clothing, buildings, flowers, objects, etc., or the identified content may also include the background.

[0150] The image content in the area to be edited can also include various elements, such as portraits, roads, buildings, the sky, and the sea.

[0151] 230. The electronic device matches a target reference image with a set of target image retouching techniques based on the image content in the area to be retouched.

[0152] In some examples, the electronic device can match a target reference image from multiple reference images, which can be stored in the electronic device. Alternatively, the multiple reference images can also be stored in the cloud, which is not limited to the embodiments of this application.

[0153] For example, these multiple reference images can be obtained by an electronic device via... Figure 2 , Figure 4 It was obtained using the method described in [the document / reference].

[0154] In some implementations, if the image content in the area to be edited is a human portrait 1, this is divided into Case 1 and Case 2.

[0155] Scenario 1: The electronic device prioritizes matching the target reference image from the reference image that includes portrait 1.

[0156] For example, if the portrait 1 is the user himself, then the target reference image will be obtained by first matching the reference images that include the user himself.

[0157] Since the target reference image also includes the user, the retouching effect can be made to the user's liking.

[0158] Scenario 2: The electronic device matches the target reference image from all reference images that include the human figure.

[0159] In this way, by matching from reference images that include human figures, the matching results can be made to better meet the user's needs.

[0160] In some implementations, if the image content in the area to be edited is a building, the electronic device will prioritize matching from reference images that include the same or similar buildings, so that the matching result better meets the user's needs.

[0161] Alternatively, if no identical or similar building exists in the reference image, a match can be made from a reference image that includes other buildings.

[0162] In some implementations, if the image content in the area to be edited is a landscape, such as the sea, the electronic device will prioritize matching from reference images that include the sea, so that the matching result better meets the user's needs.

[0163] 240. The electronic device uses a set of target retouching techniques corresponding to the target reference image to retouch the area to be retouched, and obtains the target image B.

[0164] After matching the target reference image, the electronic device can obtain the target retouching technique set corresponding to the target reference image, and use the target retouching technique set to retouch the area to be retouched, resulting in target image B. The aforementioned area to be retouched in target image B has been retouched.

[0165] It should be understood that the target set of retouching techniques may include one or more retouching techniques.

[0166] The technical solutions in this application embodiment can be applied to scenarios such as one-click removal of passersby, one-click color retention, object stylization, and adding text stickers to specific locations. They can also be applied to scenarios such as repairing users' clothes, hair, pets, and flowers.

[0167] The technical solutions in this application embodiment can also be applied to scenarios of global adjustment. For example, the retouching techniques in the reference image can be applied to the image to be retouched to achieve global lighting and shadow adjustment, filter adjustment, etc.

[0168] Based on the embodiments of this application, the electronic device can determine the area to be edited according to the user's interactive actions, match a target reference image from multiple reference images according to the image content of the area to be edited, and use the set of editing techniques corresponding to the target reference image to edit the area to be edited, so as to obtain the edited target image B.

[0169] Furthermore, for different types of target images A, different target reference images can be matched, so that the image editing results of different images that the user wants to edit can meet the user's needs, and the diversity of image editing can also be improved.

[0170] The following will combine Figures 6 to 9 The graphical user interfaces (GUIs) shown illustrate the image editing process in the embodiments of this application.

[0171] For example, Figure 6 This is a schematic diagram of a set of GUIs provided in an embodiment of this application. Among them, from Figure 6 Images (a) through (e) show the process of a user using electronic device 300 to edit an image.

[0172] See Figure 6 In (a), the GUI can be a display interface 310 for displaying image 311 on electronic device 300. The display interface 310 may include image 311 and function bar 312.

[0173] The function bar 312 may include a "tap" function control 313, a share function control, a favorite function control, a delete function control, and more function controls.

[0174] It should be understood that the "dip" function control 313 can also be called by other names, such as "painting" or "editing," and this application embodiment does not limit it.

[0175] In other examples, the display interface 310 may include only icons for the aforementioned functional controls, without displaying their names.

[0176] The image 311 may be used by electronic device 300. Figure 2 or Figure 4 The reference image is obtained in the manner described above. Alternatively, the image 311 may also be an image saved by the electronic device 300 from a social media platform, which is not limited in the embodiments of this application.

[0177] For example, when the electronic device 300 detects that the user clicks the "tap" function control 313, it can display something like this: Figure 6 The GUI shown in (b) is shown in the image.

[0178] For example, see Figure 6 In (b), a card 314 can be displayed on the display interface 310. The card 314 may include the text "Try it," as well as icons for color (3141), light and shadow (3142), composition (3143), and other function icons (3144). The card 314 may also include a save-as-a-card function control (3145) and a remove-from-the-image function control (3146).

[0179] For example, when the electronic device 300 detects that the user clicks on the colored icon 3141, it can display something like this. Figure 6 The GUI shown in (c) is shown in the image.

[0180] In other examples, users can also choose features such as adding lighting or adding composition.

[0181] For example, see Figure 6 In (c), the color-splashing icon 3141 becomes selected to remind the user that the currently selected function is color-splashing.

[0182] In some examples, when the electronic device 300 detects that the user clicks the save as a photo card function control 3145, it can save the color information of the image 311 as a photo card. Subsequently, the user can select the photo card containing the color information to edit other images.

[0183] In some examples, when the electronic device 300 detects that the user has clicked the detouch function control 3146, it can display something like this: Figure 6 The GUI shown in (d) is shown in the image.

[0184] For example, see Figure 6In section (d), the GUI can be a display interface 320 for displaying images on the electronic device 300. The display interface 320 may include multiple images stored in the electronic device 300.

[0185] In other examples, the display interface 320 can be used to display all images in the electronic device 300, or the display interface 320 can be used to display images from a certain album, which can be user-selected or a default album, and this application embodiment does not limit it.

[0186] Users can select images to be edited on the display interface 320. For example, when the electronic device 300 detects that the user clicks on images 321 and 322, images 321 and 322 can be selected. When the electronic device 300 detects that the user clicks on the OK control 323, it can display... Figure 6 The GUI shown in (e) is shown in the image.

[0187] For example, see Figure 6 In (e), in the display interface 320, images 321 and 322 have been edited to obtain images 324 and 325.

[0188] It should be understood that the image retouching process may take some time, so the electronic device can display dynamic changes in images 321 and 322, such as gradually changing from the original image to the retouched image.

[0189] Alternatively, during the image editing process, animation effects can be displayed on the thumbnails of images 321 and 322 to remind the user that image editing is being performed on images 321 and 322.

[0190] In other examples, the thumbnails of the retouched images 324 and 325 may also display a label indicating that the images 324 and 325 were retouched.

[0191] In other examples, the electronic device may also respond to the user's tapping of image 323 by displaying the full image 323, allowing the user to view the effect of the image retouching.

[0192] In this embodiment, when the user selects to apply color, the color of image 311 can be applied to images 321 and 322 to perform image retouching. This allows the colors of the retouched images 324 and 325 to be consistent with or nearly consistent with image 311.

[0193] In other examples, the user can also apply multiple pieces of information from image 311 to other images. For instance, the user can choose to apply color and lighting information simultaneously, allowing the electronic device to apply both color and lighting information from image 311 to other images for image retouching.

[0194] In this way, electronic devices can use the target information of the reference image to quickly retouch other images, thereby improving the speed and efficiency of image-to-image retouching.

[0195] In other examples, the electronic device can also display the image editing techniques corresponding to image 311, allowing users to selectively choose the desired techniques. This will be discussed in the following section. Figure 7 This technical solution will be introduced.

[0196] For example, Figure 7 This is a schematic diagram of a set of GUIs provided in an embodiment of this application. Among them, from Figure 7 Images (a) through (e) show the process of a user using electronic device 300 to edit an image.

[0197] It should be understood that Figure 7 (a) in the text can be found in [reference 1]. Figure 6 For the sake of brevity, the relevant description of (a) in the text will not be repeated here.

[0198] For example, when the electronic device 300 detects that the user clicks the "tap" function control 313, it can display something like this: Figure 7 The GUI shown in (b) is shown in the image.

[0199] See Figure 7 In (b), a card 315 can be displayed in the display interface 310. The card 315 may include the text "Try it" and icons 3151 for color, 3152 for light and shadow, and 3153 for composition. The card 315 may also include a save-as-a-card function control 3154 and a remove-from-the-image function control 3155.

[0200] The card 315 may also include a photo editing tips display bar 316 corresponding to image 311. The photo editing tips display bar 316 may include at least one photo editing tip.

[0201] See also Figure 7 In (b), the photo editing tips display bar 316 may include skin smoothing, slimming and filters, as well as corresponding settings controls.

[0202] It should be understood that the image editing techniques included in the image editing technique display bar 316 may be obtained by the electronic device 300 based on the user's image editing process, or they may be obtained by the electronic device 300 through image simulation. This application embodiment does not limit this.

[0203] In some examples, the card 315 may also include the aforementioned color icon 3151, light and shadow icon 3152, and composition icon 3153, or only include the aforementioned photo editing skills display bar 316. This application embodiment does not limit this.

[0204] Users can obtain the image editing techniques corresponding to image 311 in the image editing technique display bar 316, and users can also select the image editing techniques they wish to use in the image editing technique display bar 316.

[0205] For example, when the electronic device 300 detects that the user clicks the color icon 3151 and the skin-beautifying settings control 3161, it can display the following: Figure 7 The GUI shown in (c) is shown in the image.

[0206] See Figure 7 In (c), the color-touching icon 3141 becomes selected, and the skin-beautifying settings control 3161 becomes selected. When the electronic device 300 detects that the user clicks the de-touching function control 3155, it can display as follows: Figure 7 The GUI shown in (d) is shown in the image.

[0207] It should be understood that Figure 7 (d) to (e) can be found in the preceding text. Figure 6 For the sake of brevity, the relevant descriptions of (d) to (e) in the text will not be repeated here.

[0208] It should be understood that when a user selects the light and shadow enhancement and skin beautification functions, the electronic device can apply the light and shadow information of image 311 and the image beautification technique to images 321 and 322.

[0209] In this way, electronic devices can use the target information of the reference image to quickly retouch other images, thereby improving the speed and efficiency of image-to-image retouching.

[0210] In some cases, the reference image may have been obtained through image editing using a third-party application. In such cases, when using the reference image to edit other images, the electronic device can display a collaboration logo and utilize the image editing capabilities of the third-party application to process the other images. The following will combine... Figure 8 This technical solution will be introduced.

[0211] For example, Figure 8 This is a schematic diagram of a set of GUIs provided in an embodiment of this application. Among them, from Figure 8 Images (a) through (e) show the process by which the electronic device 300 invokes the image editing capabilities of a third-party application to perform image editing.

[0212] See Figure 8 In (a), the GUI can be the display interface 350 of the electronic device 300. The display interface 350 may include an image 351 and a joint logo 352 of the image 351, and a function bar 353.

[0213] The joint logo 352 may include a logo for the "Tap and Stick" function and a logo for a third-party application. The logo for the third-party application may be its icon or name, or other identifiers used to identify the third-party application; this embodiment does not limit the specific identifier. In this embodiment, the logo of the third-party application is taken as an example, for instance, the application's icon might be "App1".

[0214] The third-party application can be any application capable of editing or retouching images; this application embodiment does not limit the scope of the application.

[0215] It should be understood that the image 351 may be obtained by the electronic device 300 using a third-party application to edit the original image. In this case, when the user views the image 351, the electronic device 300 may display the joint logo 352, so that the user can determine that the image 351 was edited by a third-party application.

[0216] The description of function bar 353 can be found in the previous description of function bar 312, and will not be repeated here.

[0217] When the electronic device 300 detects that the user clicks the "tap" function control 354, it can display the following: Figure 8 The GUI shown in (b) is shown in the image.

[0218] See Figure 8 In (b), card 355 is displayed on display interface 350. Card 355 may include the text "Try it," as well as icons for color (3551), light and shadow (3552), composition (3553), and other function icons (3554). Card 355 may also include a save-as-a-card function control (3555) and a remove-from-the-image function control (3556).

[0219] The colored icon 3551 may also include the identifier of a third-party application, such as the icon "App1" of a third-party application.

[0220] The color information included in image 351 may have been obtained through image editing by a third-party application. Therefore, the third-party application's identifier is displayed in the color icon 3551 on this site, allowing users to identify that the current function belongs to a third-party application.

[0221] It is understandable that the card 355 may also include the image editing techniques corresponding to image 351. When the image editing techniques belong to the image editing techniques provided by a third-party application, the logo of the third-party application may also be displayed.

[0222] For example, when the electronic device 300 detects that the user clicks the colored icon 3551, it can display something like this. Figure 8 The GUI shown in (c) is shown in the image.

[0223] See Figure 8 In (c), the color-splashing icon 3551 is selected to remind the user that the currently selected function is color-splashing.

[0224] When the electronic device 300 detects that the user clicks the "remove image" function control 3556, it can display the following: Figure 8 The GUI shown in (d) is shown in the image.

[0225] It should be understood that Figure 8 For (d) to (e) in the previous text, please refer to the relevant description of (d) to (e) in section 6. For the sake of brevity, it will not be repeated here.

[0226] After the electronic device 300 detects that the user clicks the image removal function control 3556, it can use the interface exposed by the third-party application to call its function to implement the color of image 351 and apply the function to the image 361 and image 362 selected by the user.

[0227] Understandable, Figure 8 In (e), the thumbnails of images 364 and 365, which have already been edited, can also display icons of third-party applications, or the aforementioned co-branded icon 352.

[0228] It should also be understood that when a user clicks on the thumbnail of the image 364, the electronic device 300 can display the image 364, and at the same time, the electronic device 300 can also display the aforementioned co-branded icon 352.

[0229] Based on the embodiments of this application, when the reference image used by the electronic device is edited by a third-party application, the electronic device can also display a joint logo so that the user can determine that the image was edited by a third-party application.

[0230] In addition, electronic devices can collaborate with third-party applications. When electronic devices lack the necessary capabilities, they can utilize the capabilities provided by third-party applications, thereby enabling more possibilities in image editing and increasing the diversity of editing results.

[0231] In some examples, electronic devices can also apply visual information from a reference image (taking color information as an example) to the image to be repaired. The following will combine... Figure 9 This technical solution will be introduced.

[0232] For example, Figure 9 This is a schematic diagram of an image editing method provided in an embodiment of this application. Figure 9 This illustrates the process of a user selecting image 410 as a reference image for retouching and then retouching image 420.

[0233] See Figure 9 The image content in the reference image 410 may include building 411, tree 412, and sky 1 (background). The color of building 411 is color B1, the color of the leaves of tree 412 is color A1, and the color of sky 1 is color C1.

[0234] The image to be repaired, 420, includes a building, 421, trees, 422, and a sky (background). The building 421 is colored B2, the leaves of the trees 422 are colored A2, and the sky 2 is colored C2.

[0235] When the electronic device detects that the user has selected image 410 to repair image 420, it can apply the colors of different image contents in reference image 410 to the corresponding image contents in image 420 to be repaired.

[0236] For example, the electronic device extracts the color B1 of building 411 and applies the color B1 of building 411 to building 421 in the image to be repaired, replacing its original color B2.

[0237] The electronic device extracts the color A1 of the tree's leaves and applies this color A1 to the leaves of the tree 422 in the image to be repaired, replacing its original color A2.

[0238] The electronic device extracts the color C1 of sky 1 and applies this color C1 to sky 2 in the image to be repaired 420, replacing its original color C2.

[0239] Thus, in the image 430 obtained after retouching the image 420, the color of the building is color B1, the color of the tree leaves is color A1, and the color of the sky is color C1.

[0240] In some examples, the electronic device may also apply the color of the trunk of tree 421 to the trunk of tree 422 in the image to be repaired, in place of its original color, which is not limited in the embodiments of this application.

[0241] In other examples, if reference image 410 includes person 1 and image 420 to be edited includes person 2, then when using reference image 410 to edit image 420, the electronic device can apply the skin tone of person 1 to person 2. Alternatively, when using reference image 410 to edit image 420, the electronic device can apply the clothing color of person 1 to the clothing color of person 2. Or, when using reference image 410 to edit image 420, the electronic device can apply the editing techniques of person 1 to person 2.

[0242] It should be understood that electronic devices can determine different image contents in reference image 410 and different image contents in image 420 to be repaired through semantic recognition.

[0243] Based on the embodiments of this application, the electronic device can identify semantic information in a reference image, obtain different image content and corresponding color information, and apply the color information of the image content to the corresponding image content in the image to be repaired.

[0244] This makes image editing more fun, and the color information of the edited image is consistent with that of the reference image, thus improving the user experience.

[0245] In some examples, the electronic device can also apply the lighting and composition information of the reference image 410 to the image to be repaired 420, so that the image obtained after repair can maintain the overall style of the reference image.

[0246] It is understood that the technical solutions or parts thereof in the various embodiments of this application described above may be combined with each other to form new technical solutions if there is no logical conflict. Such technical solutions should not be considered to be outside the scope of protection of this application.

[0247] For example, Figure 10 This is a schematic flowchart illustrating an image retouching method provided in an embodiment of this application. Figure 10 As shown, the method 900 can be applied to a first electronic device, and the method 900 may include steps 910 to 920.

[0248] 910, the first electronic device acquires a first reference image, wherein the first reference image has first information, the first information including visual information of the first reference image, and / or a first set of retouching techniques corresponding to the first reference image, the first set of retouching techniques including at least one retouching technique.

[0249] For example, the first reference image may be obtained by the first electronic device by retouching other images, or it may be received directly from the second electronic device, or it may be an image obtained by storing retouching by a third-party application.

[0250] For example, the image editing techniques in the first set of image editing techniques may be those saved when the first reference image is obtained by using the image editing techniques, or they may be image editing techniques that can achieve the display effect of the first reference image by analyzing the first reference image.

[0251] This visual information may include light and shadow information, composition information, color information, etc.

[0252] This first set of photo editing techniques may include at least one photo editing technique. For example, see Figure 2 The first set of photo editing techniques may include photo editing technique 1, photo editing technique 2 and photo editing technique 3.

[0253] The first information may be metadata of the first reference image, or the first information may be associated with the first reference image.

[0254] 920. When the first electronic device uses the first reference image to perform image retouching on the second image, it applies the first information to the second image to obtain the third image.

[0255] For example, the first electronic device can use a first reference image to retouch the second image based on a selection operation, or the first electronic device can also determine to use the first reference image to retouch the second image based on feature matching.

[0256] In some examples, when the first set of image editing techniques includes multiple techniques, these techniques may also have a preset order. When applying this first set of image editing techniques to other images, the other images can be edited in the preset order or the order selected by the user. For example, the first set of image editing techniques may include techniques A, B, and C in that order. When using this first set of image editing techniques to edit other images, the other images can be edited in the order of techniques A, B, and C.

[0257] Alternatively, the multiple retouching techniques included in the first set of retouching techniques may not be in any particular order, and this application embodiment does not limit this.

[0258] It should be understood that when the first electronic device applies the first information to the second image, it may apply part of the first information to the second image or apply all of the first information to the second image.

[0259] Based on the embodiments of this application, in image-to-image retouching, the first electronic device can apply the visual information of the reference image to the image to be retouched, ensuring that the retouched result is consistent with the effect of the reference image. Alternatively, the electronic device can also apply retouching techniques corresponding to the reference image to the image to be retouched, thereby improving the speed and efficiency of image-to-image retouching. Furthermore, this technical solution is not limited to specific retouching scenarios, making the application scope of image-to-image retouching wider.

[0260] In some implementations, before retouching the second image using the first reference image, the method 900 further includes:

[0261] The first electronic device determines from multiple reference images to use the first reference image for image retouching of the second image.

[0262] For example, the first electronic device may include a plurality of reference images. The first reference image may be selected by the user or matched by the first electronic device based on features.

[0263] Based on the embodiments of this application, when retouching an image, the first electronic device can first determine a first reference image for retouching from multiple reference images, so that the electronic device can determine which reference image to use.

[0264] In some implementations, the first reference image is determined from multiple reference images, including:

[0265] The first electronic device performs feature matching from multiple reference images based on the first feature information of the second image to determine whether to use the first reference image to perform image retouching on the second image.

[0266] For example, the first feature information may be the image content, style, etc., of the second image as a whole.

[0267] It should be understood that when the electronic device uses the first feature information of the second image to perform feature matching from multiple reference images, it seeks the reference image with the highest matching degree with the first feature information of the second image, so that the matched reference image is most similar to the second image.

[0268] In this way, by matching the reference image based on the feature information of the second image, a first reference image similar to the second image can be found, which can result in better image editing effect and better meet the user's preferences.

[0269] In some implementations, before the first electronic device performs feature matching from multiple reference images based on the first feature information of the second image, the method 900 further includes:

[0270] The first electronic device determines the area to be retouched in the second image based on the user's first operation in the second image, wherein the first feature information is the feature information in the area to be retouched.

[0271] For example, the first operation can be an operation such as smearing, drawing circles, drawing lines, or clicking.

[0272] For example, if the area to be retouched is the area where the portrait is located, then matching will be prioritized from the reference image containing the portrait.

[0273] Based on the embodiments of this application, the first electronic device can determine the area to be edited in the second image according to the user's operation in the second image, and perform feature matching from multiple reference images according to the feature information of the area to be edited, so as to determine the first reference image to be used to edit the second image, thereby making the obtained first reference image similar to or the same as the area to be edited, and thus making the editing effect better.

[0274] In some implementations, when retouching a second image using a first reference image, the first information is applied to the second image to obtain a third image, including:

[0275] When the first electronic device uses the first reference image to retouch the second image, it applies the first information to the area of ​​the second image to be retouched to obtain the third image.

[0276] Based on the embodiments of this application, after matching a suitable first reference image, the first information of the first reference image can be applied to the area to be retouched to complete the retouching process of the area to be retouched. This allows for local retouching of the second image, improving the flexibility of the retouching process.

[0277] In some implementations, the second image is retouched using a first reference image, including retouching the second image using a first application.

[0278] In some implementations, the step of retouching the second image through the first application includes: retouching the second image by calling an interface provided by the first application.

[0279] Based on the embodiments of this application, for the image editing techniques provided by the third-party application included in the first reference image, the first electronic device can call the open interface of the third-party application to implement the image editing techniques, thereby improving the diversity of image editing techniques and enriching the image editing effect.

[0280] In some implementations, the first electronic device calls the interface provided by the first application to perform image retouching on the second image, including: the first electronic device sending the second image and an image retouching technique identifier sequence to the first application, wherein the image retouching technique identifier sequence includes at least one image retouching technique identifier, and the image retouching technique identifier corresponds one-to-one with an image retouching technique; and receiving the third image sent by the first application.

[0281] The first application can perform image retouching on the second image based on the image retouching technique identifier sequence to obtain a third image, and then return the retouched third image to the first electronic device.

[0282] It should be understood that in this case, the first application can perform image retouching on the second image as a whole.

[0283] In some examples, the first electronic device also needs to send the image editing area location information to the first application, so that the first application can perform image editing processing on the area indicated by the image editing area location information.

[0284] It should be understood that this location information can be coordinate information.

[0285] In some cases, the location information of the retouched area may include the location information of the entire area of ​​the second image, or it may include the location information of a portion of the second image.

[0286] In some cases, the first application can also identify the retouching area of ​​the second image. For example, when the second image includes a portrait, and the retouching technique identifier sequence includes retouching techniques used to retouch portraits (such as skin smoothing, eye enlargement, etc.), the first application can determine that the area to be retouched is the area where the face is located.

[0287] It should also be understood that the first electronic device needs the user's authorization before calling the first application to edit the second image. With the user's permission, the first electronic device calls the first application to edit the second image.

[0288] In some examples, the first electronic device may also obtain in advance from the first application the identifier of the retouching technique of the first reference image, and write the retouching technique (or identifier) ​​into the image file of the first reference image, such as in the metadata of the image file, or it may associate the retouching technique (or identifier) ​​with the first reference image.

[0289] In some implementations, the first reference image is obtained by retouching a first application.

[0290] For example, the first application is a third-party application. When the first reference image is obtained by the first application through image editing, the electronic device needs to call the interface of the first application to perform image editing on other images in the future.

[0291] In some implementations, when displaying the first reference image or the third image, the first electronic device is further configured to display an identifier of the first application, the identifier of the first application being used to indicate that at least some of the image editing techniques corresponding to the first reference image or the third image were obtained through image editing by the first application.

[0292] In this way, the user can determine that the first reference image or the third image was obtained by retouching with the assistance of the first application.

[0293] In other examples, the first electronic device may also display a joint logo of another logo used for photo editing functions and the logo of the first application.

[0294] In some implementations, the first reference image is an image obtained by retouching using a first set of retouching techniques.

[0295] In other examples, the first reference image can also be the original, unedited image, in which case the first electronic device can also simulate image editing techniques.

[0296] In some implementations, the first electronic device acquires the first reference image, including:

[0297] The first electronic device uses a first set of image retouching techniques to retouch the fourth image to obtain the first reference image.

[0298] Based on the embodiments of this application, the first electronic device can use a first set of image retouching techniques to retouch the fourth image according to the user's operation, so as to obtain a first reference image. In this way, the first electronic device can save the user's image retouching process, which is beneficial for subsequent batch image retouching.

[0299] In some implementations, the first set of image retouching techniques refers to image retouching techniques obtained by analyzing a first reference image that can achieve the display effect of the first reference image.

[0300] Based on the embodiments of this application, the first electronic device can simulate image retouching techniques according to the display effect of the reference image, so as to determine the simulated image retouching techniques.

[0301] In some implementations, the first information includes the first set of image retouching techniques. When retouching the second image using the first reference image, applying the first information to the second image to obtain a third image includes: when retouching the second image using the first reference image, applying target image retouching techniques included in the first set of retouching techniques to the second image to obtain a third image. The target image retouching techniques are some or all of the at least one set of retouching techniques.

[0302] Based on the embodiments of this application, when the first electronic device uses the first reference image to perform image retouching on the second image, some or all of the image retouching techniques corresponding to the first reference image can be applied to the second image, thereby improving the diversity of the retouching results.

[0303] In some implementations, before applying the target retouching techniques included in the first set of retouching techniques to the second image, the method 900 further includes: determining the target retouching techniques in response to a user's selection operation.

[0304] Based on the embodiments of this application, users can choose which image editing techniques to apply, thereby improving the flexibility of the image editing results.

[0305] In some implementations, the visual information includes at least one of light and shadow information, composition information, and color information.

[0306] In other examples, the visual information may also include other information, which is not limited in the embodiments of this application.

[0307] In some implementations, when using the first reference image to retouch the second image, applying the first information to the second image to obtain a third image includes: when using the first reference image to retouch the second image, applying the visual information of the first image content in the first reference image to the second image content in the second image, wherein the first image content and the second image content are of the same type.

[0308] In some implementations, the first image content is obtained by semantic recognition of the first reference image, and the second image content is obtained by semantic recognition of the second image.

[0309] For example, the first image contains a portrait, and the second image also contains a portrait. Or, the first image contains a building, and the second image also contains a building.

[0310] For example, if the visual information is color information, the first electronic device applies the first color of the first image content to the second image content in the second image, thereby ensuring that the color information of the edited image is consistent with the color information of the reference image. Alternatively, the visual information may also include lighting information, composition information, etc.

[0311] Based on the embodiments of this application, an electronic device can apply the color of the first image content in the first reference image to the second image content in the second image. The first image content and the second image content are of the same type, which can make image editing more interesting, and the color information of the edited image is consistent with that of the reference image, thereby improving the user experience.

[0312] In some implementations, the metadata of the first reference image includes the first information, or the first reference image is associated with the first information.

[0313] For example, the first information can be stored as a file in a specific format, which can be associated with a first reference image, so that the file in the specific format can be obtained through the first reference image to determine the corresponding first information.

[0314] In some implementations, acquiring the first reference image includes receiving the first reference image sent by a second electronic device.

[0315] In some cases, method 900 can be executed by a system service in the first electronic device or by a first application running in the first electronic device. The first application can be a system application, such as a library application, or a third-party application. The system service can reside in the framework layer.

[0316] When the system service executes method 900, the image retouching process can be as follows: after acquiring the first reference image, the system service uses the first reference image to retouch the second image. Alternatively, after acquiring the first reference image, the system service uses a first application running on the first electronic device (such as a library or third-party application A) to retouch the second image using the first reference image. For example, the system service calls the first application to use the first reference image to retouch the second image. Furthermore, the first reference image can be obtained through retouching by the first application.

[0317] When the first application executes method 900, the image retouching process can be as follows: after acquiring the first reference image, the first application uses the first reference image to retouch the second image. Alternatively, after acquiring the first reference image, the first application uses another application (such as third-party application A) running in the first electronic device to retouch the second image using the first reference image. For example, the first application calls the interface of third-party application A to implement image retouching of the second image using the first reference image.

[0318] When a system service or system application (such as a library) performs image retouching by calling a third-party application, the retouching process can be as follows: the third-party application retouches the image to obtain a first reference image; the system service or system application can obtain the first reference image obtained by the third-party application and call the third-party application to use the first reference image to retouch the second image. For example, the system service or system application calls the interface provided by the third-party application to use the first reference image to retouch the second image.

[0319] For example, Figure 11 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Figure 11 As shown, the electronic device 1000 includes one or more processors 1010; one or more memories 1020; the one or more memories 1020 storing one or more instructions that, when executed by one or more processors 1010, cause the method described in any of the possible implementations above to be executed.

[0320] For example, the electronic device 1000 may be the electronic device 100, electronic device 300 mentioned above, the electronic device in the embodiment, the first electronic device, the second electronic device, etc.

[0321] This application also provides an electronic device, including a processor, a memory, and a communication interface, wherein the communication interface is used to receive signals, the memory is used to store signals, the communication interface is also used to transmit signals to the processor, and the processor processes the signals so that the image editing method described in any of the possible implementations above is executed.

[0322] This application also provides an image retouching apparatus, including a processor and a communication interface. The communication interface is used to receive signals and transmit the signals to the processor. The processor processes the signals so that the image retouching method described in any of the possible implementations above is executed.

[0323] The device can be a chip. For example, the chip can be a chip system or a standalone chip.

[0324] This application also provides a readable storage medium (also known as a computer-readable storage medium) storing instructions that, when executed on an electronic device, cause the electronic device to perform the aforementioned method steps to implement the image retouching method in the above embodiments.

[0325] This application also provides a program product (also known as a computer program product) that, when run on an electronic device, causes the electronic device to perform the aforementioned related steps to implement the image retouching method described in the above embodiments.

[0326] This application also provides an apparatus including modules for implementing the image retouching method as described in any of the preceding embodiments.

[0327] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store instructions, and when the apparatus is running, the processor may execute the instructions stored in the memory to cause the apparatus to perform the image retouching methods in the above-described method embodiments.

[0328] In this embodiment, the device, readable storage medium, program product or apparatus are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0329] 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.

[0330] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0331] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of 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.

[0332] 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.

[0333] In addition, the functional units in the various embodiments of this application 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.

[0334] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0335] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for retouching images, characterized in that, The method is applied to a first electronic device, and the method includes: Obtain a first reference image, wherein the first reference image has first information, the first information including visual information of the first reference image, and / or a first set of retouching techniques corresponding to the first reference image, the first set of retouching techniques including at least one retouching technique; When using the first reference image to retouch the second image, the first information is applied to the second image to obtain the third image.

2. The method according to claim 1, characterized in that, Before retouching the second image using the first reference image, the method further includes: The first reference image is selected from multiple reference images to perform image retouching on the second image.

3. The method according to claim 2, characterized in that, Determining the first reference image from a plurality of reference images includes: Based on the first feature information of the second image, feature matching is performed from the plurality of reference images to determine whether to use the first reference image to perform image retouching on the second image.

4. The method according to claim 3, characterized in that, Before performing feature matching from the plurality of reference images based on the first feature information of the second image, the method further includes: Based on the user's first operation in the second image, the region to be retouched in the second image is determined, wherein the first feature information is the feature information in the region to be retouched.

5. The method according to claim 4, characterized in that, When retouching the second image using the first reference image, the first information is applied to the second image to obtain the third image, including: When using the first reference image to retouch the second image, the first information is applied to the area of ​​the second image to be retouched to obtain the third image.

6. The method according to any one of claims 3-5, characterized in that, The first feature information includes image content.

7. The method according to any one of claims 1-6, characterized in that, The step of using the first reference image to retouch the second image includes: The second image is retouched using the first application.

8. The method according to claim 7, characterized in that, The image retouching process performed on the second image using the first application includes: The second image is retouched by calling the interface provided by the first application.

9. The method according to claim 7 or 8, characterized in that, The first reference image was obtained by retouching the image using the first application.

10. The method according to any one of claims 7-9, characterized in that, The method further includes: When displaying the first reference image or the third image, the first electronic device is also configured to display an identifier of the first application, the identifier indicating that at least some of the retouching techniques corresponding to the first reference image or the third image were obtained through retouching by the first application.

11. The method according to any one of claims 1-10, characterized in that, The first reference image is an image obtained by retouching using the first set of retouching techniques.

12. The method according to claim 11, characterized in that, The acquisition of the first reference image includes: The first set of image editing techniques is used to edit the fourth image to obtain the first reference image.

13. The method according to any one of claims 1-12, characterized in that, The first set of image editing techniques consists of image editing techniques obtained by analyzing the first reference image that can achieve the display effect of the first reference image.

14. The method according to any one of claims 1-13, characterized in that, The first information includes the first set of image editing techniques, wherein, when using the first reference image to edit the second image, applying the first information to the second image to obtain the third image includes: When using the first reference image to retouch the second image, the target retouching techniques included in the first set of retouching techniques are applied to the second image to obtain the third image, wherein the target retouching techniques are some or all of the at least one retouching techniques.

15. The method according to claim 14, characterized in that, Before applying the target retouching techniques included in the first set of retouching techniques to the second image, the method further includes: In response to the user's selection, the target image editing technique is determined.

16. The method according to any one of claims 1-15, characterized in that, The visual information includes at least one of light and shadow information, composition information, and color information.

17. The method according to any one of claims 1-16, characterized in that, When using the first reference image to retouch the second image, applying the first information to the second image to obtain the third image includes: When using the first reference image to retouch the second image, the visual information of the first image content in the first reference image is applied to the second image content in the second image, wherein the first image content and the second image content are of the same type.

18. The method according to claim 17, characterized in that, The first image content is obtained by semantic recognition of the first reference image, and the second image content is obtained by semantic recognition of the second image.

19. The method according to any one of claims 1-17, characterized in that, The metadata of the first reference image includes the first information, or the first reference image is associated with the first information.

20. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories storing one or more programs that, when executed by one or more processors, cause the method as described in any one of claims 1-19 to be performed.

21. A chip, characterized in that, The chip includes a processor and a communication interface, the communication interface being used to receive signals and transmit the signals to the processor, the processor processing the signals such that the method as described in any one of claims 1-19 is executed.

22. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on an electronic device, cause the method as described in any one of claims 1-19 to be performed.

23. A program product, characterized in that, The program product includes program code that, when run on an electronic device, causes the method as described in any one of claims 1-19 to be performed.