Screenshot image processing method, device and electronic device
By performing contour recognition and layer separation on the screenshot image, combined with user input editing, the problem of complexity in existing screenshot functions is solved, achieving simplified operation and high-quality screenshot generation.
Patent Information
- Application Number
- CN202111062997.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-09-10
AI Technical Summary
The existing screenshot function is complex to use in some scenarios, requiring multiple screenshots and stitching, making it difficult to effectively handle unwanted content on the screen.
By performing contour recognition on the screenshot image, the bounding box of each information block is determined, separated into independent layers, and user input is received for editing, ultimately generating a new screenshot image.
It simplifies the screenshot process, reduces the possibility of accidental operations, preserves important information, and improves the presentation and user experience of screenshots.
Smart Images

Figure CN113763512B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method for processing a screenshot image, a device for processing a screenshot image, and an electronic device. Background Art
[0002] Many people will post their feelings on social platforms such as Moments, Weibo, and Weibo when important events happen (such as getting into college, winning a competition, finding a job, or getting married), and receive many congratulations on social platforms. When the poster wants to take a screenshot as a souvenir or share it with others, if there are some jokes or malicious comments in the screenshot content, it may affect the screenshot or sharing.
[0003] In the related art, if the publisher wants to adjust the comments in the screenshot, he can only do so by repeatedly taking screenshots and then splicing multiple screenshot images. It can be seen that the existing screenshot function is complicated to use in some scenarios and requires multiple screenshots. Summary of the invention
[0004] The embodiments of the present application provide a method, device and electronic device for processing screenshot images, which solve the problem that the existing screenshot function is complicated to use in some scenarios and requires multiple screenshots.
[0005] In a first aspect, an embodiment of the present application provides a method for processing a screenshot image, comprising:
[0006] Performing contour recognition on each piece of information in the first screenshot image to determine the bounding box of each piece of information;
[0007] The first screenshot image is processed according to the bounding box of each piece of information to obtain a layer of each piece of information;
[0008] Receiving a first input of a target information layer in each information layer;
[0009] In response to the first input, the target information layer is edited to generate a second screenshot image.
[0010] In a second aspect, an embodiment of the present application provides a screenshot image processing device, comprising:
[0011] A recognition module, used to perform contour recognition on each piece of information in the first screenshot image and determine an external bounding box for each piece of information;
[0012] A processing module, used for processing the first screenshot image according to the external frame of each piece of information to obtain a layer of each piece of information;
[0013] A receiving module, used for receiving a first input of a target information layer in each information layer;
[0014] The editing module is used to edit the target information layer in response to the first input to generate a second screenshot image.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and running on the processor, which, when executed by the processor, implements the steps of the screenshot image processing method provided in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, including a screenshot image processing device provided in an embodiment of the second aspect.
[0017] In a fifth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the screenshot image processing method provided in the first aspect are implemented.
[0018] In a sixth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a program or instruction to implement the steps of the screenshot image processing method provided in the first aspect.
[0019] In the embodiment of the present application, the contour of each piece of information in the first screenshot image is identified to determine the external frame of each piece of information; the first screenshot image is processed according to the external frame of each piece of information to obtain a layer of each piece of information; a first input of a target information layer in the layer of each piece of information is received; in response to the first input, the target information layer is edited to generate a second screenshot image. When the user needs to edit the target information in the first screenshot image, an editable layer of each piece of information can be formed by identification and cutting. By editing the target information layer, functions such as deleting, copying, and adjusting the order of at least one piece of target information are realized. After the editing is completed, all layers and the first screenshot image are merged to obtain the edited second screenshot image. On the one hand, there is no need to delete the original information published on the platform, and more important and quality information can be retained on the screenshot image. On the other hand, the user can perform independent editing operations on the layer of each piece of information, that is, different editing methods are used to process the layers of different information, which not only reduces the complexity and difficulty of screenshots, reduces the possibility of misoperation, but also overcomes the limitations of the information editing function, ensures the presentation effect of the second screenshot image, and meets the user's needs for the second screenshot image. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 One of the flowcharts of a method for processing a screenshot image according to an embodiment of the present application is shown;
[0021] Figure 2A second flowchart of a method for processing a screenshot image according to an embodiment of the present application is shown;
[0022] Figure 3 A third flowchart of a method for processing a screenshot image according to an embodiment of the present application is shown;
[0023] Figure 4 A fourth flowchart of a method for processing a screenshot image according to an embodiment of the present application is shown;
[0024] Figure 5 A fifth flowchart of a method for processing a screenshot image according to an embodiment of the present application is shown;
[0025] Figure 6 A sixth flowchart of a method for processing a screenshot image according to an embodiment of the present application is shown;
[0026] Figure 7 FIG7 shows a seventh flowchart of a method for processing a screenshot image according to an embodiment of the present application;
[0027] Figure 8 One of the electronic device display schematic diagrams according to an embodiment of the present application is shown;
[0028] Fig. 9 A second display schematic diagram of an electronic device according to an embodiment of the present application is shown;
[0029] Fig.10 A third display schematic diagram of an electronic device according to an embodiment of the present application is shown;
[0030] Fig.11 A fourth display schematic diagram of an electronic device according to an embodiment of the present application is shown;
[0031] Fig.12 A fifth display schematic diagram of an electronic device according to an embodiment of the present application is shown;
[0032] Fig.13 A structural block diagram of a device for processing screenshot images according to an embodiment of the present application is shown;
[0033] Fig.14 A structural block diagram of an electronic device according to an embodiment of the present application is shown;
[0034] Fig.15 A hardware structure block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0036] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0037] Refer to the following Figures 1 to 15 The present invention describes a screenshot image processing method, a screenshot image processing device and an electronic device according to some embodiments of the present application.
[0038] In one embodiment of the present application, Figure 1 One of the flowcharts of the method for processing a screenshot image according to an embodiment of the present application is shown, including:
[0039] Step 102, performing contour recognition on each piece of information in the first screenshot image to determine the bounding box of each piece of information;
[0040] Exemplarily, the electronic device may display the first screenshot image in a horizontal or vertical orientation.
[0041] Specifically, the bounding box is the boundary of the smallest area where the information is located in the first screenshot image. The shape of the bounding box can be reasonably set according to user needs, and can be a circle, a quadrilateral, an ellipse, etc. The bounding box can contain all the contents of a single piece of information. This application does not specifically limit the shape of the bounding box.
[0042] Step 104, processing the first screenshot image according to the bounding box of each piece of information to obtain a layer of each piece of information;
[0043] In this embodiment, the area where each piece of information is located is cut out from the first screenshot image according to the boundary of the external frame to form a layer for each piece of information. Thus, each piece of information is separated by content explosion, so that each piece of information becomes an editable layer. The user can achieve the desired effect of screenshot by deleting the target information layer to be modified, changing the order, and other editing operations.
[0044] It can be understood that each piece of information corresponds to each layer one by one, that is, one layer only contains the entire content of one piece of information. Processing the first screenshot image includes cutting processing and repairing processing. The area where each piece of information is located, that is, the layer of each piece of information, is segmented by cutting processing. Then, the area where each piece of information is located on the first screenshot image is repaired according to the background parameters around the area where each piece of information is located (such as brightness, contrast, light, background color, etc.), so as to fill the segmented area with the background of the first screenshot image, thereby ensuring the integrity of the first screenshot image.
[0045] It is worth mentioning that in response to the third input to the electronic device, a processing interface is displayed, and the processing interface includes the first screenshot image. At the same time, the contour of each piece of information in the first screenshot image is recognized, that is, the third input is used as a control switch to trigger the editing mode of the first screenshot image. In this way, personalized control of screenshot comment editing is achieved, and only the first screenshot image that needs to be edited is segmented, so as to avoid interference to users who do not want to edit comments, and it is beneficial to reduce the amount of processor calculation.
[0046] Step 106, receiving a first input of a target information layer in each information layer;
[0047] Among them, the target information layer is the layer of information that needs to be adjusted among the multiple pieces of information. The first input is used to trigger the editing operation and indicate the editing method of the target information layer. The first input may include click input, key input, sliding input and / or pressing input. Key input includes but is not limited to single-click input, double-click input, long press input, combination key input, etc. of the power button, volume button, and main menu button of the electronic device. Of course, the first input can also be other operations of the user on the electronic device. The embodiment of the present application does not specifically limit the operation method, and it can be any feasible method.
[0048] Step 108 , in response to the first input, edit the target information layer to generate a second screenshot image.
[0049] In this embodiment, when the electronic device receives the first input of the user to the target information layer, in response to the first input, the editing method indicated by the user is determined, and the target information layer is edited according to the editing method to achieve the deletion, copying, order change and other adjustments of the required information. After the layer editing is completed, all layers and the first screenshot image are merged to form an edited second screenshot image. On the one hand, it is not necessary to delete the original information published on the platform, and more important and high-quality information can be retained on the screenshot image. On the other hand, the user can perform independent editing operations on each information layer, that is, different editing methods are used to process different information layers, which not only reduces the complexity and difficulty of screenshots, reduces the possibility of misoperation, but also overcomes the limitations of the information editing function, ensures the presentation effect of the second screenshot image, and meets the user's needs for the second screenshot image.
[0050] In some possible designs, editing the target information layer includes at least one of the following editing methods: copying the target information layer, deleting the target information layer, moving the position of the target information layer in the first screenshot image, and adjusting the size of the target information layer. This provides multiple possible editing functions for editing information, meets multiple editing needs of users, and improves the user experience.
[0051] Specifically, moving the position of the target information layer in the first screenshot image is not limited to adjusting the order of the target information layers, and the layout of the target information layers may also be changed. Figure 8 Taking the screenshot shown as an example, in order from top to bottom, move the first comment information ("Well done") to after the second comment information ("Thank you "Xingxinghuo" team for winning the honor for our hospital!"). Fig.10 As shown, the order of comment information can be adjusted by moving the comment information, or as shown Fig.11 As shown, by moving 5 comment pieces, multiple comment pieces are arranged alternately, improving the aesthetics of the layout.
[0052] It is understandable that a response function for the first input triggering editing is predefined for the electronic device, and the response function indicates that there is at least one triggering rule for the editing method. When the user's first input to the target information layer is received, the first input is matched with the triggering rule. When the first editing input satisfies the triggering rule, the first input is responded to, and the target information layer is edited in the editing method corresponding to the triggering rule. For example, the rule is defined as double-clicking the layer to represent deleting the layer. When the user double-clicks the target information layer, the target information layer is deleted. For another example, the rule is defined as dragging the layer to represent moving the layer position. When the user presses and holds the target information layer and slides, the target information layer is moved to the end position of the sliding track to change the order of the information. Of course, the rule can also be long pressing the first screenshot to a specified time, clicking the layer to display the editing control, editing the layer through the editing control, etc., which is not specifically limited in the embodiments of the present application.
[0053] Furthermore, an editing control may be displayed on each layer, and the first input to the target information layer is an operation on the editing control on the target information layer, for example, Figure 8 As shown, each comment information in the long screenshot (first screenshot image) is identified, and each comment information can be edited as an independent layer. The editing control 802 of each layer is displayed on each layer. By clicking the editing control 802, the corresponding layer can be deleted, that is, the comment information in the long screenshot can be deleted.
[0054] For example, Fig. 9 As shown, the user clicks the edit control 802 to remove unwanted content or malicious comments from the screenshot, and drags the comment information to move the position of the comment information, thereby adjusting the order of the comments and placing important and quality comments at the front. If the save button is clicked to confirm the completion of the editing, the screenshot is formed as shown in FIG. Fig.10 The screenshot of the editing is shown (second screenshot image). The edited image is saved locally; if the cancel button is clicked, the editing operation is canceled and the user returns to the Moments (or Moments, Weibo) interface. Fig.12 As shown, the user can also press and hold the expand or reduce control in the upper right corner of the comment information and slide it to enlarge the comment information that needs to be highlighted.
[0055] Of course, after generating the second screenshot image, the second screenshot image can also be displayed on the screen of the electronic device to facilitate viewing the final editing effect. If the user suddenly finds that there is a problem with the second screenshot image and needs to be modified, the user can continue to edit and adjust it as in the above steps.
[0056] It should be noted that the screenshot image processing method is applicable to electronic devices, including but not limited to mobile terminals, tablet computers, computers, laptops, wearable devices and vehicle-mounted terminals.
[0057] In some possible designs, after obtaining the second screenshot image, the second screenshot image can be adjusted according to a preset image template, wherein the preset image template includes parameters such as image size, filter, rotation angle, etc. In this way, the second screenshot image can be edited quickly to improve the editing effect.
[0058] In one embodiment of the present application, multiple comment information related to the published content is taken as the information in the first screenshot image as an example, that is, the first screenshot image includes the published content and the multiple comment information. Figure 2 The second flowchart of the method for processing a screenshot image according to an embodiment of the present application is shown, including:
[0059] Step 202, receiving a second input of the published content;
[0060] Among them, published content refers to the information published by users on the platform, which can include pictures, videos, texts, etc. Similarly, comment information can also include pictures, videos, texts, etc.
[0061] Step 204, in response to the second input, determining the area where the published content and the plurality of comment information are located as a screenshot area;
[0062] Step 206: Take a screenshot of the interface according to the screenshot area to generate a first screenshot image.
[0063] In this embodiment, when the user needs to take a screenshot of the published content and multiple comment information related to the published content, the user can trigger the screenshot function of the electronic device through the second input of the published content. At the same time, the published content is used as the starting point of the screenshot and the last comment information is used as the end point of the screenshot, and the screenshot area where the published content and multiple comment information are located is determined. The screenshot area contains the complete published content and all related comment information. At this time, the interface of the electronic device for displaying the published content and multiple comment information is screenshotted according to the screenshot area to generate a first screenshot image. Even if too much comment information exceeds the display range of the electronic device screen, a long screenshot method can be used to take a screenshot of the published content and all comment information, so that the first screenshot image is not limited to the content displayed on the electronic device screen, and the content required by the user is captured to the greatest extent.
[0064] In one embodiment of the present application, when the position of the target information layer in the first screenshot image is moved or the target information layer is deleted, the step of editing the target information layer includes: determining the arrangement order of multiple comment information in the first screenshot image; moving or deleting the target information layer; and moving, in order of arrangement, the layers of comment information that follow the comment information corresponding to the target information layer.
[0065] In this embodiment, it is considered that moving the target information layer or deleting the target information layer will cause the background area to appear in the first screenshot image, which is not conducive to the layout of the image. To this end, the arrangement order of the multiple comment information in the first screenshot image is first determined, and after moving the layer or deleting the layer, the layers of the comment information located after the comment information corresponding to the target information layer are moved in sequence according to the arrangement order to fill the background area. In this way, dynamic adaptive adjustment of the multiple comment information is achieved, making the layout of the multiple comment information more regular and neat, and ensuring a better display effect of the edited second screenshot image.
[0066] For example, Figure 8 Taking the screenshot shown as an example, in the order from top to bottom, the third comment information ("What are you showing off") is deleted through editing operation, and the first comment information ("Well done") is moved to after the second comment information ("Thanks to the "Spark" team for winning the honor for our hospital!"). Fig.10 As shown in , the fourth and fifth comments are automatically moved upward to fill the background area after deleting the third comment, making the image layout more regular and beautiful. Fig.12 As shown, the second comment information is expanded, and at this time, the third, fourth and fifth comment information are moved downward in sequence, so as to avoid the expanded second comment information covering the third comment information.
[0067] In one embodiment of the present application, Figure 3 The third flowchart of the method for processing a screenshot image according to an embodiment of the present application is shown, comprising:
[0068] Step 302: if there is first text information matching the first preset text in the plurality of comment information, add image noise to the first text information.
[0069] Among them, image noise includes random noise or moiré noise. Moiré is a high-frequency interference that occurs in the photosensitive elements of devices such as digital cameras or scanners, which will cause colorful high-frequency stripes to appear in the image. Since moiré is irregular, there is no obvious shape pattern. Generally speaking, the moiré produced when taking pictures forms multiple rings in the form of concentric circles. Random noise is also called background noise. Random noise refers to unnecessary or redundant interference information that exists in image data. It is accumulated by a large number of fluctuations that are randomly generated in time. Random noise is noise that cannot be predicted at a given moment.
[0070] In this embodiment, a first preset text is pre-set, that is, text that is likely to expose user privacy information when sharing a screenshot image, such as the name and mobile phone number of the commentator. In the process of editing the first screenshot image, image recognition is performed on the first screenshot image to obtain the content of each comment information in the first screenshot image. By comparing each comment information with the first preset text, it is determined whether multiple comment information contains private text content. If there is a first text message that matches the first preset text, a "blocking" effect is added to the first screenshot image by adding image noise to the first text message to hide the first text information. As a result, the edited second screenshot image cannot fully display the content in the first screenshot image, preventing information leakage caused by visual recognition and ensuring the security of image sharing.
[0071] In one embodiment of the present application, Figure 4 The fourth flowchart of the method for processing a screenshot image according to an embodiment of the present application is shown, comprising:
[0072] Step 402: if there is second text information matching the second preset text in the plurality of comment information, output prompt information.
[0073] The prompt information is used to prompt editing of the second text information.
[0074] In this embodiment, a second preset text is pre-set, that is, the text content that the user does not want to display. In the process of editing the first screenshot image, image recognition is performed on the first screenshot image to obtain the content of each comment information in the first screenshot image. By comparing each comment information with the second preset text, it is determined whether multiple comment information contains content that the user may not need. If multiple comment information contains second text information that matches the second preset text, it means that there is content in the first screenshot image that the user may not be interested in, and it does not need to appear in the screenshot image or be arranged in a prominent position in the screenshot image. At this time, a prompt message is output to remind the user that the second text information can be edited. This assists the user in determining the comment information that needs to be edited, reduces the time required for the user to view and distinguish the comment information, and is conducive to improving the editing efficiency of the screenshot image, especially when the number of comment information is large, improving the user's experience.
[0075] Specifically, the text content in the first screenshot image may be recognized and extracted by means of an OCR (Optical Character Recognition) algorithm or the like.
[0076] In one embodiment of the present application, Figure 5 The fifth flowchart of the method for processing a screenshot image according to an embodiment of the present application is shown, comprising:
[0077] Step 502: Perform error correction processing on multiple comment messages to determine the typos in the multiple comment messages and the target words corresponding to the typos.
[0078] Step 504: Replace the typos with the target words.
[0079] In this embodiment, after identifying the text content of each comment message, the error correction model is used to identify and correct the typos in the comment message, so as to ensure the correctness of the text information, and it is also beneficial to reflect the cultural level of the user and meet the usage requirements of the user for the screenshot image.
[0080] For example, the word "如火如茶" can be corrected to "如火如荼".
[0081] Among them, the specific method of error correction processing in the embodiments of the present application is not limited.
[0082] In an embodiment of the present application, Figure 6 Fig. 6 shows a sixth flowchart of the processing method of the screenshot image in the embodiments of the present application, including:
[0083] Step 602: Receive a fourth input to the electronic device;
[0084] Step 604: In response to the fourth input, perform a first processing operation on the edited target information layer.
[0085] Among them, the first processing operation includes an undo operation or a restore operation.
[0086] In this embodiment, during the editing process of the target information layer, the user usually needs to perform multiple editing operations. If the user is not satisfied with the effect of the executed editing operation, the user can undo or restore the edited target information layer by a second input to the electronic device, which is beneficial to improving the editing efficiency of the information.
[0087] Furthermore, considering that in the case of a large number of steps in the editing operation, performing the undo or restore operation step by step will seriously affect the editing speed of the image. For this reason, in response to the second input, an undo or restore window is displayed, and the user can input the number of steps that need to be undone or restored in the undo or restore window, and the electronic device automatically performs the undo operation or the restore operation according to the number of steps. Thus, one-key undo or restore of multiple editing operations is realized, and the editing speed is further improved.
[0088] In an embodiment of the present application, Figure 7 Fig. 7 shows a seventh flowchart of the processing method of the screenshot image in the embodiments of the present application, including:
[0089] Step 702: Receive a fifth input to the electronic device;
[0090] Step 704: In response to the fifth input, send the second screenshot image corresponding to the fifth input to the target location.
[0091] The target location may be another electronic device or a server that communicates with the electronic device. When the target location is another electronic device, the second screenshot image is sent to the other electronic device, that is, the second screenshot image is shared; when the target location is a server, sending the second screenshot image is uploading the second screenshot image.
[0092] In this embodiment, after the target information layer is edited, the sharing operation of the second screenshot image is triggered by the fifth input to the second screenshot image, so that the user can keep it as a souvenir or share it with others.
[0093] In one embodiment of the present application, Fig.13 As shown, the screenshot image processing device 1300 includes: an identification module 1302, the identification module 1302 is used to perform contour recognition on each piece of information in the first screenshot image, and determine the bounding box of each piece of information; a processing module 1304, the processing module 1304 is used to process the first screenshot image according to the bounding box of each piece of information, and obtain the layer of each piece of information; a receiving module 1306, is used to receive a first input of a target information layer in the layer of each piece of information; and an editing module 1308, the editing module 1308 is used to edit the target information layer in response to the first input to generate a second screenshot image.
[0094] In this embodiment, when the user needs to edit the target information in the first screenshot image, an editable layer of each piece of information can be formed through identification and cutting. By editing the target information layer, the functions of deleting, copying, adjusting the order, etc. of at least one piece of target information are realized. After the editing is completed, all layers and the first screenshot image are merged to obtain the edited second screenshot image. On the one hand, it is not necessary to delete the original information published on the platform, and more important and high-quality information can be retained on the screenshot image. On the other hand, the user can perform independent editing operations on each information layer, that is, use different editing methods to process different information layers, which not only reduces the complexity and difficulty of screenshots, reduces the possibility of misoperation, but also overcomes the limitations of the information editing function, ensures the presentation effect of the second screenshot image, and meets the user's needs for the second screenshot image.
[0095] Optionally, the first screenshot image includes the published content and multiple comment information related to the published content, and the receiving module 1306 is also used to receive a second input of the published content; the screenshot image processing device 1300 also includes: a determination module (not shown in the figure), the determination module is used to determine the area where the published content and the multiple comment information are located as the screenshot area in response to the second input; the screenshot module (not shown in the figure), the screenshot module is used to take a screenshot of the interface according to the screenshot area to generate a first screenshot image.
[0096] Optionally, the screenshot image processing device 1300 further includes: a noise adding module (not shown in the figure), which is used to add image noise to the first text information when there is first text information matching the first preset text in the multiple comment information.
[0097] Optionally, the screenshot image processing device 1300 also includes: a prompt module (not shown in the figure), which is used to output prompt information when there are multiple comment information and second text information matching the second preset text, and the prompt information is used to prompt editing of the second text information.
[0098] Optionally, the editing module 1308 is further used to copy the target information layer; and / or delete the target information layer; and / or move the position of the target information layer in the first screenshot image; and / or adjust the size of the target information layer.
[0099] Optionally, the screenshot image processing device 1300 also includes: an error correction module (not shown in the figure), which is used to perform error correction processing on multiple comment information, determine typos in the multiple comment information and target texts corresponding to the typos; and replace the typos with the target texts.
[0100] Optionally, the receiving module 1306 is further used to receive a fourth input to the electronic device; the editing module 1308 is further used to perform a first processing operation on the edited target information layer in response to the fourth input; wherein the first processing operation includes an undo operation or a restore operation.
[0101] Optionally, the receiving module 1306 is also used to receive a fifth input to the electronic device; the screenshot image processing device 1300 also includes: a transmission module (not shown in the figure), which is used to respond to the fifth input and send the second screenshot image corresponding to the fifth input to the target location.
[0102] In this embodiment, each module of the screenshot image processing device 1300 implements the steps of the screenshot image processing method in any embodiment of the first aspect when performing its respective functions. Therefore, the screenshot image processing device 1300 also includes all the beneficial effects of the screenshot image processing method in any embodiment of the first aspect, which will not be repeated here.
[0103] The processing device of the screenshot image in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV) or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0104] The screenshot image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other operating systems, which are not specifically limited in the embodiment of the present application.
[0105] In one embodiment of the present application, the present application embodiment provides an electronic device, including the second aspect embodiment provides a screenshot image processing device. Therefore, the electronic device includes all the beneficial effects of the screenshot image processing device provided in any of the above embodiments, which will not be repeated here.
[0106] In one embodiment of the present application, Fig.14 As shown, an electronic device 1400 is provided, including: a processor 1404, a memory 1402, and a program or instruction stored in the memory 1402 and running on the processor 1404, and when the program or instruction is executed by the processor 1404, the steps of the screenshot image processing method provided in any of the above embodiments are implemented. Therefore, the electronic device 1400 includes all the beneficial effects of the screenshot image processing method provided in any of the above embodiments, which will not be repeated here.
[0107] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0108] Fig.15The hardware structure diagram of an electronic device 1500 for implementing an embodiment of the present application is shown. The electronic device 1500 includes, but is not limited to, components such as a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, and a processor 1510.
[0109] Those skilled in the art will appreciate that the electronic device 1500 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.15 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0110] Among them, the processor 1510 is used to perform contour recognition on each piece of information in the first screenshot image to determine the bounding box of each piece of information; the first screenshot image is processed according to the bounding box of each piece of information to obtain the layer of each piece of information; the user input unit 1507 is used to receive a first input for a target information layer in the layer of each piece of information; the processor 1510 is also used to edit the target information layer in response to the first input to generate a second screenshot image.
[0111] In this embodiment, when the user needs to edit the target information in the first screenshot image, an editable layer of each piece of information can be formed through identification and cutting. By editing the target information layer, the functions of deleting, copying, adjusting the order, etc. of at least one piece of target information are realized. After the editing is completed, all layers and the first screenshot image are merged to obtain the edited second screenshot image. On the one hand, it is not necessary to delete the original information published on the platform, and more important and high-quality information can be retained on the screenshot image. On the other hand, the user can perform independent editing operations on each information layer, that is, use different editing methods to process different information layers, which not only reduces the complexity and difficulty of screenshots, reduces the possibility of misoperation, but also overcomes the limitations of the information editing function, ensures the presentation effect of the second screenshot image, and meets the user's needs for the second screenshot image.
[0112] Furthermore, the first screenshot image includes the published content and multiple comment information related to the published content, and the user input unit 1507 is also used to receive a second input on the published content; the processor 1510 is also used to determine the area where the published content and the multiple comment information are located as the screenshot area in response to the second input; take a screenshot of the interface according to the screenshot area to generate a first screenshot image.
[0113] Furthermore, the processor 1510 is further configured to add image noise to the first text information when there is first text information matching the first preset text among the plurality of comment information.
[0114] Furthermore, the processor 1510 is further configured to output prompt information when there is second text information matching the second preset text in the plurality of comment information, where the prompt information is used to prompt the user to edit the second text information.
[0115] Furthermore, the processor 1510 is further configured to copy the target information layer; and / or delete the target information layer; and / or move the position of the target information layer in the first screenshot image; and / or adjust the size of the target information layer.
[0116] Furthermore, the processor 1510 is also used to perform error correction processing on the multiple comment information, determine the typos in the multiple comment information and the target texts corresponding to the typos; and replace the typos with the target texts.
[0117] Furthermore, the user input unit 1507 is also used to receive a fourth input to the electronic device; the processor 1510 is also used to perform a first processing operation on the edited target information layer in response to the fourth input; wherein the first processing operation includes an undo operation or a restore operation.
[0118] Furthermore, the user input unit 1507 is further configured to receive a fifth input to the electronic device; and the radio frequency unit 1501 is configured to respond to the fifth input and send a second screenshot image corresponding to the fifth input to a target location.
[0119] It should be understood that in the embodiment of the present application, the input unit 1504 may include a graphics processor (Graphics Processing Unit, GPU) 1541 and a microphone 1542, and the graphics processor 1541 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1506 may include a display panel 1561, and the display panel 1561 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1507 includes a touch panel 1571 and other input devices 1572. The touch panel 1571 is also called a touch screen. The touch panel 1571 may include two parts: a touch detection device and a touch controller. Other input devices 1572 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 1509 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 1510 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1510.
[0120] In one embodiment of the present application, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the screenshot image processing method provided in any of the above embodiments are implemented.
[0121] In this embodiment, reading the storage medium can implement each process of the screenshot image processing method provided in the embodiment of the present application, and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0122] The processor is the processor in the communication device in the above embodiment. The read storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0123] An embodiment of the present application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned screenshot image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0124] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc.
[0125] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0127] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for processing a screenshot image, characterized in that: include: Performing contour recognition on each piece of information in the first screenshot image to determine a bounding box for each piece of information; Processing the first screenshot image according to the bounding box of each piece of information to obtain a layer of each piece of information; Receiving a first input of a target information layer in the layers of each piece of information; In response to the first input, editing the target information layer to generate a second screenshot image; The first screenshot image includes published content and a plurality of comment information related to the published content, and the method for processing the screenshot image further includes: In the case where there is first text information matching the first preset text in the plurality of comment information, adding image noise to the first text information; If there is second text information matching the second preset text in the plurality of comment information, outputting prompt information, the prompt information being used to prompt editing of the second text information; Correction processing is performed on the multiple comment information, wrong characters in the multiple comment information and target characters corresponding to the wrong characters are determined, and the wrong characters are replaced with the target characters.
2. The method for processing screenshot images according to claim 1, characterized in that: The screenshot image processing method further includes: receiving a second input of the published content; In response to the second input, determining the area where the published content and the plurality of comment information are located as a screenshot area; A screenshot of the interface is taken according to the screenshot area to generate the first screenshot image.
3. The method for processing screenshot images according to claim 1 or 2, characterized in that: The editing of the target information layer includes: copying the target information layer; and / or Deleting the target information layer; and / or Moving the position of the target information layer in the first screenshot image; and / or Adjust the size of the target information layer.
4. A screenshot image processing device, characterized in that: include: A recognition module, used to perform contour recognition on each piece of information in the first screenshot image, and determine an outer bounding box of each piece of information; A processing module, configured to process the first screenshot image according to the external frame of each piece of information to obtain a layer of each piece of information; A receiving module, used for receiving a first input of a target information layer in the layer of each piece of information; An editing module, configured to edit the target information layer in response to the first input to generate a second screenshot image; The first screenshot image includes the published content and a plurality of comment information related to the published content, and the screenshot image processing device further includes: a noise adding module, configured to add image noise to the first text information if there is first text information matching the first preset text among the plurality of comment information; A prompt module, configured to output prompt information when the plurality of comment information contains second text information matching the second preset text, wherein the prompt information is used to prompt the user to edit the second text information; Correction processing is performed on the multiple comment information, wrong characters in the multiple comment information and target characters corresponding to the wrong characters are determined, and the wrong characters are replaced with the target characters.
5. The screenshot image processing device according to claim 4, characterized in that: The receiving module is further configured to receive a second input of the published content; the screenshot image processing device further comprises: a determination module, configured to determine, in response to the second input, an area where the published content and the plurality of comment information are located as a screenshot area; The screenshot module is used to take a screenshot of the interface according to the screenshot area to generate the first screenshot image.
6. The screenshot image processing device according to claim 4 or 5, characterized in that: The editing module is further used to copy the target information layer; and / or Deleting the target information layer; and / or Moving the position of the target information layer in the first screenshot image; and / or Adjust the size of the target information layer.
7. An electronic device, characterized in that: The invention comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for processing screenshot images as described in any one of claims 1 to 3.