Picture processing method, electronic equipment and storage medium
By detecting and controlling the display of superimposed elements in the editing interface of the electronic device, the problems of low operation efficiency and overlay element occlusion in the prior art are solved, and an efficient and flexible picture editing experience is achieved.
Patent Information
- Application Number
- CN202311556165.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-03
- Filing Date
- 2023-11-17
- Publication Date
- 2025-05-13
AI Technical Summary
In picture editing, existing electronic devices eliminate low operation efficiency, flexibility and convenience, resulting in the processing results not meeting user expectations and affecting the user experience.
By detecting the cancellation operation in the editing interface, the overlay class elements are controlled to stop displaying, which achieves accurate elimination of elements, and redisplays the overlay class elements after the operation is completed to avoid obstructing other elements.
It improves the efficiency and flexibility of elimination operations, enables users to intuitively see the elimination effect, and is simple to operate, avoids the problem of overlay element occlusion, and ensures the accuracy of image processing.
Smart Images

Figure CN119987626A_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on November 3, 2023, with application number 202311461263.8 and invention name “A method for eliminating operation in mobile phone picture editing”, all contents of which are incorporated by reference in this application. Technical Field
[0002] The embodiments of the present application relate to the field of image processing technology, and in particular to a picture processing method, an electronic device, and a storage medium. Background Art
[0003] With the development of electronic devices, electronic devices can support more and more rich image processing functions, and users can process images through the editing functions of applications used to process images in electronic devices. For example, electronic devices can beautify portraits in images, or adjust the size of images, or remove objects in images, etc.
[0004] For example, when an electronic device performs a process of removing elements from a picture, the process may be inefficient, inflexible, and inconvenient, and the processing result of the picture may not meet the user's expectations, thus affecting the user's experience. Summary of the invention
[0005] The embodiment of the present application provides a picture processing method, an electronic device, and a storage medium. After the electronic device eliminates the elements in the first picture in the editing interface of the first picture, the picture after the elimination processing is directly displayed in the editing interface. Not only is the entire elimination process simple to operate, but the elimination effect can also be intuitively seen, and the elimination process is efficient and flexible. During the execution of the elimination operation, the superimposed elements are not displayed on the editing interface. After the elimination operation is completed, the superimposed elements are redisplayed on the editing interface, avoiding the problem that the superimposed elements block other elements in the picture, resulting in the inability to accurately process other elements in the picture.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, the present application provides a method for processing an image, comprising:
[0008] Display an editing interface for a first picture, the first picture including a first image and an overlay element; in response to detecting an operation of eliminating a first element in the first image, control the overlay element to stop being displayed on the editing interface; in response to an operation of eliminating the first element in the first image, eliminate the first element on the editing interface; display the first image after eliminating the first element on the editing interface and resume displaying the overlay element.
[0009] Among them, superimposed elements can be text, graffiti, watermarks, stickers, etc.
[0010] It can be understood that, in the editing interface of the first picture, when the electronic device detects that the elimination operation of the first element has started, it can control the superimposed elements to stop displaying in the editing interface, so as to avoid the superimposed elements from blocking the elements in the first picture, causing the user to be unable to accurately eliminate the elements in the first picture.
[0011] Optionally, displaying the first image after eliminating the first element on the editing interface and restoring display of the overlay element includes:
[0012] In response to the elimination operation being completed, the first image after the first element is eliminated is displayed on the editing interface and the display of the overlay elements is restored.
[0013] In one case, when the electronic device detects that the elimination operation is completed, the electronic device controls the overlay element to resume display in the editing interface.
[0014] Optionally, in response to detecting a deletion operation on the first element in the first image, controlling the superimposed element to stop being displayed on the editing interface includes:
[0015] In response to detecting a removal operation on a first element in a first picture, if it is determined that the distance between the first overlay type element and a first position is less than a first distance, controlling the first overlay type element to stop displaying, the first position being a position where the removal operation acts on the display screen;
[0016] The above-mentioned image processing method may further include:
[0017] If it is determined that the distance between the second superimposed element and the first position is greater than the first distance, the second superimposed element is controlled to continue to be displayed.
[0018] Optionally, the above picture processing method further includes:
[0019] When the distance between the stopped first overlay element and the first position is greater than the first distance, the first overlay element is restored to display.
[0020] It can be understood that when the superimposed element is close to the position where the elimination operation acts on the display screen, in order to avoid the superimposed element affecting other elements in the picture, the superimposed element can be controlled to stop display. When the superimposed element is far from the position where the elimination operation acts on the display screen, the superimposed element does not affect the element to be eliminated, and the superimposed element does not need to be controlled to stop display. Optionally, the editing interface includes a first control, and the above-mentioned image processing method may also include:
[0021] In response to a triggering operation on the first control, determining to use a first elimination method to eliminate elements in the first image, the first elimination method being used to eliminate the elements selected by the elimination operation;
[0022] In response to the elimination operation on the first element in the first image, eliminating the first element on the editing interface includes:
[0023] In response to a removal operation on the first element in the first image, the first element selected by the removal operation is removed on the editing interface.
[0024] The first control may be a smart elimination control, and the electronic device may determine to eliminate the first element in a smart elimination manner in response to a user triggering operation on the smart elimination control. Thus, when the electronic device detects an elimination operation on the first element, the electronic device may eliminate the entire first element.
[0025] Optionally, the editing interface may further include a second control, and the above-mentioned image processing method may further include:
[0026] In response to a triggering operation on the second control, determining to use a second elimination method to eliminate the element in the first image, the second elimination method is to eliminate a selected partial area of the element targeted by the elimination operation;
[0027] In response to a removal operation on the second element in the first image, a region selected by the removal operation in the second element is removed on the editing interface.
[0028] The second element may be a residual part of the first element, or may be another element in the first image that is different from the first element. The second control may be a manual elimination control.
[0029] That is to say, after the electronic device eliminates the first element using the intelligent elimination method in response to the user's operation, there may be a problem that the first element is not completely eliminated. In this case, the electronic device can continue to eliminate the remaining part of the first element using the manual elimination method in response to the user's operation.
[0030] Alternatively, after the electronic device eliminates the first element in an intelligent elimination manner, the electronic device may also eliminate a second element in the first image that is different from the first element in a manual elimination manner.
[0031] Optionally, the editing interface includes a second control, and the above-mentioned image processing method further includes:
[0032] In response to a triggering operation on the second control, determining to eliminate the first element by adopting a second elimination method;
[0033] In response to the elimination operation on the first element in the first image, eliminating the first element on the editing interface includes:
[0034] In response to a removal operation on a first element on a first picture, a region selected by the removal operation in the first element is removed on an editing interface.
[0035] Optionally, the elimination operation includes a click or slide operation, and in response to detecting the elimination operation on the first element in the first image, controlling the superimposed element to stop being displayed on the editing interface includes:
[0036] In response to detecting a click or slide operation on the first element, the overlay element is controlled to stop being displayed on the editing interface.
[0037] It can be understood that the electronic device detects a click or slide operation on the first element, the electronic device determines that the elimination operation starts, and in response to the click or slide operation, controls the overlay element to stop displaying on the editing interface.
[0038] Optionally, in response to the elimination operation on the first element in the first image, after the first element is eliminated on the editing interface, the image processing method may further include:
[0039] A target color is determined according to a color on the first image that is within a preset range where the first element is located; and the position where the first element is located is filled with the target color.
[0040] Wherein, after the first element is eliminated on the editing interface, the position where the first element is located on the first image is filled with the target color.
[0041] In this way, the electronic device uses the target color to fill the position where the first element is located after the first element is eliminated, so that the filled picture is more natural and realistic.
[0042] Optionally, the editing interface includes a save button, and after the first image and the superimposed elements are displayed on the editing interface after the first element is eliminated, the method further includes:
[0043] In response to detecting a triggering operation on the save button, a second picture is saved, where the second picture includes the first image after the first element is eliminated and the overlay-type element.
[0044] Therefore, after the electronic device eliminates the first element in the first image, the electronic device can save the second image in response to the user's triggering operation of the save button in the editing interface. The image after the elimination process can be saved without jumping to the page, which reduces the user's operation and improves the user's usage experience.
[0045] In a second aspect, the present application provides an electronic device, comprising: a display screen, the display screen is used to display an editing interface of a picture; one or more processors; a memory; wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the processor, the electronic device executes the picture processing method as described in any one of the above-mentioned first aspects.
[0046] In a third aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the image processing method as described in any one of the first aspects.
[0047] In a fourth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the image processing method as described in any one of the first aspects.
[0048] It can be understood that the electronic device described in the second aspect, the computer storage medium described in the third aspect, and the computer program product described in the fourth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 An example of image processing for related technologies Figure 1 ;
[0050] Figure 2 An example of image processing for related technologies Figure 2 ;
[0051] Figure 3 Image processing examples for related technologies Figure 3 ;
[0052] Figure 4 Image processing examples for related technologies Figure 4 ;
[0053] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0054] Figure 6 A software structure diagram of an electronic device provided in an embodiment of the present application;
[0055] Figure 7 A schematic diagram of a logical layer provided for an embodiment of the present application;
[0056] Figure 8 A schematic diagram of a physical layer provided in an embodiment of the present application;
[0057] Fig. 9 An example of a method for processing images provided in the present application Figure 1 ;
[0058] Fig.10 An example of a method for processing images provided in the present application Figure 2 ;
[0059] Fig.11 An example of a method for processing images provided in the present application Figure 3 ;
[0060] Fig.12 An example of a method for processing images provided in the present application Figure 4 ;
[0061] Fig.13 An example of a method for processing images provided in the present application Figure 5 ;
[0062] Fig.14 A flowchart of a method for processing an image provided by an embodiment of the present application;
[0063] Fig.15 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solution in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. In the description of the embodiment of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0065] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0066] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0067] In the related art, electronic devices are provided with applications (APPs) for editing and processing pictures, such as gallery APPs, third-party picture editing APPs, etc. The electronic device can edit and process pictures in response to user operations, wherein the editing and processing includes but is not limited to cropping, adjusting filters, beautifying, annotating, graffiti, mosaic, and eliminating.
[0068] For example, Figure 1 Image processing examples for related technologies Figure 1 Taking the electronic device as a mobile phone and the application for editing and processing pictures as a gallery APP as an example, the picture processing process is introduced exemplarily.
[0069] like Figure 1 In the interface shown in (a), the gallery APP of the mobile phone may include one or more pictures. After the mobile phone receives the operation of the user selecting a picture in the gallery APP, as shown in Figure 101, the display interface of the mobile phone is as follows: Figure 1 (a) in the switch is Figure 1 (b) in .
[0070] like Figure 1 In the interface shown in (b), the interface displayed by the mobile phone includes picture 101, sharing icon, favorite icon, edit icon 102, delete icon and more icons. When the mobile phone detects that the user triggers an operation on an icon, the mobile phone can perform a corresponding operation on picture 101. For example, when the mobile phone detects that the user triggers an operation on edit icon 102, the display interface of the mobile phone is as follows: Figure 1 (b) in the switch is Figure 1 (c) in .
[0071] like Figure 1 In the interface shown in (c), the interface displayed by the mobile phone includes a picture 101 and a first-level toolbar 103. The first-level toolbar 103 may include a crop icon, a filter icon, an adjustment icon, and a more icon 104. When the mobile phone detects that the user has triggered an icon, the mobile phone may perform corresponding processing on the picture 101. For example, when the mobile phone detects that the user has triggered the more icon 104, the display interface of the mobile phone is as follows: Figure 1 (c) in the switch to Figure 1 (d) in.
[0072] like Figure 1 In the interface shown in (d), the interface displayed by the mobile phone includes a picture 101, a primary toolbar 103 and a secondary toolbar 105. Figure 1 As shown in (d), the secondary toolbar 105 may include a beauty icon, a marking icon 106, a doodle icon, an erase icon, and a mosaic icon.
[0073] In some embodiments, the secondary toolbar 105 may also include a watermark icon, a photo frame icon, a blur icon, a retain color icon, a sticker icon, and the like.
[0074] It is understandable that, in the case of a limited screen size of a mobile phone, the contents of the secondary toolbar 105 may not be fully displayed. When the mobile phone receives a sliding operation of the user on the secondary toolbar 105, the secondary toolbar 105 may display hidden contents. For example, in the mobile phone interface, the contents displayed by the secondary toolbar 105 include beauty icons, annotation icons, graffiti icons, elimination icons, and mosaic icons, and the hidden contents include watermark icons, photo frame icons, blur icons, color retention icons, and sticker icons. In response to the user sliding the secondary toolbar, the secondary toolbar of the mobile phone interface may display the hidden contents.
[0075] When the mobile phone detects the user's triggering operation on the annotation icon 106, the display interface of the mobile phone displays a text input interface ( Figure 1 (not shown in the figure), the user can enter text in the text input interface, for example, enter "the weather is really good". After the mobile phone detects that the user confirms the input text operation, the display of the mobile phone Figure 1 The interface shown in (e) in the figure. Figure 1 In the interface shown in (e), the interface displayed on the mobile phone is still a secondary page, which includes a picture 108, “Nice weather” 107, a primary toolbar 103 and a secondary toolbar 105.
[0076] After adding text to the picture, the mobile phone can also perform other processing on the picture. For example, the mobile phone can graffiti on the picture 108 in response to the user's graffiti operation. Figure 1 As shown in (e), after the mobile phone detects that the user triggers the graffiti icon 109, the user can perform graffiti operations on the display screen of the mobile phone. After the mobile phone detects that the user confirms the graffiti operation, the graffiti added by the user can be retained in the picture displayed by the mobile phone. Figure 1 As shown in (f), the secondary page displayed on the mobile phone includes a picture 111, a doodle 112, "Nice weather 107", a primary toolbar 103 and a secondary toolbar.
[0077] In some embodiments, when a user doodles on a picture, a doodle function bar ( Figure 1 (not shown), wherein the graffiti toolbar may include a pen shape function, a color function, a thickness function, an eraser function, etc. The mobile phone can select the pen shape of the graffiti in the pen shape function in the graffiti toolbar in response to the user's selection operation; the mobile phone can select the color of the graffiti in the color function in the graffiti function bar in response to the user's selection operation; the mobile phone can also determine the thickness of the line used for graffiti in the thickness function in the graffiti function bar in response to the user's selection operation; the mobile phone can also erase the graffiti through the eraser function in the graffiti function bar in response to the user's operation.
[0078] Figure 1It is introduced that a mobile phone performs a text adding operation and a graffiti operation on a picture, and obtains a picture 111 including graffiti and text. The mobile phone can remove objects in the picture 111.
[0079] Figure 2 Image processing examples for related technologies Figure 2 .like Figure 2 In the interface shown in (a), the interface displayed by the mobile phone includes a picture 111, a doodle 112, "Nice weather 107", a primary toolbar 103 and a secondary toolbar 105. For example, when the mobile phone detects that the user triggers the elimination icon 201, the display interface of the mobile phone is as follows: Figure 2 (a) in the switch is Figure 2 (b) in .
[0080] like Figure 2 In the interface shown in (b), the interface displayed by the mobile phone includes the picture 111 and the elimination toolbar 202 (i.e., the third-level toolbar). The elimination toolbar includes the smart elimination control, the manual elimination control, the elimination cancel icon, and the elimination confirmation icon. The user can choose to perform a smart elimination operation or a manual elimination operation on the picture 111 in the elimination toolbar. For example, when the mobile phone detects that the user has selected the manual elimination control, the mobile phone detects that the user has eliminated the boat in the picture 111, and the mobile phone detects that the user has triggered the elimination confirmation icon 203, the display interface of the mobile phone is as follows: Figure 2 (b) in the switch is Figure 2 (c) in .
[0081] Depend on Figure 2 As can be seen in (b), when the user deletes the picture 111, the display interface of the mobile phone does not display the graffiti 112 and "Nice weather" 107. That is, when the mobile phone performs the deletion operation, the picture 111 does not display the superimposed elements.
[0082] like Figure 2 In the interface shown in (c), the mobile phone displays an interface including the picture 204 (i.e., the picture after the deletion operation), the primary toolbar 103, the secondary toolbar 105, and the save button 205. When the mobile phone detects that the user triggers the save button 205, the mobile phone executes the operation of saving the picture 204, and the display interface of the mobile phone is as follows: Figure 2 (c) in the switch to Figure 2 (d) in. Figure 2 As shown in (d), the display interface of the mobile phone includes a picture 204, a share icon, a favorite icon, an edit icon, a delete icon and more icons.
[0083] Depend on Figure 2It can be seen that when the mobile phone is deleting the picture, the display interface of the mobile phone does not display the superimposed elements. When the mobile phone saves the deleted picture 204, the superimposed elements are re-displayed in the display interface of the mobile phone. In addition, in the third-level toolbar interface of the deletion function, after deleting the picture, the user needs to click the "confirm" icon first, return to the interface of the second-level toolbar, and click the "save" button in the interface of the second-level toolbar to save and export the processed picture. It can be seen that after the mobile phone deletes some objects in the picture, multiple operations are required to save the picture after the deletion process.
[0084] Similarly, after the user uses a third-party application on the mobile phone to remove certain elements from the picture, the user needs to perform multiple operations before the mobile phone can successfully save the removed picture. Figure 3 Provide an exemplary introduction.
[0085] Figure 3 An example of image processing for related technologies Figure 3 .like Figure 3 The interface shown in (a) is the homepage of a third-party application for processing pictures. When the mobile phone detects that the user triggers the picture beautification icon 301, the display interface of the mobile phone is changed to Figure 3 (a) in the switch is Figure 3 (b) in .
[0086] like Figure 3 In the interface shown in (b), the mobile phone's gallery may include one or more pictures. After the mobile phone receives the user's operation of selecting a picture in the gallery, as shown in Figure 302, the mobile phone's display interface is Figure 3 (b) in the switch is Figure 3 (c) in .
[0087] like Figure 3 In the interface shown in (c), the display interface of the mobile phone includes a picture 302 and a primary toolbar. The primary toolbar may include text icons, a graffiti pen icon, a tool icon 304, and a decoration icon. When the mobile phone detects that the user triggers the tool icon 304, the display interface of the mobile phone may display a secondary toolbar 305. The secondary toolbar 305 may include: an erase pen icon 306, a magic cutout icon, a blur icon, a background icon, etc. When the mobile phone detects that the user triggers the erase pen icon 306, the display interface of the mobile phone is Figure 3 (c) in the switch to Figure 3 (d) in.
[0088] It is understandable that, when the screen size of a mobile phone is limited, the content of the secondary toolbar 305 may not be fully displayed. When the mobile phone receives a sliding operation of the user on the secondary toolbar 305, the secondary toolbar 305 can display the hidden content. For example, in the mobile phone interface, the content displayed by the secondary toolbar 305 includes beauty icons, annotation icons, mosaic icons, etc.
[0089] like Figure 3 In the interface shown in (d), the mobile phone display interface includes the picture 302 and the erase pen toolbar 307. The user can select the size of the pen tip for erasing the picture in the erase pen toolbar 307. After the mobile phone detects that the user has erased the boat in the picture 302, when the mobile phone detects that the user has triggered the erase confirmation icon 308, the mobile phone display interface is changed to Figure 3 (d) in the switch is Figure 3 (e) in .
[0090] Depend on Figure 3 As can be seen in (d), when the user deletes the picture 302, the display interface of the mobile phone does not display "visitor" 303. That is, when the mobile phone performs the deletion operation, no superimposed elements are displayed in the picture 302.
[0091] like Figure 3 In the interface shown in (e), the mobile phone displays an interface including picture 309, a primary toolbar, a secondary toolbar 305, and a save button 310. Picture 309 is the picture after picture 302 is deleted. When the mobile phone detects that the user triggers the save button 310, the mobile phone executes the operation of saving picture 309, and the display interface of the mobile phone is as follows: Figure 3 (e) in the switch to Figure 3 (f) in.
[0092] In one embodiment, when a gallery APP or a third-party application in a mobile phone performs a removal operation, there may be a problem that the superimposed elements in the picture are not hidden, resulting in the superimposed elements being removed.
[0093] For example, Figure 4 Image processing examples for related technologies Figure 4 .like Figure 4 In the interface shown in (a), the display interface of the mobile phone includes a picture 401, a primary toolbar and a secondary toolbar 403. The picture 401 includes an overlay element 402. After the mobile phone detects that the user triggers the erase pen icon 404 in the secondary toolbar 403, the display interface of the mobile phone is changed to Figure 4 (a) in the switch is Figure 4 (b) in .
[0094] like Figure 4In the interface shown in (b), the mobile phone display interface includes a picture 401 and an erase pen toolbar 405. The picture 401 includes text in the superimposed element. When the mobile phone detects that the user has erased the picture 401, the superimposed element in the picture 401 is not hidden, that is, the superimposed element in the picture does not disappear during the erasure process of the mobile phone. When the mobile phone detects that the user has triggered the erase confirmation icon 406, the mobile phone display interface is changed to Figure 4 (b) in the switch is Figure 4 (c) in .
[0095] like Figure 4 In the interface shown in (c), the display interface of the mobile phone includes a picture 407 (i.e., the picture after the elimination process) and a save button 408. When the mobile phone detects that the user triggers the save button 408, the mobile phone executes the operation of saving the picture 407.
[0096] Depend on Figure 4 It can be seen that when the mobile phone is removing the image, the display interface of the mobile phone shows superimposed elements. When the mobile phone saves the image after the removal process, it returns to the interface of the secondary toolbar and clicks the "Save" button in the interface of the secondary toolbar to save and export the processed image. It can be seen that when the mobile phone removes certain objects in the image, there is a problem of superimposed elements blocking the image. When saving the removed image, multiple operations are required to save the removed image.
[0097] In some embodiments, when the gallery APP or third-party application in the mobile phone executes the elimination function, the superimposed elements in the picture may not be hidden, and the superimposed elements cover the eliminated objects, resulting in the user being unable to accurately eliminate certain elements in the picture.
[0098] like Figure 4 As shown in (a), assuming that the user wants to delete the area covered by "visitor" 402 in the picture 401, when the mobile phone detects the user's triggering operation on the erasing pen 404, the "visitor" 402 is still displayed in the interface of the mobile phone. Therefore, since the superimposed element "visitor" 402 covers the area of the object to be deleted, the user cannot accurately delete part of the area in the picture 401.
[0099] To this end, an embodiment of the present application provides a picture processing method, which is applied to an electronic device. In the process of displaying an editing interface of a first picture on the electronic device, in response to detecting an elimination operation on a first element in the first image, the method controls the superimposed elements to stop being displayed on the editing interface, and in response to the elimination operation on the first element in the first picture, eliminates the first element, and in response to the end of the elimination operation, displays the first image and superimposed elements after the elimination of the first element on the editing interface. As a result, after the electronic device eliminates the elements in the first picture on the editing interface of the first picture, the image after the elimination process is directly displayed on the editing interface. Not only is the entire elimination process simple to operate, but the elimination effect can also be intuitively seen. In addition, when it is detected that the elimination operation on the first element in the first image starts, the superimposed elements are controlled to stop being displayed, thereby avoiding the problem that the superimposed elements block the elements in the first picture, resulting in the inability to accurately eliminate the elements in the first picture. Exemplarily, the image processing method provided in the embodiments of the present application can be applied to mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, smart speakers and other electronic devices with display screens, and the embodiments of the present application do not impose any restrictions on this.
[0100] like Figure 5 As shown, Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0101] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0102] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0103] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0104] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0105] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0106] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0107] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0108] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0109] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0110] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0111] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0112] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).
[0113] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0114] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0115] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0116] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0117] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0118] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0119] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0120] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0121] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0122] Figure 6 A software structure diagram of an electronic device provided in an embodiment of the present application.
[0123] It is understandable that the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system may include an application layer (abbreviated as application layer), an application framework layer (abbreviated as framework layer), a system library, and a kernel layer.
[0124] The above-mentioned application layer may include a series of application packages.
[0125] like Figure 6 As shown, the application package may include system applications. The system application refers to an application that is set in the electronic device before leaving the factory. For example, the system application may include programs such as camera, gallery, calendar, music, short message, memo, and weather. The gallery includes at least one picture.
[0126] The application package may also include third-party applications, which are applications that users install after downloading the installation package from an application store (or application market), such as map applications, food delivery applications, reading applications (such as e-books), social applications, and travel applications.
[0127] The application framework layer provides an application programming interface (API) and a programming framework for the application programs in the application layer. The application framework layer includes some predefined functions.
[0128] like Figure 6 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0129] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0130] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0131] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including connected, hung up, etc.).
[0132] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0133] The notification manager allows applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a reminder sound is emitted, the phone vibrates, the indicator light flashes, etc.
[0134] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
[0135] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0136] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0137] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0138] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional and three-dimensional layers for multiple applications.
[0139] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0140] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0141] A 2D graphics engine is a drawing engine for 2D drawings.
[0142] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver and sensor driver.
[0143] Taking the picture processing method of the embodiment of the present application as an example, the pictures in the picture library application can be divided into the following categories according to different processing functions: Figure 7 The logical layers described, as well as Figure 8 The physical layer described.
[0144] For example, Figure 7 A schematic diagram of the logic layers provided for an embodiment of the present application.
[0145] like Figure 7 As shown, the logical layers from top to bottom may include photo frames, color functions, overlay materials, effect materials, and content layers.
[0146] The photo frame is displayed independently outside the screen, so that the photo frame is not affected by other materials or functions. For example, the mobile phone receives the user's operation of adding a photo frame to a picture and the user's operation of adding a filter to the picture in sequence, and the color of the photo frame is not affected by the filter and does not change.
[0147] Color functions may include preserving colors, and color functions act on all colored content in the image.
[0148] The overlay material may include at least one of text, watermark, sticker or graffiti, and the overlay material acts on a part of the image.
[0149] Effect materials can include at least one of mosaic, blur, filter, beautification, adjustment or elimination. Among them, the adjustment function acts on the picture or video itself. For example, the user can adjust the brightness, saturation, etc. of the picture itself through the adjustment function. In addition to the adjustment function, the upper layer materials in other effect materials can affect the lower layer materials. For example, the mobile phone receives the user's operation of adding a mosaic to a picture with a filter, and the mosaic acts on the picture after the filter is added.
[0150] The content layer may include images and canvases, where images refer to the images themselves used for image processing.
[0151] exist Figure 7 In the logical layer shown, the materials or functions of the upper layer will affect the materials or functions of the lower layer, and the materials or functions of the lower layer will not affect the materials or functions of the upper layer. In this way, no matter how the user's operation sequence changes, consistent image processing results can be obtained. Taking filters and adjustments as an example, the mobile phone receives in sequence: the user's operation of adding filters to the image, and the user's operation of adjusting the image using the adjustment function. Since the adjustment function is aimed at the image layer in the logical layer, rather than the image after adding the filter, the above image processing results are consistent with the effect of the user adjusting the image using the adjustment function and then adding the filter.
[0152] like Figure 7 As shown, for the actual needs of users, the cropping function is placed in the lower layer of text, watermarks and stickers, and the cropping function is placed in the upper layer of graffiti. When the mobile phone receives the user's cropping operation to crop the picture, the cropping can be applied to the graffiti layer, effect materials and content layer of the lower layer, but the cropping cannot be applied to the text, watermark and sticker layer, color functions and photo frames of the upper layer.
[0153] That is to say, on the one hand, considering that the graffiti and mosaics added by the user to the picture may be strongly related to the content of the picture, for example, when the user adds graffiti to the picture or circles a word in the picture, the user does not want the relative position of the graffiti and the picture to change during the cropping process; or, when the user adds a mosaic to the picture to cover the face of the person in the picture, the user does not want the relative position of the mosaic and the picture to change during the cropping process. Therefore, the graffiti and mosaic are placed in the lower layer of the cropping, so that the graffiti and mosaic can always be displayed on the picture during the cropping process, and the relative position with the picture remains unchanged. The user can intuitively see the graffiti and mosaic, and the mosaic and graffiti are cropped according to the actual needs of the user.
[0154] On the other hand, considering that the user does not want to partially or completely crop the text, watermark and / or stickers added to the picture during the cropping process, the text, watermark and stickers are placed on the upper layer of the cropping so that the text, watermark and stickers can be temporarily hidden during the cropping process. After the cropping is completed, the text, watermark and stickers can be redisplayed on the cropped picture, and the cropping function does not affect the text, watermark and stickers.
[0155] It is understandable that there is no coupling relationship between the layers, and the content included in each layer can be adjusted according to actual needs. For example, when a user adds text to a picture and uses text to mark the names of various items in the picture, the user's demand is that the relative position of the text and the picture remain unchanged during the cropping process. To meet the user's needs, the text can be moved to the lower layer of the cropping. This embodiment of the present application does not specifically limit this.
[0156] For example, Figure 8 A schematic diagram of the physical layers provided in the embodiment of the present application, wherein the physical layers are the actual layer order corresponding to each image processing function during the image processing process.
[0157] Corresponds to Figures 1 to 4 In the image processing process, the order of physical layers from top to bottom can include: photo frame physical layer, color retention physical layer, overlay material physical layer, mosaic physical layer, blur physical layer, filter physical layer, beauty physical layer, adjustment physical layer, picture physical layer and canvas physical layer.
[0158] The superimposed material may include at least one of stickers, watermarks, text, and graffiti. Figure 1-Figure 4 In the picture editing process, the physical layers of superimposed materials can include graffiti rectangle layers, sticker layers, watermark layers, text layers and graffiti 123 layers from top to bottom.
[0159] The order of the above physical layers can be relatively fixed. One or more real layers can be added to each physical layer.
[0160] For example, taking the mosaic physical layer as an example, the mobile phone adds the first mosaic to the picture in response to the user's operation, then the first real mosaic layer will be added to the mosaic physical layer. Afterwards, the mobile phone adds text to the picture in response to the user's operation, then a real text layer can be added to the text physical layer. After adding the text, the user returns to the mosaic function. Furthermore, the mobile phone adds the second mosaic to the picture in response to the user's operation, then the second real mosaic layer will be added to the mosaic physical layer. That is to say, the first mosaic and the second mosaic are in the mosaic physical layer.
[0161] Similarly, for text, graffiti, watermarks, and stickers added by electronic devices to images, in the physical layer of superimposed elements, new layers can be created for each element in sequence according to the order in which the user adds them. For example, the mobile phone adds the first graffiti to the image in response to the user's operation, and the first real graffiti layer can be added to the physical layer of superimposed materials. After that, the mobile phone adds text to the image in response to the user's operation, and a real text layer can be added to the physical layer of superimposed materials. After adding the text, the user returns to the graffiti function. Further, the mobile phone adds the second graffiti to the image in response to the user's operation, and the second real graffiti layer can be added to the physical layer of superimposed materials. In other words, the first graffiti layer, the text layer, and the second graffiti layer can be in the physical layer of superimposed materials in a bottom-to-top order.
[0162] It is understandable that, for the first graffiti, no matter how much graffiti content is included in the first graffiti, a real graffiti layer can be created for the first graffiti. For example, the content of the first graffiti is "123", where "1", "2" and "3" correspond to three different strokes, but in the graffiti physical layer, "123" corresponds to one real layer, not three. The second graffiti is processed similarly and will not be described in detail.
[0163] For images that include multiple layers, such as Figure 1 The picture 111 shown in (f) includes a canvas, a picture, a graffiti 112 and text 107. In response to the user clicking on the graffiti 112, the mobile phone can select the graffiti 112 in the graffiti layer.
[0164] Based on the logical layer and the physical layer, the embodiment of the present application can distinguish and process the elements in each logical layer or physical layer, so that when some elements in the picture are eliminated, some elements can be displayed and some elements can be hidden. After the elimination action is completed, the elements that are not displayed can be re-displayed on the eliminated picture, thereby solving the problem that the superimposed elements cover the elements to be eliminated on the picture, resulting in the user being unable to accurately eliminate certain elements in the picture. The specific solution will be described in detail in the subsequent embodiments and will not be repeated here.
[0165] In the following, the electronic device 100 is still taken as a mobile phone, and the application for editing pictures is a gallery APP as an example, and the picture processing method of the present application is exemplarily described in conjunction with the accompanying drawings.
[0166] For example, Fig. 9 An example of a method for processing images provided in the present application Figure 1 The mobile phone's gallery APP may include one or more pictures. After the mobile phone receives the user's operation of selecting a picture in the gallery APP and performs an editing operation on the picture, the mobile phone interface displays the following Fig. 9 In the interface shown in (a), the interface displayed by the mobile phone includes a picture 901, a share icon, a favorite icon, an edit icon 902, a delete icon, and more icons. Among them, the picture 901 includes a text layer and a sticker layer. The text layer includes "weather" 903, and the sticker layer includes a sticker smiley face 900. When the mobile phone detects that the user has triggered an icon, the mobile phone can perform a corresponding operation on the picture 901. For example, when the mobile phone detects that the user has triggered the edit icon 102, the display interface of the mobile phone is as follows: Fig. 9 (a) in the switch is Fig. 9 (b) in .
[0167] like Fig. 9 In the interface shown in (b), the interface displayed by the mobile phone includes a picture 901 and a primary toolbar 904. The primary toolbar 904 may include a doodle icon, a text icon, an erase icon 905, a mosaic icon, and a watermark icon.
[0168] In some embodiments, the primary toolbar 904 may also include beauty icons, filter icons, photo frame icons, blur icons, color preservation icons, sticker icons, etc.
[0169] It is understandable that, when the screen size of the mobile phone is limited, the content of the first-level toolbar 904 may not be fully displayed. When the mobile phone receives a sliding or dragging operation of the user on the first-level toolbar 904, the first-level toolbar 904 can display hidden content. For example, in the mobile phone interface, the content displayed by the first-level toolbar 904 includes graffiti icons, text icons, elimination icons, mosaic icons, and watermark icons, and the hidden content includes beauty icons, filter icons, photo frame icons, blur icons, retain color icons, and sticker icons. In response to the user's sliding or dragging operation on the first-level toolbar 904, the first-level toolbar of the mobile phone interface can display hidden content. In this way, the user can select the function to be used in the first-level toolbar without expanding the second-level toolbar, which is convenient for the user to find various functions, reduces the number of interface jumps, and makes the user's operation more convenient.
[0170] When the mobile phone detects that the user triggers the operation of removing the icon 905 in the first-level toolbar 904, the display interface of the mobile phone is changed to Fig. 9 (b) in the switch is Fig. 9 (c) in .
[0171] like Fig. 9 In the interface shown in (c), the interface displayed by the mobile phone includes picture 901, a primary toolbar, a secondary toolbar, and prompt information. The prompt information is used to prompt how to remove elements in the picture. Fig. 9 As shown in (c), the prompt message is "Click or slide on the target object to eliminate it." The secondary toolbar includes a smart elimination control 906 and a manual elimination control 907. When the mobile phone detects that the user triggers the smart elimination control 906, the display interface of the mobile phone is changed to Fig. 9 (c) in the switch to Fig. 9 (d) in.
[0172] Similarly, when the mobile phone detects the user's triggering operation on the manual elimination control 907, the display interface of the mobile phone is changed to Fig.11 (a) in the switch to Fig.11 (b) in the figure, the detailed process of manually removing the elements in the image is described later and will not be repeated here.
[0173] like Fig. 9 In the interface shown in (d), when the mobile phone detects the user sliding the boat in the picture 901, the mobile phone automatically identifies the boat. After the mobile phone recognizes the outline of the boat, the display interface of the mobile phone changes to Fig. 9 (d) in the switch to Fig. 9 (e) in .
[0174] like Fig. 9In the interface shown in (e), the display interface of the mobile phone includes picture 901, the primary toolbar and the secondary toolbar. The boat in picture 901 is in the recognized state. Picture 901 does not include the text "weather" 903 and the smiley face 900. When the mobile phone detects that the sliding operation of the user ends, the display interface of the mobile phone changes to Fig. 9 (e) in the switch to Fig. 9 (f) in.
[0175] In the embodiment of the present application, after the mobile phone removes an element in the picture, the mobile phone can automatically identify the color around the removed element and use the identified color to fill the position of the removed element. Fig. 9 As shown in (f), after the mobile phone removes the boat in the picture, the mobile phone fills the position of the boat with the color around the boat in the picture 909. Thus, the picture after the removal process is more real and natural.
[0176] like Fig. 9 In the interface shown in (f), the display interface of the mobile phone includes a picture 909, a primary toolbar, a secondary toolbar and a save button 908. Among them, the picture 909 is a picture after elimination processing, and the picture 909 includes the text "weather" 903 and a smiley face 900. When the mobile phone detects that the user triggers the save button 908, the mobile phone saves the picture 909 after elimination processing.
[0177] It should be noted that after the mobile phone saves the picture 909 , the mobile phone can also edit the saved picture 909 in response to the user's operation.
[0178] By the above Fig. 9 From the picture processing process, we can know that the mobile phone can intelligently eliminate elements in the picture in response to the user's trigger operation. When the mobile phone detects that the user slides an element in the picture, the mobile phone can identify the element. When the mobile phone detects that the user's sliding operation ends, the picture that has been intelligently eliminated is displayed in the display interface of the mobile phone. In this way, the user can intuitively see the picture that has been eliminated. If the user is satisfied with the picture after elimination, the user can trigger the save button to save the processed picture without triggering the phone to jump to other interfaces. Compared with Figures 2 to 4 In the example, the user needs to return and jump to the save interface to save the processed image. In the embodiment of the present application, the mobile phone can directly save the image after the elimination process in the editing interface, which reduces the user's triggering operation and makes it more convenient for the user to save the image after the elimination process.
[0179] Above Fig. 9In the figure, after the mobile phone detects that the user slides the elements in the picture, the elements in the picture are removed. Fig.10 The process of eliminating elements in a picture after a mobile phone detects that a user has clicked on an element in the picture is exemplarily introduced.
[0180] Fig.10 An example of a method for processing images provided in the present application Figure 2 .like Fig.10 In the interface shown in (a), the display interface of the mobile phone includes a picture 901, a primary toolbar and a secondary toolbar. The picture 901 includes the text "weather" 903, a smiling face 900, a seaside background and a person 1001. When the mobile phone detects that the user triggers the smart elimination control 906, the display interface of the mobile phone is changed to Fig.10 (a) in the switch to Fig.10 (b) in .
[0181] like Fig.10 In the interface shown in (b), when the mobile phone detects that the user clicks on the character 1001, the display interface of the mobile phone is changed from Fig.10 (b) in the switch to Fig.10 (c) in the above example. Fig.10 In the interface shown in (c) of FIG. 1 , the mobile phone automatically recognizes the outline of the person 1001. When the mobile phone detects that the user stops clicking on the person 1001, the display interface of the mobile phone changes to Fig.10 (c) in the switch to Fig.10 (d) in which the click operation can be a single click, a double click, or a multi-click operation.
[0182] like Fig.10 In the interface shown in (d), the display interface of the mobile phone includes a picture 1002 and a save button 908. The picture 1002 is a picture after elimination processing, and the picture 1002 includes the text "weather" 903 and a smiling face 900. When the mobile phone detects that the user triggers the save button 908, the mobile phone saves the picture 1002.
[0183] It should be noted that after the mobile phone eliminates the person 1001, the mobile phone can automatically identify the color of the area surrounding the person 1001 in the picture 1002, and use the color of the area surrounding the person 1001 to fill the position of the person 1001, so that the picture after the elimination process is more realistic and natural.
[0184] By the above Fig.10From the picture processing process, it can be seen that when the mobile phone detects that the user clicks on an element in the picture, the mobile phone can automatically identify the element. When the mobile phone detects that the user's click operation ends, the picture after intelligent elimination processing is displayed in the display interface of the mobile phone. In this way, the user can intuitively see the picture after elimination processing. If the user is satisfied with the picture after elimination processing, the user does not need to trigger the mobile phone to jump to other interfaces, and can trigger the save button to save the processed picture, which reduces the user's triggering operation and makes it more convenient for the user to save the picture after elimination processing.
[0185] Combine the following Fig.11 The process of manually deleting elements in a picture in response to a manual deletion operation by a mobile phone is introduced.
[0186] Fig.11 An example of a method for processing images provided in the present application Figure 3 .like Fig.11 In the editing interface shown in (a), when the mobile phone detects the user's triggering operation on the manual elimination control 907, the display interface of the mobile phone is changed to Fig.11 (a) in the switch to Fig.11 (b) in .
[0187] like Fig.11 In the interface shown in (b), the interface displayed by the mobile phone includes a picture 901, a primary toolbar and a secondary toolbar. The picture 901 includes a smiley face sticker 900 and the text "weather" 903. The secondary toolbar includes a smart erase control 906, a manual erase control 907 and a manual adjustment icon 1101. The manual adjustment icon 1101 is used to adjust the thickness of the eraser pen when manually erasing the picture. When the mobile phone detects the user's manual erase operation on the boat in the picture 901, the display interface of the mobile phone shows the erasure process, such as Fig.11 As shown in (c).
[0188] like Fig.11 In the interface shown in (c), the display interface of the mobile phone includes a picture 1102, a primary toolbar and a secondary toolbar. The picture 1102 does not include the text "weather" 903 and the smiley face sticker 900. When the mobile phone detects that the user stops sliding the picture, the display interface of the mobile phone changes to Fig.11 (c) in the switch to Fig.11 (d) in.
[0189] like Fig.11In the interface shown in (d), the display interface of the mobile phone includes a picture 1103, a primary toolbar, a secondary toolbar and a save button 908. Among them, the picture 1103 is a picture after manual deletion. The picture 1103 includes the text "weather" 903 and a smiley face sticker 900. When the mobile phone detects that the user triggers the save button 908, the mobile phone saves the picture 1103.
[0190] It should be noted that, after the mobile phone eliminates part of the area of the boat in the picture 1103, the mobile phone can automatically identify the color around the eliminated boat and use the identified color to fill the area after the boat is eliminated.
[0191] By the above Fig.11 It can be seen from the picture processing process that when the mobile phone detects that the user slides an element in the picture, the mobile phone eliminates the element in the user's sliding area, and then displays the picture after the mobile phone elimination process in the display interface of the mobile phone, so that the user can see the elimination effect in real time. When saving the picture after elimination process, the user can save the processed picture by triggering the save button, which reduces the user's triggering operation and makes it more convenient for the user to save the picture after elimination process.
[0192] In some embodiments, after the mobile phone performs intelligent removal processing on certain elements in the picture, the mobile phone can also continue to manually remove the elements in the picture in response to the user's sliding operation. Thus, by combining intelligent removal with manual removal, some elements in the picture can be removed more accurately.
[0193] For example, Fig.12 An example of a method for processing images provided in the present application Figure 4 .like Fig.12 In the interface shown in (a), the interface displayed by the mobile phone includes a picture 901, a primary toolbar, a secondary toolbar, and prompt information. The picture 901 includes a smiley face sticker 900, the text "weather" 903, and a boat 1201. The secondary toolbar includes a smart delete control 906 and a manual delete control 907. When the mobile phone detects that the user triggers the smart delete control 906, the display interface of the mobile phone is changed to Fig.12 (a) in the switch to Fig.12 (b) in .
[0194] like Fig.12 In the interface shown in (b), when the mobile phone detects that the user triggers the boat 1201 in the picture 901, the mobile phone automatically identifies the boat 1201. When the mobile phone detects that the user's triggering operation on the boat 1201 ends, the display interface of the mobile phone changes to Fig.12 (b) in the switch to Fig.12 (c) in .
[0195] like Fig.12 In the interface shown in (c), the picture 901 displayed on the display interface of the mobile phone still includes a part of the boat 1201. In this case, the user can select the manual deletion method to delete the remaining part of the boat 1201. When the mobile phone detects that the user triggers the manual deletion control 907, the display interface of the mobile phone is changed to Fig.12 (c) in the switch to Fig.12 (d) in.
[0196] like Fig.12 In the interface shown in (d), when the mobile phone detects the user's sliding operation, the mobile phone eliminates the remaining part of the boat 1201, and the display interface of the mobile phone displays the elimination process in real time. When the mobile phone detects that the user's sliding operation ends, the display interface of the mobile phone changes to Fig.12 (d) in the switch to Fig.12 (e) in . Fig.12 The picture 1202 shown in (e) is a picture that has been deleted intelligently and manually. When the mobile phone detects that the user triggers the save button 908, the mobile phone saves the picture 1202.
[0197] In some embodiments, when the mobile phone detects a user sliding or clicking on a picture, the superimposed elements in the picture displayed in the display interface of the mobile phone are hidden. That is, when the mobile phone is removing elements in the picture, the superimposed elements are not displayed in the picture. In this way, the problem of superimposed elements blocking the original elements in the picture, which makes it impossible for the user to accurately remove the elements in the picture, is avoided, and the accuracy of picture processing is improved.
[0198] It needs to be explained that according to Figure 7 As shown in the logical layer, the elimination function is at the lower layer of the overlay materials and effect materials in the logical layer, so the elimination function can only eliminate the original elements in the picture, and cannot eliminate the text, watermarks, stickers, graffiti, etc. added to the picture. During the elimination process of the mobile phone, the overlay elements in the picture are temporarily not displayed. After the mobile phone determines that the elimination operation is completed, the overlay elements are redisplayed on the picture. Therefore, during the elimination process, the mobile phone controls the overlay elements to be temporarily not displayed in the picture, avoiding the overlay elements from blocking the picture, resulting in the problem that the user cannot accurately eliminate the elements in the picture.
[0199] For example, Fig. 9In the interfaces shown in (a), (b) and (c) in FIG. 1 , the picture 901 includes the text “weather” 903 and the smiley face sticker 900. When the mobile phone detects that the user slides the boat in the picture 901 and triggers the elimination process, the display interface of the mobile phone does not display the text “weather” 903 and the smiley face sticker 900. Fig. 9 When the mobile phone detects that the user's sliding operation ends, the text "Weather" 903 and the smiley face sticker 900 are displayed again in the display interface of the mobile phone, as shown in (d) and (e). Fig. 9 The interface shown in (f).
[0200] For example, Fig.10 In the interface shown in (a) of FIG. 1 , the pictures 901 all include the text “weather” 903 and the smiley face sticker 900. When the mobile phone detects that the user clicks on the person 1001 in the picture 901 and triggers the elimination process, the display interface of the mobile phone does not display the text “weather” 903 and the smiley face sticker 900. Fig.10 When the mobile phone detects that the user's click operation ends, the text "Weather" 903 and the smiley face sticker 900 are displayed again in the display interface of the mobile phone, as shown in (b) and (c). Fig.10 The interface shown in (d).
[0201] Another example is Fig.11 In the interfaces shown in (a) and (b) of FIG. 1 , the picture 901 includes the text "weather" 903 and the smiley face sticker 900. When the mobile phone detects that the user slides the boat in the picture 901 and triggers the elimination process, the display interface of the mobile phone does not display the text "weather" 903 and the smiley face sticker 900. Fig.11 When the mobile phone detects that the user's sliding operation ends, the text "Weather" 903 and the smiley face sticker 900 are displayed again in the display interface of the mobile phone, as shown in FIG. Fig.11 The interface shown in (d).
[0202] Figures 9 to 11 In the introduction, the overlay elements include text and stickers as examples. The overlay elements can also include graffiti, watermarks, etc., which will not be introduced one by one here.
[0203] In other embodiments, when the mobile phone detects a user sliding operation on a picture during the process of performing a removal operation, if the mobile phone detects that the distance between the superimposed element in the picture and the user's sliding touch point is less than a first distance, the mobile phone controls the superimposed element to be in a hidden state. The first distance is a preset value, for example, the first distance can be 10dp, 12dp, etc.
[0204] For example, Fig.13An example of a method for processing images provided in the present application Figure 5 ,like Fig.13 In the interface shown in (a), when the mobile phone detects the user's triggering operation on the manual elimination control 907, the display interface of the mobile phone is changed to Fig.13 (a) in the switch to Fig.13 (b) in .
[0205] like Fig.13 In the interface shown in (b), when the mobile phone detects the user sliding the boat in the picture 901, the mobile phone detects that the distance between the superimposed element text "weather" 903 and the sliding contact point is less than the first distance, and the superimposed element text "weather" 903 is not displayed in the display interface of the mobile phone. Fig.13 At the position in the interface shown in (c), the mobile phone detects that the distance between the superimposed element sticker smiley face 900 and the sliding contact point is less than the first distance, and the display interface of the mobile phone does not display the superimposed element sticker smiley face 900. At this time, the mobile phone detects that the distance between the sliding contact point and the superimposed element text "Weather" 903 is greater than the first distance, and the superimposed element text "Weather" 903 is redisplayed in the display interface of the mobile phone. When the mobile phone detects that the user's sliding operation is completed, that is, the user lifts his hand away from the display screen, the display interface of the mobile phone displays the eliminated picture 1310, and the picture 1310 shows the superimposed element text "Weather" 903 and the sticker smiley face 900, as shown in FIG. Fig.13 As shown in (d) in the figure, when the mobile phone detects that the user triggers the save button 908, the mobile phone saves the picture 1310.
[0206] In an embodiment of the present application, when a video is stored in the gallery APP of the mobile phone, the mobile phone can also eliminate the elements in each image frame in the video. The specific elimination process can be referred to the above-mentioned process of eliminating the elements in the picture, which will not be repeated here.
[0207] The specific implementation of the image processing method provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0208] See also Fig.14 , is a flowchart of an image processing method provided in an embodiment of the present application, and the image processing method can be applied to Figure 5 and Figure 6 The electronic equipment shown. Fig.14 As shown, the image processing method may include S1400 to S1430.
[0209] S1400: Displaying an editing interface for a first picture.
[0210] The first picture includes a first image and an overlay element. For example, the first picture can be the above Fig. 9 The image 901 shown in (a) of FIG. The superimposed element may be a watermark, a sticker, text, or graffiti. For example, the superimposed element may be Fig. 9 The text “Weather 903” and the sticker smiley face 900 are shown in (a).
[0211] The editing interface of the first picture refers to an interface that can edit the elements in the first picture. For example, the editing interface can be Fig. 9 The interface shown in (b)-(d) in the figure, or the editing interface can also be Fig.10 The interface shown in (a) to (d) in FIG. 1 , or the editing interface can also be Fig.11 The interfaces shown in (a) to (d).
[0212] S1410: In response to detecting a removal operation on a first element in a first image, controlling the overlay element to stop being displayed on the editing interface.
[0213] In an embodiment of the present application, when the electronic device detects the start of an erasing operation on a first element in a first image, in response to the start of the erasing operation, the overlay-type element is controlled to stop being displayed.
[0214] like Fig. 9 As shown, when the mobile phone detects that the user has removed the boat in the picture 901, the mobile phone controls the text "weather 903" and the sticker smiley face 900 to stop displaying. Fig. 9 The editing interface shown in (d) and (e) does not display the superimposed elements. After the elimination operation is completed, the editing interface of the image 901 displays the superimposed elements again, such as Fig. 9 The text "Weather 903" and the sticker smiley face 900 are redisplayed in the editing interface shown in (f).
[0215] In an embodiment of the present application, in response to a removal operation on a first element in a first image, the electronic device can determine whether to control any superimposed element on the first image to stop displaying the superimposed element according to the distance between the superimposed element and the first position. The first position is the position where the removal operation acts on the display screen. For example, the position where the user acts on the display screen when sliding.
[0216] In one case, if the electronic device determines that the distance between the first overlay element and the first position is less than the first distance (the first distance is a preset distance), the electronic device controls the first overlay element to stop displaying. For example, the first distance may be 10dp, 12dp, etc. When the electronic device determines that the distance between the first overlay element that stops displaying and the first position is greater than the first distance, the electronic device controls the first overlay element to resume displaying.
[0217] In another case, if the electronic device determines that the distance between the second overlay element and the first position is greater than the first distance, the electronic device controls the second overlay element to continue to be displayed.
[0218] For example, Fig.13 At the position in the interface shown in (b), the mobile phone detects that the distance between the superimposed element sticker smiley face 900 and the first position is greater than the first distance, and the display interface of the mobile phone continues to display the superimposed element sticker smiley face 900. At this time, the mobile phone detects that the distance between the first position and the superimposed element text "weather" 903 is less than the first distance, and the display interface of the mobile phone stops displaying the superimposed element text "weather" 903. When the mobile phone detects that the distance between the first position and the superimposed element text "weather" 903 is greater than the first distance, as shown in FIG. Fig.13 As shown in (c), the text "Weather" 903 is redisplayed in the display interface of the mobile phone.
[0219] It should be explained that the above-mentioned elimination operation can be a click operation or a sliding operation. Among them, the click operation can be a single-click operation, a double-click operation or a multi-click operation. For example, in response to detecting a click or sliding operation on the first element, the electronic device controls the superimposed element to stop displaying on the editing interface.
[0220] S1420: In response to the elimination operation on the first element in the first image, eliminate the first element on the editing interface.
[0221] In the embodiment of the present application, the editing interface of the first picture includes a first control and a second control. Among them, the first control can be a smart elimination control, and the second control can be a manual elimination control. Of course, the first control can also be a manual elimination control, and the second control can be a smart elimination control, which is not limited here.
[0222] Exemplarily, the first control may be Figure 9-13 The smart elimination control in the second control can be Figure 9-13 Manual elimination controls in .
[0223] In one embodiment, the electronic device may determine to eliminate the first element using a first elimination method in response to a user triggering operation on a first control. The first elimination method is used to eliminate the element selected by the elimination operation. Thereafter, the electronic device may also determine to eliminate the second element using a second elimination method in response to a user triggering operation on a second control. The second elimination method is to eliminate a selected partial area of the element targeted by the elimination operation.
[0224] The second element can be a residual part of the first element, or the second element can be another element that is unrelated to the first element. Fig.12For the boat shown in (a), the second element is Fig.12 The remaining part of the boat shown in (c) in the figure. For example, the first element is Fig.10 For the boat shown in (a), the second element is Fig.10 The person shown in (a).
[0225] In another embodiment, the electronic device may directly respond to the triggering operation of the second control and eliminate the first element using the second elimination method. Fig.13 As shown in (a), the mobile phone can determine to eliminate the first element by manual elimination in response to the user's triggering operation on the manual elimination control 907.
[0226] In an embodiment of the present application, after the electronic device eliminates the first element, the target color is determined based on the color on the first image that is within the preset range where the first element is located. Then, the electronic device can fill the position where the first element is located with the target color. In other words, the electronic device can determine the target color based on the colors around the first element. The position where the first element is located on the first image after the first element is eliminated on the editing interface is filled with the target color.
[0227] The above target colors can be the same color or different colors, which is not limited here.
[0228] S1430: Display the first image after eliminating the first element on the editing interface and restore the display of the overlay elements.
[0229] For example, Fig.13 As shown in (d), the mobile phone detects that the sliding operation is completed. In response to the sliding operation being completed, the first image after eliminating the boat portion is displayed on the editing interface and the display of the overlay elements is restored.
[0230] In an embodiment of the present application, the editing interface further includes a save button. After the electronic device displays the first image after the first element is eliminated and the superimposed elements on the editing interface, the electronic device can save the second image in response to detecting a trigger operation on the save button. The second image includes the first image after the first element is eliminated and the superimposed elements.
[0231] For example, Fig. 9 As shown in (f), the mobile phone detects the user's triggering operation on the save button 908, and in response to the triggering operation, the mobile phone saves the picture 909.
[0232] It can be seen that the user can directly trigger the save button in the editing interface to save the image after the elimination process. The user does not need to switch pages and can save the processed image in the editing interface, which has the advantages of simple and convenient operation.
[0233] like Fig.15 As shown, an embodiment of the present application discloses an electronic device, which may be the mobile phone mentioned above. The electronic device may specifically include: a touch screen 1501, wherein the touch screen 1501 includes a touch sensor 1506 and a display screen 1507; one or more processors 1502; a memory 1503; one or more application programs (not shown); and one or more computer programs 1504, and the above-mentioned components may be connected via one or more communication buses 1505. Among them, the above-mentioned one or more computer programs 1504 are stored in the above-mentioned memory 1503 and are configured to be executed by the one or more processors 1502, and the one or more computer programs 1504 include instructions, which may be used to execute the relevant steps in the above-mentioned embodiments.
[0234] It is understandable that, in order to realize the above functions, the above-mentioned electronic devices, etc. include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.
[0235] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device etc. according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0236] In the case of dividing each functional module according to each function, a possible composition diagram of the electronic device involved in the above embodiment, the electronic device may include: a display unit, a transmission unit and a processing unit, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0237] The embodiment of the present application also provides an electronic device, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the above-mentioned related method steps to implement the image processing method in the above-mentioned embodiment.
[0238] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the image processing method in the above-mentioned embodiment.
[0239] An embodiment of the present application further provides a computer program product, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the image processing method in the above-mentioned embodiment.
[0240] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the device executes the image processing method executed by the electronic device in the above-mentioned method embodiments.
[0241] Among them, the electronic device, computer-readable storage medium, computer program product or device provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0242] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0243] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0244] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.
[0245] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for processing an image, characterized in that: The method comprises: Displaying an editing interface of a first picture, wherein the first picture includes a first image and an overlay element; In response to detecting a deletion operation on the first element in the first image, controlling the superimposed element to stop being displayed on the editing interface; In response to the elimination operation on the first element in the first image, eliminating the first element on the editing interface; The first image after the first element is eliminated is displayed on the editing interface, and the superimposed element is restored to be displayed.
2. The method according to claim 1, characterized in that The step of displaying the first image after eliminating the first element on the editing interface and restoring the display of the superimposed element comprises: In response to the elimination operation being completed, the first image after the first element is eliminated is displayed on the editing interface, and the overlay element is restored to display.
3. The method according to claim 1, characterized in that In response to detecting a deletion operation on the first element in the first image, controlling the superimposed element to stop being displayed on the editing interface includes: In response to detecting a removal operation on a first element in the first picture, if it is determined that the distance between the first overlay type element and a first position is less than a first distance, controlling the first overlay type element to stop displaying, the first position being a position where the removal operation acts on the display screen; The method further comprises: If it is determined that the distance between the second overlay element and the first position is greater than the first distance, the second overlay element is controlled to continue to be displayed.
4. The method according to claim 3, characterized in that The method further comprises: When the distance between the first overlay element that stops being displayed and the first position is greater than the first distance, the first overlay element is restored to be displayed.
5. The method according to any one of claims 1 to 4, characterized in that: The editing interface includes a first control, and the method further includes: In response to a triggering operation on the first control, determining to use a first elimination method to eliminate elements in the first image, the first elimination method being used to eliminate the elements selected by the elimination operation; In response to the elimination operation on the first element in the first image, eliminating the first element on the editing interface includes: In response to the elimination operation on the first element in the first image, the first element selected by the elimination operation is eliminated on the editing interface.
6. The method according to claim 5, characterized in that The editing interface includes a second control, and the method further includes: In response to a triggering operation on the second control, determining to use a second elimination method to eliminate the element in the first image, the second elimination method being to eliminate a selected partial area of the element targeted by the elimination operation; In response to a removal operation on a second element in the first image, a region selected by the removal operation in the second element is removed on the editing interface.
7. The method according to any one of claims 1 to 6, characterized in that: The editing interface includes a second control, and the method further includes: In response to a triggering operation on the second control, determining to eliminate the first element by adopting a second elimination method; In response to the elimination operation on the first element in the first image, eliminating the first element on the editing interface includes: In response to a removal operation on a first element on the first picture, a region selected by the removal operation in the first element is removed on the editing interface.
8. The method according to any one of claims 1 to 7, characterized in that: The elimination operation includes a click or a slide operation, and in response to detecting the elimination operation on the first element in the first image, controlling the superimposed element to stop being displayed on the editing interface includes: In response to detecting a click or slide operation on the first element, the overlay element is controlled to stop being displayed on the editing interface.
9. The method according to any one of claims 1 to 8, characterized in that: In response to the operation of removing the first element in the first image, after removing the first element on the editing interface, the method further includes: Determine a target color according to a color on the first image that is within a preset range where the first element is located; The target color is used to fill the position where the first element is located; the target color is filled at the position where the first element is located on the first image after the first element is eliminated on the editing interface.
10. The method according to any one of claims 1 to 9, characterized in that: The editing interface includes a save button. After the first image after eliminating the first element and the superimposed element are displayed on the editing interface, the method further includes: In response to detecting a triggering operation on the save button, a second picture is saved, where the second picture includes the first image after eliminating the first element and the overlay-type element.
11. An electronic device, characterized in that: include: A display screen, wherein the display screen is used to display an editing interface of a picture; one or more processors; Memory; One or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are read and executed by one or more processors, the method according to any one of claims 1 to 10 is executed.
Citation Information
Cited By
Picture processing method, electronic device and storage medium
EP4745742A1
Picture processing method, electronic device and storage medium
WO2025092085A1