Image Processing Method, Apparatus, Computer Device, and Storage Medium
By receiving the terminal's de-occlusion request, the occlusion in the video screenshot is obtained and processed, and high-quality images are generated, which solves the problem of difficult removal of the occlusion in the video screenshot, and achieves fast and efficient image processing and quality improvement.
Patent Information
- Application Number
- CN202111233653.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-10-22
AI Technical Summary
In the prior art, the image quality of the video screenshot does not meet user requirements, and it is difficult to quickly and effectively remove occlusions.
An image processing method is provided, by receiving a terminal's de-occlusion request, obtaining a first image in a video screenshot, and removing occlusions in a target area based on the area location information, generating a high-quality second image, and performing image processing and storage through a server.
It realizes the option of automatically displaying targets when video playback, quickly removes occlusions, improves the image quality of video screenshots, simplifies user operations, and improves user experience.
Smart Images

Figure CN114285961B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computer technologies, and particularly to an image processing method, apparatus, computer device, and storage medium. Background Art
[0002] Currently, when a user watches a video, the user usually takes a screenshot of a certain frame of the video picture, and subsequent sharing, forwarding, or other operations can be performed on this screenshot. However, the image quality of the screenshot may not meet the user's requirements, and how to improve the image quality has become an urgent problem to be solved. Summary of the Invention
[0003] Embodiments of the present application provide an image processing method, apparatus, computer device, and medium, which realize fast processing of video screenshots and improve the image quality of video screenshots. The technical solutions are as follows:
[0004] On the one hand, an image processing method is provided. The method includes:
[0005] Receiving an occlusion removal request sent by a terminal, where the occlusion removal request carries a first image link and region position information, the first image link corresponds to a first image, and the region position information is used to represent the position of a selected target region in the first image;
[0006] In response to the occlusion removal request, obtaining the first image based on the first image link;
[0007] Based on the region position information, determining the selected target region in the first image, removing the occluder in the target region, and obtaining a second image;
[0008] Returning the second image to the terminal.
[0009] On the other hand, an image processing method is provided. The method includes:
[0010] Taking a screenshot of a video picture in the played video to obtain a first image;
[0011] Displaying a target option corresponding to the first image, where the target option is used to remove the occluder in the first image;
[0012] In response to a trigger operation on the target option, removing the occluder in the selected target region in the first image to obtain a second image, and displaying the second image.
[0013] On the other hand, an image processing apparatus is provided. The apparatus includes:
[0014] A first receiving module, configured to receive a first image uploaded by a terminal, where the first image is uploaded by the terminal in response to a trigger operation on a target option after taking a screenshot of a video frame in the played video, and the target option is used to remove an occluder in the first image;
[0015] A generating module, configured to store the first image and generate a first image link corresponding to the first image;
[0016] A sending module, configured to send the first image link to the terminal;
[0017] A second receiving module, configured to receive a de-occluding request sent by a terminal, where the de-occluding request carries a first image link and region location information, the first image link corresponds to a first image, and the region location information is used to indicate the position of a selected target region in the first image;
[0018] An image processing module, configured to, in response to the de-occluding request, obtain the first image based on the first image link, determine the selected target region in the first image based on the region location information, remove the occluder in the target region, and obtain a second image;
[0019] A feedback module, configured to return the second image to the terminal.
[0020] Optionally, the second generating unit is configured to:
[0021] Store the second image in the image site;
[0022] Generate a second image link based on the storage location of the second image in the image site.
[0023] On the other hand, an image processing device is provided, and the device includes:
[0024] A screenshot module, configured to take a screenshot of a video frame in the played video to obtain a first image;
[0025] A first display module, configured to display a target option corresponding to the first image, where the target option is used to remove an occluder in the first image;
[0026] A second display module, configured to, in response to a trigger operation on the target option, remove the occluder in the selected target region in the first image to obtain a second image, and display the second image.
[0027] Optionally, the first display module includes:
[0028] A first display unit for displaying a screenshot result interface, where the screenshot result interface includes the first image and editing options corresponding to the first image;
[0029] A second display unit for displaying an editing interface in response to a trigger operation on the editing options, where the editing interface includes the first image and the target options.
[0030] Optionally, the second display module includes:
[0031] A third display unit for displaying an occlusion removal interface in response to a trigger operation on the target options, where the occlusion removal interface includes the first image, marking options, and filling options;
[0032] A determination unit for determining the marked area in the first image as the target area in response to a trigger operation on the marking options;
[0033] A first processing unit for removing the image content within the target area and filling the target area based on the image content of the first image to obtain the second image in response to a trigger operation on the filling options; or,
[0034] A second processing unit for covering the occluder within the target area based on the image content of other areas in the first image except the target area to obtain the second image in response to a trigger operation on the filling options.
[0035] Optionally, the second display module includes:
[0036] A fourth display unit for displaying the second image in the occlusion removal interface;
[0037] A fifth display unit for displaying an editing interface in response to a confirmation operation on the second image in the occlusion removal interface, where the editing interface includes the second image and the target options.
[0038] Optionally, the device further includes:
[0039] A third display module for displaying an edited image display interface in response to a confirmation operation on the second image in the editing interface, where the screenshot result interface includes the second image and editing options corresponding to the second image.
[0040] Optionally, the device further includes at least one of the following:
[0041] A saving module for saving the second image in response to a trigger operation on the saving option, where the edited image display interface further includes the saving option;
[0042] A sharing module, where the editing image display interface further includes a sharing option. In response to a trigger operation on the sharing option, the second image is shared to a selected target client;
[0043] A publishing module, where the editing image display interface further includes a publishing option. In response to a trigger operation on the publishing option, a dynamic message is generated based on the second image, and the dynamic message is published based on the currently logged-in user identifier.
[0044] Optionally, the second display module includes:
[0045] An upload unit, which, in response to a trigger operation on the target option, uploads the first image and region location information to the server. The region location information is used to represent the position of the target region in the first image; the server is used to determine the selected target region in the first image based on the region location information, remove the occluder within the target region, and obtain the second image;
[0046] An acquisition unit, which is used to acquire the second image returned by the server.
[0047] Optionally, the upload unit includes:
[0048] A generation subunit, which, in response to a trigger operation on the target option, uploads the first image to the server. The server is used to store the first image and generate a first image link corresponding to the first image;
[0049] A first receiving subunit, which is used to receive the first image link returned by the server;
[0050] A removal subunit, which sends an occlusion removal request to the server. The occlusion removal request carries the first image link and the region location information. The server is used to obtain the first image based on the first image link, determine the selected target region in the first image based on the first image and the region location information, remove the occluder within the target region, and obtain the second image.
[0051] Optionally, the server is further used to store the second image, obtain a second image link corresponding to the second image, and return the second image link;
[0052] The acquisition unit includes:
[0053] A second receiving subunit, which is used to receive the second image link returned by the server;
[0054] An obtaining subunit, configured to obtain the second image based on the second image link.
[0055] Optionally, the first display module is configured to display the target option corresponding to the first image when the type of the video is the target video type.
[0056] On the other hand, a computer device is provided, which includes a processor and a memory. At least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the image processing method as described in the above aspect.
[0057] On the other hand, a computer-readable storage medium is provided. At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the image processing method as described in the above aspect.
[0058] On the other hand, a computer program product is provided, which includes a computer program. The computer program is loaded and executed by a processor, so that the computer device implements the operations performed by the image processing method as described in the above aspect.
[0059] The beneficial effects brought by the technical solution provided by the embodiments of this application at least include:
[0060] When playing a video in the embodiments of this application, after taking a screenshot of the video frame, the target option for removing the occluder is automatically displayed. By triggering the target option, the occluder in the first image can be conveniently and quickly removed, realizing the rapid processing of the video screenshot and improving the image quality of the video screenshot. Description of the Drawings
[0061] To more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0062] Figure 1 is a schematic diagram of an implementation environment provided by the embodiments of this application;
[0063] Figure 2 is a flowchart of an image processing method provided by the embodiments of this application;
[0064] Figure 3 is a flowchart of another image processing method provided by the embodiments of this application;
[0065] Figure 4 It is a schematic diagram of a screenshot result interface provided by an embodiment of the present application;
[0066] Figure 5 It is a schematic diagram of another screenshot result interface provided by an embodiment of the present application;
[0067] Figure 6 It is a schematic diagram of an editing interface provided by an embodiment of the present application;
[0068] Figure 7 It is a schematic diagram of another editing interface provided by an embodiment of the present application;
[0069] Figure 8 It is a schematic diagram of an occlusion removal interface provided by an embodiment of the present application;
[0070] Figure 9 It is a schematic diagram of an interface jump provided by an embodiment of the present application;
[0071] Figure 10 It is a flowchart of another image processing method provided by an embodiment of the present application;
[0072] Figure 11 It is a schematic diagram of the process of a server storing an image provided by an embodiment of the present application;
[0073] Figure 12 It is a schematic diagram of the process of a server processing an image provided by an embodiment of the present application;
[0074] Figure 13 It is a schematic diagram of an operation process provided by an embodiment of the present application;
[0075] Figure 14 It is a schematic diagram of the data layer and control layer of a video playback client provided by an embodiment of the present application;
[0076] Figure 15 It is a flowchart of another image processing method provided by an embodiment of the present application;
[0077] Figure 16 It is a schematic diagram of the structure of an image processing device provided by an embodiment of the present application;
[0078] Figure 17 It is a schematic diagram of the structure of another image processing device provided by an embodiment of the present application;
[0079] Figure 18 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present application;
[0080] Figure 19 It is a schematic diagram of the structure of a server provided by an embodiment of the present application. Specific Embodiments
[0081] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will further describe the embodiments of this application in detail with reference to the accompanying drawings.
[0082] It can be understood that the terms "first", "second", etc. used in this application can be used in this document to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, the first image can be called the second image, and the second image can be called the first image.
[0083] The terms "at least one", "multiple", "each", "any one", etc. used in this application, at least one includes one, two, or more than two, multiple includes two or more than two, each refers to each one of the corresponding multiple, and any one refers to any one of the multiple.
[0084] To facilitate the understanding of the embodiments of this application, first, the image restoration technology involved in the embodiments of this application will be explained:
[0085] Image restoration technology is a technology that uses the information in the non-missing areas of a damaged image and, according to certain restoration rules, performs pixel patching and filling on the contaminated or missing areas in the image. Image restoration includes image painting and image filling. Image restoration makes the texture / pixels in the specified area of the image blend in with the surrounding texture / pixels by replacing and filling them, achieving a natural and harmonious restoration effect.
[0086] Figure 1 is a schematic diagram of an implementation environment provided by the embodiments of this application. Refer to Figure 1 , this implementation environment includes at least one terminal 101 and a server 102. The terminal 101 and the server 102 are connected through a wireless or wired network.
[0087] The terminal 101 is installed with a client provided by the server 102. The terminal 101 can implement functions such as data transmission and message interaction through this client. For example, the client is a video playback client, and this video playback client has the function of playing videos. Of course, this video playback client can also have other functions, such as a screenshot function, a sharing function for videos or images, an image editing function, a video comment function, etc. Optionally, the client is a client in the operating system of the terminal 101 or a client provided by a third party.
[0088] Optionally, the terminal 101 may be a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer, a desktop computer, a smart TV, a vehicle-mounted terminal, etc.
[0089] Optionally, the server 102 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0090] The terminal 101 is used to log in to the client based on the user identifier, play a video through the client, take a screenshot during the video playback, upload the captured image to the server 102, and the server 102 removes the occluders within the selected target area in the image and sends the image after removing the occluders to the terminal 101 so that the terminal 101 can display the image after removing the occluders.
[0091] The method provided by the embodiments of the present application can be applied to various scenarios.
[0092] For example, it is applied to the scenario where a user publishes a landscape picture.
[0093] When a user is watching any landscape video and hopes to save the currently displayed landscape picture, after taking a screenshot of the landscape picture, the method provided by the present application is used to remove objects such as people, TV station logos, and vehicles in the screenshot except for the scenic spot elements, so as to obtain an unobstructed landscape picture, improving the quality of the landscape picture. Subsequently, the unobstructed landscape picture can be saved.
[0094] For example, it can also be applied to the scenario where a user shares an anime screenshot.
[0095] When a user is watching any cartoon anime and hopes to take a screenshot of a certain plot and forward it, after taking a screenshot of the plot, the method provided by the present application is used to remove other elements in the screenshot except for the plot, such as TV station logos, subtitles, anime names, bullet screens, etc., so as to obtain an unobstructed anime screenshot for subsequent forwarding the unobstructed anime screenshot to other clients.
[0096] Figure 2It is a flowchart of an image processing method provided by an embodiment of the present application. The execution subject of the embodiment of the present application is a terminal. Refer to Figure 2 , the method includes the following steps:
[0097] 201. The terminal takes a screenshot of the video frame in the played video to obtain a first image.
[0098] Among them, the video played by the terminal can be a landscape video, a humanities video, a travel video, etc., or a TV drama video or a movie video, etc. During the process of playing the video, the terminal will display the video frame, which may include objects such as people, animals, furniture, etc., and will also include the corresponding theme background of the objects, such as the environment where the people are located, the room where the furniture is located, etc. In addition, the video frame may also include a radio icon, subtitles, and inserted advertisement text, etc.
[0099] When displaying the video frame, if the user hopes to save the current video frame, they can take a screenshot on the terminal to obtain a first image containing the video frame.
[0100] 202. The terminal displays a target option corresponding to the first image.
[0101] After the terminal takes a screenshot to obtain the first image, it will not only display the first image but also display the target option corresponding to the first image, and the target option is used to remove the occluder in the first image.
[0102] 203. The terminal responds to the trigger operation on the target option, removes the occluder in the selected target area in the first image to obtain a second image.
[0103] If the user hopes to edit the first image and remove an object in the first image, they can trigger the target option. The terminal responds to the trigger operation on the target option, determines the selected target area in the first image, and the object in this target area can be considered as the occluder to be removed. Therefore, the occluder is removed to obtain a second image.
[0104] Among them, the target area can be selected by the user in the first image. And the target area may include an object, the background where the object is located, or other content. When removing the occluder, all the content in the target area can be removed, and then the target area can be filled according to the content in other areas, so as to achieve the effect of removing the occluder and retaining the background, or directly cover the target area according to the content in other areas except the target area, so that the occluder in the target area is covered without removing the image content in the target area, or use other methods to remove the occluder in the target area and retain the background corresponding to the occluder.
[0105] 204. The terminal displays a second image.
[0106] After removing the occluder, the terminal displays the second image, facilitating the user to view the second image or perform other processing on the second image, such as forwarding the second image or sharing the second image, etc.
[0107] Optionally, the terminal is installed with a video playback client. When playing any video through this video playback client, it is possible to take a screenshot of any video frame in the played video, thereby obtaining the first image corresponding to this video frame. Then, the occluder in the first image is removed to obtain the second image, and the second image is displayed through this video playback client. Subsequently, the second image can be saved to the album of the terminal, or a dynamic message containing the second image can be published in the video playback client, or the second image can be shared to other clients through this video playback client.
[0108] In the embodiment of the present application, when playing a video, after taking a screenshot of the video frame, the target option for removing the occluder is automatically displayed. By triggering this target option, the occluder in the first image can be conveniently and quickly removed, realizing the rapid processing of the video screenshot and improving the image quality of the video screenshot.
[0109] Figure 3 It is a flowchart of an image processing method provided by an embodiment of the present application. The execution subject of the embodiment of the present application is a terminal. Refer to Figure 3 and the method includes the following steps:
[0110] 301. The terminal takes a screenshot of the video frame in the played video to obtain a first image.
[0111] Among them, the video played by the terminal can be a landscape video, a cultural video, a travel video, etc., and can also be a TV drama video or a movie video, etc. During the process of playing the video, the terminal will display the video frame, which may include objects such as people, animals, furniture, etc. in the video frame, and will also include the corresponding theme background of the object, such as the environment where the person is located, the room where the furniture is located, etc. In addition, the video frame may also include a radio icon, subtitles, and inserted advertisement text, etc.
[0112] When displaying this video frame, if the user hopes to save the current video frame, a screenshot can be taken on the terminal to obtain the first image containing this video frame.
[0113] Optionally, the terminal displays a video playback interface, which includes the video picture in the currently playing video, and the video playback interface also includes operation options, such as a screenshot option, a like option, a video sharing option, a comment option, etc. The user can trigger any operation option to perform a corresponding operation on the video. In the embodiment of the present application, the user can trigger the screenshot option, and the terminal responds to the trigger operation of the screenshot option to capture the current displayed video picture to obtain a first image.
[0114] 302. The terminal displays a screenshot result interface, which includes the first image and the editing options corresponding to the first image.
[0115] After the terminal captures the first image, it jumps from the original video playback interface to the screenshot result interface, and displays the first image and the editing options corresponding to the first image in the screenshot result interface. The editing options are used to trigger an editing operation on the first image. In addition, a save option, a sharing option, a publishing option, etc. corresponding to the first image can also be displayed in the screenshot result interface. The save option is used to save the first image to the album of the terminal, the sharing option is used to share the first image to the selected target client, and the publishing option is used to generate a dynamic message based on the first image and publish it to the comment area.
[0116] Such as Figure 4 shown, the screenshot result interface includes an image display area 401 in the middle and an operation control area 402 at the bottom. As Figure 5 shown, the first image is located in the image display area 401, and the editing option 501 is located in the operation control area 402. In addition, the operation control area 402 also includes a save option 502, a sharing option 503, and a publishing option 504.
[0117] It should be noted that when displaying the screenshot result interface, the terminal pauses the playback of the video. At this time, the screenshot result interface may cover part or all of the video picture. After closing the screenshot result interface, the terminal redisplays the video playback interface and can resume playing the video.
[0118] 303. The terminal responds to the trigger operation of the editing option and displays an editing interface, which includes the first image and target options.
[0119] In response to a trigger operation on an editing option in the screenshot result interface, the terminal will jump from the screenshot result interface to an editing interface, and the first image is still displayed in the editing interface. Moreover, the editing interface also displays a target option corresponding to the first image, and the target option is used to remove the occluder in the first image. Additionally, the editing interface may further include other editing options, such as a filter option, a text option, and a cropping option, etc. The filter option is used to add a filter to the first image, the text option is used to add text to the first image, and the cropping option is used to crop the first image. Additionally, after triggering any editing option, a corresponding text prompt will be displayed in the editing interface to explain the editing operation that can be performed after triggering the editing option.
[0120] As Figure 6 shown, the editing interface includes an image display area 601 located in the middle, a text prompt area 602 located on the left, and an operation control area 603 located at the bottom. As Figure 7 shown, the first image is located in the image display area 601, the target option 701 is located in the operation control area 603. Additionally, the operation control area 603 further includes a filter option 702, a text option 703, and a cropping option 704. And when any editing option in the operation control area is triggered, a corresponding operation instruction will be displayed in the text prompt area 602.
[0121] It should be noted that the above steps 302-303 only provide an optional way to display the target option. In other embodiments, after taking a screenshot of the video frame to obtain the first image, the target option can also be directly displayed, or other display methods can be adopted to display the target option.
[0122] Optionally, when the type of the video is the target video type, the target option corresponding to the first image is displayed. Wherein, the target video type is a determined specific video type, such as video types like scenery, aerial photography, and tourism, etc. Then only when taking a screenshot of the video frame of the target video type, the target option corresponding to the first image will be displayed, otherwise the target option will not be displayed.
[0123] Optionally, after taking a screenshot of the video frame to obtain the first image, the target option is displayed. Among them, when the type of the video is the target video type, the target option is in a triggerable state, and the user can trigger the target option to remove the occluder in the first image. While when the type of the video is not the target video type, the target option is in a non-triggerable state, and the user cannot trigger the target option, so the occluder in the first image cannot be removed through the target option.
[0124] In some embodiments, the terminal sets a whitelist, which includes target video types. Then, video types that do not belong to this whitelist are non-target video types. The terminal can determine whether the type of the currently played video is a target video type by querying this whitelist.
[0125] 304. In response to a trigger operation on a target option, the terminal displays an occlusion removal interface, which includes a first image, a marking option, and a filling option.
[0126] In response to a trigger operation on the target option in the editing interface, the terminal jumps from the editing interface to the occlusion removal interface, and the first image is still displayed in this occlusion removal interface. Moreover, this occlusion removal interface further includes a marking option and a filling option corresponding to the first image. Among them, the marking option is used to trigger marking the area in the first image where the occluder needs to be removed, and the filling option is used to trigger removing the content in the selected area and then filling the selected area. Additionally, this occlusion removal interface may further include an undo option and a completion option, etc. The undo option is used to withdraw the first image to the result of the previous filling, and the completion option is used to save the second image and return from this occlusion removal interface to the editing interface.
[0127] As Figure 8 shown, this occlusion removal interface includes a first image 801 located in the middle of the interface and an operation control area 802 located at the bottom of the interface. This operation control area 802 includes a marking option 803, a filling option 804, an undo option 805, and a completion option 806.
[0128] 305. In response to a trigger operation on the marking option, the terminal determines the marked area in the first image as the target area.
[0129] The user triggers this marking option, and then marks one or more areas in the first image. The terminal determines the areas marked by the user in the first image and determines the marked areas as the target areas where the occluder needs to be removed.
[0130] Optionally, in response to a trigger operation on the marking option, the terminal provides at least one marking tool, such as a circular brush, a rectangular brush, an eraser, etc. After the user selects one or more marking tools, the user performs a touch operation on the first image, so as to mark or clear the area where the touch operation is located according to the selected marking tool, and thus determine the marked area as the target area.
[0131] 306. In response to a trigger operation on the filling option, the terminal removes the image content within the target area and fills the target area based on the image content of the first image to obtain a second image.
[0132] After the user marks the area where the occluder needs to be removed, the filling option can be triggered. Then, in response to the triggering operation of the filling option, the terminal first removes the image content within the target area, and then fills the target area according to the image content in other areas of the first image except the target area, so as to obtain the second image.
[0133] Optionally, the triggering operation of the filling option is a click operation, or a left-swipe operation in the de-occlusion interface, or other types of operations.
[0134] It should be noted that the above step 306 is an optional step. In another embodiment, this step 306 can be replaced by: covering the occluder within the target area based on the image content in other areas of the first image except the target area to obtain the second image. In this way of removing the occluder, the occluder within the target area is covered without removing the image content within the target area.
[0135] Optionally, based on the image content in other areas of the first image except the target area, a layer with the same size as the target area is created, so that the image content in the layer matches the image content in other areas of the first image except the target area. The layer is displayed above the target area, so as to cover the occluder within the target area with the layer, and the layer can present a complete image with other areas in the first image.
[0136] 307. The terminal displays the second image in the de-occlusion interface.
[0137] By performing the above steps 304-306, the occluder in the first image can be removed based on the de-occlusion interface to obtain the second image.
[0138] 308. In response to the confirmation operation on the second image in the de-occlusion interface, the terminal displays an editing interface, and the editing interface includes the second image and target options.
[0139] In response to the confirmation operation on the second image in the de-occlusion interface, the terminal can return from the de-occlusion interface to the editing interface, so as to display the second image in the editing interface. The editing interface also includes various editing options for performing different editing operations on the second image. For example, the editing interface also includes the target option corresponding to the second image, and the target option is used to remove the occluder in the second image.
[0140] Optionally, the de-occlusion interface also includes a confirmation option, and the confirmation operation on the second image can be the triggering operation on the confirmation option. Or, the confirmation operation on the second image can be a left-swipe operation in the de-occlusion interface, or other types of operations.
[0141] 309. The terminal responds to the confirmation operation on the second image in the editing interface and displays an edited image display interface, which includes the second image and the editing options corresponding to the second image.
[0142] When the terminal responds to the confirmation operation on the second image in the editing interface, the edited second image can be displayed in the edited image display interface. The edited image display interface also includes various operation options for performing different processes on the second image. For example, the edited image display interface also includes the editing options corresponding to the second image, and the editing options are used to perform editing operations on the second image.
[0143] Optionally, the edited image display interface is an updated screenshot result interface, that is, after the terminal edits to obtain the second image, it returns from the editing interface to the updated screenshot result interface, so that the second image is displayed in the screenshot result interface. The difference between the updated screenshot result interface and the previously displayed screenshot result interface is that the displayed image is an edited image.
[0144] Optionally, the editing interface also includes a confirmation option, and the confirmation operation on the second image can be a triggering operation on the confirmation option. Or, the confirmation operation on the second image can be a left swipe operation in the editing interface, or other types of operations.
[0145] The interface jump process in the above steps 302-309 is as Figure 9 shown.
[0146] 310. The terminal responds to the triggering operation on the save option and saves the second image.
[0147] The edited image display interface also includes a save option, which is used to save the second image in the edited image display interface. By triggering the save option, the second image can be saved to the album of the terminal or saved to the album corresponding to the current client.
[0148] It should be noted that the above step 310 only takes the process of saving the second image as an example for illustration, and the edited image display interface can also include other operation options. Optionally, the edited image display interface also includes a sharing option. The terminal responds to the triggering operation on the sharing option and shares the second image to the selected target client. Among them, the target client is different from the client currently playing the video. For example, the target client is a social client. After the user triggers the sharing option, multiple clients will be displayed, and the user can select the social client from them to share the second image to the social client.
[0149] Optionally, the edited image display interface further includes a publishing option. In response to a triggering operation on the publishing option, the terminal generates a dynamic message based on the second image and publishes the dynamic message based on the currently logged-in user identifier. For example, when the user triggers the publishing option, the terminal, in response to the triggering operation on the publishing option, displays a dynamic message editing interface, which includes the second image and a text information input field. The user can enter the text information to be published in the text information input field. After confirmation, a dynamic message including the second image and the text information can be generated and published in the identity of the currently logged-in user identifier. For example, the dynamic message can be published in the dynamic message display interface corresponding to the user identifier. When other terminal corresponding to user identifiers that follow the user identifier access the dynamic message display interface, the dynamic message can be viewed. Alternatively, the dynamic message can be published in the comment display area corresponding to the video. When any terminal corresponding to user identifiers that view the video access the comment display area, the dynamic message can be viewed.
[0150] In the embodiment of the present application, when playing a video, after taking a screenshot of the video frame, a target option for removing the occluder is automatically displayed. By triggering the target option, the occluder in the first image can be conveniently and quickly removed, realizing the rapid processing of the video screenshot and improving the image quality of the video screenshot.
[0151] Moreover, after taking a screenshot of the video frame, a screenshot result interface is displayed, and by jumping from the screenshot result interface to the editing interface, the video screenshot can be edited. Furthermore, from the editing interface, it is also possible to jump to the de-occlusion interface to remove the occluder in the video screenshot. After removing the occluder in the video screenshot, it is also possible to return to the original editing interface to continue other editing operations on the video screenshot after removing the occluder, or it is also possible to return to the original screenshot result interface to continue operations such as forwarding or sharing the edited video screenshot. This interface jump method can not only achieve the de-occlusion of the video screenshot but also achieve other operations on the video screenshot, providing multiple possibilities for users and meeting the processing requirements of different users for video screenshots.
[0152] Furthermore, based on the function of quickly taking screenshots, the embodiment of the present application adds a quick editing function in the screenshot result interface. After the user selects the area where the occluder to be removed in the video screenshot is located, the occluder can be quickly removed to obtain an available image for the user to use.
[0153] When users watch videos of types such as tourism, scenery, and humanities, the themes they need to capture are often the background parts of the images. At this time, some irrelevant occlusions will affect the quality of the images, and further affect the effects of sharing or using the images. The editing functions in related technologies can only delete these occlusions. If users want to remove the occlusions, they need to save the screenshots and perform post-processing manually, which requires users to have a certain professional level and consumes a lot of time and manpower. However, the method provided in the embodiments of this application can, based on the function of quickly editing after taking screenshots, and without overly increasing the operation complexity, allow users to make simple marks according to their own usage needs, then remove the occlusions in the images, obtain images with better quality, improve the user experience, and also provide better functional support for users to actively share and spread the screenshots of the original videos.
[0154] Figure 10 It is a flowchart of an image processing method provided by an embodiment of this application. The execution subject of the embodiments of this application is a terminal and a server. Refer to Figure 10 and the method includes the following steps:
[0155] 1001. The terminal takes a screenshot of the video frame in the played video to obtain a first image.
[0156] 1002. The terminal displays a target option corresponding to the first image, and this target option is used to remove the occlusions in the first image.
[0157] Steps 1001 - 1002 are the same as the above steps 201 - 202 and the above steps 301 - 303, and will not be elaborated here.
[0158] 1003. In response to the triggering operation on the target option, the terminal uploads the first image to the server.
[0159] In the embodiments of this application, the server processes the first image. When the user triggers the target option, the terminal responds to the triggering operation on this target option and uploads the first image to the server so that the server can first store the first image.
[0160] Optionally, the server provides an image upload interface, and this image upload interface is used to upload images to the server. Therefore, in response to the triggering operation on the target option, the terminal calls this image upload interface and uploads the first image to the server, and the server receives the first image through this image upload interface.
[0161] 1004. After receiving the first image, the server stores the first image and generates a first image link corresponding to the first image.
[0162] After receiving the first image, the server not only stores the first image, but also generates a first image link for the first image to facilitate subsequent search for the first image. The first image link is used to indicate the storage location of the first image, such as the storage address of the first image, or the address identifier corresponding to the storage address of the first image, etc.
[0163] Optionally, the server stores the first image in an image site and generates the first image link according to the storage location of the first image in the image site. Wherein, the image site is a database in the server for storing images, or another server associated with the server, etc. Optionally, the server calls an image upload interface to upload the first image to the image site for storage, and generates a corresponding first image link according to the storage location of the first image. Wherein, the image upload interface can be a different interface or the same interface as the image upload interface called by the terminal when uploading the first image to the server.
[0164] Optionally, when uploading the first image, the terminal also uploads the image information of the first image. The image information includes the data volume of the first image, and the data volume can represent the size of the storage space required to store the first image. In addition, the image information can also include the video identifier corresponding to the first image, the size of the first image, etc. After receiving the image information of the first image, the server first verifies the data volume of the first image. When the data volume of the first image is less than the first threshold, the server stores the first image and the image information of the first image, and generates the first image link. When the data volume of the first image is not less than the first threshold, the server does not store the first image, but returns a storage failure notification to the terminal to prompt the terminal to re-upload an image with a data volume that meets the requirements.
[0165] As Figure 11 shown, after receiving the image information of the first image through the image upload interface, the server first verifies the data volume of the first image. After the verification passes, the server stores the first image and the image information in the image site, and generates a corresponding first image link.
[0166] 1005. The server sends the first image link back to the terminal.
[0167] 1006. The terminal receives the first image link returned by the server.
[0168] 1007. The terminal sends an unoccluding request to the server, and the unoccluding request carries the first image link and region location information.
[0169] After receiving the first image link, the terminal first caches the first image link. When sending a de-occlusion request to the server, the de-occlusion request carries the first image link so that the server can find the first image based on the first image link.
[0170] In addition, the region position information is used to represent the position of the selected target region in the first image. The terminal determines the region position information according to the selected target region in the first image. When sending a de-occlusion request to the server, the de-occlusion request carries the region position information so that the server can determine the position of the target region in the first image based on the region position information. Among them, the region position information may include the coordinates of at least two vertices of the target region in the first image, or may also include information such as the shape or size of the target region.
[0171] Optionally, the server provides an image processing interface, which is used to request the server to remove the occluder in the image. Therefore, the terminal calls the image processing interface and sends the de-occlusion request to the server. The de-occlusion request carries the first image link and the region position information. The server receives the de-occlusion request through the image processing interface.
[0172] 1008. After receiving the de-occlusion request, the server obtains the first image based on the first image link, determines the selected target region in the first image based on the region position information, removes the occluder in the target region, and obtains the second image.
[0173] Optionally, when the server stores the image in the image site, after receiving the de-occlusion request, the server queries and downloads the first image from the image site based on the first image link carried in the de-occlusion request. Then, based on the region position information carried in the de-occlusion request, the server determines the selected target region in the first image, thereby removing the occluder in the target region and obtaining the second image.
[0174] Optionally, the server first removes the image content in the target region, and then fills the target region according to the image content in other regions except the target region in the first image, thereby obtaining the second image. For example, the server can calculate based on the image content in other regions except the target region in the first image and fill the target region based on image inpainting technology, thereby obtaining the second image.
[0175] Or, the server covers the occluder in the target region based on the image content in other regions except the target region in the first image, and obtains the second image. This way of removing the occluder covers the occluder in the target region without removing the image content in the target region.
[0176] Optionally, based on the image content of other regions in the first image except the target region, a layer with the same size as the target region is created, so that the image content in the layer matches the image content of other regions in the first image except the target region. The layer is displayed above the target region, thereby covering the occluder in the target region with the layer, and the layer can present a complete image with other regions in the first image.
[0177] 1009. The server stores the second image and generates a second image link corresponding to the second image.
[0178] Optionally, the server calls the image upload interface to upload the second image to the image site for storage, and generates a corresponding second image link according to the storage location of the second image in the image site.
[0179] Among them, the process of storing the second image and generating and returning the second image link is the same as step 1004 above, and will not be elaborated here.
[0180] As Figure 12 shown, after receiving the de-occlusion request, the server first obtains the first image link carried in the de-occlusion request, and based on the first image link, queries and downloads the first image from the image site. Then it obtains the region location information carried in the de-occlusion request, and based on the region location information, determines the target region selected in the first image, thereby deleting the image content in the target region. After that, based on the image inpainting technology, calculations are performed according to the image content in other regions in the first image except the target region, and the target region is filled to obtain the second image. The image upload interface is called to store the second image in the image site, and a corresponding second image link is generated, and the second image link is returned to the terminal.
[0181] 1010. The server sends the second image link back to the terminal.
[0182] 1011. The terminal receives the second image link returned by the server and obtains the second image based on the second image link.
[0183] Optionally, in the case where the server stores the second image and returns the second image link, the terminal receives the second image link returned by the server and obtains the second image based on the second image link.
[0184] Among them, the second image is stored in the image site, and the second image link is used to indicate the storage location of the second image in the image site. The terminal can query the second image in the image site according to the second image link, and thus download the second image from the image site.
[0185] The method provided by the embodiments of the present application, through the interaction between the terminal and the server, enables the server to remove the occlusions in the image for the terminal, thereby saving the processing resources of the terminal and reducing the load on the terminal. Moreover, compared with the server directly returning the image to the terminal, the embodiments of the present application use the image site as a transfer station. The server stores the image in the image site and generates an image link. The terminal obtains the image based on the image link, realizing accurate downloading of the image and reducing the amount of data returned from the server to the terminal, saving data traffic.
[0186] Figure 13 It is a specific operation flowchart for the above embodiments. As Figure 13 shown, it includes the following steps:
[0187] 1301. The terminal plays a video.
[0188] 1302. When a certain video frame is played, a screenshot is taken on the terminal.
[0189] 1303. The terminal automatically displays the screenshot result interface, which includes the captured image and editing options.
[0190] 1304. Determine whether to enter quick editing. If yes, execute step 1305 below; if no, execute step 1314 below.
[0191] 1305. The terminal displays an editing interface, which includes an occlusion removal option.
[0192] 1306. After the user triggers the occlusion removal option, the terminal displays an occlusion removal interface, which includes a marking option, a restoration option, and a filling option.
[0193] 1307. After the user triggers the marking option, the target area is marked.
[0194] 1308. In the case where the user triggers the restoration option, all marks are cleared, and the process returns to step 1306 above.
[0195] 1309. In the case where the user triggers the filling option, the first image and the region position information corresponding to the marked area in the first image are uploaded to the server. The server removes the content of the target area and performs filling to obtain the second image and the second image link.
[0196] 1310. The terminal receives the second image link sent by the server.
[0197] 1311. The terminal downloads the second image based on the second image link, returns to the editing interface, and updates the first image displayed in the editing interface to the second image.
[0198] 1312. Determine whether the confirmation option in the editing interface is triggered. If yes, execute step 1313 below. If no, return to step 1303 above.
[0199] 1313. Update the screenshot result interface, replace the first image in the screenshot result interface with the second image, and repeat steps 1303 - 1304 above.
[0200] 1314. The screenshot result interface also includes a save option, a share option, and a publish option. When the save option is triggered, save the image displayed in the screenshot result interface to the album. When the share option is triggered, share the image displayed in the screenshot result interface to other target clients. When the publish option is triggered, generate a dynamic message based on the image displayed in the screenshot result interface, and thus publish the dynamic message to the comment area of the video.
[0201] In another embodiment, when a video playback client is installed on the terminal, the video playback client includes a data layer and a control layer. Among them, the data layer contains an Image (image) class, a UserEditInfo (user edit information) class, and an ImageEditInfo (image edit information) class. The data layer is mainly used to process the image data when the user uses the de - occlusion function and the area data corresponding to the selected target area.
[0202] As Figure 14 shown, the information in the Image class includes: image binary data; image name; image ID (Identification); last modification time, etc.
[0203] The methods in the Image class include: return image data; update image data, etc.
[0204] The information in the ImageEditInfo class includes: target image; user - selected information; current tool information; operation record, etc.
[0205] The methods in the ImageEditInfo class include: restore selected information; update selected information; update image; restore image, etc.
[0206] The information in the UserEditInfo class includes: set of selected area coordinates; last update time, etc.
[0207] The methods in the UserEditInfo class include: return selected area; set of selected area coordinates; delete a certain area; clear all areas.
[0208] The control layer can abstract the EditManager (editing management) class, including data classes and interface classes. When the user finishes editing and makes a selection, the EditManager class calls the corresponding method to upload the current video screenshot, uploads the editing information to the server interface, calculates and generates a new image, and returns the image link corresponding to the image to the terminal. When the terminal receives the new image link from the server, the EditManager class calls the corresponding method to download the processed image, updates the image data in the data class, and at the same time, through the interface class, updates the image display area in the interface and updates the processed image to the current interface.
[0209] Based on the above embodiments, the embodiments of the present application further provide an image processing method executed by a server. Figure 15 is a flowchart of another image processing method, see Figure 15 and the method includes:
[0210] 1501. Receive a first image uploaded by a terminal. The first image is uploaded by the terminal in response to a trigger operation on a target option after taking a screenshot of a video frame in the played video. The target option is used to remove the occluder in the first image.
[0211] 1502. Store the first image, generate a first image link corresponding to the first image, and send the first image link to the terminal.
[0212] 1503. Receive a de-occlusion request sent by the terminal. The de-occlusion request carries the first image link and region position information, and the region position information is used to represent the position of the selected target region in the first image.
[0213] 1504. In response to the de-occlusion request, obtain the first image based on the first image link, determine the selected target region in the first image based on the region position information, remove the occluder in the target region, and obtain a second image.
[0214] 1505. Return the second image to the terminal.
[0215] The method provided by the embodiments of the present application, when receiving the de-occlusion request sent by the terminal, quickly removes the occluder in the target region based on the image and the selected target region in the image, so as to achieve the purpose of removing the occluder in the image, realizes fast processing of the image, and improves the quality of the image.
[0216] Optionally, storing the first image and generating a first image link corresponding to the first image includes:
[0217] Store the first image in an image site;
[0218] Generate a first image link based on the storage location of the first image in the image site.
[0219] Optionally, receive the first image uploaded by the terminal, including:
[0220] Receive the first image and image information uploaded by the terminal, where the image information includes at least the data volume of the first image;
[0221] Store the first image and generate a first image link corresponding to the first image, including:
[0222] When the data volume of the first image is less than the first threshold, store the first image and the image information of the first image, and generate a first image link.
[0223] Optionally, return a second image to the terminal, including:
[0224] Store the second image and generate a second image link corresponding to the second image;
[0225] Send the second image link to the terminal, and the terminal is used to obtain the second image based on the second image link.
[0226] Optionally, store the second image and generate a second image link corresponding to the second image, including:
[0227] Store the second image in the image site;
[0228] Generate a second image link based on the storage location of the second image in the image site.
[0229] Optionally, remove the occluder in the target area to obtain the second image, including:
[0230] Remove the image content in the target area and fill the target area based on the image content of the first image to obtain the second image; or,
[0231] Cover the occluder in the target area based on the image content of other areas except the target area in the first image to obtain the second image.
[0232] Figure 16 It is a schematic structural diagram of an image processing device provided by an embodiment of the present application. See Figure 16 , the device includes:
[0233] A first receiving module 1601, configured to receive the first image uploaded by the terminal, where the first image is uploaded by the terminal in response to a trigger operation on a target option after taking a screenshot of a video frame in the played video, and the target option is used to remove the occluder in the first image;
[0234] A generation module 1602, configured to store a first image and generate a first image link corresponding to the first image;
[0235] A sending module 1603, configured to send the first image link to a terminal;
[0236] A second receiving module 1604, configured to receive an unoccluding request sent by the terminal, where the unoccluding request carries the first image link and region location information, the first image link corresponds to the first image, and the region location information is used to indicate the position of a selected target region in the first image;
[0237] An image processing module 1605, configured to, in response to the unoccluding request, obtain the first image based on the first image link, determine the selected target region in the first image based on the region location information, remove the occluder within the target region, and obtain a second image;
[0238] A feedback module 1606, configured to return the second image to the terminal.
[0239] When the device provided in the embodiment of the present application receives an unoccluding request sent by a terminal, based on a video screenshot and the selected target region in the video screenshot, the occluder within the target region is quickly removed, so as to achieve the purpose of removing the occluder in the video screenshot, realize fast processing of the video screenshot, and improve the image quality of the video screenshot.
[0240] Optionally, the generation module 1602 includes:
[0241] A storage unit, configured to store the first image to an image site;
[0242] A first generation unit, configured to generate a first image link based on the storage location of the first image in the image site.
[0243] Optionally, the first receiving module 1601 includes:
[0244] A receiving unit, configured to receive a first image and image information uploaded by the terminal, where the image information at least includes the data volume of the first image;
[0245] The generation module 1602 includes:
[0246] A first generation unit, configured to, when the data volume of the first image is less than a first threshold, store the first image and the image information of the first image, and generate a first image link.
[0247] Optionally, the feedback module 1606 includes:
[0248] A second generation unit, configured to store the second image and generate a second image link corresponding to the second image;
[0249] A sending unit, configured to send a second image link to a terminal, where the terminal is configured to obtain a second image based on the second image link.
[0250] Optionally, a second generating unit, configured to:
[0251] Store the second image in an image site;
[0252] Generate a second image link based on the storage location of the second image in the image site.
[0253] Optionally, an image processing module 1605 includes:
[0254] A first processing unit, configured to remove the image content within a target area and fill the target area based on the image content of the first image to obtain a second image; or
[0255] A second processing unit, configured to cover the occluder within the target area based on the image content of other areas except the target area in the first image to obtain a second image.
[0256] Figure 17 It is a schematic structural diagram of another image processing device provided by an embodiment of the present application. Refer to Figure 17 , the device includes:
[0257] A screenshot module 1701, configured to take a screenshot of a video frame in a played video to obtain a first image;
[0258] A first display module 1702, configured to display a target option corresponding to the first image, where the target option is used to remove the occluder in the first image;
[0259] A second display module 1703, configured to, in response to a trigger operation on the target option, remove the occluder within the selected target area in the first image to obtain a second image, and display the second image.
[0260] In an embodiment of the present application, when playing a video, after taking a screenshot of the video frame, a target option for removing the occluder is automatically displayed. By triggering the target option, the occluder in the first image can be conveniently and quickly removed, realizing fast processing of the video screenshot and improving the image quality of the video screenshot.
[0261] Optionally, the first display module 1702 includes:
[0262] A first display unit, configured to display a screenshot result interface, where the screenshot result interface includes the first image and an editing option corresponding to the first image;
[0263] A second display unit, configured to, in response to a trigger operation on the editing option, display an editing interface, where the editing interface includes the first image and the target option.
[0264] Optionally, the second display module 1703 includes:
[0265] A third display unit, configured to display an unoccluded interface in response to a trigger operation on a target option, where the unoccluded interface includes a first image, a marked option, and a filling option;
[0266] A determination unit, configured to determine a marked area in the first image as a target area in response to a trigger operation on the marked option;
[0267] A first processing unit, configured to remove the image content within the target area and fill the target area based on the image content of the first image to obtain a second image in response to a trigger operation on the filling option; or,
[0268] A second processing unit, configured to cover the occluder within the target area based on the image content of other areas in the first image except the target area to obtain a second image in response to a trigger operation on the filling option.
[0269] Optionally, the second display module 1703 includes:
[0270] A fourth display unit, configured to display the second image in the unoccluded interface;
[0271] A fifth display unit, configured to display an editing interface in response to a confirmation operation on the second image in the unoccluded interface, where the editing interface includes the second image and the target option.
[0272] Optionally, the apparatus further includes:
[0273] A third display module, configured to display an edited image display interface in response to a confirmation operation on the second image in the editing interface, where the screenshot result interface includes the second image and an editing option corresponding to the second image.
[0274] Optionally, the apparatus further includes at least one of the following:
[0275] A saving module, where the edited image display interface further includes a saving option, and is configured to save the second image in response to a trigger operation on the saving option;
[0276] A sharing module, where the edited image display interface further includes a sharing option, and is configured to share the second image to a selected target client in response to a trigger operation on the sharing option;
[0277] A publishing module, where the edited image display interface further includes a publishing option, and is configured to generate a dynamic message based on the second image and publish the dynamic message based on the currently logged-in user identifier.
[0278] Optionally, the second display module 1703 includes:
[0279] An upload unit, configured to upload a first image and region location information to a server in response to a trigger operation on a target option, where the region location information is used to represent the position of a target region in the first image; the server is configured to determine a selected target region in the first image based on the region location information, remove an occluder within the target region, and obtain a second image;
[0280] An acquisition unit, configured to acquire the second image returned by the server.
[0281] Optionally, the upload unit includes:
[0282] A generation subunit, configured to upload the first image to the server in response to a trigger operation on the target option, where the server is configured to store the first image and generate a first image link corresponding to the first image;
[0283] A first receiving subunit, configured to receive the first image link returned by the server;
[0284] A removal subunit, configured to send an occlusion removal request to the server, where the occlusion removal request carries the first image link and the region location information, and the server is configured to obtain the first image based on the first image link, determine a selected target region in the first image based on the first image and the region location information, remove an occluder within the target region, and obtain a second image.
[0285] Optionally, the server is further configured to store the second image, obtain a second image link corresponding to the second image, and return the second image link;
[0286] The acquisition unit includes:
[0287] A second receiving subunit, configured to receive the second image link returned by the server;
[0288] An acquisition subunit, configured to acquire the second image based on the second image link.
[0289] Optionally, the first display module 1702 is configured to display a target option corresponding to the first image when the type of the video is a target video type.
[0290] Any combination of the above all optional technical solutions can form an optional embodiment of this application, which will not be elaborated herein one by one.
[0291] It should be noted that: when the image processing device provided in the above embodiment processes a video screenshot, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be assigned to different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the image processing device provided in the above embodiment and the embodiment of the image processing method belong to the same concept. For the specific implementation process, please refer to the method embodiment, which will not be elaborated here.
[0292] An embodiment of the present application also provides a computer device, which includes a processor and a memory. At least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the image processing method in the above embodiment.
[0293] Optionally, the computer device is provided as a terminal. Figure 18 FIG. 1800 is a schematic structural diagram of a terminal 1800 provided by an embodiment of the present application. The terminal 1800 includes a processor 1801 and a memory 1802.
[0294] The processor 1801 may include one or more processing cores, such as a 4-core processor or an 8-core processor. The processor 1801 may be implemented in at least one of the following hardware forms: DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). In some embodiments, the processor 1801 may further include an AI (Artificial Intelligence) processor, which is used to process computational operations related to machine learning.
[0295] The memory 1802 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. In some embodiments, the non-transitory computer-readable storage medium in the memory 1802 is used to store at least one computer program, and the at least one computer program is used to be executed by the processor 1801 to implement the image processing method provided in the method embodiment of the present application.
[0296] In some embodiments, the terminal 1800 may further optionally include: a peripheral device interface 1803 and at least one peripheral device. The processor 1801, the memory 1802, and the peripheral device interface 1803 may be connected via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1803 via a bus, signal lines, or a circuit board. Specifically, the peripheral devices include at least one of a display screen 1804, a camera assembly 1805, an audio circuit 1806, and a radio frequency circuit 1807.
[0297] The peripheral device interface 1803 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1801 and the memory 1802. In some embodiments, the processor 1801, the memory 1802, and the peripheral device interface 1803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1801, the memory 1802, and the peripheral device interface 1803 may be implemented on a separate chip or circuit board, and this embodiment does not limit this.
[0298] The display screen 1804 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1804 is a touch display screen, the display screen 1804 also has the ability to collect touch signals on or above the surface of the display screen 1804. The touch signals may be input to the processor 1801 as control signals for processing. At this time, the display screen 1804 may also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard.
[0299] The camera assembly 1805 is used to collect images or videos. Optionally, the camera assembly 1805 includes a front camera and a rear camera. The front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal.
[0300] The audio circuit 1806 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 1801 for processing to achieve voice communication.
[0301] The radio frequency circuit 1807 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1807 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1807 converts electrical signals into electromagnetic signals for transmission, or converts the received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1807 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so on. The radio frequency circuit 1807 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1807 may further include a circuit related to NFC (Near Field Communication), which is not limited in this application.
[0302] Those skilled in the art can understand that Figure 18 the structure shown in does not constitute a limitation on the terminal 1800, and it may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0303] Optionally, the computer device is provided as a server. Figure 19 FIG. is a schematic structural diagram of a server provided by an embodiment of the present application. The server 1900 may vary greatly due to different configurations or performances, and may include one or more processors (Central Processing Units, CPUs) 1901 and one or more memories 1902. Among them, at least one computer program is stored in the memory 1902, and the at least one computer program is loaded and executed by the processor 1901 to implement the methods provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The server may further include other components for implementing the functions of the device, which will not be elaborated here.
[0304] An embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the image processing method in the above embodiment.
[0305] The embodiment of the present application also provides a computer program product, which includes a computer program. The computer program is loaded and executed by a processor, so that the computer device implements the operations performed by the image processing method in the above embodiment.
[0306] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disc, etc.
[0307] The above are only optional embodiments of the embodiments of the present application, and are not intended to limit the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included in the protection scope of the present application.
Claims
1. An image processing method, characterized in that, The method includes: Receiving a first image uploaded by a terminal, where the first image is uploaded by the terminal in response to a trigger operation on a target option after taking a screenshot of a video frame in the played video, and the target option is used to remove an occluder in the first image; Storing the first image, generating a first image link corresponding to the first image, and sending the first image link to the terminal; Receiving a de-occlusion request sent by the terminal, where the de-occlusion request carries the first image link and region position information, and the region position information is used to represent the position of a selected target region in the first image, and the target region is a region marked by a user in the first image; In response to the de-occlusion request, obtaining the first image based on the first image link, and determining the selected target region in the first image based on the region position information; Removing the image content within the target region, and filling the target region based on the image content of other regions in the first image except the target region to obtain a second image; or, covering the occluder within the target region based on the image content of other regions in the first image except the target region to obtain a second image; Returning the second image to the terminal; In response to a de-occlusion request for the second image, performing the step of removing the occluder on the second image.
2. The method according to claim 1, characterized in that, The storing the first image and generating a first image link corresponding to the first image includes: Storing the first image in an image site; Generating the first image link based on the storage location of the first image in the image site.
3. The method according to claim 1, characterized in that, The receiving the first image uploaded by the terminal includes: Receiving the first image and image information uploaded by the terminal, where the image information at least includes the data volume of the first image; The storing the first image and generating a first image link corresponding to the first image includes: When the data volume of the first image is less than a first threshold, storing the first image and the image information of the first image, and generating the first image link.
4. The method according to claim 1, wherein The returning the second image to the terminal includes: Storing the second image and generating a second image link corresponding to the second image; Sending the second image link to the terminal, and the terminal is used to obtain the second image based on the second image link.
5. The method according to claim 4, characterized in that The storing the second image and generating a second image link corresponding to the second image includes: Storing the second image in an image site; Generating the second image link based on the storage location of the second image in the image site.
6. An image processing method, characterized in that, The method includes: Taking a screenshot of a video frame in the played video to obtain a first image; Displaying a target option corresponding to the first image, where the target option is used to remove an occluder in the first image; In response to a trigger operation on the target option, displaying a de-occlusion interface, where the de-occlusion interface includes the first image, a marking option, and a filling option; In response to a trigger operation on the marked option, determine the area marked in the first image as the target area; In response to a trigger operation on the filling option, remove the image content within the target area, and fill the target area based on the image content of other areas in the first image except the target area to obtain a second image; alternatively, in response to a trigger operation on the filling option, cover the occluder within the target area based on the image content of other areas in the first image except the target area to obtain a second image; In the de-occlusion interface, display the second image; In response to a confirmation operation on the second image in the de-occlusion interface, display an editing interface, where the editing interface includes the second image and the target option, and the target option is used to remove the occluder in the second image.
7. The method according to claim 6, characterized in that, The displaying the target option corresponding to the first image includes: Display a screenshot result interface, where the screenshot result interface includes the first image and the editing option corresponding to the first image; In response to a trigger operation on the editing option, display an editing interface, where the editing interface includes the first image and the target option.
8. The method according to claim 6, wherein After the step of, in response to a confirmation operation on the second image, display an editing interface, the method further includes: In response to a confirmation operation on the second image in the editing interface, display an edited image display interface, where the edited image display interface includes the second image and the editing option corresponding to the second image.
9. The method according to claim 8, wherein After the step of, in response to a confirmation operation on the second image in the editing interface, display an edited image display interface, the method further includes at least one of the following: The edited image display interface further includes a save option, and in response to a trigger operation on the save option, save the second image; The edited image display interface further includes a share option, and in response to a trigger operation on the share option, share the second image to a selected target client; The edited image display interface further includes a publish option, and in response to a trigger operation on the publish option, generate a dynamic message based on the second image and publish the dynamic message based on the currently logged-in user identifier.
10. The method according to any one of claims 6-9, characterized in that, The step of, in response to a trigger operation on the filling option, remove the image content within the target area, and fill the target area based on the image content of other areas in the first image except the target area to obtain a second image, includes: In response to a trigger operation on the filling option, upload the first image and area location information to the server, where the area location information is used to represent the position of the target area in the first image; the server is used to determine the selected target area in the first image based on the area location information, remove the image content within the target area, and fill the target area based on the image content of other areas in the first image except the target area to obtain the second image; Obtain the second image returned by the server.
11. The method according to any one of claims 6-9, characterized in that, In response to a trigger operation on the filling option, covering the occluder in the target area based on the image content of other areas in the first image except the target area to obtain a second image, including: In response to a trigger operation on the filling option, uploading the first image and area position information to the server, where the area position information is used to represent the position of the target area in the first image; the server is configured to determine the selected target area in the first image based on the area position information, and cover the occluder in the target area based on the image content of other areas in the first image except the target area to obtain the second image; Obtaining the second image returned by the server.
12. The method according to claim 10, wherein The step of, in response to a trigger operation on the filling option, uploading the first image and area position information to the server includes: In response to a trigger operation on the filling option, uploading the first image to the server, where the server is configured to store the first image and generate a first image link corresponding to the first image; Receiving the first image link returned by the server; Sending a de-occlusion request to the server, where the de-occlusion request carries the first image link and the area position information, and the server is configured to obtain the first image based on the first image link, determine the selected target area in the first image based on the first image and the area position information, and remove the occluder in the target area to obtain the second image.
13. The method according to claim 12, wherein The server is further configured to store the second image, obtain a second image link corresponding to the second image, and return the second image link; The step of obtaining the second image returned by the server includes: Receiving the second image link returned by the server; Obtaining the second image based on the second image link.
14. The method according to any one of claims 6-9, characterized in that, The step of displaying the target option corresponding to the first image includes: In the case where the type of the video is the target video type, displaying the target option corresponding to the first image.
15. An image processing apparatus, characterized in that, The device includes: A first receiving module, configured to receive a first image uploaded by a terminal, where the first image is uploaded by the terminal in response to a trigger operation on a target option after taking a screenshot of a video frame in the played video, and the target option is used to remove the occluder in the first image; A generating module, configured to store the first image and generate a first image link corresponding to the first image; A sending module, configured to send the first image link to the terminal; A second receiving module, configured to receive the de-occlusion request sent by the terminal, where the de-occlusion request carries the first image link and area position information, and the area position information is used to represent the position of the selected target area in the first image, and the target area is an area marked by the user in the first image; An image processing module, configured to remove the image content within the target area, and fill the target area based on the image content of other areas in the first image except the target area, to obtain a second image; or, cover the occluder within the target area based on the image content of other areas in the first image except the target area, to obtain a second image; A feedback module, configured to return the second image to the terminal; The image processing module is further configured to, in response to a de-occlusion request for the second image, perform a step of removing the occluder on the second image.
16. The device according to claim 15, characterized in that, The generation module includes: A storage unit, configured to store the first image to an image site; A first generation unit, configured to generate a first image link based on the storage location of the first image in the image site.
17. The device according to claim 15, characterized in that, The first receiving module includes: A receiving unit, configured to receive the first image and image information uploaded by the terminal, where the image information at least includes the data volume of the first image; The generation module includes: A first generation unit, configured to, when the data volume of the first image is less than a first threshold, store the first image and the image information of the first image, and generate a first image link.
18. The device according to claim 15, characterized in that, The feedback module includes: A second generation unit, configured to store the second image and generate a second image link corresponding to the second image; A sending unit, configured to send the second image link to the terminal, and the terminal is configured to obtain the second image based on the second image link.
19. An image processing apparatus, characterized in that, The device includes: A screenshot module, configured to take a screenshot of a video frame in the played video to obtain a first image; A first display module, configured to display a target option corresponding to the first image, where the target option is used to remove the occluder in the first image; A second display module, configured to, in response to a trigger operation on the target option, display a de-occlusion interface, where the de-occlusion interface includes the first image, a marking option, and a filling option; in response to a trigger operation on the marking option, determine the marked area in the first image as the target area; in response to a trigger operation on the filling option, remove the image content within the target area, and fill the target area based on the image content of other areas in the first image except the target area, to obtain a second image; or, in response to a trigger operation on the filling option, cover the occluder within the target area based on the image content of other areas in the first image except the target area, to obtain a second image; display the second image in the de-occlusion interface; in response to a confirmation operation on the second image in the de-occlusion interface, display an editing interface, where the editing interface includes the second image and the target option, and the target option is used to remove the occluder in the second image.
20. The device according to claim 19, wherein The first display module includes: A first display unit, configured to display a screenshot result interface, where the screenshot result interface includes the first image and an editing option corresponding to the first image; A second display unit, configured to display an editing interface in response to a triggering operation on the editing option, where the editing interface includes the first image and the target option.
21. The device according to claim 19, characterized in that, The apparatus further includes: A third display module, configured to display an edited image display interface in response to a confirmation operation on the second image in the editing interface, where the edited image display interface includes the second image and the editing option corresponding to the second image.
22. The device according to claim 21, wherein, The apparatus further includes at least one of the following: A saving module, where the edited image display interface further includes a saving option, and configured to save the second image in response to a triggering operation on the saving option; A sharing module, where the edited image display interface further includes a sharing option, and configured to share the second image to a selected target client in response to a triggering operation on the sharing option; A publishing module, where the edited image display interface further includes a publishing option, and configured to generate a dynamic message based on the second image and publish the dynamic message based on the user identifier of the currently logged-in user in response to a triggering operation on the publishing option.
23. The device according to any one of claims 19-22, characterized in that, The second display module includes: An uploading unit, configured to upload the first image and region position information to a server in response to a triggering operation on the filling option, where the region position information is used to represent the position of the target region in the first image; the server is configured to determine the selected target region in the first image based on the region position information, remove the image content within the target region, and fill the target region based on the image content of other regions in the first image except the target region to obtain the second image; An obtaining unit, configured to obtain the second image returned by the server.
24. The device according to any one of claims 19-22, characterized in that The second display module includes: An uploading unit, configured to upload the first image and region position information to a server in response to a triggering operation on the filling option, where the region position information is used to represent the position of the target region in the first image; the server is configured to determine the selected target region in the first image based on the region position information, cover the occluder within the target region based on the image content of other regions in the first image except the target region to obtain the second image; An obtaining unit, configured to obtain the second image returned by the server.
25. The device according to claim 23, characterized in that, The uploading unit includes: A generating subunit, configured to upload the first image to the server in response to a triggering operation on the target option, where the server is configured to store the first image and generate a first image link corresponding to the first image; A first receiving subunit, configured to receive the first image link returned by the server; A removal subunit, configured to send an occlusion removal request to the server, where the occlusion removal request carries the first image link and the region location information, and the server is configured to obtain the first image based on the first image link, determine the target region selected in the first image based on the first image and the region location information, remove the occluder in the target region, and obtain the second image.
26. The device according to claim 25, characterized in that, The server is further configured to store the second image, obtain a second image link corresponding to the second image, and return the second image link; The obtaining unit includes: A second receiving subunit, configured to receive the second image link returned by the server; An obtaining subunit, configured to obtain the second image based on the second image link.
27. The device according to any one of claims 19-22, characterized in that, The first display module is configured to display the target option corresponding to the first image when the type of the video is the target video type.
28. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one computer program is stored in the memory. The at least one computer program is loaded and executed by the processor to implement the operations performed by the image processing method according to any one of claims 1 to 5, or to implement the operations performed by the image processing method according to any one of claims 6 to 14.
29. A computer-readable storage medium, characterized in that, At least one computer program is stored in the computer-readable storage medium. The at least one computer program is loaded and executed by a processor to implement the operations performed by the image processing method according to any one of claims 1 to 5, or to implement the operations performed by the image processing method according to any one of claims 6 to 14.
30. A computer program product, comprising a computer program, characterized by When the computer program is executed by a processor, it implements the operations performed by the image processing method according to any one of claims 1 to 5, or implements the operations performed by the image processing method according to any one of claims 6 to 14.
Citation Information
Patent Citations
Image processing method and device and electronic equipment
CN112363787A