Image processing method and device
By removing and correlating image elements in electronic devices or sending them to other devices, the problem of excessive storage space occupies electronic devices is solved, and the effect of saving storage space is achieved.
Patent Information
- Application Number
- CN202510226991.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-30
AI Technical Summary
The increase in the number of images stored in electronic devices leads to an increase in storage space usage, and a method is needed to save storage space.
After displaying an image in an electronic device, the image elements in the image are removed and associated with other image elements, or information about the image elements is sent to other electronic devices to reduce stored image elements.
It is realized that without affecting the image display effect, the storage space of the electronic device is saved, by removing duplicate or similar image elements and performing association or transmission.
Smart Images

Figure CN120075456A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of image processing, and particularly relates to an image processing method and apparatus. Background Art
[0002] Currently, the number of images stored in electronic devices is increasing.
[0003] However, the more images stored in an electronic device, the greater the occupancy of the storage space of the electronic device. Therefore, how to save the storage space of the electronic device is an urgent problem to be solved. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide an image processing method and apparatus, which can reduce the occupancy of the storage space of the electronic device by images, thereby saving the storage space of the electronic device.
[0005] In a first aspect, the embodiments of this application provide an image processing method, which is applied to a first electronic device. The method includes: displaying a first image; removing a first image element from the first image and performing a first operation, where the first operation includes any one of the following: associating the image information of the first image element with a second image element in a second image, where the second image element is an image element whose element similarity with the first image element is greater than or equal to a preset threshold; sending the image information of the first image element and a first piece of information to a second electronic device; where the first piece of information is used to indicate associating the image information of the first image element with the second image element, or the first piece of information includes the first image element.
[0006] In a second aspect, the embodiments of this application provide an image processing apparatus, which includes: a display module and a processing module. The display module is used to display a first image. The processing module is used to remove a first image element from the first image displayed by the display module and perform a first operation, where the first operation includes any one of the following: associating the image information of the first image element with a second image element in a second image, where the second image element is an image element whose element similarity with the first image element is greater than or equal to a preset threshold; sending the image information of the first image element and a first piece of information to a second electronic device; where the first piece of information is used to indicate associating the image information of the first image element with the second image element, or the first piece of information includes the first image element.
[0007] In a third aspect, the embodiments of this application provide an electronic device, which includes a processor and a memory. The memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] Fourthly, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] Fifthly, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is configured to run a program or instruction to implement the method described in the first aspect.
[0010] Sixthly, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0011] In the embodiment of the present application, the first electronic device can display a first image, remove a first image element from the first image, and perform a first operation. The first operation may include any one of the following: associating the image information of the first image element with a second image element in a second image, where the second image element is an image element whose element similarity to the first image element is greater than or equal to a preset threshold; sending the image information of the first image element and a first piece of information to a second electronic device. Wherein, the first piece of information can be used to indicate associating the image information of the first image element with the second image element, or the first piece of information includes the first image element. Through this solution, since the first electronic device can remove the first image element from the first image after displaying the first image, that is, the first electronic device does not need to store the first image element in the first image, the storage space of the first electronic device can be saved. Also, because the image information of the first image element can be associated with the second image element, or the first electronic device can send the image information of the first image element and the first piece of information to the second electronic device, when the first electronic device needs to display the first image again, the first device can obtain the first image element or a second image element whose element similarity to the first image element is greater than or equal to the preset threshold based on the association relationship between the image information of the first image element and the second image element or the image information of the first image element, and restore and display the first image based on the obtained image element. In this way, the first electronic device can completely display the image without storing some image elements in the image, thereby saving the storage space of the first electronic device on the basis of ensuring the image display effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a schematic flowchart of an image processing method provided by an embodiment of the present application;
[0013] Figure 2 is an example schematic diagram of image element description provided by an embodiment of the present application;
[0014] Figure 3A One of the schematic diagrams of the image processing method provided by the embodiments of this application;
[0015] Figure 3B Another schematic diagram of the image processing method provided by the embodiments of this application;
[0016] Figure 3C Another schematic diagram of the image processing method provided by the embodiments of this application;
[0017] Figure 3D Another schematic diagram of the image processing method provided by the embodiments of this application;
[0018] Figure 4A Another schematic diagram of the image processing method provided by the embodiments of this application;
[0019] Figure 4B Another schematic diagram of the image processing method provided by the embodiments of this application;
[0020] Figure 4C Another schematic diagram of the image processing method provided by the embodiments of this application;
[0021] Figure 4D Another schematic diagram of the image processing method provided by the embodiments of this application;
[0022] Figure 5A Another schematic diagram of the image processing method provided by the embodiments of this application;
[0023] Figure 5B Another schematic diagram of the image processing method provided by the embodiments of this application;
[0024] Figure 6 One of the schematic diagrams of the display prompt information provided by the embodiments of this application;
[0025] Figure 7 Another schematic diagram of the display prompt information provided by the embodiments of this application;
[0026] Figure 8 Schematic diagram of the structure of the image processing device provided by the embodiments of this application;
[0027] Figure 9 Schematic diagram of the structure of an electronic device provided by the embodiments of this application;
[0028] Figure 10 Hardware schematic diagram of an electronic device provided by the embodiments of this application. Detailed implementation manners
[0029] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually of the same type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the related objects before and after are in an "or" relationship.
[0031] The terms "at least one (item)", "at least one of", etc. in the specification and claims of the present application refer to any one, any two or more combinations of the objects it contains. For example, at least one (item) of a, b, and c can mean: "a", "b", "c", "a and b", "a and c", "b and c", and "a, b, and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" means two or more, and its meaning is similar to that of "at least one (item)".
[0032] Next, in conjunction with the accompanying drawings, the image processing method and device provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0033] Next, taking some specific scenarios of the embodiments of the present application as examples, the image processing method provided by the embodiments of the present application will be exemplarily described.
[0034] Scenario 1: There are image elements with a similarity greater than or equal to a preset threshold in different images in the same electronic device. Suppose there are image A and image B stored in the electronic device. Among them, image A includes the following image elements: "lovely child", "big tree", "cloud", and "sun"; image B includes the following image elements: "lovely child", "ID card", "pet dog", and the "lovely child" in image B is exactly the same as the "lovely child" in image A. Then, after the electronic device displays image A, it can remove the "lovely child" in image A and associate the "lovely child" in image B with the image identifier of image A and the element parameters of the "lovely child" in image A. Thus, when the electronic device needs to display image A again, it can, based on this association relationship and the image identifier of image A, fuse the "lovely child" in image B into image A and display it. In this way, when there are the same image elements, such as "lovely child", in two images in the electronic device, the electronic device can store only one "lovely child" instead of storing multiple identical image elements, thereby saving the storage space of the electronic device without affecting the image display effect.
[0035] Scenario 2: There are image elements with a similarity greater than or equal to a preset threshold between the images in two electronic devices. Suppose there is image A stored in electronic device 1, and image A includes the following image elements: "lovely child", "big tree", "cloud", and "sun"; there is image B stored in electronic device 2, and image B includes the following image elements: "lovely child", "ID card", "pet dog". Electronic device 1 and electronic device 2 are connected to each other, and the similarity between the "lovely child" in image A and the "lovely child" in image B is greater than or equal to the preset threshold, such as 99%. Then, after the electronic device displays image A, it can remove the "lovely child" in image A and send to electronic device 2: the image identifier of image A, the element parameters of the "lovely child" in image A, and the first information indicating that the image information of the "lovely child" is associated with the "lovely child" in image B. Thus, when electronic device 1 needs to display image A again, electronic device 1 can, based on the image information of image A, request the image information of the "lovely child" in image A and the "lovely child" in image B from electronic device 2, and then, based on the requested image information of the "lovely child" in image A and the "lovely child" in image B, fuse the "lovely child" in image B into image A and display it. In this way, when there is an image element "lovely child" with a similarity greater than or equal to the preset threshold between two electronic devices, the "lovely child" can be stored in one of the two electronic devices instead of storing the image element "lovely child" with a similarity greater than or equal to the preset threshold in both electronic devices, thereby saving the storage space of the electronic device.
[0036] Scenario 3: Store some image elements in an image of an electronic device in another electronic device. Assume that image A is stored in electronic device 1, and image A includes the following image elements: "lovely child", "ID card", and "pet dog", and electronic device 1 and electronic device 2 are connected to each other. Then, after displaying image A, electronic device 1 can remove the "ID card" from image A and send to electronic device 2: the image identifier of image A, the element parameters of the "ID card" in image A, and the "ID card". Thus, when electronic device 1 needs to display image A again, electronic device 1 can request the image information of the "ID card" in image A and the "ID card" in image A from electronic device 2 based on the image information of image A, and then electronic device 1 can fuse the "ID card" in image A stored in electronic device 2 into image A and display it based on the requested image information of the "ID card" in image A and the "ID card" in image A. In this way, an electronic device can send some image elements, such as an "ID card", to electronic device 2 for storage, so as to save the storage space of electronic device 1 without affecting the image display effect.
[0037] In some embodiments of the present application, the element parameters of the image element may include: before removing the image element from the image, the display area parameters, display size parameters, effect parameters, etc. of the image element in the image.
[0038] In some embodiments of the present application, the image information of the image may include the image identifier of the image, so that the electronic device can search for: the image elements associated with the image identifier according to the image identifier of the image, or send a request message to other electronic devices to request other electronic devices to search for: the image elements associated with the image identifier.
[0039] It should be noted that the above Scenarios 1 to 3 only exemplarily list some scenarios to which the embodiments of the present application may be applied. In actual implementation, the embodiments of the present application may also be applied to any possible scenarios with more requirements for saving the storage space of the electronic device, and the embodiments of the present application are not limited thereto.
[0040] The embodiments of the present application provide an image processing method, Figure 1 which shows a schematic flowchart of the image processing method provided by the embodiments of the present application, as Figure 1 shown, the image processing method may include the following steps 201 and 202.
[0041] Step 201, the first electronic device displays the first image.
[0042] In some embodiments of the present application, the first image may include at least one of the following: an image captured by a first electronic device, an image captured by the first electronic device's screenshot, an image received by the first electronic device, an image downloaded by the first electronic device, an image generated by the first electronic device, etc.
[0043] In some embodiments of the present application, the image type of the first image may include any one of the following: an image of a real object, such as an image of a person being photographed, an anime image, a hand-drawn image, an AI image generated by Artificial Intelligence (AI), etc.
[0044] In some embodiments of the present application, the first electronic device may display the first image based on a user input.
[0045] For example, the first electronic device may display the first image based on a click input by the user on the thumbnail of the first image.
[0046] Step 202: The first electronic device removes the first image element from the first image and performs a first operation.
[0047] Among them, the first operation may include any one of the following Operations 1 to 3:
[0048] Operation 1: Associate the image information of the first image element with a second image element in a second image, where the second image element is an image element whose element similarity to the first image element is greater than or equal to a preset threshold;
[0049] Operation 2: Send the image information of the first image element and a first message to a second electronic device, and the first message is used to indicate associating the image information of the first image element with a second image element, and the second image element is an image element whose element similarity to the first image element is greater than or equal to a preset threshold;
[0050] Operation 3: Send the image information of the first image element and a first message to a second electronic device, and the first message includes the first image element.
[0051] In some embodiments of the present application, removing the first image element from the first image can be understood as: cropping the first image element from the first image, that is, deleting the first image element from the first image and retaining the remaining image area in the first image except the area where the first image element is located. Among them, deleting the first image element from the first image may include: deleting the image data of the first image element from the image data of the first image.
[0052] In some embodiments of the present application, an image element is the image content of an object in an image. Among them, the object in the image may include, but is not limited to: any possible objects such as people, animals, plants, starry sky, sun, rivers, lakes and seas.
[0053] For example, as Figure 2 shown, the following image elements may be included in the image 20: "sun" 21, "cloud" 22, "coconut tree" 23, "coconut tree" 24, "little girl with a schoolbag" 25, "little boy with a schoolbag" 26, and "sea" 27.
[0054] In some embodiments of the present application, the image information of the image element may include: the image identifier of the image where the image element is located, and the display parameters of the image element in the corresponding image.
[0055] For example, the image identifier of the image where the first image element is located is the image identifier of the first image.
[0056] In some embodiments of the present application, the display parameters may include at least one of the following: display area parameters, display size parameters, effect parameters, etc.; the image identifier may be the serial number, name, or thumbnail of the image, and the image identifier of the image may be used to indicate the corresponding image. Among them, the effect parameters may include but are not limited to at least one of the following: filter parameters, transparency parameters, contrast parameters, blur parameters, etc.
[0057] For example, the display parameters of the first image element may include the display area parameters, display size parameters, and filter parameters of the first image element in the first image.
[0058] In some embodiments of the present application, the display area parameters may be the coordinate information of the image element in the image.
[0059] For example, the display area parameters of the first image element may be the coordinate information of the first image element in the first image.
[0060] In some embodiments of the present application, "associating the image information of the first image element with the second image element in the second image" may include: associating the image information of the first image element with the identifier of the second image element.
[0061] In some embodiments of the present application, if the element similarity of two image elements is greater than or equal to a preset threshold, then these two image elements may be referred to as similar image elements, that is, one image element is the similar image element of the other image element.
[0062] It can be understood that after the first electronic device sends the element information and the first information of the first image element to the second electronic device, the second electronic device may receive the element information and the first information of the first image element and perform related operations.
[0063] Specifically, in operation 2, after the second electronic device receives the image information and the first information of the first image element, the second electronic device may associate the image information of the first image element with the second image element.
[0064] In operation 3, after the second electronic device receives the image information and the first information of the first image element, the first image element may be stored in the second electronic device.
[0065] In some embodiments of the present application, in operation 2, the first information may include: the identifier of the second image element, so that after the second electronic device receives the first information and the image information of the first image element, the second electronic device may associate the second image element with the image information of the first image element.
[0066] It should be noted that when the first electronic device executes operation 1, subsequently, based on the association relationship between the image information of the first image element and the second image element, the second image element may be used as the first image element, so that the first image can be restored and displayed; or, when the first electronic device executes operation 2, subsequently, the second image element in the second electronic device may be obtained, and the second image element may be used as the first image element, and the first image is restored and displayed in the first electronic device; or, when the first electronic device executes operation 3, subsequently, the first image element in the second electronic device may be obtained, and the first image is restored and displayed in the first electronic device.
[0067] In some embodiments of the present application, in operation 1, the second image and the first image may be two different images in the first electronic device; or, the second image and the first image may be the same image in the first electronic device, that is, the element similarity between the first image element and the second image element, which are two image elements in the same image, is greater than or equal to a preset threshold.
[0068] In some embodiments of the present application, in operation 2, the first image is an image stored in the first electronic device, and the second image is an image stored in the second electronic device.
[0069] In some embodiments of the present application, the second electronic device may be an electronic device connected to the first electronic device.
[0070] Among them, the connection method between the first electronic device and the second electronic device may be any one of the following: Bluetooth connection, Wi-Fi connection, local area network connection, Near Field Communication (NFC) connection, and communication connection through a base station, etc. Of course, the first electronic device and the second electronic device may also be connected by any other possible method, and the embodiments of the present application do not limit this.
[0071] In some embodiments of the present application, after the first electronic device displays the first image, in operation 1, the first electronic device may search for image elements in the images stored in the first electronic device that have an element similarity greater than or equal to a preset threshold with the image elements of the first image.
[0072] In operation 2, after the first electronic device displays the first image, the first electronic device may request the second electronic device to send the images in the second electronic device to the first electronic device. Then, the first electronic device may compare the element similarity of each received image with the image elements in the first image to determine whether there are image elements in the images stored in the second electronic device that have an element similarity greater than or equal to the preset threshold with the image elements in the first image. It can be understood that in actual implementation, the first electronic device may also send the first image to the second electronic device, and the second electronic device may search for image elements in the images stored in the second electronic device that have an element similarity greater than or equal to the preset threshold with the image elements of the first image, and feedback the determination result of the image element similarity to the first electronic device. In addition, the interconnected system may also detect whether there are image elements with an element similarity greater than or equal to the preset threshold between the images stored in multiple interconnected devices, and share the detection result to each interconnected electronic device.
[0073] For example, electronic device A displays image 1, and the interconnected system sends an indication message to multiple interconnected electronic devices to indicate that each electronic device detects whether there are image elements in the stored images of the device that have an element similarity greater than or equal to the preset threshold with the image elements in image 1, and shares the detection result to each interconnected electronic device.
[0074] In some embodiments of the present application, when there are images with high similarity in two electronic devices and there are repeated (i.e., identical) local image elements in the images, the first electronic device may remove the corresponding local image elements in one of the images and perform operation 2.
[0075] In some embodiments of the present application, in operation 3, after the first electronic device displays the first image, it may send the first image element and the image information of the first image element to the second electronic device. The second electronic device may receive the first image element and the image information of the first image element sent by the first electronic device and store them in an associated manner.
[0076] It should be noted that the number of the first image elements is not limited in the above embodiments, that is, the first electronic device may remove any number of image elements in the first image, such as removing 1 image element, 2 image elements or 3 image elements in the first image, which may be specifically determined according to actual usage requirements.
[0077] In some embodiments of the present application, when there are multiple first image elements, each image element can be associated with the image identifier of the first image, and the display parameters of different image elements are at least partially different. For example, the display areas of two image elements are different.
[0078] In some embodiments of the present application, for at least two image elements whose image element similarity is greater than or equal to a preset threshold, one of the at least two image elements can be retained or stored, and the remaining image elements among the at least two image elements can be deleted. Among them, the at least two image elements can be any one of the following: different image elements in one image in the same electronic device; image elements in different images in the same electronic device; image elements in images in different electronic devices.
[0079] It can be understood that when the above at least two image elements are image elements in images in different electronic devices, any one of the electronic devices can retain the corresponding image element, and other electronic devices can delete their respective corresponding image elements.
[0080] The following is an exemplary description of steps 201 and 202 with reference to the accompanying drawings.
[0081] Example 1: For operation 1. Assume that the album application of the first electronic device stores images 3001 as shown in Figure 3A and images 3007 as shown in Figure 3C . Image 3001 includes the image element "lovely child" 3002, and image 3007 includes the image element "lovely child" 3008 and the image element "pet dog" 3009. Then: As shown in Figure 3A , when the first electronic device displays image 3001, and the element similarity between the "lovely child" 3008 in image 3007 in the first electronic device and the "lovely child" 3002 in image 3001 is greater than or equal to the preset threshold, then: The first electronic device can remove the "lovely child" 3002 in image 3001 to obtain the image 3004 as shown in Figure 3B , and associate the image information of the "lovely child" 3002 in image 3001 with the "lovely child" 3008 in image 3007; that is, the first electronic device retains the "lovely child" 3008 in image 3007 and deletes the "lovely child" 3002 in image 3001 to save the storage space of the first electronic device. It should be noted that Figure 3B the image 3004 shown in
[0082] It can be understood that in actual implementation, the shape of the black area 3005 can also be the shape of the contour area of the image element, or other possible shapes, which are not limited in the embodiments of the present application. In the following examples provided by the present application, unless otherwise specified, the black area 3005 shown in Figure 3B is used to represent the display situation of the area where the image element is located after removing the image element.
[0083] Example 2: For operation 2. Assume that the image 3001 shown in Figure 3A is stored in the first electronic device, and the image 3007 shown in Figure 3C is stored in the second electronic device. The image 3001 includes the image element "lovely child" 3002, and the image 3007 includes the image element "lovely child" 3008 and the image element "pet dog" 3009. The first electronic device is connected to the second electronic device. Then: After the first electronic device displays the image 3001, it can obtain from the second electronic device: Figure 3C The "lovely child" 3008 shown in Figure 3A whose element similarity to the "lovely child" 3002 shown in
[0084] is greater than or equal to the preset threshold. Then, the first electronic device can remove the "lovely child" 3002 from the image 3001 and send the image information of the "lovely child" 3002 in the image 3001 and the first information for instructing the second electronic device to associate the image information of the "lovely child" 3002 in the image 3001 with the "lovely child" 3008 in the image 3007 to the second electronic device. It can be understood that the "lovely child" 3008 in the image 3007 is retained in the second electronic device, and the "lovely child" 3002 in the image 3001 is deleted in the first electronic device, that is, the second electronic device stores the complete image 3007.
[0085] It should be noted that the image identifiers of the image 3001 and the image 3004 are the same, and the image 3004 is the image obtained by removing the "lovely child" 3002 from the image 3001.
[0086] Example 3: For operation 3. Assume that the first electronic device stores the image as shown in Figure 4AThe image 30 shown, the second electronic device is a life device, the first electronic device is a work device, and the first electronic device is connected to the second electronic device. Then: after the first electronic device displays the image 30, after determining the association between the image element "ID card" 31 and the device usage of the second electronic device, the first electronic device can send the image element "ID card" 31 and the image information of the "ID card" 31 to the second electronic device, so that the second electronic device can store the "ID card" 31 and the image information of the "ID card" 31. For example, the second electronic device can store the "ID card" 31 in the form as shown in Figure 4B image 34. It can be understood that Figure 4B is a schematic diagram of the storage of the "ID card" 31 in the second electronic device. In actual implementation, it can also be stored in other forms.
[0087] It should be noted that in the above embodiment, it is an example to perform step 202 after the first electronic device displays the first image. In actual implementation, the first electronic device can also automatically perform step 202 on the first image. For example, after the first image exists in the first electronic device, the first electronic device can perform step 202 on the first image.
[0088] In the image processing method provided in the embodiments of the present application, since the first electronic device can remove the first image element in the first image after displaying the first image, that is, the first electronic device can not store the first image element in the first image, thus saving the storage space of the first electronic device. Also, because the image information of the first image element can be associated with the second image element, or the first electronic device can send the element information of the first image element and the first information to the second electronic device, so when the first electronic device needs to display the first image again, the first electronic device can obtain the first image element or the second image element whose element similarity to the first image element is greater than or equal to the preset threshold based on the association relationship between the image information of the first image element and the second image element or the image information of the first image element, and restore and display the first image based on the obtained image element. In this way, the first electronic device can completely display the image without storing some image elements in the image, thereby saving the storage space of the first electronic device on the basis of ensuring the image display effect.
[0089] In some embodiments of the present application, the above step 202 may include the following step 202A.
[0090] Step 202A: When the element similarity between the first image element and the second image element is greater than or equal to the preset threshold, the first electronic device removes the first image element from the first image and performs the first operation.
[0091] Among them, the first operation may include any one of the following:
[0092] Operation 1: Associate the image information of the first image element with the second image element;
[0093] Operation 2: Send the image information of the first image element and the first information to the second electronic device, and the first information is used to indicate that the image information of the first image element is associated with the second image element.
[0094] For other descriptions of step 202A, refer to the relevant descriptions in the above embodiments. To avoid repetition, they are not elaborated here.
[0095] In this way, since the first electronic device can remove the first image element in the first image whose element similarity with the second image element is greater than or equal to the preset threshold, and perform any one of Operation 1 or Operation 2. Therefore, on the one hand, the storage space of the first electronic device can be saved; on the other hand, based on Operation 1 or Operation 2, the first electronic device can subsequently restore and display the first image element in the first image, thereby improving the image processing ability of the first electronic device. In this way, the image processing method provided by the embodiments of the present application can ensure the image display effect and save the storage space occupied by the image on the electronic device.
[0096] In some embodiments of the present application, after the above step 202A, the image processing method provided by the embodiments of the present application may further include the following steps 401 to 403.
[0097] Step 401: The first electronic device receives the first input from the user.
[0098] In some embodiments of the present application, the first input may be used to trigger the display of the first image.
[0099] In some embodiments of the present application, the first input may be an input to the thumbnail of the first image, an input to the name of the first image, an input to the serial number of the first image, etc.
[0100] In some embodiments of the present application, the above first input may include any one of the following: click input, swipe input, gesture input, or other feasible inputs, and the embodiments of the present application do not limit this.
[0101] In some embodiments of the present application, the above click input may be a click input of any number of times.
[0102] In some embodiments of the present application, the above swipe input may be a swipe operation in any direction, such as swiping up, swiping down, swiping left, or swiping right, etc., and the embodiments of the present application do not limit this.
[0103] In some embodiments of the present application, the above gesture input may include, but is not limited to, at least one of the following: click gesture, swipe gesture, drag gesture, pressure recognition gesture, long press gesture, area change gesture, double press gesture, double click gesture, specific gesture input, or other possible gesture inputs. The specific form of the gesture input may be determined according to actual needs and is not limited in the embodiments of the present application.
[0104] Step 402: In response to the first input, the first electronic device obtains the second image element from the second image based on the association relationship between the image information of the first image element and the second image element.
[0105] In some embodiments of the present application, the first electronic device may find the second image including the second image element based on the image information of the first image element, such as the image identifier of the first image and the above association relationship, so that the first electronic device can obtain the second image element from the second image.
[0106] In some embodiments of the present application, the first electronic device obtaining the second image element from the second image may include: performing a screenshot operation on the second image element in the second image to obtain an image, and using this image as the second image element.
[0107] Step 403: The first electronic device fuses the second image element with the first image after removing the first image element based on the image information of the first image element, and obtains and displays the third image.
[0108] In some embodiments of the present application, the image information of the first image element may include: the display parameters of the first image element in the first image. For the description of the display parameters, refer to the relevant description in the above embodiments.
[0109] In some embodiments of the present application, after obtaining the second image element from the second image, the first electronic device may fuse the second image element with the first image after removing the first image element based on the image information of the second image element and the first image element, such as the display parameters of the first image element, and obtain and display the third image.
[0110] It can be understood that "fusing the second image element with the first image after removing the first image element (hereinafter referred to as image 0)" means that the first electronic device places the second image element in the area corresponding to the display area of the first image element in image 0, that is, the area vacated after removing the first image element from the first image, and fuses the second image element with image 0 according to the display size and effect parameters of the first image element in the first image to obtain the third image.
[0111] It can be understood that since the element similarity between the second image element and the first image element is greater than or equal to a preset threshold, the first electronic device can replace the first image element with the second image element, thereby realizing an effective restoration of the first image. That is to say, the third image can replace the first image.
[0112] Furthermore, since the first electronic device can fuse the second image element with the first image after removing the first image element based on the display parameters of the first image element in the first image, it can ensure that the display parameters of the second image element in the third image match the display parameters of the first image element in the first image, thereby improving the image restoration effect.
[0113] Next, with reference to the accompanying drawings, steps 401 to 403 will be exemplarily described.
[0114] Example 4, in combination with the above Example 1, after the first electronic device associates the image information of "lovely child" 3002 in the image 3001 as shown in Figure 3A with "lovely child" 3008 in the image 3007, the user can click on the thumbnail of the image 3004. Then, the first electronic device can obtain "lovely child" 3008 in the image 3007 based on the image identifier of the image 3001 and the association relationship of "lovely child" 3008 in the image 3007. Then, the first electronic device can fuse "lovely child" 3008 with the image 3004 based on the image information of "lovely child" 3002 associated with "lovely child" 3008, and obtain and display the image 3001 as shown in Figure 3A shown.
[0115] In this way, the first electronic device can receive and respond to the first input of the user, and based on the association relationship between the image information of the first image element and the second image element, fuse the second image element whose element similarity with the first image element is greater than or equal to the preset threshold with the first image after removing the first image element, and obtain and display the third image. That is, the first electronic device realizes the restoration of the first image by fusing the second image element with the first image after removing the first image element, thereby improving the display processing ability of the first electronic device for images and the image display effect on the basis of saving the storage space occupied by the images.
[0116] In some embodiments of the present application, the second image is an image in the second electronic device. After the above step 202A, the image processing method provided by the embodiments of the present application may further include the following steps 501 to 504.
[0117] Step 501, the first electronic device receives a second input from the user.
[0118] In some embodiments of the present application, the second input can be used to trigger the display of the first image.
[0119] In some embodiments of the present application, the second input can be an input to the thumbnail of the first image, an input to the name of the first image, an input to the serial number of the first image, etc.
[0120] In some embodiments of the present application, for other descriptions of the second input, reference can be made to the relevant descriptions of the first input in the above embodiments. To avoid repetition, they are not elaborated here.
[0121] Step 502: In response to the second input, the first electronic device sends a first request message to the second electronic device.
[0122] Among them, the first request message can be used to request the second image element.
[0123] In some embodiments of the present application, after the first electronic device sends the first request message to the second electronic device, the second electronic device can receive the first request message sent by the first electronic device. Then, the second electronic device can send the second image element and the image information of the first image element to the first electronic device.
[0124] In some embodiments of the present application, the first request message may carry partial image information of the first image element. Specifically, the first request message may carry the image identifier of the first image.
[0125] For example, the first electronic device can send a first request message carrying the image identifier of the first image to the second electronic device, so that the second electronic device can find the second image element based on the image identifier of the first image and the association relationship between the second image element and the image information of the first image element (including the image identifier of the first image). Then, the second electronic device can send the second image element and the display parameters of the first image element to the first electronic device.
[0126] Step 503: The first electronic device receives the second image element and the image information of the first image element sent by the second electronic device.
[0127] In some embodiments of the present application, the first electronic device can receive the second image element and the image information of the first image element sent by the second electronic device after the second electronic device sends the second image element and the image information of the first image element to the first electronic device.
[0128] In some embodiments of the present application, the "image information of the first image element" that the second electronic device can send to the first electronic device may include: the display parameters of the first image element, so that the first electronic device can fuse the second image element with the first image after removing the first image element based on the display parameters of the first image element, thereby obtaining a third image.
[0129] Step 504: The first electronic device fuses the second image element with the first image after removing the first image element based on the image information of the first image element, and obtains and displays the third image.
[0130] In some embodiments of the present application, after receiving the first request message sent by the first electronic device, the second electronic device may adjust the effect parameter of the second image element to the effect parameter 1 (hereinafter referred to as effect parameter 1) based on the effect parameter of the first image element associated with the second image element, and send the adjusted second image element to the first electronic device; or, after the second electronic device sends the second image element and the effect parameter associated with the second image element (such as the effect parameter 1 of the first image element) to the first electronic device, the first electronic device adjusts the effect parameter of the second image element to the effect parameter 1 based on the effect parameter of the first image element. Then, the first electronic device may fuse the adjusted second image element with the first image after removing the first image element based on the display area parameter of the first image element, and obtain and display the third image. In this way, the similarity between the third image and the first image can be higher, thereby further improving the image restoration degree and the image display effect.
[0131] The following will describe steps 501 to 504 with specific examples.
[0132] Example 5, in combination with the above Example 2, after the first electronic device sends the image information and the first information of the "lovely child" 3002 in the image 3001 to the second electronic device, the second electronic device may associate the "lovely child" 3008 with the image information of the "lovely child" 3002. After the user clicks on the thumbnail of the image 3004 as shown in Figure 3B the first electronic device may send a first request message to the second electronic device. Then, after receiving the first request message, the second electronic device may find the "lovely child" 3008 in the image 3007 as shown in Figure 3C according to the image identifier of the image 3001 carried in the first request message, and send the display parameters of the "lovely child" 3008 and the "lovely child" 3002 to the first electronic device. Then, the first electronic device may fuse the "lovely child" 3008 with the image 3004 based on the display parameters of the "lovely child" 3002, and obtain and display as shown in Figure 3AThe image 3001 shown.
[0133] In this way, the first electronic device can receive and respond to the second input of the user, send a first request message to the second electronic device, requesting the second electronic device to send a second image element to the first electronic device. Then, the first electronic device can receive the second image element sent by the second electronic device and the image information of the first image element, and based on the image information of the first image element, fuse the second image element with the first image after removing the first image element to obtain and display a third image. That is, the first electronic device realizes the restoration of the first image by fusing the second image element with the first image after removing the first image element, thereby improving the display processing ability of the first electronic device for images and the image display effect on the basis of saving the storage space occupied by the images.
[0134] In some embodiments of the present application, when the second image is an image in the second electronic device, the first electronic device may first determine whether the following first condition is satisfied. If the first condition is satisfied, step 202 may include the following step 202B; if the first condition is not satisfied, the first electronic device may execute the following step 301. It can be understood that the first electronic device may alternatively execute step 202B and step 301.
[0135] Step 202B: When the first electronic device satisfies the first condition, remove the first image element from the first image and perform a first operation.
[0136] Among them, the first condition may include any one of the following:
[0137] Condition 1: The remaining storage space of the first electronic device is less than or equal to the remaining storage space of the second electronic device;
[0138] Condition 2: The usage frequency of the album application of the first electronic device is less than or equal to the usage frequency of the album application of the second electronic device.
[0139] In some embodiments of the present application, before removing the first image element from the first image, the first electronic device may, through interaction with the second electronic device, obtain the remaining storage space of the second electronic device and the usage frequency of the album application of the second electronic device, and determine whether the above first condition is satisfied.
[0140] For example, the first electronic device may send inquiry information to the second electronic device to inquire about the remaining storage space of the second electronic device and the usage frequency of the photo album of the second electronic device. After receiving the inquiry information sent by the first electronic device, the second electronic device sends the remaining storage space of the second electronic device and the usage frequency of the photo album application to the first electronic device. After receiving the storage space and the usage frequency of the photo album application sent by the second electronic device, the first electronic device determines whether the first condition is met.
[0141] In some embodiments of the present application, buried point records for opening the photo album application can be set inside both the first electronic device and the second electronic device, so that the first electronic device can record the number of times the user opens the photo album application on the first electronic device, and the second electronic device can record the number of times the user opens the photo album application on the second electronic device.
[0142] In some embodiments of the present application, the first electronic device and the second electronic device can obtain each other's remaining storage space and the number of times the photo album application is opened through interaction.
[0143] A possible implementation is that the first electronic device may send a request message to the second electronic device, requesting the second electronic device to send the remaining storage space of the second electronic device and the number of times the photo album application is opened to the first electronic device, so as to obtain the remaining storage space of the second electronic device and the number of times the photo album application is opened.
[0144] Similarly, the second electronic device can also obtain the remaining storage space of the first electronic device and the number of times the photo album application is opened in the above manner.
[0145] Another possible implementation is that interconnected electronic devices can send to each other in real time or at regular intervals: the remaining storage space of this device and the number of times the photo album application is opened.
[0146] In some embodiments of the present application, the first electronic device may, based on the interaction with the second electronic device, remove the first image element from the first image and perform a first operation when it is determined that condition 2 is met. In this way, the second image element can be saved in the second electronic device with a high usage frequency of the photo album application, thereby reducing the transmission of the image data of the image element from other electronic devices (such as the second electronic device) back to the first electronic device as much as possible, reducing the number of transmissions of the image element, and thus reducing the interaction times between the first electronic device and the second electronic device, and reducing the power consumption loss of the electronic device.
[0147] In some embodiments of the present application, the first electronic device may, based on the interaction with the second electronic device, remove the first image element from the first image and perform a first operation when it is determined that condition 1 is met. In this way, the storage pressure on the remaining storage space of the first electronic device can be alleviated, and the intelligence of the electronic device for storing images is improved.
[0148] In some embodiments of the present application, the satisfaction priorities of condition 1 and condition 2 can be set in the first electronic device. If the first electronic device determines that both condition 1 and condition 2 are met, the first electronic device may, according to the set satisfaction priority, remove the first image element from the first image and perform the first operation when the condition with the higher satisfaction priority is established.
[0149] For example, the satisfaction priority of condition 1 can be set higher than that of condition 2 in the first electronic device. When the first electronic device determines that both condition 1 and condition 2 are met, condition 1 is preferentially used. When condition 1 is met, the first image element is removed from the first image and the first operation is performed.
[0150] In some embodiments of the present application, a remaining storage space threshold can be set in the first electronic device, such as 20% remaining storage space. When the remaining storage space is less than or equal to the remaining storage space threshold, condition 2 is preferentially used for judgment. When condition 2 is met, the first image element is removed from the first image and the first operation is performed.
[0151] The following describes step 202B with specific examples.
[0152] Exemplarily, the system can determine on which device (i.e., the electronic device) the duplicate element (such as the first image element) is suitable to be stored according to the remaining memory space capacity (i.e., the remaining storage space) on different devices (i.e., electronic devices) and the operation frequency of opening the album application (i.e., the usage frequency of the album application).
[0153] For example, if the system determines that the device with a higher number of album openings is the second electronic device, the image data of the first image element can be preferentially stored on the second electronic device that opens the album application more frequently. In this way, the situation where the image data of the first image element needs to be transmitted back from another device can be minimized as much as possible. Among them, there are click-through rate records for APP openings on the system, and the system can record the number of times the user opens the album on each device. It should be noted that the system can be one of the interconnected electronic devices, such as the first electronic device or the second electronic device.
[0154] In this way, when the first electronic device meets condition 1 or condition 2, it can remove the first image element in the first image, so that the second image element is saved in the second electronic device, and perform the first operation. As a result, the removed first image element can be in the electronic device with less remaining storage space, or in the electronic device with a lower usage frequency of the album application, reducing the risk of insufficient storage space of the first electronic device and the power consumption loss of the first electronic device, thereby improving the image processing ability of the first electronic device.
[0155] Step 301: When the first electronic device does not meet the first condition, it sends the second information to the second electronic device.
[0156] Among them, the second information can be used to indicate removing the second image element in the second image.
[0157] In some embodiments of the present application, after the first electronic device sends the second information to the second electronic device, the second electronic device can receive the second information sent by the first electronic device and remove the second image element in the second image based on the second information.
[0158] In some embodiments of the present application, after the first electronic device sends the second information to the second electronic device, it can also associate the image information of the second image element with the first image element.
[0159] It should be noted that when the first electronic device does not meet the first condition, it can also associate the image information of the second image element with the first image element, so that the first electronic device can subsequently send the image information of the first image element and the second image element to the second electronic device based on the association relationship between the image information of the second image element and the first image element, enabling the second electronic device to use the first image element as the second image element, thereby restoring and displaying the second image.
[0160] In this way, when the first electronic device does not meet the first condition, by sending the second information to the second electronic device, the second electronic device can remove the second image element in the second image, so that the first electronic device can retain the first image element in the first electronic device, thereby increasing the flexibility of image element storage.
[0161] In some embodiments of the present application, the above step 202 may include the following step 202C.
[0162] Step 202C: When the element category corresponding to the first image element is associated with the device usage information of the second electronic device, the first electronic device removes the first image element in the first image and performs the first operation.
[0163] Among them, the first operation may include: sending the image information of the first image element and the first information to the second electronic device, and the first information includes the first image element.
[0164] In some embodiments of the present application, the element category corresponding to the image element includes any one of the following: personal privacy category, work category, life category, travel category, etc.
[0165] For example, when the element category corresponding to the image element is the personal privacy category, the image element may be a personal ID card image element, an express bill image element, etc.; when the element category corresponding to the image element is the work category, the image element may be a meeting minutes image element, a company product image element, etc.; when the element category corresponding to the image element is the life category, the image element may be a landscape-related image element, a food-related image element; when the element category corresponding to the image element is the travel category, the image element may be a train ticket image element, an airplane ticket image element, etc.
[0166] In some embodiments of the present application, the device usage information of the electronic device indicates the usage scenario of the electronic device.
[0167] For example, the device usage may include a life-type device, a work-type device, a business trip-type device, etc.
[0168] In some embodiments of the present application, the association between the element category corresponding to the image element and the device usage information of the second electronic device can be understood as: there is an association relationship between the element category information and the device usage information.
[0169] In some embodiments of the present application, the electronic device may determine the device usage based on at least one of the following: the usage time of the electronic device, the usage location, and the usage application, etc.
[0170] In some embodiments of the present application, the electronic device may determine the element category of the image element based on at least one of the following: the text included in the image element, the image content included in the image element, the position of the image element in the image, etc.
[0171] In some embodiments of the present application, when there are multiple first image elements, the image information of each image element may include: the image identifier of the first image and the display parameters of the corresponding image element.
[0172] The following describes step 202C with specific examples.
[0173] Exemplarily, the electronic device 1 displays an image A. If the element category corresponding to the "identity card" in the image A (such as personal privacy information) is associated with the information of the life device, and the information of the life device indicates the device use of the electronic device 2, then: the first electronic device can remove the "identity card" in the image A and save the "identity card" to the electronic device 2, that is, send the "identity card" and the image information of the "identity card" to the electronic device 2.
[0174] It should be noted that in the above embodiments, the image processing method provided by the embodiments of the present application is illustrated by taking whether the element category corresponding to the image element in the image is associated with the device use information as an example. In actual implementation, the user can also manually trigger the first electronic device to store one or more image elements in an image to one or more electronic devices.
[0175] Exemplarily, when the first electronic device displays the first image, the user can trigger the first electronic device to put the first image in an editing state. Then the user can perform a manual selection input on the first image element in the first image, so that the first electronic device can display a device list, which includes at least one device identifier, and each device identifier indicates an electronic device connected to the first electronic device. Then, the user can trigger the first electronic device to remove the first image element from the first image and save the first image element to the electronic device indicated by the selected device identifier through the selection input of the device identifier.
[0176] For example, assume that the user has multiple electronic devices (hereinafter referred to as devices). Device A is used in the work scenario, device B is used in the life scenario, and device C is used in the business trip scenario. In the image 30 shown in device A Figure 4A there are different types of image information (i.e., the element categories of the image elements). Among them, there is a "document" 35 related to work content and an "identity card" 31 related to personal privacy information. Then, for the purpose of protecting personal privacy information security, etc., Figure 4A as shown, when the first electronic device displays the image 30, the user can trigger the image 30 to be in an editing state. Then the user can long-press the "identity card" 31 in the image 30. As Figure 4D shown, the first electronic device can display a device list 37 on the image 30, which includes the device identifier 32 of device A and the device identifier 33 of device B. Then, the first electronic device can save the "identity card" 31 to device B33 based on the drag input of the user from the "identity card" 31 to the device identifier 33 of device B. That is to say, in this way, it is possible to store some image data in the image, such as the "identity card" 33, to other electronic devices.
[0177] In some embodiments of the present application, when the element category corresponding to the first image element is associated with the device usage information of the second electronic device, the first electronic device sends the image information of the first image element and the first information to the second electronic device, and the first information includes the first image element, so that the first electronic device can subsequently obtain the removed first image element based on the interaction between the first electronic device and the second electronic device, and restore the first image element to the first image after removing the first image element.
[0178] In this way, when the element category corresponding to the first image element is associated with the device usage information of the second electronic device, the first electronic device can remove the first image element from the first image and send the image information of the first image element and the first information including the first image element to the second electronic device; that is, different image elements in the image can be stored separately according to the device usage information associated with the element category corresponding to the image element; thus, on the one hand, the image elements of the image can be classified and stored according to the device usage information, making the storage of image elements more organized; on the other hand, since different image elements in the image in the first electronic device can be stored in different electronic devices, the storage space of the first electronic device can be saved.
[0179] In some embodiments of the present application, after the above step 202C, the image processing method provided by the embodiments of the present application may further include the following steps 601 to 604.
[0180] Step 601: The first electronic device receives a third input from the user.
[0181] Step 602: In response to the third input, the first electronic device sends a second request message to the second electronic device.
[0182] Wherein, the second request message can be used to request the first image element.
[0183] Step 603: The first electronic device receives the first image element and the image information of the first image element sent by the second electronic device.
[0184] Step 604: The first electronic device fuses the first image element with the first image after removing the first image element based on the image information of the first image element, and obtains and displays a third image.
[0185] In some embodiments of the present application, the relevant description of the third input can refer to the relevant description of the first input and the second input above. To avoid repetition, it will not be elaborated here.
[0186] In some embodiments of the present application, the image identifier of the first image may be carried in the second request message.
[0187] In some embodiments of the present application, after the first electronic device sends a second request message to the second electronic device, the second electronic device can receive the second request message sent by the first electronic device, find the first image element based on the image identifier of the first image, and send the first image element to the first electronic device.
[0188] In some embodiments of the present application, after the second electronic device sends the first image element, the first electronic device can receive the first image element sent by the second electronic device and the image information of the first image element, and based on the image information of the first image element, such as display parameters, fuse the first image element with the first image after removing the first image element to obtain and display a third image.
[0189] The following will give an exemplary description of steps 601 to 604 in combination with specific examples.
[0190] Example 6, in combination with the above Example 3, after the first electronic device sends the image element "ID card" 31 and the image information of "ID card" 31 to the second electronic device, so that the second electronic device can store "ID card" 31 and the image information of "ID card" 31, after the user clicks on the thumbnail corresponding to the image 30 as shown in Figure 4A After the first electronic device sends a second request message to the second electronic device, after receiving the second request message, the second electronic device can find the image as shown in Figure 4B associated with the image identifier of the image 30 in the second electronic device according to the image identifier of the image 30, and send "ID card" 31 and the display parameters of "ID card" 31 to the first electronic device. Then, the first electronic device can receive "ID card" 31 and the display parameters of "ID card" 31 sent by the second electronic device, and based on the display parameters of "ID card" 31, fuse "ID card" 31 with the image after removing "ID card" 31 to obtain and display the image as shown in Figure 4A shown.
[0191] In some embodiments of the present application, after the above step 602, the image processing method provided by the present application may further include: displaying identity confirmation information for confirming whether to fuse the first image element with the first image after removing the first image element. The first electronic device can fuse the first image element with the first image after removing the first image element after receiving the confirmation input of the user for the identity confirmation information to obtain and display a third image.
[0192] In this way, the first electronic device can obtain the first image element stored in the second electronic device through the second request message, and based on the image information of the first image element, fuse the first image element with the first image after removing the first image element to obtain and display the third image, thereby increasing the flexibility of the image display of the first electronic device and improving the image processing ability of the first electronic device. That is, the first electronic device can restore the first image by fusing the second image element in other electronic devices with the first image after removing the first image element, thereby improving the image display and processing ability of the first electronic device and the image display effect on the basis of saving the storage space occupied by the image.
[0193] In some embodiments of the present application, after the above steps 403, 504 or 604, the image processing method provided by the embodiments of the present application may further include the following steps 701 to 704.
[0194] Step 701: The first electronic device receives a fourth input from the user for the third image element in the third image.
[0195] In some embodiments of the present application, the relevant description of the fourth input may refer to the relevant description of the first input and the second input above. To avoid repetition, it will not be elaborated here.
[0196] Step 702: In response to the fourth input, the first electronic device displays at least one image element, and the at least one image element is an image element retrieved based on the third image element.
[0197] In some embodiments of the present application, the above at least one image element is an image element retrieved with the third image element as the index.
[0198] In some embodiments of the present application, the first electronic device may perform image element retrieval according to the element content or element name of the third image element, and use the retrieved image element as the above at least one image element.
[0199] For example, if the third image element is "basketball", then the first electronic device can receive and respond to the fourth input from the user for the third image element, and display image elements such as "basketball court", "basketball player", and basketball-related equipment such as "basketball hoop".
[0200] In some embodiments of the present application, the first electronic device may perform an image element retrieval in the first electronic device based on the third image element to obtain at least one image element. Alternatively, the first electronic device may perform an image retrieval through an electronic device connected to the first electronic device based on the third image element to obtain the above-mentioned at least one image element; for example, the first electronic device sends a request message to the second electronic device, and the request message is used to request an image element retrieval based on the third image element, so that the second electronic device can perform an image element retrieval in the second electronic device based on the third image element and send the retrieved image element to the first electronic device.
[0201] Step 703: The first electronic device receives a fifth input from the user for a fourth image element among the at least one image element.
[0202] Step 704: In response to the fifth input, the first electronic device replaces the third image element in the third image with the fourth image element, or adds the fourth image element to the third image.
[0203] In some embodiments of the present application, the first electronic device may receive and respond to the fifth input to display third information in the area where the third image element is located or in the nearby area where the third element is located. The third information may include the device name where the above-mentioned at least one image element is located, a determination control and a cancellation control for determining whether to display the above-mentioned at least one image element in the third image. In the case where the user inputs to the determination control, the first electronic device may, in response to the user's input to the determination control, replace the third image element in the third image with the fourth image element, or add the fourth image element to the third image element.
[0204] For example, as Figure 5A shown, the first electronic device may display third information 42 at the "basketball" 41 based on the user's long-press input on the "basketball" 41 in the image. Then, the first electronic device may receive and respond to the user's confirmation input for the third information, replace the "basketball" 41 with the "basketball court" 43, and obtain Figure 5B the image shown.
[0205] Next, a specific example is used to exemplarily illustrate the image processing method provided in the embodiments of the present application.
[0206] Exemplarily, it is assumed that the user wants to, in the electronic device 1, as Figure 5AThe "basketball" 41 in the image 50 shown is replaced with the "basketball court" (such as the image data of the "basketball court") in the basketball game image in the electronic device 2, and the electronic device 1 is connected to the electronic device 2. Then: The user can long-press the "basketball" 41 in the image 50, and then the electronic device 1 can display the third information, which is used to prompt whether to extract image elements related to the basketball from other devices. Then, after the user performs a confirmation input on the third information, the electronic device 1 can update the "basketball" 41 in the image 50 to the "basketball court" from the electronic device 2, and the updated image 50 is as Figure 5B shown.
[0207] In this way, since the user can trigger the first electronic device to display the image elements retrieved based on one image element in the image by inputting one image element in the image, and trigger the first electronic device to add the retrieved image elements to the image or replace one image element with the retrieved image elements, the image processing ability of the first electronic device can be improved.
[0208] In some embodiments of the present application, the above step 202 may include the following step 202D and step 202E.
[0209] Step 202D, the first electronic device displays a prompt message.
[0210] Wherein, the above prompt message can be used to prompt any one of the following: whether to retain one of the first image element and the second image element, whether to store the first image element to the second electronic device.
[0211] Step 202E, when the first electronic device receives the confirmation input of the user on the prompt message, remove the first image element in the first image and perform the first operation.
[0212] In some embodiments of the present application, when the first electronic device can find a second image element in the first electronic device whose element similarity to the first image element is greater than or equal to a preset threshold, or when the first electronic device obtains, through interaction with the second electronic device, a second image element in the second electronic device whose element similarity to the first image element is greater than or equal to a preset threshold, the above prompt message is displayed.
[0213] In some embodiments of the present application, when the first image and the second image belong to different electronic devices, the above prompt message may further include the device identifier of the electronic device to which the second image belongs.
[0214] For example, assuming that the second image belongs to the electronic device 2, then: as Figure 6As shown, the electronic device 1 can prompt information 51 on the first image, and the prompt information 51 can prompt: whether to retain one of the first image element and the second image element. It can be seen that the device name of the electronic device 2 can be included in the prompt information.
[0215] For example, assume that the first image belongs to the electronic device 1, and the element category of the image element in the first image is associated with the usage information of the electronic device 2. Then: as Figure 7 As shown, the electronic device 1 can prompt information 61 on the first image. It can be seen that the prompt information 61 can prompt: whether to store the first image element to the electronic device 2. It can be seen that the device name of the electronic device 2 can be included in the prompt information.
[0216] In some embodiments of the present application, the first electronic device can display the above prompt information on the first image element, or the first electronic device can display the above prompt information in an adjacent area of the first image element.
[0217] In some embodiments of the present application, when the first electronic device displays the first image, if the first electronic device detects that the device usage information associated with the element category of the first image element does not match the device usage information of the first electronic device, then the first electronic device can display the above prompt information on the first image element or in an adjacent area of the first image element.
[0218] In this way, after the first electronic device displays the prompt information to prompt the user whether to retain one of the first image element and the second image element, or to prompt the user whether to store the first image element to the second electronic device, and upon receiving the user's confirmation input for the prompt information, the first image element in the first image is removed and the first operation is executed. Therefore, the human-computer interaction of the first electronic device can be improved.
[0219] Next, the image processing method provided by the embodiments of the present application will be described with reference to three examples.
[0220] Example 7, assume that the album application of the first electronic device stores images 3001 as Figure 3A shown and images 3007 as Figure 3C shown. The image 3001 includes the image element "lovely child" 3002, and the image 3007 includes the image element "lovely child" 3008 and the image element "pet dog" 3009. Then: as Figure 3A shown, when the first electronic device displays the image 3001, and the element similarity between the "lovely child" 3008 in the image 3007 in the first electronic device and the "lovely child" 3002 in the image 3001 is greater than or equal to a preset threshold. Then: the first electronic device can display in the image 3001 asFigure 3D The prompt message 3010 shown is used to prompt the user whether to retain one of the "lovely child" 3002 in the image 3001 and the "lovely child" 3008 in the image 3007. After the first electronic device receives the confirmation input from the user for the prompt message 3010, the "lovely child" 3002 in the image 3001 is removed to obtain Figure 3B the image 3004 shown, and the image information of the "lovely child" 3002 in the image 3001 is associated with the "lovely child" 3008 in the image 3007. Then, after the user clicks on the thumbnail of the image 3004, the first electronic device can, based on the association relationship between the image identifier of the image 3001 and the "lovely child" 3008 in the image 3007, obtain the "lovely child" 3008 in the image 3007. Then, the first electronic device can, based on the image information of the "lovely child" 3002 associated with the "lovely child" 3008, fuse the "lovely child" 3008 with the image 3004 to obtain and display as Figure 3A the image 3001 shown.
[0221] Example 8, assume that Figure 3A the image 3001 shown is stored in the first electronic device, and Figure 3C the image 3007 shown is stored in the second electronic device, and the image 3001 includes the image element "lovely child" 3002, and the image 3007 includes the image element "lovely child" 3008 and the image element "pet dog" 3009, and the first electronic device is connected to the second electronic device. Then: After the first electronic device displays the image 3001, it can obtain from the second electronic device: Figure 3C the "lovely child" 3008 shown that has an element similarity greater than or equal to the preset threshold with the Figure 3A "lovely child" 3002 shown. Then, the first electronic device can display in the image 3001 the Figure 3D prompt message 3010 shown to prompt the user whether to retain one of the "lovely child" 3002 in the image 3001 and the "lovely child" 3008 in the image 3007. After the first electronic device receives the confirmation input from the user for the prompt message 3010, the "lovely child" 3002 in the image 3001 is removed, and the image information of the "lovely child" 3002 in the image 3001 and the first information for instructing the second electronic device to associate the image information of the "lovely child" 3002 in the image 3001 with the "lovely child" 3008 in the image 3007 are sent to the second electronic device. Then, the second electronic device can associate the "lovely child" 3008 with the image information of the "lovely child" 3002. After the user clicks on the Figure 3BAfter the thumbnail of the image 3004 as shown, the first electronic device may send a first request message to the second electronic device. Then, after receiving the first request message, the second electronic device may, according to the image identifier of the image 3001 carried in the first request message, find the "lovely child" 3008 in the image 3007 as shown in Figure 3C and send the display parameters of the "lovely child" 3008 and the "lovely child" 3002 to the first electronic device. Then, the first electronic device may, based on the display parameters of the "lovely child" 3002, fuse the "lovely child" 3008 with the image 3004 to obtain and display the image 3001 as shown in Figure 3A . In this way, the local information of the image 3001 (i.e., the "lovely child") can be stored separately in electronic devices (i.e., the "lovely child" 3008 in the image 3007 is retained in the second electronic device), and can be integrally displayed (the "lovely child" 3008 in the image 3007 is fused with the image 3004 to obtain and display the restored image 3001, thereby improving the image processing ability of the electronic device.
[0222] Example 9, assume that the first electronic device stores the image 30 as shown in Figure 4A . The second electronic device is a life-type device, the first electronic device is a work-type device, and the first electronic device is connected to the second electronic device. Then: After the first electronic device displays the image 30, it may determine whether the image element "ID card" 31 is associated with the device usage of the first electronic device. In the case where it is determined that the "ID card" 31 is not associated with the device usage of the first electronic device, it searches for an electronic device that can be associated with the "ID card" 31, such as finding that the device usage of the second electronic device can be associated with the "ID card" 31. Then, the first electronic device may display the prompt message 36 as shown in Figure 4C . After receiving the confirmation input of the user for the prompt message 36, it sends the image element "ID card" 31 and the image information of the "ID card" 31 to the second electronic device, so that the second electronic device can store the "ID card" 31 and the image information of the "ID card" 31. Then, after the user clicks on the thumbnail corresponding to the image 30 as shown in Figure 4A , the first electronic device may send a second request message to the second electronic device, so that after the second electronic device receives the second request message, the second electronic device may, according to the image identifier of the image 30, search in the second electronic device for the one associated with the image identifier of the image 30 as shown in Figure 4BThe displayed image, and send the display parameters of "identity card" 31 and "identity card" 31 to the first electronic device. Then, the first electronic device can receive the "identity card" 31 and the display parameters of "identity card" 31 sent by the second electronic device, and based on the display parameters of "identity card" 31, fuse "identity card" 31 with the image after removing "identity card" 31, and obtain and display as Figure 4A the image shown.
[0223] In some embodiments of the present application, the beautification processing capabilities of different electronic devices may be different. If the user needs the image elements in an image to have the effects after being beautified by different electronic devices, the user can trigger the first electronic device to synchronize the image elements to the corresponding electronic devices one by one. Among them, when the first electronic device synchronizes the image elements to the corresponding electronic devices, each image element is associated with the image identifier of the image, each image element is associated with the image information of the image element, and includes indication information indicating that the corresponding electronic device performs beautification processing on the image element. Then, the first electronic device can send request information to the corresponding electronic device based on the user's input to the image, requesting the corresponding electronic device to send the beautified image element and the image information of the image element to the first electronic device. After the first electronic device receives the beautified image element and the information corresponding to the image element sent by the corresponding electronic device, it can fuse the beautified image element with the image after removing the image element based on the image information of the image element, and obtain and display the fused image, that is, the first electronic device integrates and displays the beautified image element again. In this way, multiple local elements (i.e., image elements) in an image can be split and extracted (i.e., removing the image elements) and distributed to multiple electronic devices for processing and optimization and then integrated and displayed again, so as to realize the integration of the processing results of multiple electronic devices and improve the processing ability of the electronic device for the image.
[0224] In some embodiments of the present application, the second image is an image in the second electronic device. If the user needs to store other image elements in the first image to the second electronic device and display the other image elements in the second image, the first electronic device can send the other image elements, the image information of the other image elements, and indication information indicating the association between the second image and the other image elements and the image information of the other image elements to the second electronic device based on the user's input to the other image elements, remove the other image elements in the first image, and display the other image elements in the second image. For the specific process, refer to the relevant description in the above embodiments. To avoid repetition, it will not be elaborated here.
[0225] In some embodiments of the present application, if the first image is an image in a first electronic device, the second image is an image in a second electronic device, the element similarity between the first image element and the second image element is greater than or equal to a preset threshold, and there are difference features in the first image element that are different from the second image element. Then, in order to ensure the restoration effect of the first image:
[0226] In one way, the first electronic device can remove the first image element and retain the difference feature in the first image, that is, remove the part of the first image element that is the same as the second image element and retain the different part.
[0227] In another way, the first electronic device can remove the first image element and carry the difference feature and the display parameters of the difference feature in the image information of the first image element, so that the first electronic device can restore and display the difference feature subsequently. Further, if the user wants to add the difference feature to the second image, such as adding it to the second image element in the second image, then the second electronic device can extract the difference feature and the display parameters of the difference feature from the image information associated with the second image element, and then based on the display parameters, fuse the difference feature with the second image.
[0228] Exemplarily, image A is stored in the first electronic device, and image A includes the image element "lovely child" 1, and there is a "hat" C on the head of "lovely child" 1; image B is stored in the second electronic device, and image B includes the "lovely child" 2 without a hat and the image element "pet dog", and the element similarity between "lovely child" 1 and "lovely child" 2 is greater than or equal to the preset threshold. Then: after the first electronic device displays image A, it can remove "lovely child" 1 and send the image information of "lovely child" 1 and the first information to the second electronic device. The first information is used to indicate that the image information of "lovely child" 1 is associated with "lovely child" 2. Among them, the image information of "lovely child" 1 includes: the display parameters of "lovely child" 1, the image identifier of image A, "hat" C, and the display parameters of "hat" C, so that the second electronic device can associate the image information of "lovely child" 1 with "lovely child" 2 based on the first information. Then, if the user needs to view "hat" C in image B, the second electronic device can extract "hat" C and the display parameters of "hat" C according to the image information association relationship between "lovely child" 2 and "lovely child" 1, and fuse "hat" C with image B and display the fused image based on the display parameters of "hat" C. That is to say, at this time, "hat" C in image A is removed by the first electronic device, and the second electronic device associates and saves "hat" C with "lovely child" 2 in image B.
[0229] Further, if the first electronic device opens Image A again, then the first electronic device may request "lovely child" 2 from the second electronic device. Consequently, the second electronic device sends "lovely child" 2 and the image information associated with "lovely child" 2 (i.e., the image information of "lovely child" 1) to the first electronic device, so that the first electronic device fuses "lovely child" 2 and "hat" C with Image A from which "lovely child" 1 has been removed based on the display parameters of "lovely child" 1 and the display parameters of "hat" C, and displays the fused image.
[0230] For the method provided in the embodiments of the present application, the execution subject may be an image processing device. In the embodiments of the present application, taking the image processing device executing the image processing method as an example, the image processing device provided in the embodiments of the present application is described.
[0231] Combined with Figure 8 , an image processing device 800 is provided in the embodiments of the present application. The image processing device 800 may include a display module 801 and a processing module 802. The display module 801 may be used to display a first image. The processing module 802 may be used to remove a first image element from the first image displayed by the display module 801 and perform a first operation, and the first operation includes any one of the following: associating the image information of the first image element with a second image element in a second image, where the second image element is an image element whose element similarity to the first image element is greater than or equal to a preset threshold; sending the image information of the first image element and a first piece of information to a second electronic device. Among them, the first piece of information may be used to indicate associating the image information of the first image element with the second image element, or the first piece of information includes the first image element.
[0232] In some embodiments of the present application, the above-mentioned processing module 802 may specifically be used to remove the first image element from the first image when the element similarity between the first image element and the second image element is greater than or equal to the preset threshold.
[0233] Among them, the above-mentioned first operation includes any one of the following: associating the image information of the first image element with the second image element; sending the image information of the first image element and the first piece of information to the second electronic device, and the first piece of information may be used to indicate associating the image information of the first image element with the second image element.
[0234] In some embodiments of the present application, the second image is an image in a second electronic device. The above-mentioned processing module 802 may specifically be used to remove the first image element from the first image when a first condition is met.
[0235] Wherein, the first condition includes any one of the following: the remaining storage space of the first electronic device is less than or equal to the remaining storage space of the second electronic device; the usage frequency of the photo album application of the first electronic device is less than or equal to the usage frequency of the photo album application of the second electronic device.
[0236] In some embodiments of the present application, the above-mentioned processing module 802 can also be used to send a second message to the second electronic device when the above-mentioned first condition is not met, and the second message can be used to indicate removing the second image element from the second image.
[0237] In some embodiments of the present application, the above-mentioned processing module 802 can specifically be used to remove the first image element from the first image when the element category corresponding to the first image element is associated with the device usage information of the second electronic device.
[0238] Wherein, the above-mentioned first operation includes: sending the image information of the first image element and the first message to the second electronic device, and the first message includes the first image element.
[0239] In some embodiments of the present application, the above-mentioned image processing apparatus 800 may further include: a receiving module and an obtaining module. The receiving module can be used to receive a first input. The obtaining module can be used to obtain a second image element from the second image based on the association relationship between the image information of the first image element and the second image element in response to the first input received by the receiving module. The above-mentioned processing module 802 can also be used to fuse the second image element obtained by the obtaining module with the first image after removing the first image element based on the image information of the first image element to obtain a third image. The above-mentioned display module 801 can also be used to display the third image obtained by the above-mentioned processing module 802.
[0240] In some embodiments of the present application, when the second image is an image in the second electronic device, the above-mentioned image processing apparatus 800 may further include: a receiving module. The receiving module can be used to receive a second input. The above-mentioned processing module 802 can also be used to send a first request message to the second electronic device in response to the second input received by the receiving module, and the first request message can be used to request the second image element. The receiving module can also be used to receive the second image element sent by the second electronic device and the image information of the first image element. The above-mentioned processing module 802 can also be used to fuse the second image element received by the receiving module with the first image after removing the first image element based on the image information of the first image element to obtain a third image. The above-mentioned display module 801 can also be used to display the third image obtained by the above-mentioned processing module 802.
[0241] In some embodiments of the present application, the above-mentioned image processing apparatus 800 may further include: a receiving module. The receiving module may be configured to receive a third input. The above-mentioned processing module 802 may further be configured to, in response to the third input received by the receiving module, send a second request message to the second electronic device, where the second request message may be used to request a first image element. The receiving module may further be configured to receive the first image element and the image information of the first image element sent by the second electronic device. The above-mentioned processing module 802 may further be configured to, based on the image information of the first image element, fuse the first image element received by the receiving module with the first image after removing the first image element to obtain a third image. The above-mentioned display module 801 may further be configured to display the third image obtained by the above-mentioned processing module 802.
[0242] In some embodiments of the present application, the above-mentioned receiving module may further be configured to, after the display module 801 displays the third image, receive a fourth input for a third image element in the third image. The above-mentioned display module 801 may further be configured to, in response to the fourth input received by the receiving module, display at least one image element, where the at least one image element is an image element retrieved based on the third image element. The receiving module may further be configured to receive a fifth input for a fourth image element in the at least one image element displayed by the above-mentioned display module 801. The above-mentioned processing module 802 may further be configured to, in response to the fifth input received by the receiving module, replace the third image element in the third image with the fourth image element, or add the fourth image element to the third image.
[0243] In some embodiments of the present application, the above-mentioned display module 801 may further be configured to display a prompt message, where the prompt message may be used to prompt any one of the following: whether to retain one of the first image element and the second image element, whether to store the first image element to the second electronic device. The above-mentioned processing module 802 may specifically be configured to, when receiving a confirmation input for the prompt message displayed by the above-mentioned display module 801, remove the first image element in the first image.
[0244] In the image processing apparatus provided in the embodiments of the present application, since the image processing apparatus can remove the first image element in the first image after displaying the first image, that is, the image processing apparatus can not store the first image element in the first image, the storage space of the image processing apparatus can be saved. Also, because the image information of the first image element can be associated with the second image element, or the image processing apparatus sends the element information and the first information of the first image element to the second electronic device, when the image processing apparatus needs to display the first image again, the image processing apparatus can obtain the first image element or the second image element whose element similarity to the first image element is greater than or equal to a preset threshold based on the association relationship between the image information of the first image element and the second image element or the image information of the first image element, and restore and display the first image based on the obtained image element. In this way, the image processing apparatus can completely display the image without storing some image elements in the image, so that the storage space of the image processing apparatus can be saved on the basis of ensuring the image display effect.
[0245] In the embodiments of the present application, the image processing apparatus may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0246] The image processing apparatus in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0247] The image processing apparatus provided in the embodiments of the present application can implement each process implemented in the above-mentioned embodiments of the image processing method, achieving the same technical effects. To avoid repetition, details are not described here again.
[0248] Optionally, as Figure 9 shown, an embodiment of the present application further provides an electronic device 900, including a processor 901 and a memory 902. A program or instruction that can run on the processor 901 is stored on the memory 902. When the program or instruction is executed by the processor 901, each step of the above-mentioned embodiment of the image processing method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.
[0249] It should be noted that the electronic device in the embodiment of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.
[0250] Figure 10 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.
[0251] The electronic device 100 includes, but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110, and other components.
[0252] Those skilled in the art can understand that the electronic device 100 may further include a power source (such as a battery) for supplying power to each component. The power source can be logically connected to the processor 110 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. Figure 10 The structure of the electronic device shown in does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0253] Among them, the display unit 106 can be used to display a first image. The processor 110 can be used to remove a first image element from the first image displayed by the display unit 106 and perform a first operation, and the first operation includes any one of the following: associating the image information of the first image element with a second image element in a second image, where the second image element is an image element whose element similarity with the first image element is greater than or equal to a preset threshold; sending the image information of the first image element and a first piece of information to a second electronic device. Among them, the first piece of information can be used to indicate associating the image information of the first image element with the second image element, or the first piece of information includes the first image element.
[0254] In some embodiments of the present application, the above-mentioned processor 110 can be specifically used to remove the first image element from the first image when the element similarity between the first image element and the second image element is greater than or equal to a preset threshold.
[0255] Wherein, the first operation includes any one of the following: associating the image information of the first image element with the second image element; sending the image information of the first image element and the first information to the second electronic device, and the first information can be used to indicate associating the image information of the first image element with the second image element.
[0256] In some embodiments of the present application, the second image is an image in the second electronic device. The above-mentioned processor 110 can specifically be used to remove the first image element in the first image when the first condition is met.
[0257] Wherein, the first condition includes any one of the following: the remaining storage space of the first electronic device is less than or equal to the remaining storage space of the second electronic device; the usage frequency of the album application of the first electronic device is less than or equal to the usage frequency of the album application of the second electronic device.
[0258] In some embodiments of the present application, the above-mentioned processor 110 can also be used to send the second information to the second electronic device when the first condition is not met, and the second information can be used to indicate removing the second image element in the second image.
[0259] In some embodiments of the present application, the above-mentioned processor 110 can specifically be used to remove the first image element in the first image when the element category corresponding to the first image element is associated with the device usage information of the second electronic device.
[0260] Wherein, the first operation includes: sending the image information of the first image element and the first information to the second electronic device, and the first information includes the first image element.
[0261] In some embodiments of the present application, the user input unit 107 can be used to receive a first input. The processor 110 can be used to obtain the second image element from the second image based on the association relationship between the image information of the first image element and the second image element in response to the first input received by the user input unit 107. The above-mentioned processor 110 can also be used to fuse the second image element obtained by the processor 110 with the first image after removing the first image element based on the image information of the first image element to obtain a third image. The display unit 106 can also be used to display the third image obtained by the above-mentioned processor 110.
[0262] In some embodiments of the present application, the second image is an image in a second electronic device. The user input unit 107 can be used to receive a second input. The above-mentioned processor 110 can also be used to send a first request message to the second electronic device in response to the second input received by the user input unit 107. The first request message can be used to request second image elements. The user input unit 107 can also be used to receive the image information of the second image elements and the first image elements sent by the second electronic device. The above-mentioned processor 110 can also be used to fuse the second image elements received by the user input unit 107 with the first image after removing the first image elements based on the image information of the first image elements to obtain a third image. The above-mentioned display unit 106 can also be used to display the third image obtained by the above-mentioned processor 110.
[0263] In some embodiments of the present application, the user input unit 107 can be used to receive a third input. The above-mentioned processor 110 can also be used to send a second request message to the second electronic device in response to the third input received by the user input unit 107. The second request message can be used to request first image elements. The user input unit 107 can also be used to receive the image information of the first image elements and the first image elements sent by the second electronic device. The above-mentioned processor 110 can also be used to fuse the first image elements received by the user input unit 107 with the first image after removing the first image elements based on the image information of the first image elements to obtain a third image. The above-mentioned display unit 106 can also be used to display the third image obtained by the above-mentioned processor 110.
[0264] In some embodiments of the present application, the above-mentioned user input unit 107 can also be used to receive a fourth input to a third image element in the third image after the above-mentioned display unit 106 displays the third image. The above-mentioned display unit 106 can also be used to display at least one image element in response to the fourth input received by the user input unit 107. The at least one image element is an image element retrieved based on the third image element. The user input unit 107 can also be used to receive a fifth input to a fourth image element in the at least one image element displayed by the above-mentioned display unit 106. The above-mentioned processor 110 can also be used to replace the third image element in the third image with the fourth image element or add the fourth image element to the third image in response to the fifth input received by the user input unit 107.
[0265] In some embodiments of the present application, the above display unit 106 can also be used to display a prompt message, which can be used to prompt any one of the following: whether to retain one of the first image element and the second image element, and whether to store the first image element to the second electronic device. The above processor 110 can specifically be used to remove the first image element in the first image when receiving a confirmation input for the prompt message displayed by the above display unit 106.
[0266] In the electronic device provided in the embodiments of the present application, since the electronic device can remove the first image element in the first image after displaying the first image, that is, the electronic device can not store the first image element in the first image, thus the storage space of the electronic device can be saved. Also because the image information of the first image element can be associated with the second image element, or the electronic device can send the element information of the first image element and the first information to the second electronic device, so when the electronic device needs to display the first image again, the electronic device can obtain the first image element or the second image element whose element similarity with the first image element is greater than or equal to a preset threshold based on the association relationship between the image information of the first image element and the second image element or the image information of the first image element, and restore and display the first image based on the obtained image element. In this way, the electronic device can completely display the image without storing some image elements in the image, thereby saving the storage space of the electronic device on the basis of ensuring the image display effect.
[0267] It should be understood that in the embodiments of the present application, the input unit 104 can include a Graphics Processing Unit (GPU) 1041 and a microphone 1042. The graphics processor 1041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 can include a display panel 1061, and the display panel 1061 can be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 can include two parts: a touch detection device and a touch controller. The other input devices 1072 can include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, which will not be elaborated here.
[0268] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area can store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 109 can include volatile memory or non-volatile memory, or the memory 109 can include both volatile and non-volatile memory. Among them, the non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 109 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0269] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above modem processor may not be integrated into the processor 110 either.
[0270] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above embodiment of the image processing method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0271] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs.
[0272] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above embodiment of the image processing method and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0273] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip.
[0274] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the above embodiment of the image processing method and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0275] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article, or device. Without more limitations, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article, or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed. It may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.
[0276] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0277] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.
Claims
1. An image processing method, characterized in that: Applied to a first electronic device, the method includes: displaying a first image; Removing a first image element from the first image and performing a first operation, where the first operation includes any one of the following: Associating the image information of the first image element with a second image element in the second image, where the second image element is an image element having an element similarity with the first image element greater than or equal to a preset threshold; The image information of the first image element and first information are sent to a second electronic device; wherein the first information is used to indicate that the image information of the first image element is associated with the second image element, or the first information includes the first image element.
2. The method according to claim 1, characterized in that The removing the first image element in the first image comprises: When the element similarity between the first image element and the second image element is greater than or equal to a preset threshold, removing the first image element from the first image; The first operation includes any one of the following: Associating the image information of the first image element with the second image element; The image information of the first image element and the first information are sent to the second electronic device, and the first information is used to indicate that the image information of the first image element is associated with the second image element.
3. The method according to claim 2, characterized in that The second image is an image in the second electronic device; The removing the first image element in the first image comprises: When a first condition is met, removing a first image element in the first image; The first condition includes any one of the following: The remaining storage space of the first electronic device is less than or equal to the remaining storage space of the second electronic device; The usage frequency of the photo album application of the first electronic device is less than or equal to the usage frequency of the photo album application of the second electronic device.
4. The method according to claim 1, characterized in that The removing the first image element in the first image comprises: When the element category corresponding to the first image element is associated with the device usage information of the second electronic device, removing the first image element in the first image; The first operation includes: sending image information of the first image element and the first information to the second electronic device, and the first information includes the first image element.
5. The method according to claim 2, characterized in that: The method further comprises: receiving a first input; In response to the first input, based on the association relationship between the image information of the first image element and the second image element, acquiring the second image element from the second image; Based on the image information of the first image element, the second image element is merged with the first image after the first image element is removed to obtain and display a third image.
6. The method according to claim 2, characterized in that The second image is an image in the second electronic device, and the method further includes: receiving a second input; In response to the second input, sending a first request message to the second electronic device, where the first request message is used to request the second image element; receiving image information of the second image element and the first image element sent by the second electronic device; Based on the image information of the first image element, the second image element is merged with the first image after the first image element is removed to obtain and display a third image.
7. The method according to claim 4, characterized in that The method further comprises: receiving a third input; In response to the third input, sending a second request message to the second electronic device, where the second request message is used to request the first image element; receiving the first image element and image information of the first image element sent by the second electronic device; Based on the image information of the first image element, the first image element is merged with the first image after the first image element is removed to obtain and display a third image.
8. An image processing device, characterized in that: The device comprises: a display module and a processing module; The display module is used to display the first image; The processing module is configured to remove a first image element in the first image displayed by the display module, and perform a first operation, wherein the first operation includes any one of the following: Associating the image information of the first image element with a second image element in the second image, where the second image element is an image element having an element similarity with the first image element greater than or equal to a preset threshold; The image information of the first image element and first information are sent to a second electronic device; wherein the first information is used to indicate that the image information of the first image element is associated with the second image element, or the first information includes the first image element.
9. The device according to claim 8, characterized in that The processing module is specifically configured to remove the first image element in the first image when the element similarity between the first image element and the second image element is greater than or equal to a preset threshold; The first operation includes any one of the following: Associating the image information of the first image element with the second image element; The image information of the first image element and the first information are sent to the second electronic device, and the first information is used to indicate that the image information of the first image element is associated with the second image element.
10. The device according to claim 9, characterized in that The second image is an image in the second electronic device; The processing module is specifically configured to remove the first image element in the first image when a first condition is met; The first condition includes any one of the following: The remaining storage space of the first electronic device is less than or equal to the remaining storage space of the second electronic device; The usage frequency of the photo album application of the first electronic device is less than or equal to the usage frequency of the photo album application of the second electronic device.
11. The device according to claim 8, characterized in that The processing module is specifically configured to remove the first image element in the first image when the element category corresponding to the first image element is associated with the device usage information of the second electronic device; The first operation includes: sending image information of the first image element and the first information to the second electronic device, and the first information includes the first image element.
12. The device according to claim 9, characterized in that The device also includes: a receiving module and an acquiring module; The receiving module is used to receive a first input; The acquisition module is configured to acquire the second image element from the second image based on the association relationship between the image information of the first image element and the second image element in response to the first input received by the receiving module; The processing module is further configured to fuse the second image element acquired by the acquisition module with the first image after the first image element is removed, based on the image information of the first image element, to obtain a third image; The display module is also used to display the third image obtained by the processing module.
13. The device according to claim 9, characterized in that The second image is an image in the second electronic device, and the device further includes: a receiving module; The receiving module is used to receive a second input; The processing module is further configured to send a first request message to the second electronic device in response to the second input received by the receiving module, wherein the first request message is used to request the second image element; The receiving module is further used to receive image information of the second image element and the first image element sent by the second electronic device; The processing module is further configured to fuse the second image element received by the receiving module with the first image after the first image element is removed, based on the image information of the first image element, to obtain a third image; The display module is also used to display the third image obtained by the processing module.
14. The device according to claim 11, characterized in that The device further comprises: a receiving module; The receiving module is used to receive a third input; The processing module is further configured to send a second request message to the second electronic device in response to the third input received by the receiving module, where the second request message is used to request the first image element; The receiving module is further configured to receive the first image element and image information of the first image element sent by the second electronic device; The processing module is further configured to fuse the first image element received by the receiving module with the first image after the first image element is removed, based on the image information of the first image element, to obtain a third image; The display module is also used to display the third image obtained by the processing module.