Picture processing method and device, equipment and medium
By automatically recognizing and blurring images after taking a screenshot, the problem of tedious manual selection of areas by users is solved, resulting in a more efficient image processing workflow.
Patent Information
- Application Number
- CN202511115440.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-11-25
AI Technical Summary
Manually selecting the areas that need to be blurred in a screenshot is cumbersome and inefficient, especially when multiple areas are intertwined.
By responding to user actions, the system automatically identifies and blurs target areas in screenshots, generating new images that cover the blurred marks, reducing the need for manual selection by the user.
It improves the efficiency of code-breaking processing, simplifies user operations, reduces the frequency of manual selection, and enhances the convenience and accuracy of processing.
Smart Images

Figure CN121010519A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to an image processing method, an image processing apparatus, an electronic device, and a computer-readable storage medium. Background Technology
[0002] Users may need to take screenshots while using the software system. For example, when a user wants to quickly record the content of a page, they can take a screenshot and share the image.
[0003] In practical applications, users may need to further process screenshots, such as redacting certain information within the image. Typically, users need to manually select the areas to be redacted, which is cumbersome and inefficient. Summary of the Invention
[0004] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] At least one embodiment of this disclosure provides an image processing method, including: in response to a first operation triggered on a first page, presenting a first image associated with the first operation, wherein the first operation is used to take a screenshot of at least a portion of the first page; in response to a second operation on the first image, presenting a second image associated with the second operation, wherein the second operation is used to trigger the identification of a target region of the first image and to perform a masking process on the target region, wherein a blurred mark is covered at the position corresponding to the target region in the second image.
[0006] At least another embodiment of this disclosure provides an image processing apparatus, comprising: a first presentation module configured to: in response to a first operation triggered on a first page, present a first image associated with the first operation, wherein the first operation is used to take a screenshot of at least a portion of the first page; and a second presentation module configured to: in response to a second operation on the first image, present a second image associated with the second operation, wherein the second operation is used to trigger the identification of a target region of the first image and to perform a masking process on the target region, wherein a blurred mark is covered at the position corresponding to the target region in the second image.
[0007] At least one further embodiment of this disclosure provides an electronic device, including: a processing device; and a storage device including one or more computer program instructions; wherein the one or more computer program instructions are executed by the processing device to perform the image processing method provided in at least one embodiment of this disclosure.
[0008] At least one further embodiment of this disclosure provides a computer-readable storage medium that non-transitory stores computer-readable instructions, wherein the image processing method provided in at least one embodiment of this disclosure is implemented when the computer-readable instructions are executed by a processor.
[0009] At least one embodiment of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the image processing method provided in at least one embodiment of this disclosure. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0011] Figure 1 This illustration schematically depicts an application scenario of an image processing system provided by at least one embodiment of the present disclosure;
[0012] Figure 2 The illustration shows a flowchart of an image processing method provided in at least one embodiment of the present disclosure;
[0013] Figure 3 This illustration schematically shows a flowchart of identifying a target region provided by at least one embodiment of the present disclosure;
[0014] Figures 4A to 4G The illustration shows a schematic diagram of a first page provided in at least one embodiment of the present disclosure;
[0015] Figure 5 The schematic diagram illustrates the structure of the image processing apparatus in at least one embodiment of the present disclosure; and
[0016] Figure 6 A schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0017] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0018] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0019] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0021] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0022] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0023] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0024] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, relevant users should be informed of the type, scope of use, and usage scenarios of the information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and authorization should be obtained from the relevant users. Among them, relevant users may include any type of rights holder, such as individuals, enterprises, and groups.
[0025] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly inform the user that the requested operation will require obtaining and using the user's information, thereby enabling the relevant user to choose whether to provide information to the software or hardware such as the electronic device, application, server, or storage medium that performs the operation of the technical solution disclosed herein based on the prompt message.
[0026] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, such as a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide information to the electronic device.
[0027] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0028] Users may need to take screenshots while using the software system. Taking a screenshot can be understood as the process of converting visual information on the display screen into a static image. For example, when a user is browsing a page and wants to quickly record its content, they can take a screenshot to create an image that includes the page content.
[0029] In practical applications, users may need to further process the screenshots. For example, when the page content contains certain target information (such as names, phone numbers, etc.), the target information in the screenshot can be blurred to prevent the leakage of the target information.
[0030] Normally, users can manually select the areas that need to be blurred in a screenshot. However, when there are multiple areas that need to be blurred in a screenshot, and these areas are intertwined with areas that do not need to be blurred, users need to make multiple selections in the screenshot, which is cumbersome and inefficient.
[0031] To address at least some of the aforementioned technical problems, at least one embodiment of this disclosure provides an image processing method, comprising: in response to a first operation triggered on a first page, presenting a first image associated with the first operation, wherein the first operation is used to take a screenshot of at least a portion of the first page; then, in response to a second operation on the first image, presenting a second image associated with the second operation, wherein the second operation is used to trigger the identification of a target area of the first image and to perform a masking process on the target area, wherein a blurred mark is covered at the position corresponding to the target area in the second image.
[0032] Based on the image processing method provided in at least one embodiment of this disclosure, at least one embodiment of this disclosure also provides an image processing apparatus, an electronic device, and a computer-readable storage medium.
[0033] This disclosure provides at least one embodiment of an image processing method that, in response to a first operation (i.e., a screenshot operation) triggered by a user on a first page, presents a first image after the screenshot. In this case, by triggering a second operation on the first image, the method automatically identifies the areas in the first image that need to be blurred and performs automatic blurring, presenting a second image with blurred text to the user. Thus, by providing an automatic blurring function after a screenshot, the user is not required to manually select the areas to be blurred, reducing the frequency of user operations and improving the efficiency of blurring.
[0034] The embodiments and some examples of this disclosure will now be described in detail with reference to the accompanying drawings.
[0035] Figure 1 The illustration shows an application scenario of an image processing system provided by at least one embodiment of the present disclosure.
[0036] like Figure 1 As shown, the application scenario of this embodiment includes user 101 and terminal device 102. User 101 can be a user who needs to take screenshots and then de-mask the screenshots. Terminal device 102 can be any electronic device that can provide a page for the user to use and operate, such as a mobile phone, tablet computer, portable computer, desktop computer, smart wearable device, smart home appliance, or smart vehicle terminal, etc. The embodiments disclosed herein do not limit this.
[0037] In embodiments of this disclosure, terminal device 102 can provide a first page, which user 101 can browse. Specifically, user 101 can trigger a first operation on the first page, which can be used to take a screenshot of at least a portion of the first page. In response to the first operation, terminal device 102 can display a first image 103 associated with the first operation, i.e., the first image 103 can be understood as the screenshot image.
[0038] User 101 can also trigger a second operation on the first image. This second operation can be used to trigger the recognition of the target area of the first image and to perform a masking process on the target area. In other words, the second operation can be understood as an operation of automatic masking.
[0039] In the embodiments of this disclosure, in response to the second operation, the image processing system 104 can process the first image 103 to form a second image 105. The position corresponding to the target area in the second image 105 is covered with a blurred mark. That is, the second image 105 can be understood as an image after automatic blurring of the screenshot.
[0040] It should be noted that the embodiments disclosed herein do not limit the form of the image processing system 104. In some embodiments, the image processing system 104 may be a system used only for decryption processing; for example, the image processing system 104 may be a plugin, cloud service, or other tool for decryption processing.
[0041] In other embodiments, the image processing system 104 may also be a system for taking screenshots and further processing the screenshot images. That is, the image processing system 104 may provide screenshot functions, decryption functions, and other processing (such as text extraction, highlighting, etc.) of the screenshot images.
[0042] In some other embodiments, the image processing system 104 may also be integrated into other software systems. For example, the image processing system 104 may be integrated into the software system that provides the first page as a functional module of the software system, providing a decryption function, or providing a screenshot function and a function to further process the screenshot image.
[0043] The following will combine Figure 2 and Figure 3 The image processing method provided in at least one embodiment of this disclosure will be described in detail.
[0044] Figure 2 The illustration shows a flowchart of an image processing method provided in at least one embodiment of the present disclosure.
[0045] like Figure 2 As shown, the image processing method of this embodiment includes steps S201 and S202. In some embodiments, the executing entity of this image processing method can be an electronic device with a client deployed, an electronic device with a server deployed, or any electronic device that communicates between the client and the server; the embodiments of this disclosure do not limit this. Specifically, the image processing method includes:
[0046] Step S201: In response to the first operation triggered on the first page, present the first image associated with the first operation.
[0047] In the embodiments of this disclosure, the first page can be understood as the currently viewed page. While browsing the first page, the user may have a need to take screenshots of its content. For example, the first page can be an instant messaging page, a document page, a browser page, an email page, etc.
[0048] The first operation can be used to take a screenshot of at least a portion of the first page; in other words, the first operation can be understood as a screenshot operation. When a user needs to take a screenshot of the content of the first page, the first operation is triggered to take a screenshot of at least a portion of the first page.
[0049] The embodiments disclosed herein do not limit the manner in which the first operation is triggered. For example, the first page may provide a screenshot control; by triggering the screenshot control, at least a portion of the area on the first page to be screenshotted is selected, thus triggering the first operation. Alternatively, the first page may also support keyboard shortcut screenshots; by triggering the keyboard shortcut, at least a portion of the area on the first page to be screenshotted is selected, thus triggering the first operation.
[0050] The first image associated with the first operation can be understood as an image generated by triggering the first operation. In other words, the first image can be a screenshot generated after taking a screenshot of at least a part of the first page. The first image includes the page content of at least a part of the first page indicated by the first operation.
[0051] Step S202: In response to the second operation on the first image, present the second image associated with the second operation.
[0052] In embodiments of this disclosure, after taking a screenshot of at least a portion of the first page, automatic decryption processing is supported for the screenshot image (i.e., the first image).
[0053] Specifically, the second operation can be used to trigger the identification of a target region in the first image and to perform a masking process on the target region. The target region can be understood as the area that needs to be masked. In other words, the second operation can trigger an automatic masking process for the first image.
[0054] In the second image associated with the second operation, the area corresponding to the target region is covered with a blurred marker. This blurred marker can be understood as a marker used to blur the page content at the location corresponding to the target region; for example, it could be a mosaic. In other words, the second image can be understood as an image after the first image has been blurred. By triggering the second operation on the first image, the first image is automatically blurred, and the blurred second image is presented to the user.
[0055] The following describes how the second operation is triggered. In some possible implementations, a first control is presented in a first area associated with the first image, and in response to a trigger operation on the first control, a second image associated with the second operation is presented.
[0056] The first region associated with the first image can be understood as an area used for further processing of the captured image. For example, the first region may be located below the first image. Furthermore, the first region may provide at least one control that can be used to perform different types of further processing on the captured image. The at least one control may include a first control that can be used to automatically remove blurring from the first image.
[0057] Thus, by providing a first control in the first area, users can quickly and conveniently trigger automatic decryption of the first image by activating the first control.
[0058] In other possible implementations, the second operation can also be triggered in other ways. For example, by triggering a shortcut key for automatic code-breaking, or by voice input, or by conversing with a digital assistant.
[0059] Furthermore, in at least some embodiments, considering that the automatic captcha solving process may deviate from the user's actual captcha solving needs, the embodiments of this disclosure also support the user to manually modify the data after the automatic captcha solving process.
[0060] For example, receiving a selection operation for a second region in a second image, in response to the location corresponding to the second region being covered by a blurry mark, removing the blurry mark covering the location corresponding to the second region in the second image; and / or, in response to the location corresponding to the second region not being covered by a blurry mark, covering the location corresponding to the second region in the second image with a blurry mark.
[0061] For example, the second region can be understood as the area in the second image that the user selects and needs to manually modify. For instance, a user can click on an object in the second image (such as an image or a word), and the area containing that object will be designated as the second region. Or, a user can select a region in the second image by drawing a box; the selected area will then be designated as the second region.
[0062] Regarding the selection operation on the second region in the second image, the system determines whether the second region was masked during the automatic masking process and then performs the corresponding modification operation. If the location corresponding to the second region is covered by a blurry mark (i.e., the second region was masked during the automatic masking process), the blurry mark is removed, and the original information of the second region is displayed in the second image. If the location corresponding to the second region is not covered by a blurry mark (i.e., the second region was not masked during the automatic masking process), a blurry mark is added to the location of the second region, and the blurry mark is displayed in the second image.
[0063] Thus, after automatic decryption, users can perform fine-grained modifications on the second image through simple and convenient area selection. Furthermore, it supports two processing logics: "from nothing to something" and "from something to nothing" for fuzzy marking, making it easy for users to quickly make manual modifications based on the automatically decrypted image.
[0064] The embodiments of this disclosure do not limit the implementation of "removing the blur mark in the second region" or "covering the blur mark in the second region". In some embodiments, the bounding box of the target region and the bounding box of the second region are calculated. For the portion where the bounding box of the target region intersects with the bounding box of the second region, the operation of removing the blur mark is performed. For the portion of the bounding box of the second region that does not intersect with the bounding box of any target region, the operation of covering the blur mark is performed.
[0065] Furthermore, users can also adjust the attributes of the blurred markers covered by the second image. For example, users can adjust the size, position, blur intensity, and style of the blurred markers.
[0066] Figure 3 The illustration shows a flowchart of identifying a target region provided by at least one embodiment of the present disclosure.
[0067] As mentioned above, in the embodiments of this disclosure, the target area in the first image is identified and then masked to achieve automatic masking. Therefore, accurately identifying the target area in the first image that needs to be masked is particularly important. The following is a combination of... Figure 3 The process of identifying the target region is introduced.
[0068] like Figure 3 As shown, the process of identifying the target region in this embodiment includes steps S301 and S302, which are described in detail below:
[0069] Step S301: Perform image feature recognition on the first image to determine the first candidate region, and perform text feature recognition on the first image to determine the second candidate region.
[0070] In the embodiments of this disclosure, two-dimensional feature recognition is performed on the screenshotted image (i.e., the first image): In the first dimension, image feature recognition is performed on the first image, that is, by using the image features of the first image (such as brightness changes, color changes, etc.), the first candidate region in the first image that may need to be masked is identified; In the second dimension, text feature recognition is performed on the first image, that is, by using the text features of the first image (such as the included text, numbers, etc.), the second candidate region in the first image that may need to be masked is identified.
[0071] In this way, the first image is comprehensively identified from two different dimensions: image features and text features. This avoids missing candidate areas in the first image that may need to be masked, thus improving the accuracy of automatic masking processing.
[0072] The embodiments of this disclosure do not limit the executing entity for performing the above-described "image feature recognition of the first image to determine the first candidate region" and "text feature recognition of the first image to determine the second candidate region". In some possible implementations, the above-described "image feature recognition of the first image to determine the first candidate region" and "text feature recognition of the first image to determine the second candidate region" can both be executed locally (e.g., on a terminal device), or the above-described "image feature recognition of the first image to determine the first candidate region" and "text feature recognition of the first image to determine the second candidate region" can both be executed on the server side.
[0073] In other possible implementations, to balance user experience and resource consumption, the process of "performing image feature recognition on the first image to determine the first candidate region" can be executed locally, while the process of "performing text feature recognition on the first image to determine the second candidate region" can be executed on the server. This allows the less resource-intensive image feature recognition process to be completed locally, improving recognition speed, while the more resource-intensive text feature recognition process is completed on the server, reducing local resource consumption and preventing excessively long recognition times from impacting user experience.
[0074] The following is a non-limiting example of the specific implementation process for determining the first candidate region and the second candidate region.
[0075] In some embodiments, a first candidate region is determined through edge extraction, region growing, and feature verification. Edge extraction can be used to extract the edges of the region; for example, existing edge extraction algorithms can be used to extract edges from a first image. Region growing can be used to adjust the edges of the region; for example, existing region growing algorithms can be used to grow the edges of the region. Feature verification can be used to determine whether the filled region composed of the adjusted region edges meets the recognition requirements. For example, when the recognition requirement is "recognizing a circular region of a set size," it is determined whether the filled region composed of the adjusted region edges is a circular region of a set size, and whether to include the filled region composed of the adjusted region edges as the first candidate region.
[0076] In other embodiments, optical character recognition (OCR) technology is used to determine the second candidate region. Specifically, the text content included in the first image is extracted, and the text content is recognized according to the set target information recognition rules. The region containing the text content that satisfies the target information recognition rules is determined as the second candidate region.
[0077] In other words, by performing OCR recognition on the first image, the text content in the first image is extracted, such as text content and number content. Then, based on the set target information recognition rules, the target information in the text content is recognized, and the area where the target information is located is determined as the second candidate area.
[0078] The aforementioned target information recognition rules can be used to identify target information that needs to be decrypted. For example, target information can be mobile phone numbers, email addresses, names, etc. By matching the text content with the target information recognition rules, if the target information recognition rules are met, it indicates that the text content is target information and needs to be decrypted.
[0079] In this way, by using OCR technology and target information recognition, the target information that may exist in the screenshot (i.e., the first image) can be identified so that the target information can be masked in subsequent processing.
[0080] Furthermore, considering that the first image may have different proportions, it is difficult to achieve uniform processing for first images with different proportions. Therefore, before performing image feature recognition on the first image to determine the first candidate region, and before performing text feature recognition on the first image to determine the second candidate region, the first image can be adjusted from the first proportion to a set proportion, which can be understood as the original proportion of the first image.
[0081] In this way, by adjusting the first image to a set ratio, candidate regions are identified for first images with the same set ratio, avoiding the problem of inaccurate candidate region identification due to different ratios, improving the accuracy of candidate region identification, and further improving the accuracy of automatic decryption processing.
[0082] After performing image feature recognition on the first image to determine the first candidate region, and performing text feature recognition on the first image to determine the second candidate region, the first image can be adjusted from a set ratio to a first ratio.
[0083] In other words, after the candidate region is identified at a set ratio, the first image is adjusted to its original ratio so that the second image can be presented to the user at the original ratio in the subsequent process, thus avoiding affecting the user experience.
[0084] Step S302: Determine the target region from the first candidate region and the second candidate region.
[0085] In the embodiments of this disclosure, the target area can be understood as the area that needs to be decoded. That is, by directly performing image feature recognition on the first image and performing text feature recognition on the text content extracted from the first image, a first candidate area and a second candidate area that may have decoded processing requirements are obtained. Further screening is performed on the areas that may have decoded processing requirements to determine the area that needs to be decoded.
[0086] In some possible implementations, since there can be multiple first candidate regions and multiple second candidate regions, there may be overlapping parts between different first candidate regions and different second candidate regions. In order to improve the recognition efficiency of the target region, the first candidate regions and the second candidate regions can be sorted and combined to form a third candidate region. This third candidate region can be understood as the region that may have the need for masking processing.
[0087] For example, first, the bounding boxes of the first candidate region and the second candidate region are determined. Then, based on the overlap between the bounding boxes of the first and second candidate regions, the first and second candidate regions are merged to obtain the third candidate region, and the target region is determined in the third candidate region.
[0088] A bounding box can be understood as a geometric object used to approximate a first or second candidate region. The bounding box is typically larger than the area of the first or second candidate region, and it can be a simple geometric shape. By determining the bounding boxes of the first and second candidate regions, the overlap between them can be quickly determined using simple geometric objects, allowing for the merging of the first and second candidate regions.
[0089] For example, for the first and second candidate regions whose overlap relationship indicates that the degree of overlap is higher than the overlap threshold, the candidate region with the smaller area is deleted. Alternatively, for the first and second candidate regions whose overlap relationship indicates that there is an overlapping part, the two candidate regions are merged into one candidate region, thus reducing memory usage.
[0090] The embodiments of this disclosure do not limit the method of determining the bounding box. For example, the bounding box of the first candidate region and the bounding box of the second candidate region can be determined by a quadtree algorithm.
[0091] Considering that the third candidate region may include the first and / or second candidate regions, the target region can be determined based on the type of the third candidate region. For example, since the second candidate region is determined based on text feature recognition, the text content included in the second candidate region can match the target information recognition rules, that is, the second candidate region may include target information. Therefore, the portion of the third candidate region that is of the type of the second candidate region can be determined as the target region, so that the target information within it can be decrypted. As another example, since the first candidate region is determined based on image feature recognition, the first candidate region may include images that need to be decrypted, or images similar to images that need to be decrypted but do not require decryption. Therefore, the portion of the third candidate region that is of the type of the first candidate region can be further filtered to identify images that need to be decrypted, so that targeted decryption can be performed on those images.
[0092] Based on the above description, by performing two-dimensional recognition on the first image, the candidate regions in the first image are fully identified. By merging the candidate regions obtained from the two-dimensional recognition, memory usage is reduced, and the automatic decryption process is executed more quickly. By further filtering the merged third candidate regions, the target regions that need to be decrypted are finally determined, thereby improving the accuracy and targeting of the automatic decryption process.
[0093] In the embodiments of this disclosure, considering that screenshots are often involved in instant messaging, and that there are often multiple, scattered areas in instant messaging messages that need to be masked, the above image processing method can also be applied to the instant messaging process. That is, the first page can be an instant messaging page, and the first image can be an image after at least a portion of the instant messaging page has been screenshotted.
[0094] In this case, the first candidate region may include at least one of the following: the region where the user's avatar is located in the first image, the region where the emoji reply content is located in the first image, the text region in the first image, and the image region in the first image.
[0095] The area where a user's avatar is located can be understood as the area in the first image where the user's avatar is displayed. For example, it could be the area where the current user's avatar is located, the area where the avatar of a user who is in instant messaging with the current user is located, the area where the avatars of other users in the current user's message list are located, or the area where the avatars of users in other locations on the instant messaging page are located.
[0096] Emoji replies can be sent in the form of emojis to respond to instant messaging messages. For example, for a specific instant messaging message, a user can select an emoji to reply to that message. After replying, the emoji will be displayed below the instant messaging message, and the user's identifier (such as username) will also be displayed next to the emoji.
[0097] The text area can be understood as the area in the first image where text is displayed. For example, the text area in an instant messaging message, the text area in a message list, the text area of various controls on an instant messaging page, the text area of a user's signature, etc.
[0098] An image region can be understood as the area in the first image where the image is displayed, such as the area where an image is sent in an instant messaging message.
[0099] Thus, in the process of automatic decryption processing in instant messaging, image feature recognition is used to identify the first candidate regions with a variety of types that may have decryption processing needs from the first image, avoiding omissions.
[0100] The following section describes the specific identification process for different types of first candidate regions.
[0101] For example, the first candidate region may include the region where the emoticon reply content is located in the first image. The region where the emoticon reply content is located can be identified in the following way: First, perform edge extraction on the first image to determine the first edge and the second edge in the horizontal direction. Then, perform region growing on the first edge and the second edge to determine the updated first edge, the updated second edge, and the two arc edges used to connect the first edge and the second edge. Then, perform region filling on the updated first edge, the updated second edge, and the two arc edges used to connect the first edge and the second edge to obtain candidate filling regions. The candidate filling regions that meet the set shape conditions are determined as the region where the emoticon reply content is located.
[0102] In other words, the process of identifying the region containing the emoji reply can be broadly divided into three steps: edge extraction, region growing, and feature verification. Considering that the region containing the emoji reply is usually composed of two horizontal line segments (top and bottom) and two arcs (left and right), the first and second horizontal edges are determined first in the edge extraction process, i.e., the top and bottom edge lines of the region containing the emoji reply.
[0103] It should be noted that, in the embodiments disclosed herein, the horizontal direction can be understood as the direction that is horizontal to the length direction (i.e., the x-direction) of the first page.
[0104] In some possible implementations, during the edge extraction step, the first image can first be converted to a grayscale image. The ratio of bright to dark colors in the grayscale image is then statistically analyzed. Based on this ratio, the hue of the first image is determined to be either bright or dark. For example, if the ratio is greater than 0.6, the image is considered bright; otherwise, it is considered dark. By determining the hue of the first image, the corresponding threshold values for the recognition parameters are used during edge extraction, making the edge extraction process more closely match the attributes of the first image. Next, the gradients (e.g., Soble gradients) of each pixel in the first image in the x and y directions are calculated, and these gradients are converted to polar coordinates between 0 and 255 for standardized processing. Then, pixels in the first image whose x-axis gradient is close to 0 and whose y-axis gradient satisfies the aforementioned threshold values for the hue are identified as the first and second edges in the horizontal direction.
[0105] After edge extraction is completed, region growing is performed. In some embodiments, region growing may include two stages. Specifically, horizontal region growing is performed on the first edge and the second edge to determine the updated first edge and the updated second edge; neighborhood growing is performed on the updated first edge and the updated second edge to determine two arc edges for connecting the first edge and the second edge.
[0106] In other words, during the first stage of growth, the horizontal edge lines are grown. In this embodiment, considering that instant messaging pages often have watermarks, such as watermarks used to represent user identifiers, watermarks may also exist in the screenshot image (i.e., the first image). Watermarks may cause the first and second edges to have broken lines in the horizontal direction. Therefore, by growing the region in the horizontal direction, the first and second edges are updated to ensure the horizontal connectivity of the first and second edges.
[0107] The embodiments of this disclosure do not limit the implementation method of horizontal region growth. For example, any region growth algorithm can be used to perform horizontal region growth on the first edge and the second edge to obtain the updated first edge and the updated second edge.
[0108] In the second stage of growth, growth begins from the updated first and second edge lines to obtain two arc edges used to connect the updated first and second edges. Since the second stage of growth is not limited to the horizontal direction, neighborhood growth (e.g., 8-neighborhood growth) can be performed.
[0109] For example, firstly, a seed point is selected from the updated first edge and the updated second edge, and the seed point is used as the current point for neighborhood growth. Then, the following steps are executed in a loop: the angle value and amplitude change value between the current point and the first point in the neighborhood of the current point are determined, the first point whose angle meets the set angle condition and whose amplitude change value meets the set amplitude condition is marked as the second point, and any second point is used as the current point, where the first point is any point in the neighborhood of the current point. Finally, based on the marked second point, two arc edges are determined to connect the first edge and the second edge.
[0110] In other words, the second stage of growth involves multiple iterations of growth. In the first neighborhood growth, a point between the updated first edge and the updated second edge is used as a seed point, and this seed point is used as the current point for the first neighborhood growth to begin.
[0111] The shape of the area where the emoji reply content is located is usually fixed, and the angles of the two arcs on the left and right sides of the area where the emoji reply content is located usually meet the set angle conditions. Therefore, in the embodiments of this disclosure, in each neighborhood growth, in addition to judging whether the amplitude change value between the current point and each point in the current point's neighborhood meets the set amplitude conditions, it is also judged whether the angle value between the current point and each point in the current point's neighborhood meets the set angle conditions. Only when both the amplitude change value and the angle value meet the corresponding conditions is the first point marked as the second point, that is, indicating that the first point belongs to the two arcs on the left and right sides of the area where the emoji reply content is located, so as to avoid including irrelevant areas in the neighborhood growth process, reducing growth efficiency, and affecting the growth results.
[0112] After completing one neighborhood growth cycle, any second point marked in that neighborhood growth cycle is used as the current point for the next neighborhood growth cycle. The next neighborhood growth cycle is performed until all marked second points have been used as the current point for neighborhood growth. The cycle ends and the second stage of growth ends. In multiple neighborhood growth cycles, all marked second points form two arc edges that connect the first edge and the second edge.
[0113] In some embodiments, the endpoints of the updated first edge and the updated second edge can be determined as seed points.
[0114] In other words, in the first neighborhood growth, the endpoints of the updated first edge and / or the endpoints of the updated second edge are used as seed points to begin neighborhood growth. Compared to randomly selecting seed points on the updated first edge and / or the updated second edge, the above method of selecting seed points ensures that the growth starting point falls within the effective area, thus improving the efficiency of neighborhood growth.
[0115] After completing region growing, feature verification is performed. Similarly, considering that the shape of the region where the emoji reply content is located is usually fixed, region filling is performed on the updated first edge, the updated second edge, and the two arc edges used to connect the first edge and the second edge to obtain candidate filling regions. Then, the candidate filling regions are matched with the set shape conditions (e.g., the shape of the region where the emoji reply content is located). If the set shape conditions are met, it indicates that the candidate filling region is the region where the emoji reply content is located.
[0116] The first candidate region may include the region where the user's avatar is located in the first image. The region where the user's avatar is located can be identified as follows: First, calculate the gradient of each pixel in the first image; then, for any given pixel, compare the gradient difference between that pixel and its neighboring pixels. If the gradient difference is greater than a first threshold, the pixel is identified as an edge point of the region where the user's avatar is located; if the gradient difference is greater than a second threshold, the pixel is identified as a candidate point. For each candidate point in the first image, candidate points whose distance interval is less than a distance interval threshold are identified as edge points of the region where the user's avatar is located. The region formed by these edge points is the region where the user's avatar is located. The first threshold may be greater than the second threshold.
[0117] In the embodiments of this disclosure, a dual threshold is used to perform multi-scale analysis on the edge points of the area where the user avatar is located. For pixels with a gradient difference greater than the high threshold (i.e., the first threshold), since the change difference between this pixel and the surrounding pixels is significant, this pixel is directly identified as an edge point. For pixels with a gradient difference greater than the low threshold (i.e., the second threshold), although there is a change difference between this pixel and the surrounding pixels, the change difference is not significant enough. Considering that the overall color of the user avatar may be similar to the background color of the instant messaging page or the user avatar may be blurry, this pixel is considered as a candidate point. By subsequently judging whether the interval distance between candidate points is close and whether the candidate points can be connected, the candidate points that can be connected are identified as edge points.
[0118] Thus, by using dual-threshold region recognition, strong edge points are preserved while weak edge points are fully captured, preserving details while reducing noise. This method is suitable for detecting and recognizing user avatars of different colors and contrasts.
[0119] Furthermore, on some instant messaging pages, users can pin certain contacts to the top. After pinning, the contact will be displayed at the top of the message list on the instant messaging page, for example, displaying the contact's avatar and a user ID below the avatar.
[0120] In view of the above situation, the user identifier of the contact displayed at the top is often easily missed during the process of identifying the second candidate area. Therefore, in the embodiments of this disclosure, a set range area located below the area where the user's avatar is located can be determined as the third candidate area.
[0121] In other words, to avoid missing the user identifiers of the pinned contacts, after identifying the area where the user's avatar is located, the designated area below the area where the user's avatar is located is added to the third candidate area as an area that may require masking. This allows the designated area below the area where the user's avatar is located to be identified when determining the target area. If the designated area below the area where the user's avatar is located contains a user identifier, then the designated area below the area where the user's avatar is located is determined as the target area.
[0122] In embodiments of this disclosure, the target area may include at least one of the following: the area where the target information is located in the instant messaging message, the area where the user avatar is located, the area where the emoji reply content is located, a sub-area representing the user identifier, an area located below the area where the user avatar is located and representing the user identifier, and an area adjacent to the area where the user avatar is located and representing the user identifier or user signature.
[0123] In other words, the content that ultimately needs to be masked on the instant messaging page includes: target information in the instant messaging message (such as name, email address, identity information, etc.), user avatar, user identifier in emoji replies, user identifier of pinned contacts, user identifier next to the user avatar and / or user signature.
[0124] Thus, in addition to the target information and user avatar, the embodiments of this disclosure will also automatically redact user identifiers in emoji replies that are easily overlooked or forgotten, user identifiers of pinned contacts, user identifiers next to user avatars and / or user signatures, to ensure that the second image does not include page content that is not suitable for display.
[0125] In some embodiments, the third candidate region includes the region where the user's avatar is located and the text region. The region adjacent to the region where the user's avatar is located and representing the user's identifier or user signature is determined in the following manner: First, a first bounding box corresponding to the region where the user's avatar is located is determined, and a second bounding box corresponding to the text region is determined; then, in response to the positional relationship between the first bounding box and the second bounding box satisfying a set positional condition, the text region is determined as the region adjacent to the region where the user's avatar is located and representing the user's identifier or user signature.
[0126] In other words, considering that user icons or signatures may appear next to user avatars, there is usually a certain positional relationship between them, such as the user icon or signature being located next to the user avatar. Therefore, by determining the first bounding box corresponding to the area where the user avatar is located and the second bounding box corresponding to the text area, it is determined whether there is a situation where the positional relationship between the first bounding box and the second bounding box satisfies the set positional conditions. If so, it indicates that the text area is an area adjacent to the area where the user avatar is located and represents the user icon or signature, that is, the user icon or signature next to the user avatar.
[0127] The preceding text introduced the image processing methods provided in this publication. The following text will explain them in conjunction with specific page illustrations.
[0128] Figures 4A to 4G The illustration shows a schematic diagram of a first page provided in at least one embodiment of the present disclosure.
[0129] exist Figure 4A In this context, the first page 400 is an instant messaging page, comprising a message list area 401 and an instant messaging area 402. Specifically, the message list area 401 displays a list of messages from one-on-one or group chats between the current user (i.e., user A) and other users. For example, it displays one-on-one chats between user A and user B, group chat A, one-on-one chats between user A and user C, one-on-one chats between user A and user D, and group chat B. Furthermore, user A has pinned user C to the top, and pinned contact information 4011 is displayed at the top of the message list area 401. This pinned contact information 4011 includes user C's avatar and user identifier. The instant messaging area 402 displays the specific instant messaging messages from user A's one-on-one or group chats. For example, it displays the instant messaging messages from user A's one-on-one chat with user B. Additionally, the upper half of the instant messaging area 402 displays communication partner information 4021 (i.e., user B's related information), such as user B's avatar, user identifier, and user signature.
[0130] User A can trigger the first operation on page 400, taking a screenshot of at least a portion of page 400. For example... Figure 4BAs shown, user A can select the message list area 401 and the instant messaging area 402 in the first page 400, and take a screenshot of the area formed by the message list area 401 and the instant messaging area 402, displaying the first image 403 (in...). Figure 4B (Displayed with a black border). Meanwhile, to facilitate further processing of the first image 403 by user A, at least one control can be provided in the first area 404 associated with the first image 403. This control could include, for example, a control for selecting with a rectangle, a control for selecting with a circle, a control for adding line segments, a control for adding arrows, a control for adding text, a control for highlighting, a control for extracting text, a control for downloading the image, a control for canceling the screenshot, and a control for confirming the screenshot. In embodiments of this disclosure, the first area 404 also provides a first control 4041 for automatic code-breaking processing.
[0131] User A can trigger a second operation on the first image 403 by triggering the first control 4041. For example... Figure 4C As shown, in response to the second operation on the first image 403, a second image 405 is presented. In the second image 405, the position corresponding to the target area is covered with a blurry mark. For example, the user avatar, user ID, and contact information in the message list area are covered with a blurry mark, and the user avatar, user ID next to the user avatar, user signature, target information (including name, bank card number, email and mobile phone number), and user ID in the emoji reply content in the instant messaging area are covered with a blurry mark.
[0132] After the second image 405 is presented, user A is also allowed to manually adjust the second image 405. In some embodiments, such as Figure 4D As shown, user A selects the second region 4051 in the second image 405. Because the second region 4051 is covered by a blurred mark, therefore, Figure 4E As shown, the blurred mark covering position 4052 corresponding to the second region 4051 is removed, and the original information (i.e., 1234567890) is presented at position 4052 corresponding to the second region 4051 in the second image 405.
[0133] In other embodiments, such as Figure 4F As shown, user A selects the second region 4053 in the second image 405. Because the second region 4053 is covered by a blurred marker, therefore, Figure 4G As shown, a blurred mark is covered at position 4054 corresponding to the second region 4053, and a blurred mark appears at position 4054 corresponding to the second region 4053 in the second image 405.
[0134] Based on the image processing method provided in at least one embodiment of this disclosure, at least one embodiment of this disclosure also provides an image processing apparatus. The following will be combined with... Figure 5 The image processing device is described in detail.
[0135] Figure 5 The illustration shows a schematic diagram of the structure of an image processing apparatus provided in at least one embodiment of the present disclosure.
[0136] like Figure 5 As shown, the image processing apparatus 500 of this embodiment includes a first presentation module 501 and a second presentation module 502. For example, these units or modules can be implemented by hardware (e.g., circuit) modules or software modules, as is the case in the following embodiments, and will not be repeated here. For example, these units or modules can be implemented by a central processing unit (CPU), a general-purpose graphics processor (GPGPU), a graphics processing unit (GPU), a tensor processor (TPU), a field-programmable gate array (FPGA), or other forms of processing units with data processing capabilities and / or instruction execution capabilities, along with corresponding computer instructions.
[0137] The first presentation module 501 is configured to: in response to a first operation triggered on the first page, present a first image associated with the first operation, wherein the first operation is used to take a screenshot of at least a portion of the first page. For example, the first presentation module 501 can be configured to execute step S201 described above; its specific implementation principle can be found in the relevant description of step S201, and will not be repeated here.
[0138] The second presentation module 502 is configured to: in response to a second operation on the first image, present a second image associated with the second operation, wherein the second operation is used to trigger the identification of a target region in the first image and to perform a masking process on the target region, and the position in the second image corresponding to the target region is covered with a blurred mark. For example, the second presentation module 502 can be configured to execute step S202 described above; its specific implementation principle can be found in the relevant description of step S202, and will not be repeated here.
[0139] In at least one embodiment of this disclosure, the second presentation module 502 is further configured to: present a first control in a first area associated with the first image; and present a second image associated with the second operation in response to a trigger operation on the first control.
[0140] In at least one embodiment of this disclosure, the second presentation module 502 is further configured to: receive a selection operation for a second region in the second image; in response to a blurred marker covering the position corresponding to the second region, remove the blurred marker covering the position corresponding to the second region in the second image; and / or in response to a blurred marker not covering the position corresponding to the second region, cover the blurred marker at the position corresponding to the second region in the second image.
[0141] In at least one embodiment of this disclosure, the image processing apparatus 600 may further include a recognition module, which is configured to: perform image feature recognition on the first image to determine a first candidate region, and perform text feature recognition on the first image to determine a second candidate region; and determine a target region in the first candidate region and the second candidate region.
[0142] In at least one embodiment of this disclosure, the first page includes an instant messaging page, and the first candidate area includes at least one of the following: the area where the user's avatar is located in the first image; the area where the emoji reply content is located in the first image, wherein the emoji reply content is a reply to the instant messaging message in the form of an emoji; the text area in the first image; and the image area in the first image.
[0143] In at least one embodiment of this disclosure, the first candidate region includes the region where the emoji reply content is located in the first image. The recognition module is further configured to: extract edges from the first image to determine a first edge and a second edge in the horizontal direction; perform region growing on the first edge and the second edge to determine an updated first edge, an updated second edge, and two arc edges for connecting the first edge and the second edge; fill the updated first edge, the updated second edge, and the two arc edges for connecting the first edge and the second edge to obtain a candidate filled region; and determine the candidate filled region that meets the set shape conditions as the region where the emoji reply content is located.
[0144] In at least one embodiment of this disclosure, the identification module is further configured to: perform horizontal region growing on the first edge and the second edge to determine the updated first edge and the updated second edge; and perform neighborhood growing on the updated first edge and the updated second edge to determine two arc edges for connecting the first edge and the second edge.
[0145] In at least one embodiment of this disclosure, the identification module is further configured to: select a seed point from the updated first edge and the updated second edge, use the seed point as the current point, and perform neighborhood growth; cyclically execute the following steps: determine the angle value and amplitude change value between the current point and a first point in the neighborhood of the current point, mark the first point whose angle value satisfies a set angle condition and whose amplitude change value satisfies a set amplitude condition as a second point, and use any second point as the current point until all second points have been used as current points, wherein the first point is any point in the neighborhood of the current point; and determine two arc edges for connecting the first edge and the second edge based on the marked second points.
[0146] In at least one embodiment of this disclosure, the identification module is further configured to: determine the endpoints of the updated first edge and the endpoints of the updated second edge as seed points.
[0147] In at least one embodiment of this disclosure, the identification module is further configured to: determine the bounding box of the first candidate region and the bounding box of the second candidate region; merge the first candidate region and the second candidate region according to the overlap relationship between the bounding boxes of the first candidate region and the second candidate region to obtain a third candidate region; and determine the target region in the third candidate region.
[0148] In at least one embodiment of this disclosure, the first page includes an instant messaging page, the first candidate region includes the region where the user's avatar is located, and the recognition module is further configured to: determine a set range region located below the region where the user's avatar is located as a third candidate region.
[0149] In at least one embodiment of this disclosure, the recognition module is further configured to: extract text content included in the first image; recognize the text content according to a set target information recognition rule; and determine the region where the text content that satisfies the target information recognition rule is located as a second candidate region.
[0150] In at least one embodiment of this disclosure, the recognition module is further configured to: adjust the first image from a first ratio to a set ratio; and adjust the first image from the set ratio to the first ratio.
[0151] In at least one embodiment of this disclosure, the first page includes an instant messaging page, and the target area of the instant messaging page includes at least one of the following: the area where the target information in the instant messaging message is located; the area where the user avatar is located; the area where the emoji reply content is located, and a sub-area representing the user identifier; the area located below the area where the user avatar is located and representing the user identifier; and the area adjacent to the area where the user avatar is located and representing the user identifier or user signature.
[0152] In at least one embodiment of this disclosure, the third candidate region includes a region where the user's avatar is located and a text region. The recognition module is further configured to: determine a first bounding box corresponding to the region where the user's avatar is located, and determine a second bounding box corresponding to the text region; in response to the positional relationship between the first bounding box and the second bounding box satisfying a set positional condition, determine the text region as a region adjacent to the region where the user's avatar is located and representing a user identifier or user signature.
[0153] It should be noted that, for clarity and brevity, this disclosure does not show all the constituent units of the image processing apparatus 500. To achieve the necessary functions of the image processing apparatus 500, those skilled in the art can provide and set other constituent units (not shown) according to specific needs, and this disclosure does not impose any limitations on this.
[0154] At least one embodiment of this disclosure also provides an electronic device, including: a processing device; a storage device including one or more computer program modules; wherein the one or more computer program modules are stored in the storage device and configured to be executed by the processing device, and the one or more computer program modules are used to implement the image processing method provided in any embodiment of this disclosure.
[0155] For example, the processing device may be a central processing unit (CPU), digital signal processor (DSP), image processor (GPU), general-purpose graphics processor (GPGPU), or other form of processing unit with data processing capabilities and / or instruction execution capabilities. It may be a general-purpose processor or a dedicated processor and may control other components in the electronic device to perform the desired functions.
[0156] For example, the storage device may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and a processing device may execute these program instructions to implement the functions (implemented by the processing device) in the embodiments of this disclosure and / or other desired functions. Various application programs and various data may also be stored in the computer-readable storage medium, which is not limited in the embodiments of this disclosure.
[0157] The following is for reference. Figure 6 The diagram illustrates a structural schematic of an electronic device (e.g., a terminal device or a server) 600 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0158] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0159] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0160] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0161] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0162] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0163] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0164] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to a first operation triggered on a first page, present a first image associated with the first operation; and in response to a second operation on the first image, present a second image associated with the second operation.
[0165] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0166] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0167] The units or modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units or modules do not necessarily constitute a limitation on the unit or module itself.
[0168] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0169] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0170] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0171] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0172] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. An image processing method, comprising: In response to a first operation triggered on a first page, a first image associated with the first operation is presented, wherein the first operation is used to take a screenshot of at least a portion of the first page; In response to a second operation on the first image, a second image associated with the second operation is presented, wherein the second operation is used to trigger the identification of a target region in the first image and to perform a masking process on the target region, and the position in the second image corresponding to the target region is covered with a blurred mark.
2. The method according to claim 1, wherein, The step of presenting a second image associated with the second operation in response to the first image includes: In the first area associated with the first image, a first control is presented; In response to a triggering operation on the first control, a second image associated with the second operation is displayed.
3. The method according to claim 1, further comprising: Receive a selection operation for the second region in the second image; In response to the fact that the location corresponding to the second region is covered by a blurry mark, the blurry mark covering the location corresponding to the second region is removed in the second image; and / or In response to the fact that the location corresponding to the second region is not covered by the blur mark, the blur mark is covered in the second image at the location corresponding to the second region.
4. The method according to any one of claims 1 to 3, wherein, The target region of the first image is identified in the following way: The first image is subjected to image feature recognition to determine a first candidate region, and the first image is subjected to text feature recognition to determine a second candidate region; The target region is determined from the first candidate region and the second candidate region.
5. The method according to claim 4, wherein, The first page includes an instant messaging page, and the first candidate area includes at least one of the following: The area where the user's avatar is located in the first image; The area in the first image where the emoji reply content is located, wherein the emoji reply content is a reply to the instant messaging message in the form of an emoji; The text area in the first image; and The image region in the first image.
6. The method according to claim 5, wherein, The first candidate region includes the region where the emoji reply content is located in the first image, and the region where the emoji reply content is located is identified in the following way: Edge extraction is performed on the first image to determine the first and second edges in the horizontal direction; Region growing is performed on the first edge and the second edge to determine the updated first edge, the updated second edge, and two arc edges for connecting the first edge and the second edge; The updated first edge, the updated second edge, and the two arc edges connecting the first edge and the second edge are filled to obtain candidate filling regions; The candidate filling regions that meet the set shape conditions are determined as the regions where the emoji reply content is located.
7. The method according to claim 6, wherein, The step of performing region growing on the first edge and the second edge to determine the updated first edge, the updated second edge, and two arc edges connecting the first edge and the second edge includes: Perform horizontal region growing on the first edge and the second edge to determine the updated first edge and the updated second edge; Neighborhood growing is performed on the updated first edge and the updated second edge to determine two arc edges for connecting the first edge and the second edge.
8. The method according to claim 7, wherein, The step of performing neighborhood growing on the updated first edge and the updated second edge to determine two arc edges for connecting the first edge and the second edge includes: Select a seed point from the updated first edge and the updated second edge, and use the seed point as the current point to perform neighborhood growth; The following steps are executed repeatedly: determine the angle value and amplitude change value between the current point and a first point in the neighborhood of the current point; mark the first point whose angle value satisfies a set angle condition and whose amplitude change value satisfies a set amplitude condition as a second point; and take any second point as the current point until all second points have been taken as the current point, wherein the first point is any point in the neighborhood of the current point; Based on the marked second point, two arc edges are determined to connect the first edge and the second edge.
9. The method according to claim 8, wherein, The step of selecting a seed point from the updated first edge and the updated second edge includes: The endpoints of the updated first edge and the updated second edge are determined as the seed points.
10. The method according to claim 4, wherein, Determining the target region from the first candidate region and the second candidate region includes: Determine the bounding box of the first candidate region and the bounding box of the second candidate region; Based on the overlap between the bounding boxes of the first candidate region and the second candidate region, the first candidate region and the second candidate region are merged to obtain the third candidate region; The target region is determined within the third candidate region.
11. The method according to claim 10, wherein, The first page includes an instant messaging page, the first candidate area includes the area where the user's avatar is located, and the method further includes: The defined area located below the area where the user's avatar is located is identified as the third candidate area.
12. The method according to claim 4, wherein, The step of performing text feature recognition on the first image to determine the second candidate region includes: Extract the text content included in the first image; The text content is identified according to the set target information recognition rules; The region containing text content that meets the target information recognition rules is determined as the second candidate region.
13. The method according to claim 4, wherein, Before performing image feature recognition on the first image to determine the first candidate region, and performing text feature recognition on the first image to determine the second candidate region, the method further includes: Adjust the first image from a first aspect ratio to a set aspect ratio; and After performing image feature recognition on the first image to determine the first candidate region, and performing text feature recognition on the first image to determine the second candidate region, the method further includes: Adjust the first image from the set ratio to the first ratio.
14. The method according to claim 4, wherein, The first page includes an instant messaging page, and the target area of the instant messaging page includes at least one of the following: The area containing the target information in an instant messaging message; The area where the user's avatar is located; The area containing the emoji reply content is a sub-area representing the user's identifier; The area located below the user's avatar and representing the user's identifier; as well as The area adjacent to the user's avatar and representing the user's identifier or signature.
15. The method according to claim 14, wherein, The third candidate region includes the region where the user's avatar is located and the text region. The region adjacent to the region where the user's avatar is located and representing the user's identifier or signature is determined in the following way: Determine the first bounding box corresponding to the area where the user's avatar is located, and determine the second bounding box corresponding to the text area; In response to the positional relationship between the first bounding box and the second bounding box satisfying the set positional conditions, the text area is determined to be an area adjacent to the area where the user's avatar is located and represents the user's identifier or user signature.
16. An image processing apparatus, comprising: The first presentation module is configured to: in response to a first operation triggered on a first page, present a first image associated with the first operation, wherein the first operation is used to take a screenshot of at least a portion of the first page; The second presentation module is configured to: in response to a second operation on the first image, present a second image associated with the second operation, wherein the second operation is used to trigger the identification of a target region in the first image and to perform a masking process on the target region, and the position in the second image corresponding to the target region is covered with a blurred mark.
17. An electronic device comprising: Processing device; as well as Storage device, including one or more computer program instructions; The one or more computer program instructions are executed by the processing device according to any one of claims 1 to 15.
18. A computer-readable storage medium for non-transitory storage of computer-readable instructions, wherein, The method of any one of claims 1 to 15 is implemented when the computer-readable instructions are executed by a processor.
Citation Information
Patent Citations
Moving object detection method based on Gaussian mixture and edge detection
CN103942812A
Picture coding method and device
CN109271089A
Layout detection method and device
CN112651942A
Image generation method and device, electronic equipment and storage medium
CN113254141A
File processing method and device, electronic equipment, storage medium and program product
CN115909449A