Image restoration method, apparatus, device, computer-readable storage medium, and product

The image restoration method addresses the inefficiencies of manual adjustments by generating and editing a first area to obtain a second area for improved restoration, enhancing efficiency and effectiveness.

JP2025534362AInactive Publication Date: 2025-10-15BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025518656
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-09-30
Filing Date
2023-09-14
Publication Date
2025-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Conventional image restoration methods require cumbersome manual adjustments, leading to low restoration effectiveness.

Method used

An image restoration method that involves determining a first target area, generating a related first area, performing editing operations to obtain a second area, and using this second area for image restoration, thereby improving restoration efficiency and effectiveness.

Benefits of technology

The method enhances image restoration efficiency and accuracy by allowing users to adapt the editing process to their needs, resulting in improved restoration effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025534362000001_ABST
    Figure 2025534362000001_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide an image restoration method, an apparatus, an electronic device, a computer-readable storage medium, a computer program product, and a computer program. [Solution] The method includes determining a first target area selected by the user in response to a selection operation performed by the user on any area in the image to be repaired within an image repair page; generating a first area related to the first target area based on the first target area and displaying a predetermined editing page within the image repair page; performing an editing operation on the first area based on the editing content in response to editing content input by the user within the editing page to obtain a second area; and performing an image repair operation on the image to be repaired based on the second area.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] FIELD Embodiments of the present disclosure relate to the technical field of image processing, and in particular to an image restoration method, apparatus, electronic device, computer-readable storage medium, computer program product, and computer program.

[0002] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to a Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on September 30, 2022, bearing application number 202211215127.6 and entitled "Image restoration method, apparatus, device, computer-readable storage medium and product," the entire contents of which are incorporated herein by reference. [Background technology]

[0003] As the hardware performance of terminal devices improves, the number of applications (abbreviated as APP) that run on terminal devices, such as image processing software, is increasing. Image processing software allows users to perform operations such as image editing and restoration.

[0004] When performing image restoration with conventional image restoration software, the user generally needs to manually adjust the area to be restored, which makes the operation cumbersome and often results in low restoration effectiveness. Summary of the Invention

[0005] Embodiments of the present disclosure provide an image restoration method, an apparatus, an electronic device, a computer-readable storage medium, a computer program product, and a computer program.

[0006] In a first aspect, an embodiment of the present disclosure provides an image restoration method, the method including: determining a first target area selected by a user in response to a selection operation performed by the user on any area in an image to be restored within an image restoration page; generating a first area related to the first target area based on the first target area; displaying a predetermined editing page within the image restoration page; performing an editing operation on the first area based on the editing content in response to editing content input by the user within the editing page to obtain a second area; and performing an image restoration operation on the image to be restored based on the second area.

[0007] In a second aspect, an embodiment of the present disclosure provides an image restoration device, comprising: a determination module for determining a first target area selected by a user in response to a selection operation performed by the user on any area in an image to be restored within an image restoration page; a processing module for generating a first area related to the first target area based on the first target area and displaying a predetermined editing page within the image restoration page; an editing module for performing an editing operation on the first area based on the editing content in response to editing content input by the user within the editing page to obtain a second area; and a restoration module for performing an image restoration operation on the image to be restored based on the second area.

[0008] In a third aspect, an embodiment of the present disclosure provides an electronic device, the device comprising a processor and a memory, the memory storing computer-executable instructions, and the processor executing the computer-executable instructions stored in the memory, such that the at least one processor performs the image restoration method described in the first aspect above and various possible designs of the first aspect.

[0009] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, the computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implements the image restoration method described in the first aspect above and various possible designs of the first aspect.

[0010] In a fifth aspect, an embodiment of the present disclosure provides a computer program product including a computer program that, when executed by a processor, implements the image restoration method according to the first aspect above and various possible designs of the first aspect.

[0011] In a sixth aspect, an embodiment of the present disclosure provides a computer program product that, when executed by a processor, implements the image restoration method according to the first aspect above and various possible designs of the first aspect.

[0012] The image restoration method, device, electronic device, computer-readable storage medium, computer program product, and computer program provided by this embodiment allow a user to determine a first target area selected in an image to be restored, generate a first area corresponding to this first target area, perform an editing operation on this first area to obtain a second area, and use this second area to perform a restoration operation on the image to be restored. [Brief explanation of the drawings]

[0013] In order to more clearly explain the embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. The accompanying drawings in the following description are some embodiments of the present disclosure, and it is obvious to those skilled in the art that they can obtain other drawings according to these accompanying drawings without paying creative efforts. [Figure 1] 1 is a schematic flowchart of an image restoration method provided by an embodiment of the present disclosure. [Figure 2]FIG. 2 is a schematic diagram of interface interactions provided by an embodiment of the present disclosure. [Figure 3] FIG. 10 is a schematic diagram of another interface interaction provided by an embodiment of the present disclosure. [Figure 4] 1 is a schematic flowchart of an image restoration method provided by another embodiment of the present disclosure. [Figure 5] FIG. 10 is a schematic diagram of another interface interaction provided by an embodiment of the present disclosure. [Figure 6] 1 is a schematic flowchart of an image restoration method provided by another embodiment of the present disclosure. [Figure 7] 1 is a schematic flowchart of an image restoration method provided by another embodiment of the present disclosure. [Figure 8] 1 is a schematic diagram illustrating the configuration of an image restoration device provided by an embodiment of the present disclosure. [Figure 9] 1 is a schematic diagram illustrating the configuration of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0014] In order to clarify the objectives, technical solutions, and advantages of the embodiments of the present disclosure, the following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings in the embodiments of the present disclosure, but it is clear that the described embodiments are only a part of the embodiments of the present disclosure, and are not all of the embodiments. All other embodiments that can be obtained by a person skilled in the art based on the embodiments of the present disclosure without paying creative effort shall fall within the protection scope of the present disclosure.

[0015] In order to solve the technical problems of conventional image restoration methods, which usually involve complicated operations and low restoration effects, the present disclosure provides an image restoration method, an apparatus, an electronic device, a computer-readable storage medium, a computer program product, and a computer program.

[0016] It should be noted that the image restoration method, apparatus, electronic device, computer-readable storage medium, computer program product, and computer program provided by the present disclosure can be applied to any one of the application scenarios of image restoration.

[0017] In conventional image restoration methods, users typically manually select the area that needs to be restored and then perform direct editing operations on the area to achieve the restoration effect. However, when image restoration is performed using the above method, the restoration effect tends to be low.

[0018] In the process of solving the above technical problem, the inventors have found through research that, in order to improve the restoration effect of image restoration, a first region related to a region selected by a user in an image to be restored can be generated according to the selected region. A second region can be obtained by performing an editing operation on the first region. Then, an image restoration operation can be performed based on this second region. The second region obtained by performing the editing operation on the first region can better meet the needs of practical applications, and further, performing image restoration based on this second region can achieve a better restoration effect.

[0019] Example 1

[0020] FIG. 1 is a schematic flowchart of an image restoration method provided by an embodiment of the present disclosure. As shown in FIG. 1, the method includes steps 101 to 104, which are described below.

[0021] In step 101, a first target area selected by the user in response to a selection operation performed by the user on an arbitrary area in the image to be restored within the image restoration page is determined.

[0022] The execution entity of this embodiment is an image restoration device, which is coupled to a terminal device and can perform restoration operations on the image to be restored in response to a user's trigger operation on the terminal device. Optionally, the image restoration device is also coupled to a server, which is communicatively connected to the terminal device and can receive the user's trigger operation sent from the terminal device, and can perform image restoration operations based on the trigger operation and feed the restored restoration results back to the terminal device for display.

[0023] In this embodiment, when a user needs to perform an image restoration operation, the user can trigger a predetermined restoration controller to enter an image restoration page, in which the image to be restored may be displayed.

[0024] Furthermore, in the image inpainting page, the user may select a first target area that needs to be cloned in the image to be inpainted according to actual needs. Specifically, the user can select any area in the image to be inpainted in a predetermined image inpainting page to obtain the first target area.

[0025] Alternatively, the first target area may be obtained by a user performing a paint operation on any area in the image to be inpainted. Alternatively, the first target area may be obtained by a user performing a paint operation on any area in the image to be inpainted and an intelligent identification operation. Alternatively, all target objects in the image to be inpainted may be intelligently recognized based on the user's selection operation on any one of the target objects in response to a selection operation triggered by the user. The present disclosure does not limit the specific selection method.

[0026] In step 102, a first region related to the first target region is generated based on the first target region, and a predetermined editing page is displayed within the image restoration page.

[0027] In this embodiment, after obtaining a first target area selected by a user, a first area may be generated based on the first target area to facilitate the restoration operation on the image. Here, the first target area has the same parameters as the first area, such as shape and size. The first area may be a clone area generated based on the first target area.

[0028] After generating the first region, the user may perform an editing operation on the first region according to the restoration needs in actual application. Therefore, after generating the first region, a predetermined editing page may be displayed in the image restoration page. The user may perform an editing operation on the first region based on the editing page.

[0029] Optionally, the display size of the editing page may be smaller than that of the image inpainting page, and the image to be inpainted, the first target area, and the first area may be displayed within the image inpainting page, and the editing page may be displayed below the image inpainting page to avoid obscuring the image to be inpainted.

[0030] In step 103, in response to an edit content input by a user in the edit page, an edit operation is performed on the first area based on the edit content to obtain the second area.

[0031] In this embodiment, the editing page specifically includes multiple editing options, and the user may input editing content for each editing option. Here, the editing options may include a transparency editing option, a feathering option, an erasing option, etc. For example, the user may input content such as transparency parameters and feathering parameters as editing content on the editing page, perform editing operations on the first area based on the parameters in the editing content, and obtain a second area after editing is completed. Here, the number of second areas may be multiple. This second area may be a patch area for applying a patch to the image to be restored.

[0032] In step 104, an image inpainting operation is performed on the image to be inpainted based on the second region.

[0033] In this embodiment, after obtaining the second region, an image inpainting operation may be performed on the image to be inpainted based on the second region.

[0034] For example, the second region may cover the area to be inpainted in the image to be inpainted, or the second region may replace the area to be inpainted in the image to be inpainted.

[0035] 2 is a schematic diagram of an interface interaction provided by an embodiment of the present disclosure. As shown in FIG. 2, a user may perform a selection operation on an image 21 to be inpainted. In response to the selection operation, a first target region 22 is determined. A first region 23 related to the first target region 22 is generated. Here, the first region 23 is the same as the first target region 22.

[0036] Further, in addition to any one of the above embodiments, following step 102: moving the first target area and the first area in response to a user's movement operation on the first target area; and / or The method further includes moving the first area in response to a user's movement operation on the first area.

[0037] In this embodiment, the user may perform a moving operation on the selected first target area or the first area according to actual needs.

[0038] Alternatively, when a user performs a move operation on the first target area, the first area also moves in accordance with the move operation on the first target area. When a user performs a move operation on the first area, the first target area does not move in accordance with the move operation. Specifically, the first target area and the first area are moved in response to the user's move operation on the first target area. Furthermore, the first area is moved in response to the user's move operation on the first area.

[0039] Furthermore, in addition to any one of the above embodiments, the image restoration page further includes a comparison controller.

[0040] Following step 103, displaying a first region corresponding to the second region in response to a user triggering the comparison controller; The method further includes redisplaying the second area in response to the user ceasing the trigger to the comparison controller.

[0041] In this embodiment, in order to adapt the edited second region to the user's personal needs and improve the repair effect, the user may perform a comparative display operation between the current second region and the first region during editing so as to further edit the second region.

[0042] Optionally, the image restoration page also includes a comparison controller that, in response to a user's triggering of the comparison controller, displays a first region corresponding to a second region, allowing the user to view the current editing effect. When it is detected that the user has stopped triggering the comparison controller, the second region may be redisplayed to allow the user to perform further editing operations on the second region.

[0043] The image restoration method provided by this embodiment allows a user to select a first target area in an image to be restored, generate a first area corresponding to the first target area, and then edit the first area to obtain a second area, which can then be used to perform restoration on the image to be restored. This improves the efficiency of the image restoration operation. Furthermore, by editing the first area, the second area can be further adapted to actual needs, thereby improving the image restoration effect.

[0044] Example 2

[0045] In this embodiment, to determine the first target area, the area selected by the user in the image to be restored may be directly set as the first target area, or the first target area may be determined based on the user's selection operation and intelligent identification operation, or the first target area may be determined using intelligent recognition.

[0046] Optionally, in any one of the above embodiments, step 101 further comprises: In response to at least one sliding operation by a user on any region in the image to be inpainted, determining a covering region corresponding to the sliding operation; determining the coverage area as the first target area.

[0047] In this embodiment, to determine the first target area, a region selected by the user in the image to be inpainted may be directly set as the first target area. Specifically, the user may perform a sliding operation on any region in the image to be inpainted according to actual needs, and select the first target area through this sliding operation. Here, the number of times of this sliding operation may be at least one. Correspondingly, in response to the sliding operation, a cover region corresponding to the sliding operation may be determined. The cover region is determined as the first target area.

[0048] Further, in addition to any one of the above embodiments, determining a cover area corresponding to at least one slide operation by a user on an arbitrary area in the image to be restored as described above may include: determining brushing size information corresponding to the at least one sliding operation; determining a slide trajectory corresponding to the slide operation; determining the coverage area based on the slide trajectory and the brushing size.

[0049] In this embodiment, the user can select brushing size information corresponding to the sliding operation according to actual needs. Therefore, according to the user's sliding operation in any area of ​​the image to be restored, a sliding trajectory corresponding to the sliding operation is determined. In addition, based on the sliding trajectory and the brushing size information corresponding to the sliding operation, a covering area corresponding to the sliding operation is determined.

[0050] The image restoration method provided in this embodiment determines a first target area according to the user's sliding operation on the image to be restored, so that the first target area can be further adapted to the user's actual needs, and further generates a first area that further meets the user's actual needs based on the first target area, thereby improving the efficiency and accuracy of image restoration.

[0051] Optionally, in any one of the above embodiments, step 101 further comprises: In response to at least one sliding operation by a user on any region in the image to be inpainted, determining a covering region corresponding to the sliding operation; identifying a target object corresponding to a location in the coverage area; determining a region corresponding to the target object as the first target region.

[0052] In this embodiment, the first target area may be determined based on a user's selection operation and intelligent identification operation. Specifically, the user may perform a sliding operation on any area in the image to be inpainted according to actual needs, and the number of sliding operations may be at least one. In response to the user's at least one sliding operation on any area in the image to be inpainted, a covering area corresponding to the sliding operation is determined.

[0053] The image to be inpainted may contain multiple target objects, including but not limited to people, animals, objects, stickers, etc., and the coverage area may not accurately cover the target objects. Therefore, a coverage area corresponding to the slide operation can be determined, and a target object corresponding to the location of the coverage area can be intelligently identified. The target object is determined as a first target area.

[0054] 3 is a schematic diagram of another interface interaction provided by an embodiment of the present disclosure, as shown in FIG. 3, a user may perform a sliding operation on an image to be restored 31, and in response to the sliding operation, determine a covering area 32 corresponding to the sliding operation, and determine a target object 33 corresponding to the location of the covering area as a first target area.

[0055] Optionally, in any one of the above embodiments, step 101 further comprises: determining a trigger position corresponding to a user's trigger operation on any region within the image to be inpainted; identifying a target object corresponding to the trigger location; determining a region corresponding to the target object as the first target region.

[0056] In this embodiment, the first target region may be determined by using an intelligent recognition method. Specifically, a user may select a trigger position by performing a trigger operation on any region in the image to be inpainted. Then, a target object corresponding to the trigger position is identified. The target object is determined as the first target region.

[0057] It should be noted that any recognition method may be used to realize the target object identification operation, and the present disclosure is not limited thereto.

[0058] The image inpainting method provided in this embodiment intelligently identifies the target object at the user's trigger position and determines the first target area based on this target object, thereby improving the convenience of determining the first target area, allowing the user to obtain the first target area without painting all the target objects, and improving the efficiency of image inpainting.

[0059] Example 3

[0060] 4 is a schematic flowchart of an image restoration method provided by another embodiment of the present disclosure, which is similar to any one of the above embodiments, and further includes at least one editing option on the editing page. As shown in FIG. 4, step 103 includes: Step 401: in response to a trigger operation by a user on any one of the editing options, acquiring an editing content input by the user for the editing option; Step 402 includes performing an editing operation on the first region based on editing content corresponding to the editing option to obtain a second region.

[0061] In this embodiment, the editing page may specifically include multiple editing options, and the user may input editing content for each editing option. Here, the editing options may include a transparency editing option, a feather option, an erase option, etc. For example, the user may input content such as a transparency parameter or a feather parameter as editing content into the editing page, and then perform an editing operation on the first region based on the parameters in the editing content. Correspondingly, in response to a user's trigger operation on any one of the editing options, the editing content input by the user into the editing options can be obtained. Based on the editing content corresponding to the editing option, an editing operation is performed on the first region to obtain a second region.

[0062] The image restoration method provided in this embodiment sets multiple editing options, and performs editing operations on the first area based on the editing content corresponding to the multiple editing options, so that a second area that is more suited to the user's actual needs can be obtained, and the generated second area has a better restoration effect.

[0063] Optionally, in addition to any one of the above embodiments, if the editing option is a transparency editing option or a feather option, step 401 includes: displaying a parameter adjustment controller corresponding to the transparency editing option or the feathering option in response to a user triggering the transparency editing option or the feathering option; determining a target adjustment parameter in response to a user's adjustment operation on the parameter adjustment controller, and determining the target adjustment parameter as editing content corresponding to the editing option.

[0064] Step 402 includes adjusting the transparency or featheriness of the first region according to the target adjustment parameters to obtain the second region.

[0065] In this embodiment, if the editing option is a transparency editing option or a feather option, the user may input content such as transparency parameters, feather parameters, etc. as editing content on the editing page.

[0066] Specifically, in response to a user's trigger operation on the transparency editing option or the feather option, a parameter adjustment controller corresponding to the transparency editing option or the feather option is displayed. The user may determine a target adjustment parameter by adjusting the parameter adjustment controller, and determine the target adjustment parameter as editing content corresponding to the editing option. For example, the user may adjust the feather parameter to 59 by adjusting the parameter adjustment controller.

[0067] After determining the editing content corresponding to the editing option, the transparency or featheriness of the first region may be adjusted based on the target adjustment parameters in the editing content to obtain the second region.

[0068] 5 is a schematic diagram of another interface interaction provided by an embodiment of the present disclosure. As shown in FIG. 5, when the editing option is a transparency editing option or a feather option, a parameter adjustment controller 53 corresponding to the transparency editing option or the feather option is displayed in response to a user's trigger operation on the transparency editing option 51 or the feather option 52. The user can adjust the parameter adjustment controller 53 to achieve the determination of the target adjustment parameter.

[0069] The image restoration method provided in this embodiment can adjust the transparency or featheriness of the first region, allowing the second region to achieve a better restoration effect, thereby improving the efficiency and accuracy of image restoration.

[0070] Optionally, in addition to any one of the above embodiments, if the edit option is a delete option, step 401 includes: displaying a predetermined stroke size adjustment controller in response to a user triggering the erase option; Obtaining a target stroke size input by the user by triggering the stroke size adjustment controller and an erasure path triggered by the user within the first region; determining an area to be erased based on the target stroke size and the erasure path, and determining the area to be erased as the edited content.

[0071] Step 402 includes performing an erasing operation on a position of the first area that overlaps with the area to be erased, to obtain the second area.

[0072] In this embodiment, the edit option further includes an erase option, and when the shape of the second area does not meet practical needs, the erase option may be triggered to perform an erase operation on the second area.

[0073] Optionally, in response to a user's trigger operation on an erase option, a predetermined stroke size adjustment controller is displayed, and a target stroke size corresponding to the erase operation is determined by performing an adjustment operation on the stroke size adjustment controller. The target stroke size input by the user when the stroke size adjustment controller is triggered is obtained. An erasure path triggered by the user within the first region is obtained. A region to be erased is determined based on the target stroke size and the erasure path, and the region to be erased is determined as the edited content. Furthermore, an erase operation may be performed on a position in the first region that overlaps with the region to be erased to obtain a second region.

[0074] The image restoration method provided in this embodiment obtains the second area by performing an erasure operation on the first area, so that the second area can be more adapted to the area to be restored and a better restoration effect can be achieved.

[0075] Optionally, in addition to any one of the above embodiments, the edit page includes a clone continuation option. displaying a region selection page in response to a user triggering the clone continuation option; determining a second target area selected by the user in response to a user selection of an arbitrary area within the image to be inpainted, and generating a first area associated with the second target area; determining a first region associated with the first target region and a first region associated with the second target region as current first regions; The region selection page includes the image to be inpainted and a predetermined prompt controller, which prompts a user to select a target region in the image to be inpainted.

[0076] In this embodiment, after obtaining the first region, the cloning operation can be continued, specifically, the edit page also includes a continue cloning option.

[0077] Optionally, the clone continuation option can be used to select another first region. In response to a user's trigger operation on the clone continuation option, a region selection page is displayed, which includes an image to be repaired and a predetermined prompt controller, where the prompt controller is used to prompt the user to select a target region in the image to be repaired. The user can select any region in the image to be repaired according to the needs of the image repair. In response to the selection operation, a second target region selected by the user can be determined, and a first region associated with the second target region can be generated. The first region associated with the first target region and the first region associated with the second target region are determined as current first regions.

[0078] Optionally, a first region identical to this first region may be duplicated by triggering the clone continuation option.

[0079] The image restoration method provided in this embodiment can add a new first area in addition to the first area by triggering the clone continuation option, which is convenient to operate, improves the efficiency of image restoration, and enhances the user experience.

[0080] Example 4

[0081] FIG. 6 shows a schematic flowchart of an image restoration method provided by another embodiment of the present disclosure, which, in addition to any one of the above embodiments, further comprises: Step 601: in response to a user's movement operation on the second region, moving the second region to a position to be restored within the image to be restored; and covering the location to be inpainted with the second region and performing an image inpainting operation on the image to be inpainted (step 602).

[0082] In this embodiment, the second region can be used to cover the region to be repaired in the image to be repaired, thereby achieving a repair operation on the image to be repaired. Specifically, the second region may be moved to a position to be repaired in the image to be repaired in response to a user's movement operation on the second region. Alternatively, the user may realize the movement operation by dragging the second region. Alternatively, the second region may be moved by inputting coordinate information of the position to be repaired. Alternatively, the second region may be moved to the position to be repaired by triggering the position to be repaired. The present disclosure is not limited thereto. Furthermore, the repair operation on the image to be repaired may be achieved by covering the position to be repaired with the second region.

[0083] The image restoration method provided in this embodiment acquires the second region, then moves the second region to the position to be restored, thereby accurately performing the restoration operation on the image to be restored, thereby improving the accuracy of image restoration.In addition, the restoration operation on the image to be restored can be achieved through a simple movement operation, which is convenient and improves the efficiency of image restoration.

[0084] Example 5

[0085] FIG. 7 is a schematic flowchart of an image restoration method provided by another embodiment of the present disclosure. In addition to any one of the above embodiments, as shown in FIG. 7, before step 101: Step 701: jumping to the image restoration page in response to a user's trigger operation on a predetermined restoration controller; The method further includes step 702 of displaying the image to be restored and all editable layers associated with the image to be restored in the image restoration page.

[0086] In this embodiment, before the image to be restored is restored, various editing operations may be performed on the image to be restored in advance, such as adding filters, adding stamps, beautifying the image, etc. In addition, in order to achieve better image editing effects, multiple layers may be set and different editing operations may be performed on each layer.

[0087] Therefore, in the process of image restoration, in order to ensure the image restoration effect, the non-editable layers are hidden and the editable layers are displayed, so that the user can perform image editing operations on the editable layers. Optionally, a restoration controller may be pre-installed, and the image restoration page may be jumped to in response to a user's trigger operation on a predetermined restoration controller. The image restoration page displays the image to be restored and all editable layers related to the image to be restored.

[0088] Furthermore, in addition to any one of the above embodiments, following step 802, the method further includes displaying the image to be restored and all layers related to the image to be restored within the image restoration page in response to a predetermined trigger operation by the user within the image restoration page.

[0089] In this embodiment, the user can view currently hidden layers according to actual needs. Specifically, in response to a predetermined trigger operation by the user in the image restoration page, the image to be restored and all layers related to the image to be restored may be displayed in the image restoration page. Here, all the layers include editable layers and non-editable layers. Specifically, the predetermined trigger operation may be a long press operation, a double click operation, a predetermined gesture, etc.

[0090] The image restoration method provided by this embodiment ensures the effectiveness of image restoration by hiding non-editable content and redisplaying it according to the user's trigger operation, while making the image restoration process more adaptable to the user's personal needs.

[0091] Example 6

[0092] FIG. 8 is a schematic diagram of an image restoration device provided by an embodiment of the present disclosure. As shown in FIG. 8, the device includes a determination module 81, a processing module 82, an editing module 83, and an inpainting module 84. Here, the determination module 81 is used to determine a first target area selected by a user in response to a selection operation performed by the user on an arbitrary area in an image to be inpainted in an image inpainting page. The processing module 82 is used to generate a first area related to the first target area based on the first target area and display a predetermined editing page in the image inpainting page. The editing module 83 is used to perform an editing operation on the first area based on editing content input by a user in the editing page to obtain a second area. The inpainting module 84 is used to perform an image inpainting operation on the image to be inpainted based on the second area.

[0093] Further, in addition to any one of the above embodiments, the device further includes a first movement module for moving the first target area and the first area in response to a user's movement operation relative to the first target area, and / or a second movement module for moving the first area in response to a user's movement operation relative to the first area.

[0094] Further, in any one of the above embodiments, the image restoration page further includes a comparison controller, and the apparatus further includes: a comparison module for displaying a first region corresponding to the second region in response to a user triggering the comparison controller; and a display module for re-displaying the second region in response to a user stopping the trigger on the comparison controller.

[0095] Further, in accordance with any one of the above embodiments, the determination module is used to determine, in response to at least one sliding operation by a user on any region in the image to be restored, a covering region corresponding to the sliding operation, and determine the covering region as the first target region.

[0096] Further, in addition to any one of the above embodiments, the determination module may determining brushing size information corresponding to the at least one sliding operation; determining a slide trajectory corresponding to the slide operation; It is used to determine the coverage area based on the slide trajectory and the brushing size.

[0097] Further, in accordance with any one of the above embodiments, the determination module is used to determine a cover area corresponding to at least one sliding operation by a user on any area in the image to be restored, identify a target object corresponding to a location of the cover area, and determine the area corresponding to the target object as the first target area.

[0098] Further, in addition to any one of the above embodiments, the determination module is used to, in response to a user's trigger operation on any region in the image to be restored, determine a trigger position corresponding to the trigger operation, identify a target object corresponding to the trigger position, and determine the region corresponding to the target object as the first target region.

[0099] Further, in any one of the above embodiments, the editing page includes at least one editing option, and the editing module is used to, in response to a user's trigger operation on any one of the editing options, obtain editing content input by the user for the editing option, and perform an editing operation on the first area based on the editing content corresponding to the editing option to obtain a second area.

[0100] Further to any one of the above embodiments, the at least one editing option includes at least one of a transparency editing option, a feather option, and a erase option.

[0101] Further, in addition to any one of the above embodiments, when the editing option is a transparency editing option or a feathering option, the editing module is used to display a parameter adjusting controller corresponding to the transparency editing option or the feathering option in response to a user's trigger operation on the transparency editing option or the feathering option, determine a target adjustment parameter in response to the user's adjustment operation on the parameter adjusting controller, and determine the target adjustment parameter as editing content corresponding to the editing option. The editing module is used to adjust the transparency or feathering of the first region based on the target adjustment parameter to obtain the second region.

[0102] Further, in addition to any one of the above embodiments, when the editing option is an erase option, the editing module is used to display a predetermined stroke size adjustment controller in response to a user's trigger operation for the erase option, obtain a target stroke size input by the user by triggering the stroke size adjustment controller, obtain an erasure path triggered by the user within the first area, determine an area to be erased based on the target stroke size and the erasure path, and determine the area to be erased as the edited content. The editing module is used to perform an erase operation on a position of the first area that overlaps with the area to be erased to obtain the second area.

[0103] Further, in addition to any one of the above embodiments, the editing page includes a continue clone option. The apparatus further includes: a display module for displaying a region selection page in response to a user's trigger operation on the continue clone option; and a selection module for determining a second target region selected by the user in response to the user's selection operation on any region in the image to be inpainted and generating a first region related to the second target region. The region selection page includes the image to be inpainted and a predetermined prompt controller, the prompt controller is used to prompt a user to select a target region in the image to be inpainted, and a determination module is further used to determine the first region related to the first target region and the first region related to the second target region as current first regions.

[0104] Further, in addition to any one of the above embodiments, the restoration module is used to, in response to a user's movement operation on the second region, move the second region to a position to be restored in the image to be restored, cover the position to be restored with the second region, and perform an image restoration operation on the image to be restored.

[0105] In addition to any one of the above embodiments, the apparatus further includes a jump module for jumping to the image restoration page in response to a user's trigger operation on a predetermined restoration controller, and a display module for displaying the image to be restored and all editable layers associated with the image to be restored within the image restoration page.

[0106] Further, in addition to any one of the above embodiments, the device further includes a display module, which is further used to display the image to be restored and all layers associated with the image to be restored within the image restoration page in response to a predetermined trigger operation by a user within the image restoration page.

[0107] The device provided in this embodiment can implement the technical solution of the above method-related embodiment, and the implementation principles and technical effects are similar, so the description of this embodiment will not be repeated here.

[0108] To achieve the above embodiment, an embodiment of the present disclosure further provides an electronic device, the device including a processor and a memory, The memory stores computer-executable instructions.

[0109] FIG. 9 is a schematic diagram illustrating the configuration of an electronic device provided by an embodiment of the present disclosure. As shown in FIG. 9, the electronic device 900 may be a terminal device or a server. Here, the terminal device includes, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (abbreviated as PDAs), tablet computers (Portable Android Devices (abbreviated as PADs), portable media players (abbreviated as PMPs), and in-vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital televisions and desktop computers. Note that the electronic device illustrated in FIG. 9 is merely an example and does not limit the functions and scope of use of the embodiment of the present disclosure.

[0110] 9, electronic device 900 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 901 that can perform various appropriate operations and processes based on a program stored in read only memory (ROM) 902 or a program loaded from a storage device 908 into random access memory (RAM) 903. RAM 903 also stores various programs and data necessary for the operation of electronic device 900. Processing unit 901, ROM 902, and RAM 903 are connected to one another via a bus 904. An input / output (I / O) interface 905 is also connected to bus 904.

[0111] Typically, the I / O interface 905 may be connected to input devices 906, including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 907, including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 908, including, for example, a magnetic tape, hard disk, etc.; and communication devices 909. The communication devices 909 may enable the electronic device 900 to communicate and exchange data with other devices wirelessly or via wires. While FIG. 9 illustrates the electronic device 900 including various devices, it should be understood that it is not necessary for the electronic device 900 to implement or include all of the devices shown. More or fewer devices may alternatively be implemented or included.

[0112] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product including a computer program stored on a computer-readable medium, the computer program including program code for performing the method illustrated in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via the communication device 909, or may be installed from the storage device 908, or may be installed from the ROM 902. When the computer program is executed by the processing device 901, it performs the functions described above defined in the method of the embodiments of the present disclosure.

[0113] In the present disclosure, the computer-readable medium may be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device. Also, in this disclosure, a computer-readable signal medium may include a propagated data signal, either in baseband or as part of a carrier carrying computer-readable program code. Such a propagated data signal may take various forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium, other than a computer-readable storage medium, that transmits, propagates, or transmits a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wire, fiber optic cable, radio frequency (RF), or the like, or any suitable combination of the foregoing.

[0114] An embodiment of the present disclosure also provides a computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the image restoration method described in any one of the above embodiments is implemented.

[0115] An embodiment of the present disclosure also provides a computer program product including a computer program, which, when executed by a processor, performs the image restoration method according to any one of the above embodiments.

[0116] An embodiment of the present disclosure further provides a computer program that, when executed by a processor, implements the image restoration method described in any one of the above embodiments.

[0117] The computer-readable medium may be included in the electronic device or may be separate and not integrated into the electronic device.

[0118] The computer-readable medium stores one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0119] Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and the like, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may run entirely on the user computer, partially on the user computer, as a stand-alone software package, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. In the context of a remote computer, the remote computer may be connected to the user computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet Service Provider).

[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions, and operations that may be implemented in accordance with systems, methods, and computer program products according to embodiments of the present disclosure. In this regard, each box in a flowchart or block diagram may represent a module, program segment, or portion of code, which includes one or more executable instructions for implementing the specified logical function(s). Note that in some alternative implementations, the functions marked in the boxes may occur in a different order than those marked in the accompanying drawings. For example, two consecutive boxes may actually be executed substantially in parallel, or may be executed in reverse order depending on the functionality involved. It should also be noted that each box in the block diagrams and / or flowcharts, and combinations of boxes in the block diagrams and / or flowcharts, may be implemented in a dedicated hardware-based system that performs the specified function or operation, or in a combination of dedicated hardware and computer instructions.

[0121] The units described in the embodiments of the present disclosure may be implemented by software or hardware, and the name of the unit does not constitute a limitation on the unit itself in a given situation, for example, the first obtaining unit may also be described as "a unit for obtaining at least two Internet Protocol addresses."

[0122] The functionality described herein above may be performed, at least in part, by one or more hardware logic units. For example, without limitation, possible example hardware logic units include Field-Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Parts (ASSPs), System On Chip (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0123] In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples of machine-readable storage media include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a CD-ROM (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0124] In a first aspect, according to one or more embodiments of the present disclosure, there is provided an image restoration method, the method comprising: determining a first target area selected by the user in response to a selection operation performed by the user on an arbitrary area in the image to be inpainted within the image inpainting page; generating a first region related to the first target region based on the first target region, and displaying a predetermined editing page within the image inpainting page; In response to an edit content input by a user within the edit page, perform an edit operation on the first region based on the edit content to obtain a second region; performing an image inpainting operation on the image to be inpainted based on the second region.

[0125] According to one or more embodiments of the present disclosure, determining a first target area selected by the user in response to a selection operation performed by the user on an arbitrary area in the image to be inpainted within an image inpainting page includes: In response to at least one sliding operation by a user on any region in the image to be inpainted, determining a covering region corresponding to the sliding operation; determining the coverage area as the first target area.

[0126] According to one or more embodiments of the present disclosure, determining a cover area corresponding to at least one sliding operation by a user on an arbitrary area in the image to be restored includes: determining brushing size information corresponding to the at least one sliding operation; determining a slide trajectory corresponding to the slide operation; determining the coverage area based on the slide trajectory and the brushing size information.

[0127] According to one or more embodiments of the present disclosure, determining a first target area selected by the user in response to a selection operation performed by the user on an arbitrary area in the image to be inpainted within an image inpainting page includes: In response to at least one sliding operation by a user on any region in the image to be inpainted, determining a covering region corresponding to the sliding operation; identifying a target object corresponding to a location in the coverage area; determining a region corresponding to the target object as the first target region.

[0128] According to one or more embodiments of the present disclosure, determining a first target area selected by the user in response to a selection operation performed by the user on an arbitrary area in the image to be inpainted within an image inpainting page includes: determining a trigger position corresponding to a user's trigger operation on any region within the image to be restored; identifying a target object corresponding to the trigger location; determining a region corresponding to the target object as the first target region.

[0129] According to one or more embodiments of the present disclosure, the edit page includes at least one edit option; In response to edit content input by the user within the edit page, performing an edit operation on the first area based on the edit content to obtain a second area, In response to a trigger operation by a user on any one of the editing options, acquiring an editing content input by the user on the editing option; performing an editing operation on the first area based on editing content corresponding to the editing option to obtain a second area.

[0130] According to one or more embodiments of the present disclosure, the at least one editing option comprises at least one of a transparency editing option, a feather option, and a erase option.

[0131] According to one or more embodiments of the present disclosure, when the editing option is a transparency editing option or a feather option, acquiring editing content input by the user for the editing option in response to a trigger operation by the user for any one of the editing options includes: displaying a parameter adjustment controller corresponding to the transparency editing option or the feathering option in response to a user triggering the transparency editing option or the feathering option; determining a target adjustment parameter in response to a user's adjustment operation on the parameter adjustment controller, and determining the target adjustment parameter as editing content corresponding to the editing option; performing an editing operation on the first area based on editing content corresponding to the editing option to obtain a second area; and performing a transparency adjustment or a feathering adjustment on the first region based on the target adjustment parameter to obtain the second region.

[0132] According to one or more embodiments of the present disclosure, when the editing option is a delete option, acquiring edited content input by the user for the one editing option in response to a trigger operation by the user for the one editing option includes: displaying a predetermined stroke size adjustment controller in response to a user triggering the erase option; Obtaining a target stroke size input by the user by triggering the stroke size adjustment controller, and obtaining an erasure path triggered by the user within the first region; determining an area to be erased based on the target stroke size and the erasure path, and determining the area to be erased as the edited content; performing an editing operation on the first area based on editing content corresponding to the editing option to obtain a second area; performing an erasing operation on a position of the first area that overlaps with the area to be erased, to obtain the second area.

[0133] According to one or more embodiments of the present disclosure, the edit page includes a clone continuation option; After generating a first region related to the first target region based on the first target region, displaying a region selection page in response to a user triggering the clone continuation option; determining a second target region selected by the user in response to a user selection operation for an arbitrary region in the image to be inpainted, and generating a first region related to the second target region; determining a first region associated with the first target region and a first region associated with the second target region as current first regions; The region selection page includes the image to be inpainted and a predetermined prompt controller, which is used to prompt a user to select a target region in the image to be inpainted.

[0134] According to one or more embodiments of the present disclosure, performing an image inpainting operation on the image to be inpainted based on the second region includes: In response to a user's movement operation on the second region, moving the second region to a position to be restored within the image to be restored; Covering the location to be inpainted with the second region and performing an image inpainting operation on the image to be inpainted.

[0135] According to one or more embodiments of the present disclosure, after generating a first region related to the first target region based on the first target region, moving the first target area and the first area in response to a user's movement operation on the first target area; and / or and moving the first area in response to a user's movement operation on the first area.

[0136] According to one or more embodiments of the present disclosure, the image restoration page further includes a comparison controller; In response to an edit content input by a user in the edit page, an edit operation is performed on the first area based on the edit content to obtain a second area, and then: displaying a first region corresponding to the second region in response to a user triggering the comparison controller; The method further includes redisplaying the second area in response to the user ceasing the trigger to the comparison controller.

[0137] According to one or more embodiments of the present disclosure, before determining a first target area selected by the user in response to a selection operation performed by the user on any area in the image to be inpainted within a predetermined image inpainting page, jumping to the image restoration page in response to a user's trigger operation on a predetermined restoration controller; Displaying the image to be restored and all editable layers associated with the image to be restored within the image restoration page.

[0138] According to one or more embodiments of the present disclosure, after displaying the image to be restored and all editable layers associated with the image to be restored in the image restoration page, The method further includes displaying the image to be restored and all layers associated with the image to be restored within the image restoration page in response to a predetermined trigger operation by a user within the image restoration page.

[0139] In a second aspect, in accordance with one or more embodiments of the present disclosure, there is provided an image restoration apparatus, the apparatus comprising: a determination module for determining a first target area selected by the user in response to a selection operation performed by the user on an arbitrary area in the image to be inpainted within the image inpainting page; a processing module for generating a first region related to the first target region based on the first target region and displaying a predetermined edit page within the image inpainting page; an editing module for, in response to an editing content input by a user in the editing page, performing an editing operation on the first region based on the editing content to obtain a second region; an inpainting module for performing an image inpainting operation on the image to be inpainted based on the second region.

[0140] According to one or more embodiments of the present disclosure, the determination module: In response to at least one sliding operation by a user on any region within the image to be restored, determining a covering region corresponding to the sliding operation; The cover area is used to determine the first target area.

[0141] According to one or more embodiments of the present disclosure, the determination module: determining brushing size information corresponding to the at least one sliding operation; determining a slide trajectory corresponding to the slide operation; It is used to determine the coverage area based on the slide trajectory and the brushing size.

[0142] According to one or more embodiments of the present disclosure, the determination module: In response to at least one sliding operation by a user on any region within the image to be restored, determining a covering region corresponding to the sliding operation; identifying a target object corresponding to a location in the coverage area; The area corresponding to the target object is used to determine the first target area.

[0143] According to one or more embodiments of the present disclosure, the determination module: determining a trigger position corresponding to a user's trigger operation on any region within the image to be restored; identifying a target object corresponding to the trigger location; The area corresponding to the target object is used to determine the first target area.

[0144] According to one or more embodiments of the present disclosure, the edit page includes at least one edit option; The editing module: In response to a trigger operation by a user on any one of the editing options, acquiring an editing content input by the user on the editing option; It is used to perform an editing operation on the first area based on an editing content corresponding to the editing option to obtain a second area.

[0145] According to one or more embodiments of the present disclosure, the at least one editing option includes at least one of a transparency editing option, a feather option, and a erase option.

[0146] According to one or more embodiments of the present disclosure, when the editing option is a transparency editing option or a feather option, the editing module: displaying a parameter adjustment controller corresponding to the transparency editing option or the feathering option in response to a user triggering the transparency editing option or the feathering option; a parameter adjustment controller configured to determine a target adjustment parameter in response to a user's adjustment operation on the parameter adjustment controller, and to determine the target adjustment parameter as editing content corresponding to the editing option; The editing module: The target adjustment parameter is used to perform a transparency adjustment or a feathering adjustment on the first region based on the target adjustment parameter to obtain the second region.

[0147] According to one or more embodiments of the present disclosure, if the editing option is a delete option, the editing module: displaying a predetermined stroke size adjustment controller in response to a user triggering the erase option; obtaining a target stroke size input by the user by triggering the stroke size adjustment controller; and obtaining an erasure path triggered by the user within the first region; determining an area to be erased based on the target stroke size and the erasure path, and determining the area to be erased as the edited content; The editing module: The erase operation is performed on the position of the first area that overlaps with the area to be erased, and is used to obtain the second area.

[0148] According to one or more embodiments of the present disclosure, the edit page includes a clone continuation option; The device comprises: a display module for displaying a region selection page in response to a user triggering the clone continuation option; a selection module for determining a second target area selected by the user in response to a user selection operation on an arbitrary area in the image to be inpainted, and generating a first area related to the second target area; the region selection page includes the image to be inpainted and a predetermined prompt controller, the prompt controller being used to prompt a user to select a target region in the image to be inpainted; The determination module is further used for determining a first region associated with the first target region and a first region associated with the second target region as current first regions.

[0149] According to one or more embodiments of the present disclosure, the repair module comprises: In response to a user's movement operation on the second region, moving the second region to a position to be restored within the image to be restored; The second region is used to cover the location to be restored and perform an image restoration operation on the image to be restored.

[0150] According to one or more embodiments of the present disclosure, the device comprises: a first movement module for moving the first target area and the first area in response to a user's movement operation relative to the first target area; and / or The display device further includes a second movement module for moving the first area in response to a user's movement operation on the first area.

[0151] According to one or more embodiments of the present disclosure, the image restoration page further includes a comparison controller; The device comprises: a comparison module for displaying a first region corresponding to the second region in response to a user trigger operation of the comparison controller; The display module is further used to redisplay the second region in response to the user stopping triggering the comparison controller.

[0152] According to one or more embodiments of the present disclosure, the device comprises: a jump module for jumping to the image restoration page in response to a user's trigger operation on a predetermined restoration controller; A display module is further used to display, within the image restoration page, the image to be restored and all editable layers associated with the image to be restored.

[0153] According to one or more embodiments of the present disclosure, the device comprises: The image restoration method further includes a display module that is further used to display the image to be restored and all layers associated with the image to be restored within the image restoration page in response to a predetermined trigger operation by a user within the image restoration page.

[0154] According to one or more embodiments of the present disclosure, In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, the device comprising: at least one processor; and a memory; the memory stores computer-executable instructions; The at least one processor executes computer-executable instructions stored in the memory to cause the at least one processor to perform the image restoration method described in the first aspect above and various possible designs of the first aspect.

[0155] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the image restoration method described in the first aspect above and various possible designs of the first aspect.

[0156] In a fifth aspect, according to one or more embodiments of the present disclosure, there is provided a computer program product including a computer program that, when executed by a processor, implements the image restoration method described in the first aspect above and various possible designs of the first aspect.

[0157] In a sixth aspect, according to one or more embodiments of the present disclosure, there is provided a computer program product which, when executed by a processor, implements the image restoration method described in the first aspect above and various possible designs of the first aspect.

[0158] The above description merely describes preferred embodiments of the present disclosure and the technical principles employed. It should be understood by those skilled in the art that the scope of the present disclosure is not limited to a technical solution formed by a specific combination of the above technical features, but also covers other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the concept disclosed above. For example, it includes technical solutions formed by replacing the above features with (but not limited to) technical features having similar functions disclosed in the present disclosure.

[0159] Additionally, although operations are depicted using a particular order, this should not be construed as requiring that these operations be performed in the particular order shown, or that they be performed sequentially. Multitasking and parallel processing may be advantageous in certain environments. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Some features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, each feature described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable subcombination.

[0160] Although the present subject matter has been described using language specific to structural features and / or methodological operations, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described above. Rather, the specific features and operations described above are merely example forms of implementing the claims.

Claims

1. determining a first target area selected by the user in response to a selection operation performed by the user on an arbitrary area in the image to be inpainted within the image inpainting page; generating a first region related to the first target region based on the first target region, and displaying a predetermined edit page within the image inpainting page; In response to an edit content input by a user within the edit page, performing an edit operation on the first area based on the edit content to obtain a second area; performing an image inpainting operation on the image to be inpainted based on the second region; An image restoration method comprising:

2. determining a first target area selected by a user in response to a selection operation performed by the user on an arbitrary area in the image to be restored within an image restoration page; determining a cover area corresponding to at least one sliding operation by a user on any area in the image to be inpainted; determining the cover area as the first target area; The method of claim 1 , comprising:

3. In response to at least one sliding operation by a user on an arbitrary region in the image to be restored, determining a cover region corresponding to the sliding operation includes: determining brushing size information corresponding to the at least one sliding operation; determining a slide trajectory corresponding to the slide operation; determining the coverage area based on the slide trajectory and the brushing size; 3. The method of claim 1 or 2, comprising:

4. determining a first target area selected by a user in response to a selection operation performed by the user on an arbitrary area in the image to be restored within an image restoration page; determining a cover area corresponding to at least one sliding operation by a user on any area in the image to be inpainted; identifying a target object corresponding to a location in the coverage area; determining a region corresponding to the target object as the first target region; The method of claim 1 , comprising:

5. determining a first target area selected by a user in response to a selection operation performed by the user on an arbitrary area in the image to be restored within an image restoration page; determining a trigger position corresponding to a user's trigger operation on any region within the image to be restored; identifying a target object corresponding to the trigger location; determining a region corresponding to the target object as the first target region; The method of claim 1 , comprising:

6. the edit page includes at least one edit option; In response to edit content input by a user within the edit page, performing an edit operation on the first area based on the edit content to obtain a second area, In response to a trigger operation by a user on any one of the editing options, acquiring an editing content input by the user on the editing option; performing an editing operation on the first area based on editing content corresponding to the editing option to obtain a second area; 6. The method of any one of claims 1 to 5, comprising:

7. The method of claim 6 , wherein the at least one editing option includes at least one of a transparency editing option, a feather option, and an erase option.

8. When the editing options are a transparency editing option or a feather option, acquiring editing content input by the user for the editing option in response to a trigger operation by the user for any one of the editing options includes: displaying a parameter adjustment controller corresponding to the transparency editing option or the feathering option in response to a user triggering the transparency editing option or the feathering option; determining a target adjustment parameter in response to a user's adjustment operation on the parameter adjustment controller, and determining the target adjustment parameter as editing content corresponding to the editing option; performing an editing operation on the first area based on editing content corresponding to the editing option to obtain a second area; The method of claim 7 , further comprising: performing a transparency adjustment or a feathering adjustment on the first region based on the target adjustment parameters to obtain the second region.

9. When the editing option is a deletion option, in response to a trigger operation by a user on any one of the editing options, acquiring editing content input by the user on the editing option displaying a predetermined stroke size adjustment controller in response to a user triggering the erase option; acquiring a target stroke size input by the user by triggering the stroke size adjustment controller, and acquiring an erasure path triggered by the user within the first region; determining an area to be erased based on the target stroke size and the erasure path, and determining the area to be erased as the edited content; performing an editing operation on the first area based on editing content corresponding to the editing option to obtain a second area; 8. The method of claim 7, further comprising performing an erasure operation on a portion of the first area that overlaps the area to be erased to obtain the second area.

10. The edit page includes a continue clone option; after generating a first region associated with the first target region based on the first target region; displaying a region selection page in response to a user triggering the clone continuation option; determining a second target region selected by the user in response to a user selection operation for an arbitrary region in the image to be inpainted, and generating a first region related to the second target region; determining a first region associated with the first target region and a first region associated with the second target region as current first regions; 6. The method of claim 1, wherein the region selection page includes the image to be restored and a predetermined prompt controller, and the prompt controller is used to prompt a user to select a target region in the image to be restored.

11. performing an image inpainting operation on the image to be inpainted based on the second region; In response to a user's movement operation on the second region, moving the second region to a position to be restored within the image to be restored; covering the location to be inpainted with the second region and performing an image inpainting operation on the image to be inpainted; 6. The method of any one of claims 1 to 5, comprising:

12. determining a first target area selected by the user in response to a selection operation performed by the user on any area in the image to be inpainted within a predetermined image inpainting page; jumping to the image restoration page in response to a user's trigger operation on a predetermined restoration controller; displaying the image to be restored and all editable layers associated with the image to be restored within the image restoration page; The method of any one of claims 1 to 5, further comprising:

13. a determination module for determining a first target area selected by the user in response to a selection operation performed by the user on an arbitrary area in the image to be inpainted within the image inpainting page; a processing module for generating a first region related to the first target region based on the first target region and displaying a predetermined edit page within the image inpainting page; an editing module for, in response to an editing content input by a user in the editing page, performing an editing operation on the first region based on the editing content to obtain a second region; an inpainting module for performing an image inpainting operation on the image to be inpainted based on the second region; An image restoration device comprising:

14. It has a processor and memory, the memory stores computer-executable instructions; The electronic device is configured to execute computer-executable instructions stored in the memory to perform the image restoration method of any one of claims 1 to 12.

15. A computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, perform the image restoration method of any one of claims 1 to 12.

16. A computer program product comprising a computer program which, when executed by a processor, implements the image restoration method of any one of claims 1 to 12.

17. A computer program product which, when executed by a processor, implements the image restoration method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Image descrambling processing method, device and apparatus and storage medium

    CN111145135A

  • Apparatus and program for image processing program

    JP2006180160A

  • Image processing device

    JP2009044405A

  • Image processing apparatus and red-eye processing method

    JP2011180953A

  • Program, control method for information processing device, and information processing device

    JP2022026888A