Watermark superimposition method, and electronic device

By determining the target information area and setting the pixel parameter range on the display interface of the electronic device, the problem of watermark character occlusion operation project identification is solved, and a better user experience is achieved.

WO2025131065A1PCT designated stage expired Publication Date: 2025-06-26HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/140997
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-22
Filing Date
2024-12-20
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

When watermark characters are superimposed on the display interface of an electronic device, they may obscure the GUI menu, OSD and other operation item identifiers in the display menu layer, affecting the user's operation experience.

Method used

By determining the target area where the target information in the display interface is located, setting the pixel parameter range, and when generating a watermark overlay image, the pixel parameters outside the specified area are adjusted so that they do not belong to the range, thereby avoiding the watermark characters from obstructing important information.

Benefits of technology

It effectively avoids the watermark character occluding important information in the layer, and improves the user's visibility and operation experience of operation items.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024140997_26062025_PF_FP_ABST
    Figure CN2024140997_26062025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application relate to the technical field of image processing. Provided are a watermark superimposition method and an electronic device. The method comprises: determining from a display interface a target area where target information is located; determining a parameter range, to which a specified pixel parameter of each pixel point in a specified area belongs, to be a pixel parameter range; in the image in which the specified area is located, adjusting specified pixel parameters of pixel points in image areas other than the specified area, such that the specified pixel parameters are out of the pixel parameter range; and performing a preset processing operation on the display interface and a target watermark image, so as to obtain a watermark-superimposed image, wherein in the watermark-superimposed image, pixel parameters of pixel points in superimposition areas, which have the same position information as the target area, are pixel parameters of pixel points having the same position information in the display interface. By means of applying the method provided in the embodiments of the present application, target information in a display interface can be prevented from being covered by watermark characters.
Need to check novelty before this filing date? Find Prior Art

Description

Watermark superposition method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 22, 2023, with application number 202311786390.5 and invention name “A watermark superimposition method and electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of image processing technology, and in particular to a watermark superposition method and electronic device. Background Art

[0003] When it is desired that all images displayed by the electronic device include watermark characters, the watermark characters can be superimposed on the topmost layer of the display interface. In this way, when the electronic device displays an image, all images displayed include the watermark characters, and the image obtained by secondary capture of the image displayed by the electronic device also includes the watermark characters.

[0004] For example, the electronic device can receive video data transmitted by various NVRs (Network Video Recorders) via video channels and simultaneously display the video images corresponding to the video data of each video channel. A watermark image can be superimposed on a menu layer. Thus, when the electronic device displays the video images, each video image viewed by the staff will include the watermark image because the menu layer including the watermark image is superimposed on the video image.

[0005] However, the watermark characters may block the operation item identifiers such as the GUI (Graphical User Interface) menu and OSD (on-screen display) in the display menu layer, affecting the user's ability to perform related operations on the operation items through the operation item identifiers. Summary of the Invention

[0006] The purpose of the embodiments of the present application is to provide a watermark superposition method and electronic device that can prevent watermark characters from obscuring information in the layer that cannot be obscured by the watermark when watermarking a layer. The specific technical solution is as follows:

[0007] In a first aspect, an embodiment of the present application provides a watermark superposition method, the method comprising:

[0008] Determine the target area where the target information in the display interface is located;

[0009] Determining a parameter range to which the designated pixel parameters of each pixel point in a designated area belong as a pixel parameter range; wherein the designated area includes the target area, or a reference area in the target watermark image having the same position information as the target area;

[0010] Adjusting the designated pixel parameters of each pixel point in the image area other than the designated area in the image where the designated area is located to not fall within the pixel parameter range;

[0011] Performing a preset processing operation on the display interface and the target watermark image to obtain a watermark superimposed image;

[0012] Among them, in the watermark overlay image, the pixel parameters of each pixel point in the overlay area with the same position information as the target area are the pixel parameters of the pixel point with the same position information in the display interface, and in the watermark overlay image, the pixel parameters of each pixel point in the area other than the overlay area are obtained by fusion based on the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image.

[0013] In a second aspect, an embodiment of the present application provides a watermark superposition method, the method comprising:

[0014] Acquire a target layer and a target watermark image for superimposing a watermark on the target layer, and determine a first area in the target layer where target information that cannot be obscured by the watermark is located;

[0015] Taking one of the target layer or the target watermark image as a target image, determining a target parameter range for the target pixel parameter based on the target pixel parameter of each pixel in the target image, and adjusting the target pixel parameter of the pixel in the target image so that, in the adjusted target image, the target pixel parameter of each pixel in a current target area falls within the target parameter range, and the target pixel parameter of each pixel in an image area outside the current target area does not fall within the target parameter range, wherein the current target area has the same position information as the target area in the target image, when the target image is the target layer, the target area is the first area, and when the target image is the target watermark image, the target area is a second area in the target watermark image that has the same position information as the first area;

[0016] For each pixel point in the adjusted target image, if the target pixel parameter of the pixel point does not fall within the target parameter range, two pixel points in the current target layer and the current target watermark image with the same position information as the pixel point are subjected to pixel parameter fusion, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer; if the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point with the same position information as the pixel point in the current target layer is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer, wherein, if the target image is the target layer, the current target layer is the target layer or the adjusted target layer, and the current target watermark image is the target watermark image; if the target image is the target watermark image, the current target watermark image is the target watermark image or the adjusted target watermark image, and the current target layer is the target layer;

[0017] The overlay layer is displayed.

[0018] In a third aspect, an embodiment of the present application provides a watermark superimposition device, the device comprising:

[0019] An image acquisition module is used to determine the target area where the target information in the display interface is located;

[0020] a range determination module, configured to determine a parameter range to which a specified pixel parameter of each pixel point in a specified area belongs as a pixel parameter range; wherein the specified area includes the target area, or a reference area in the target watermark image having the same position information as the target area;

[0021] An adjustment module, configured to adjust the designated pixel parameters of each pixel point in an image area other than the designated area in the image where the designated area is located to be outside the pixel parameter range;

[0022] An execution module is used to perform preset processing operations on the display interface and the target watermark image to obtain a watermark overlay image; wherein, in the watermark overlay image, the pixel parameters of each pixel point in the overlay area with the same position information as the target area are the pixel parameters of the pixel point with the same position information in the display interface, and in the watermark overlay image, the pixel parameters of each pixel point in the area other than the overlay area are obtained by fusing the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image.

[0023] In a fourth aspect, an embodiment of the present application provides a watermark superimposition device, the device comprising:

[0024] An image acquisition module is used to acquire a target layer and a target watermark image for superimposing a watermark on the target layer, and determine a first area in the target layer where target information that cannot be obscured by the watermark is located;

[0025] a range determination module, configured to take one of the target layer or the target watermark image as a target image, determine a target parameter range for the target pixel parameter based on the target pixel parameter of each pixel in the target image, and adjust the target pixel parameter of the pixel in the target image so that, in the adjusted target image, the target pixel parameter of each pixel in a current target area falls within the target parameter range, and the target pixel parameter of each pixel in an image area outside the current target area does not fall within the target parameter range, wherein the current target area has the same position information as the target area in the target image, when the target image is the target layer, the target area is the first area, and when the target image is the target watermark image, the target area is a second area in the target watermark image having the same position information as the first area;

[0026] an adjustment module for, for each pixel point in the adjusted target image, if the target pixel parameter of the pixel point does not fall within the target parameter range, fusing the pixel parameters of two pixels in the current target layer and the current target watermark image that have the same position information as the pixel point, and using the fusion result as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer; and if the target pixel parameter of the pixel point falls within the target parameter range, using the pixel parameter of the pixel point with the same position information as the pixel point in the current target layer as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer, wherein, if the target image is the target layer, the current target layer is the target layer or the adjusted target layer, and the current target watermark image is the target watermark image; if the target image is the target watermark image, the current target watermark image is the target watermark image or the adjusted target watermark image, and the current target layer is the target layer;

[0027] An execution module is used to display the overlay layer.

[0028] In a fifth aspect, an embodiment of the present application provides an electronic device, including:

[0029] Memory for storing computer programs;

[0030] The processor is configured to implement the steps of any of the above method embodiments when executing the program stored in the memory.

[0031] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above method embodiments are implemented.

[0032] In a seventh aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps of any of the above method embodiments.

[0033] Beneficial effects of the embodiments of the present application:

[0034] As can be seen from the above, by applying the solution provided in the embodiment of the present application, the target area where the target information in the display interface is located can be first determined; then, the parameter range to which the specified pixel parameters of each pixel point in the specified area belong can be determined as the pixel parameter range; wherein the specified area includes the target area, or the reference area in the target watermark image having the same position information as the target area; then, the specified pixel parameters of each pixel point in the image area other than the specified area in the image where the specified area is located can be adjusted to not belong to the pixel parameter range; then, a preset processing operation is performed on the display interface and the target watermark image to obtain a watermark overlay image, wherein, in the obtained watermark overlay image, the pixel parameters of each pixel point in the overlay area having the same position information as the target area are the pixel parameters of the pixel point with the same position information in the display interface, and in the watermark overlay image, the pixel parameters of each pixel point in the area other than the overlay area are obtained by fusion based on the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image.

[0035] Based on this, the solution provided in the embodiments of the present application is applied to set a pixel parameter range and use this pixel parameter range to filter the image area of ​​the display interface or the target watermark image. In this way, when generating the watermark overlay image, the pixel parameters of each pixel in the target area where the target information is located can be retained, so that the target information is not obscured by the watermark characters, thereby preventing the watermark information from affecting the user's operation of the target information and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0037] FIG1 is a schematic diagram of a flow chart of a watermark superposition method provided in an embodiment of the present application;

[0038] FIG2( a ) is an example diagram of a display interface provided in an embodiment of the present application;

[0039] FIG2( b ) is another example diagram of a display interface provided in an embodiment of the present application;

[0040] FIG2( c ) is an example diagram of a watermark overlay effect on a display interface provided by an embodiment of the present application;

[0041] FIG2( d ) is an example diagram of another watermark overlay effect of a display interface provided by an embodiment of the present application;

[0042] FIG3( a ) is a schematic diagram of a method for executing a preset processing operation provided in an embodiment of the present application;

[0043] FIG3( b ) is a schematic diagram of another method for executing a preset processing operation provided in an embodiment of the present application;

[0044] FIG4( a ) is a schematic diagram of a specific example of a watermark superposition method provided in an embodiment of the present application;

[0045] FIG4( b ) is another schematic diagram of a specific example of the watermark superposition method provided in an embodiment of the present application;

[0046] FIG5 is a flow chart of a specific example of a watermark superposition method provided in an embodiment of the present application;

[0047] FIG6 is another schematic diagram of a specific example of the watermark superposition method provided in an embodiment of the present application;

[0048] FIG7 is a schematic structural diagram of a watermark superimposition device provided in an embodiment of the present application;

[0049] FIG8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] To make the objectives, technical solutions, and advantages of this application more clearly understood, the present application is further described below with reference to the accompanying drawings and examples. It is apparent that the described examples are only a portion of the embodiments of this application, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the examples in this application are intended to fall within the scope of protection of this application.

[0051] The watermark characters may obstruct operation item identifiers such as the GUI menu and OSD in the display menu layer, affecting the user's ability to perform related operations on the operation items through the operation item identifiers.

[0052] In order to solve the above technical problems, an embodiment of the present application provides a watermark superposition method.

[0053] Among them, this method can be applied to various application scenarios that require watermark superposition on layers, for example, watermark superposition on the menu layer in the display interface to be displayed of the display device of the monitoring system; when the electronic device runs a payment application, watermark superposition on the layer in the screenshot interface to be displayed of the electronic device, etc.

[0054] Moreover, the method can be applied to various electronic devices that can perform data processing, such as mobile phones, laptop computers, desktop computers, etc.; and the electronic device can be an independent electronic device or a device cluster composed of multiple electronic devices. For the sake of clarity, it is hereinafter referred to as electronic device.

[0055] Based on this, the embodiments of the present application do not specifically limit the application scenarios and execution entities of the method.

[0056] A watermark superposition method provided in an embodiment of the present application may include the following steps:

[0057] Determine the target area where the target information in the display interface is located;

[0058] Determining a parameter range to which the designated pixel parameters of each pixel point in a designated area belong as a pixel parameter range; wherein the designated area includes the target area, or a reference area in the target watermark image having the same position information as the target area;

[0059] Adjusting the designated pixel parameters of each pixel point in the image area other than the designated area in the image where the designated area is located to not fall within the pixel parameter range;

[0060] Performing a preset processing operation on the display interface and the target watermark image to obtain a watermark superimposed image;

[0061] Among them, in the watermark overlay image, the pixel parameters of each pixel point in the overlay area with the same position information as the target area are the pixel parameters of the pixel point with the same position information in the display interface, and in the watermark overlay image, the pixel parameters of each pixel point in the area other than the overlay area are obtained by fusion based on the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image.

[0062] As can be seen from the above, by applying the solution provided in the embodiment of the present application, the target area where the target information in the display interface is located can be first determined; then, the parameter range to which the specified pixel parameters of each pixel point in the specified area belong can be determined as the pixel parameter range; wherein the specified area includes the target area, or the reference area in the target watermark image having the same position information as the target area; then, the specified pixel parameters of each pixel point in the image area other than the specified area in the image where the specified area is located can be adjusted to not belong to the pixel parameter range; then, a preset processing operation is performed on the display interface and the target watermark image to obtain a watermark overlay image, wherein, in the obtained watermark overlay image, the pixel parameters of each pixel point in the overlay area having the same position information as the target area are the pixel parameters of the pixel point with the same position information in the display interface, and in the watermark overlay image, the pixel parameters of each pixel point in the area other than the overlay area are obtained by fusion based on the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image.

[0063] Based on this, the solution provided in the embodiments of the present application is applied to set a pixel parameter range and use this pixel parameter range to filter the image area of ​​the display interface or the target watermark image. In this way, when generating the watermark overlay image, the pixel parameters of each pixel in the target area where the target information is located can be retained, so that the target information is not obscured by the watermark characters, thereby preventing the watermark information from affecting the user's operation of the target information and enhancing the user experience.

[0064] Below, in conjunction with the accompanying drawings, a watermark superposition method provided in an embodiment of the present application is described in detail.

[0065] FIG1 is a flow chart of a watermark superposition method provided in an embodiment of the present application. As shown in FIG1 , the method may include the following steps S101 - S104 .

[0066] S101: Determine a target area where target information is located in a display interface.

[0067] That is, a target layer and a target watermark image for superimposing a watermark on the target layer are obtained, and a first area in the target layer where target information that cannot be blocked by the watermark is located is determined.

[0068] When it is desired that all interfaces displayed by an electronic device include a watermark, the watermark may be superimposed on the layer in the interface to be displayed of the electronic device. When superimposing a watermark on a layer, it is often not desired that the superimposed watermark characters obscure certain information in the layer.

[0069] For example, since the display interface of an electronic device includes a menu layer, in order to include watermark characters in the display interface, the watermark is superimposed on the menu layer in the display interface. The menu layer is a layer that includes information such as LOGO (LOGOtype, logo), GUI, OSD, etc., and the menu layer is located at the top of all layers. As shown in Figure 2(a), the display interface of the electronic device includes a menu layer, and the menu layer includes a menu bar, and the menu bar can include icons such as a power icon, a screen recording icon, and a system time.

[0070] As shown in Figure 2(b), the menu layer of the display interface of the electronic device may include a video display area and a menu bar. The lower layer of the video display area displays the video images transmitted by the received video channels. The video display area of ​​the menu layer includes a LOGO, and the menu bar includes a power icon, a screen recording icon, and the system time. Since the menu layer is located at the top of the layers in the interface to be displayed, when the video image is displayed, the displayed video image is superimposed with the LOGO, and the display interface also displays a menu bar.

[0071] When a watermark image containing multiple "Company A" watermark characters is superimposed on the menu layer, the resulting screen is shown in Figure 2(c). In the menu layer after the watermark image is superimposed, the watermark characters obscure the logo in the video display area 210 and the screen recording icon in the menu bar. Thus, when the electronic device displays a video screen, the video screen displayed in each video display area 210 includes the watermark characters. The images obtained by the user taking a second photo of the displayed video screen also include the watermark characters. However, the logo in the video display area 210 cannot be clearly displayed because it is obscured. The user may not be able to recognize the screen recording icon because the watermark characters obscure the screen recording icon, and thus cannot click on the screen recording icon to perform the screen recording operation.

[0072] Based on this, when it is desired to superimpose a watermark on a target layer, the target layer may be first acquired, and a first region in the acquired target layer where target information that cannot be obscured by the watermark is located is determined.

[0073] Optionally, when wishing to overlay a watermark on a target layer, the user may send a watermark overlay instruction to the electronic device, including the target layer and target information in the target layer that cannot be obscured by the watermark. Upon receiving the watermark overlay instruction for the target layer, the electronic device may extract the target layer and the target information in the target layer that cannot be obscured by the watermark, and then determine a first region in the target layer where the target information is located.

[0074] For example, when it is desired to overlay the menu layer and the user does not want the menu bar and various logos in Figure 2(b) to be obscured by the watermark due to overlapping with the watermark characters, the user can use the menu bar and various logos as target information that cannot be obscured by the watermark, and send a watermark overlay instruction carrying the menu layer and the above-mentioned target information to the electronic device, so that the electronic device obtains the watermark overlay instruction, extracts the menu layer and target information, and determines the first area where the menu bar and various logos are located in the menu layer.

[0075] Optionally, when superimposing a watermark on a target layer, the user can select an image area on the target layer where target information that cannot be obscured is located. When the electronic device detects the user's instruction to select an image area, it can use the image area selected by the user as the first area in the target layer where target information that cannot be obscured by the watermark is located.

[0076] Optionally, the electronic device can determine information in the target layer to be watermarked that matches the key information in a pre-stored key information library as target information in the target layer that cannot be obscured by the watermark, and then determine the first area in the target layer where the target information is located.

[0077] Furthermore, in order to perform watermark superposition on the target layer, the electronic device may further obtain a target watermark image for superimposing the watermark on the target layer.

[0078] Optionally, the electronic device pre-stores multiple watermark images. When receiving a watermark superposition instruction, the electronic device can determine a target watermark image for watermark superposition among the watermark images stored in the electronic device based on the watermark superposition instruction.

[0079] Optionally, in a specific implementation, the method for obtaining the target watermark image may include the following step 11:

[0080] Step 11: In response to a watermark image generation instruction sent by a user, a target watermark image is generated, which includes a plurality of watermark characters and the transparency of the watermark characters is a target transparency; wherein the watermark image generation instruction includes the target transparency.

[0081] In this specific implementation, when a user wishes to generate a target watermark image for superimposing a watermark on a target layer, the user can send a watermark image generation instruction to the electronic device. For example, the user can send a watermark image generation instruction to the electronic device by selecting the watermark character and the image generation option in the watermark font library of the electronic device, and then the electronic device can receive the watermark image generation instruction. For another example, the user can send a watermark image generation instruction carrying a watermark character, and the electronic device can receive the above watermark image generation instruction and extract the watermark character carried in the watermark image generation instruction.

[0082] Furthermore, the electronic device can generate a target watermark image based on the watermark characters.

[0083] Moreover, since the target layer is always located at the top of all layers, that is, the target layer is located above the layer where the picture information displayed in the display interface is located, in order to avoid the watermark information in the superimposed layer after the watermark is superimposed affecting the display effect of the video picture, the watermark characters in the generated target watermark superimposed image can have a certain degree of transparency.

[0084] Among them, the user can determine the target transparency of the watermark characters in the target watermark image that he wants to generate, and send a watermark image generation instruction carrying the above target transparency to the electronic device. The electronic device can receive the above watermark image generation instruction, extract the above target transparency, and then generate a target watermark image with the target transparency of the watermark characters. Among them, the user can set the above target transparency according to the image format of the target watermark image that he wants to generate. For example, when he wants to generate a target watermark image with an image format of ARGB8888, since the range of transparency is 0-255, he can set the above target transparency to 100, 200, etc., which are all reasonable and are not specifically limited in the embodiments of the present application.

[0085] For example, a user can send a watermark image generation instruction carrying the watermark character and target transparency to the electronic device by selecting the watermark character in the watermark font library of the electronic device, selecting the target transparency in the transparency selection area, and selecting the image generation option. In this way, the electronic device can receive the above watermark image generation instruction and extract the watermark character and target transparency.

[0086] Furthermore, the electronic device may generate a target watermark image including a plurality of watermark characters and the transparency of the watermark characters being the target transparency.

[0087] Optionally, in order to facilitate watermark superposition, the electronic device may determine the image shape and image size of the target watermark image to be generated based on the layer shape and layer size of the target layer.

[0088] For the sake of clarity, the method of generating the target watermark image will be described in detail below.

[0089] As can be seen, when overlaying a watermark on a target layer, users can set the target transparency of the watermark characters in the desired target watermark image. By sending a watermark image generation instruction with the target transparency, a target watermark image that meets the user's needs can be generated. This can meet the user's personalized settings needs and improve the user experience.

[0090] Optionally, when wishing to update the generated target watermark image, the user can also send a target watermark image update instruction carrying the watermark characters to be updated and / or the target transparency to be updated to the electronic device. Then, when the electronic device receives the above-mentioned target watermark image update instruction, it can generate a new target watermark image including the above-mentioned watermark characters to be updated, and the transparency of the characters satisfies the target transparency to be updated, based on the extraction of the watermark characters to be updated and / or the target transparency to be updated.

[0091] Optionally, in a specific implementation, the method for obtaining the target watermark image may further include the following step 12:

[0092] Step 12: Receive the target watermark image sent by the user.

[0093] In this specific implementation, the user can send the target watermark image desired for watermark superposition to the electronic device, so that the electronic device can receive the target watermark image sent by the user and use the target watermark image to superimpose the watermark on the display interface.

[0094] Optionally, in order to achieve a better watermark overlay effect, after receiving the target watermark image sent by the user, the electronic device can adjust the image shape and image size of the above-mentioned target watermark image based on the layer shape and layer size of the target layer to be overlaid with the watermark image, so that the image shape of the target watermark image matches the layer shape of the target layer, and the image size of the target watermark image matches the layer size of the target layer.

[0095] It can be seen that when superimposing a watermark on a target layer, the user can set the target watermark image that he or she wants to superimpose, which can meet the user's personalized setting needs and improve the user experience.

[0096] Optionally, when wishing to update the target watermark image superimposed by the overlay layer after the watermark is superimposed, the user can send a watermark image update instruction carrying the new target watermark image to the electronic device. Then, when the electronic device receives the above watermark image update instruction, it can use the new target watermark image to update the overlay layer. In this way, the updated overlay layer is the layer obtained by superimposing the target layer with the new target watermark image.

[0097] In addition, the target watermark image used for watermark superposition often includes multiple watermark characters. Using the target watermark image including multiple watermark characters for watermark superposition can avoid the situation where the expected watermark superposition effect cannot be achieved due to the fact that the superimposed layer after the watermark is superimposed includes only one watermark character, thereby improving the watermark superposition effect.

[0098] When a watermark is desired to be superimposed on a target layer, a target watermark image for superimposing the watermark on the target layer may be obtained.

[0099] S102: Determine the parameter range to which the designated pixel parameters of each pixel point in the designated area belong as the pixel parameter range;

[0100] The designated area includes the target area, or a reference area in the target watermark image having the same position information as the target area;

[0101] S103: adjusting the designated pixel parameters of each pixel point in the image area other than the designated area in the image where the designated area is located to be outside the pixel parameter range;

[0102] That is, one of the target layer or the target watermark image is used as the target image, and based on the target pixel parameters of each pixel in the target image, a target parameter range for the target pixel parameters is determined, and the target pixel parameters of the pixels in the target image are adjusted so that, in the adjusted target image, the target pixel parameters of each pixel in the current target area fall within the target parameter range, and the target pixel parameters of each pixel in the image area outside the current target area do not fall within the target parameter range. The current target area has the same position information as the target area in the target image. When the target image is the target layer, the target area is the first area. When the target image is the target watermark image, the target area is the second area in the target watermark image that has the same position information as the first area.

[0103] In order to prevent the first area where the target information is located from being blocked by the watermark characters during watermark superposition, a target parameter range may be pre-set to distinguish the first area from other image areas through the target parameter range during watermark superposition.

[0104] Since the first area of ​​the target layer where the target information is located is not watermarked, that is, the first area is directly displayed, then, when watermarking, the first area can be distinguished from other areas in the target layer and the watermark is not superimposed on the first area. Alternatively, the second area in the target watermark image that has the same position information as the first area can be distinguished from other areas in the target watermark image and the watermark is not superimposed on the second area. Instead, the first area corresponding to the second area is directly displayed.

[0105] Based on this, the first area or the second area in the target watermark image having the same position information as the first area can be determined as the target area.

[0106] When the target layer and the target watermark image are superimposed, the first area overlaps with the second area having the same position information.

[0107] Furthermore, the parameter range to which the target pixel parameter of each pixel point in the target area belongs can be determined as the target parameter range.

[0108] The above-mentioned target pixel parameters can be set according to actual needs, such as transparency, R value, G value and B value, etc., which are all reasonable and are not specifically limited in the embodiments of the present application.

[0109] Optionally, in an embodiment of the present application, the target pixel parameter includes at least one of transparency, R value, G value and B value.

[0110] For example, the target pixel parameter may be transparency; the target pixel parameter may be transparency, R value, G value, and B value; the target pixel parameter may be transparency and R value, etc., which are all reasonable and are not specifically limited in the embodiments of the present application.

[0111] Of course, the above-mentioned target pixel parameters may also include other pixel parameters in addition to transparency, R value, G value and B value, which are not limited here. Methods of using various pixel parameters to perform region differentiation are all within the scope of protection of this application.

[0112] Optionally, when the target image is a target layer, the target area is a first area, and the first parameter range to which the target pixel parameter of each pixel in the first area belongs can be determined as the target parameter range. Exemplarily, the first parameter range [50, 150] to which the transparency of each pixel in the first area belongs is used as the target parameter range [50, 150] for transparency, and the transparency of the pixel in the image area outside the first area in the target layer is adjusted to not belong to [50, 150]. In this way, the adjusted target layer includes the current target area where the transparency of the pixel belongs to [50, 150], and the image area where the transparency of the pixel does not belong to [50, 150]. In this way, when performing watermark superposition processing, watermark superposition processing is not performed on the pixel in the adjusted target layer whose transparency belongs to [50, 150], but watermark superposition processing is performed on the pixel whose transparency belongs to the range of [0, 50) and (150, 255).

[0113] Optionally, when the target image is the target watermark image and the target area is the second area, the second parameter range to which each pixel in the second area of ​​the target watermark image belongs can be determined as the target parameter range. Exemplarily, the second parameter range [100, 200] to which the transparency of each pixel in the second area belongs is used as the target parameter range [100, 200] for transparency, and the transparency of the pixels in the image area outside the second area of ​​the target watermark image is adjusted to not belong to [100, 200]. In this way, the adjusted target watermark image includes the current target area in which the transparency of the pixels belongs to [100, 200] and the image area in which the transparency of the pixels does not belong to [100, 200].

[0114] Correspondingly, when the target pixel parameter is different, the target parameter range may also be different, that is, the above-mentioned target parameter range can be set according to the range corresponding to the target pixel parameter. For example, if the above-mentioned target pixel parameter is transparency, then the above-mentioned target parameter range can be the transparency range [A, B]; if the above-mentioned target pixel parameter is R value, then the above-mentioned target parameter range can be the R value range [C, D]. This is all reasonable and is not limited here.

[0115] The target image is the image that will be used to distinguish image regions during subsequent watermarking. The target parameter range is used to filter image regions in the adjusted target image that will not be watermarked. That is, if the target pixel parameters of all pixels in the target region fall within the target parameter range, the target region will not be watermarked.

[0116] Accordingly, when it is desired to use a target parameter range to filter the image area to be watermarked, the target parameter range can be determined by using the parameter range to which the target pixel parameters of each pixel in the image area to be watermarked belong. Based on this, the target parameter range can optionally be determined as the parameter range to which the target pixel parameters of each pixel in an image area other than the target area in the image where the target area is located belong; wherein the target area includes the first area, or a second area in the target watermark image that has the same position information as the first area.

[0117] In some cases, in the image where the target area is located, there may be pixels in the image area other than the target area whose designated pixel parameters satisfy the above pixel parameter range.

[0118] In this case, since the above-mentioned target parameter range is used to filter the area where watermark superimposition is not performed, and the area screening is achieved by screening pixel points, then, when the above-mentioned target parameter range is used for area screening, in the target image where the target area is located, the pixel points whose target pixel parameters belong to the above-mentioned target parameter range in the image area other than the target area will also be screened out, that is, the screened area includes not only the above-mentioned target area, but also the area outside the target area, resulting in inaccurate area screening results, and thus inaccurate watermark superimposition results.

[0119] Based on this, after determining the above-mentioned target parameter range, the target pixel parameters of each pixel point in the image area other than the above-mentioned target area in the image where the target area is located can be adjusted according to the above-mentioned target parameter range, that is, the target pixel parameters of each pixel point in the image area other than the target area in the image where the target area is located can be adjusted to not fall within the target parameter range.

[0120] In this way, in the adjusted image where the target area is located, the target pixel parameters of each pixel in the target area all fall within the target parameter range, while the target pixel parameters of each pixel in the image area other than the target area all fall outside the target parameter range. Furthermore, for the image where the target area is located, the target area can be distinguished from the image area other than the target area using the target parameter range.

[0121] Optionally, when the target area is the first area, the image in which the target area is located is the target layer. The target pixel parameter of each pixel in the image area other than the first area in the target layer can be adjusted to not fall within the target parameter range. Exemplarily, the target pixel parameter is transparency, and the target parameter range is [50, 150]. If the image area other than the first area in the target layer contains pixel A and pixel B with a transparency within the range of [50, 150], the transparency of pixel A and pixel B can be adjusted to 0.

[0122] Optionally, when the target area is the second area of ​​the target watermark image that has position information corresponding to the first area, the image containing the target area is the target watermark image. The target pixel parameters of each pixel in the image area other than the second area in the target watermark image can be adjusted to not fall within the target parameter range. Exemplarily, the target pixel parameter is transparency, and the target parameter range is [100, 200]. If there are pixel C and pixel D with transparency within [100, 200] in the image area other than the second area in the target watermark image, the transparency of pixel C and pixel D can be adjusted to 0.

[0123] In addition, when the determined target parameter range is too large, or in the target image, there are a large number of pixels whose target pixel parameters satisfy the above-mentioned target parameter range in the image area other than the target area, and the amount of calculation required to adjust the area other than the target area is large, the above-mentioned target parameter range can be optionally adjusted, and based on the adjusted target parameter range, the target pixel parameters of each pixel point in the target area can be adjusted to belong to the above-mentioned adjusted target parameter range, and the target pixel parameters of each pixel point in the image area other than the target area in the image where the target area is located can be adjusted to not belong to the above-mentioned adjusted target parameter range, so as to obtain the target image.

[0124] In addition, when the determined target parameter range is too large, or in the target image, there are a large number of pixels whose target pixel parameters satisfy the above-mentioned target parameter range in the image area other than the target area, and the amount of calculation required to adjust the area other than the target area is large, the above-mentioned target parameter range can be optionally adjusted, and based on the adjusted target parameter range, the target pixel parameters of each pixel point in the target area can be adjusted to belong to the above-mentioned adjusted target parameter range, and the target pixel parameters of each pixel point in the image area other than the target area in the image where the target area is located can be adjusted to not belong to the above-mentioned adjusted target parameter range, so as to obtain the target image.

[0125] For example, based on the parameter range to which the transparency of each pixel parameter in the target area belongs, the target parameter range is determined to be [50, 150]. In the image where the target area is located, the transparency of the pixels in the image area other than the target area belongs to the range of [50, 80]. In this case, the target parameter range can be adjusted to (80, 150], and the transparency of each pixel in the target area whose transparency belongs to [50, 80] is adjusted to (80, 150], so that the transparency of each pixel in the current target area of ​​the adjusted target image is within the range of (80, 150].

[0126] Correspondingly, if the target pixel parameters of all pixels in the image area other than the target area in the image where the target area is located do not fall within the above target parameter range, there is no need to adjust the target parameter range.

[0127] It can be seen that by determining the target parameter range for the target pixel parameters and using the determined target parameter range to adjust the target pixel parameters of the pixel points in the target image, in this way, in the adjusted target image, the target pixel parameters of the pixel points in the current target area and the image area outside the current target area belong to different ranges. Using the target parameter range to filter the pixel points can achieve the purpose of distinguishing between the image area where watermark superposition is not performed and the image area where watermark superposition is performed, thereby improving the accuracy of the area screening results and further improving the accuracy of the watermark superposition results.

[0128] Since the target information in the target layer cannot be obscured by the watermark, the image area where the target information is located does not need to be watermarked when the watermark is superimposed. Based on this, when superimposing the watermark, the image area where the target information is located can be screened out by distinguishing between the image areas that need to be watermarked and the image areas that do not need to be watermarked. By not superimposing the watermark on the image area where the target information is located, the target information can be prevented from being obscured by the watermark.

[0129] Specifically, the image areas that need to be watermarked and the image areas that do not need to be watermarked can be distinguished in the target layer, and the image areas that need to be watermarked and the image areas that do not need to be watermarked can be distinguished in the target watermark image to achieve the purpose of screening out the image areas corresponding to the target information.

[0130] Based on this, either the target layer or the target watermark image can be used as the target image: that is, the target layer can be used as the target image, or the target watermark image can be used as the target image. The image area corresponding to the target information in the target image is then used as the target area. Specifically, if the target image is the target layer, the target area is the first area in the target image where the target information is located; if the target image is the target watermark image, the target area is the second area in the target watermark image that has the same positional information as the first area. In this way, the target area in the target image, the first area in the target layer, and the second area in the target watermark image all have the same positional information.

[0131] Moreover, since the position information of the first area in the target layer is the same as that of the second area in the target watermark image, when the target watermark image is placed on the upper layer of the target layer, the second area completely overlaps with the first area, that is, the second area can cover the first area.

[0132] That is to say, when watermark superposition is performed, the target layer can be regionally differentiated to distinguish the first area where the target information is located and the image area other than the first area. The target watermark image can also be regionally differentiated to distinguish the second area with the same position information as the first area where the target information is located and the image area other than the second area.

[0133] Since the target image is a target layer or a target watermark image, the target image is differentiated into regions, and a target region having the same position information as the first region where the target information is located, and an image region other than the target region can be distinguished, wherein the target region is the region where the watermark is not superimposed.

[0134] The target image is regionally distinguished according to the target pixel parameters of each pixel in the target image. That is, when the target pixel parameters of the pixel points in the target area belong to a different range from the target pixel parameters of the pixel points in the image area other than the target area, the target area and the image area other than the target area can be distinguished by the range of the target pixel parameters of each pixel point.

[0135] However, in actual scenarios, the ranges of target pixel parameters of pixel points in the target area of ​​the target image and the image area other than the target area often overlap, that is, there may be pixel points in the target area whose target pixel parameters belong to the range of target pixel parameters of pixel points in the image area other than the target area, and / or, there may be pixel points in the image area other than the target area whose target pixel parameters belong to the range of target pixel parameters of pixel points in the target area.

[0136] Based on this, in order to achieve the purpose of region differentiation by utilizing the range of target pixel parameters of each pixel point, the target parameter range of the target pixel parameter can be determined according to the target pixel parameters of each pixel point in the target image, and then the target pixel parameters of the pixel points in the target image can be adjusted using the target parameter range of the target pixel parameter.

[0137] Optionally, in a specific implementation, step S102 may include:

[0138] Determine a first parameter range to which target pixel parameters of each pixel point in an image area other than a target area in a target image, and determine a parameter range outside the first parameter range as a target parameter range; and adjust the target pixel parameters of each pixel point in the target area to fall within the target parameter range.

[0139] In this specific implementation, the electronic device may determine a first parameter range to which the target pixel parameters of each pixel point in the image area excluding the target area belong, and determine the parameter range outside the first parameter range as the target parameter range.

[0140] The electronic device can adjust the target pixel parameters of each pixel in the target area to the target parameter range. In this way, in the adjusted target image, the target pixel parameters of each pixel in the current target area with the same position information as the target area belong to the target parameter range, and the target pixel parameters of each pixel in the image area outside the current target area do not belong to the target parameter range.

[0141] In this way, by adjusting the target pixel parameters of the pixels in the target area, the purpose of distinguishing the current target area from the image areas other than the current target area in the adjusted target image can be achieved.

[0142] Optionally, in a specific implementation, step S102 may include:

[0143] The target pixel parameters of each pixel point in the target area of ​​the target image are determined as the second parameter range to which the target pixel parameters belong; and the target pixel parameters of each pixel point in the image area other than the target area of ​​the target image are adjusted to not belong to the target parameter range.

[0144] In this specific implementation, the electronic device may determine a second parameter range to which the target pixel parameter of each pixel point in the target area belongs, and determine the second parameter range as the target parameter range.

[0145] In some cases, there may be pixels in the image area outside the target area whose target pixel parameters meet the above target parameter range. In this case, when the above target parameter range is used to filter pixels, the pixels in the image area outside the target area whose target pixel parameters fall within the above target parameter range will also be filtered out. In this way, the area determined by filtering pixels will not only include the above target area, but may also include areas outside the target area, resulting in inaccurate area distinction results and, in turn, inaccurate watermark superposition results.

[0146] In order to improve the accuracy of the area distinction results, the electronic device can adjust the target pixel parameters of each pixel point in the image area outside the target area to not fall within the target parameter range. In this way, in the adjusted target image, the target pixel parameters of each pixel point in the current target area with the same position information as the target area fall within the target parameter range, and the target pixel parameters of each pixel point in the image area outside the current target area do not fall within the target parameter range.

[0147] S104: performing a preset processing operation on the display interface and the target watermark image to obtain a watermark superimposed image;

[0148] Among them, in the watermark overlay image, the pixel parameters of each pixel point in the overlay area with the same position information as the target area are the pixel parameters of the pixel point with the same position information in the display interface, and in the watermark overlay image, the pixel parameters of each pixel point in the area other than the overlay area are obtained by fusion based on the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image.

[0149] That is: for each pixel point in the adjusted target image, if the target pixel parameter of the pixel point does not fall within the target parameter range, the two pixel points in the current target layer and the current target watermark image with the same position information as the pixel point are subjected to pixel parameter fusion, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer; if the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point with the same position information as the pixel point in the current target layer is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer. Wherein, if the target image is the target layer, the current target layer is the target layer or the adjusted target layer, and the current target watermark image is the target watermark image; if the target image is the target watermark image, the current target watermark image is the target watermark image or the adjusted target watermark image, and the current target layer is the target layer; the overlay layer is displayed.

[0150] A preset processing operation is performed on the current target layer and the current target watermark image to obtain an overlay layer of the current target layer and the current target watermark image. In the overlay layer, the pixel parameters of each pixel in the overlay area having the same position information as the first area are the pixel parameters of the pixel having the same position information in the first area of ​​the current target layer, and the pixel parameters of each pixel in the area other than the overlay area are the pixel parameters obtained by fusing the pixel parameters of the pixel having the same position information in the current target layer and the current target watermark image.

[0151] Among them, the above-mentioned preset processing operation is used to divide the target image where the target area is located into regions, and then the pixel parameters of each pixel point in the first region are used as the pixel parameters of each pixel point in the superimposed region with the same position information as the first region in the superimposed layer; and the pixel parameters of each pixel point in the region other than the first region and the pixel points with the same position information in the second region are fused as the pixel parameters of the pixel points with the same position information in the superimposed layer.

[0152] The above pixel parameter fusion result can be the sum of the pixel parameters or the weighted sum of the pixel parameters, which is reasonable. The above fusion method is not specifically limited in the embodiments of the present application.

[0153] Optionally, in a specific implementation, the above-mentioned preset processing operation is a colorkey operation.

[0154] In this specific implementation, a colorkey operation may be performed on the current target layer and the current target watermark image to obtain a superimposed layer of the current target layer and the current target watermark image.

[0155] Among them, the colorkey operation means that the pixels that meet the target parameter range do not participate in the TDE (Two Dimensional Engine) operation, and the pixel parameters of the pixels with the same position information as the pixel points in the background bitmap are directly output. The pixels that do not meet the target parameter range participate in the TDE operation and the pixel parameter fusion result of the pixel points is output.

[0156] Colorkey operation includes foreground mode and background mode. Foreground mode is to perform colorkey operation on the foreground bitmap, and background mode is to perform colorkey operation on the background bitmap.

[0157] Furthermore, the TDE operation is an operation that provides image drawing operations such as color filling, pixel shifting, and scaling for the OSD and GUI through hardware.

[0158] The above-mentioned target parameter range is the operating condition of the colorkey operation. Specifically, the pixel points at the pixel positions that meet the above-mentioned target parameter range do not participate in the pixel parameter fusion, and the pixel parameters of the pixel points in the background bitmap with the same position information as the pixel points are directly output. For example, the colorkey operation is performed on the current target layer and the current target watermark image. For the current target layer, it is judged in turn whether the target pixel parameters of each pixel point belong to the above-mentioned target parameter range. If so, the pixel parameters of the pixel point are used as the pixel parameters of the pixel point with the same position information as the pixel point in the overlay layer; if the target pixel parameter of the pixel point does not meet the above-mentioned target parameter range, the pixel point is fused with the pixel point with the same position information as the pixel point in the current target watermark image, and the pixel parameter fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer.

[0159] In this way, by utilizing the target parameter range and performing colorkey operation on the current target layer and the current target watermark image, an overlay layer of the current target layer and the current target watermark image can be obtained, and the first area in the current target layer in the obtained overlay layer will not be blocked by the watermark information.

[0160] For example, as shown in Figure 2(d), the LOGO, power icon, screen recording icon and system time icon in the menu layer are target information that cannot be blocked by the watermark. The menu layer is watermarked using the above-mentioned watermark overlay method, and the area where the LOGO, power icon, screen recording icon and system time icon are located is not watermarked. Therefore, the LOGO, power icon, screen recording icon and system time icon in the obtained overlay layer are not blocked by the watermark.

[0161] Optionally, in a specific implementation, the above step S103 includes the following step 21:

[0162] Step 21: Determine the pixel parameters of each pixel in the first area as the pixel parameters of the pixel with the same position information as the pixel in the overlay layer to be generated, and determine the fusion result of the pixel parameters of each pixel in the area other than the first area in the current target layer with the pixel with the same image position information in the current target watermark image as the pixel parameters of the pixel with the same position information as the pixel in the overlay layer to obtain the overlay layer.

[0163] In this specific implementation, in order to prevent the first area of ​​the current target layer from being obscured by the watermark, the pixel parameters of each pixel in the first area can be directly used as the pixel parameters of each pixel in the overlay area of ​​the overlay layer that has the same position information as the first area. In other words, when performing the preset processing operation on the current target layer and the current target watermark image, it is not necessary to fuse the pixel parameters of each pixel in the first area with the pixel parameters of each pixel in the reference area of ​​the current target watermark image that has the same position information as the first area.

[0164] The pixel parameters of each pixel in the first area can be used as the pixel parameters of the pixel with the same position information as the pixel in the overlay area of ​​the overlay layer, and the pixel parameters of the pixel in the area other than the first area in the current target layer and the pixel with the same position information as the pixel in the current target watermark image can be fused to obtain the fusion result, which can be determined as the pixel parameters of the pixel with the same position information as the pixel in the overlay layer. In this way, in the obtained overlay layer, the pixel parameters of each pixel in the overlay area with the same position information as the first area are the pixel parameters of the pixel with the same position information in the first area, and the pixel parameters of each pixel in the area other than the overlay area are the fusion result of the pixel parameters of the pixel with the same position information as the pixel in the current target layer and the current target watermark image.

[0165] Since, in the adjusted target image, the target pixel parameters of each pixel in the current target area having the same position information as the target area all fall within the target parameter range, while the target pixel parameters of each pixel in the image area outside the current target area all fall outside the target parameter range, by traversing each pixel in the adjusted target image using the target parameter range, the adjusted target image can be region-separated using the target parameter range.

[0166] Since the current target area has the same position information as the target area, and the target area has the same position information as the first area where the target information that cannot be obscured by the watermark is located, the current target area has the same position information as the first area where the target information that cannot be obscured by the watermark is located. Furthermore, each pixel point in the current target area corresponds to each pixel point in the area where no watermark superposition is required, that is, each pixel point whose target pixel parameters all fall within the target parameter range corresponds to each pixel point in the area where no watermark superposition is required.

[0167] Based on this, each pixel in the adjusted target image can be used to calculate the superimposed layer of the current target watermark image and the current target layer. In the case where the target image is the target layer, the current target layer is the target layer or the adjusted target layer, and the current target watermark image is the target watermark image; and in the case where the target image is the target watermark image, the current target watermark image is the target watermark image or the adjusted target watermark image, and the current target layer is the target layer.

[0168] That is to say, when the target image is the target layer, the adjusted target image is the adjusted target layer. Since the target parameter range is used to distinguish the current target area that does not need to be watermarked and the image area outside the current target area that needs to be watermarked in the adjusted target layer, the adjusted target layer and the target watermark image can be used to perform watermark superposition to obtain a superimposed layer; correspondingly, since the current target area that does not need to be watermarked in the adjusted target layer has the same position information as the first area that does not need to be watermarked in the target layer, the adjusted target layer can be used to perform regional distinction, and then the regional distinction can be used to perform watermark superposition on the target layer and obtain a superimposed layer.

[0169] When the target image is the target watermark image, the adjusted target image is the adjusted target watermark image. Since the target parameter range is used to distinguish the current target area that does not need to be watermarked and the image area outside the current target area that needs to be watermarked in the adjusted target watermark image, the adjusted target watermark image and the target layer can be used to perform watermark superposition to obtain a superimposed layer. Correspondingly, since the current target area that does not need to be watermarked in the adjusted target watermark image has the same position information as the second area that does not need to be watermarked in the target watermark image, the adjusted target watermark image can be used to perform regional distinction, and then the regional distinction can be used to perform watermark superposition on the target layer and the target watermark image to obtain a superimposed layer.

[0170] The electronic device can determine, for each pixel point in the adjusted target image, whether the pixel point corresponds to the current target area that does not need to be watermarked by determining whether the target pixel parameter of the pixel point falls within the target parameter range. Specifically, for each pixel point in the adjusted target image, if the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point does not correspond to a pixel point that does not participate in pixel parameter fusion, then the pixel point corresponding to the pixel point needs to participate in pixel parameter fusion, that is, the electronic device can perform pixel parameter fusion on two pixel points with the same position information as the pixel point in the current target layer and the current target watermark image to obtain a fusion result, and use the fusion result as the pixel parameter of the pixel point with the same position information as the pixel point in the superimposed layer of the current target layer and the current target watermark image.

[0171] When the target pixel parameter of the pixel point falls within the target parameter range, the pixel point corresponds to a pixel point that does not participate in pixel parameter fusion. Then the pixel point corresponding to the pixel point does not need to participate in pixel parameter fusion, that is, the electronic device can use the pixel parameter of the pixel point with the same position information as the pixel point in the current target layer as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer. After traversing each pixel point in the adjusted target image, the overlay layer can be obtained.

[0172] Optionally, in a specific implementation, the step of fusing pixel parameters of two pixels in the current target layer and the current target watermark image having the same position information as the pixel in step S103 may include:

[0173] The pixel parameter of the first pixel point with the same position information as the pixel point in the current target layer and the pixel parameter of the second pixel point with the same position information as the pixel point in the current target watermark image are weightedly summed.

[0174] The electronic device may traverse each pixel point in the adjusted target image, and when traversing each pixel point, determine whether the target pixel parameter of the pixel point falls within the target parameter range.

[0175] For each pixel point, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel parameter of the first pixel point with the same position information as the pixel point in the current target layer and the pixel parameter of the second pixel point with the same position information as the pixel point in the current target watermark image can be weightedly summed to obtain the pixel parameter of the pixel point with the same position information as the pixel point in the superimposed layer of the current target layer and the current target watermark image.

[0176] Among them, the first weight of the pixel parameter of the first pixel point with the same position information as the pixel point in the current target layer and the second weight of the pixel parameter of the second pixel point with the same position information as the pixel point in the current target watermark image can be set according to actual needs. For example, the first weight is set to 0.1 and the second weight is set to 0.9; the first weight is set to 0.5 and the second weight is set to 0.5, etc., which are all reasonable and are not specifically limited in the embodiments of this application.

[0177] Optionally, for each pixel point, when the target pixel parameter of the pixel point does not fall within the target parameter range, an Alpha operation can be performed on the pixel parameter of the first pixel point with the same position information as the pixel point in the current target layer and the pixel parameter of the second pixel point with the same position information as the pixel point in the current target watermark image, wherein Alpha is used to perform a weighted summation on the pixel parameter of the first pixel point and the pixel parameter of the second pixel point to obtain the weighted summation result as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer.

[0178] By using the target watermark image to watermark the target layer, an overlay layer with the watermark characters in the target watermark image can be obtained. After obtaining the overlay layer, the overlay layer can be displayed. In this way, the display interface includes the watermark characters in the overlay layer.

[0179] Since the above-mentioned overlay layer is obtained by superimposing the target watermark image on the target layer, the overlay layer is displayed instead of the target layer. In addition, in order to prevent the watermark from being blocked by other layers in the interface, the overlay layer can be displayed on the top of each layer.

[0180] During the process of displaying the overlay layer, the user may perform operations on various operation options in the overlay layer to send operation instructions for the overlay layer to the electronic device.

[0181] When an electronic device receives an operation instruction from a user, it can respond to the operation instruction by copying the layer to be displayed as indicated by the operation instruction. For example, a user can click on the time in the menu bar of a layer to send an operation instruction to display detailed time. When the electronic device receives the operation instruction, it can copy the time information layer indicated by the operation instruction.

[0182] After copying the layer to be displayed, the electronic device may determine a third area in the layer to be displayed where information that cannot be blocked by the watermark characters in the superimposed layer is located.

[0183] Based on the target pixel parameters of each pixel in the target image, a target parameter range regarding the target pixel parameters is determined, and the target pixel parameters of the pixel in the target image are adjusted so that in the adjusted target image, the target pixel parameters of each pixel in the current target area belong to the target parameter range, and the target pixel parameters of each pixel in the image area outside the current target area do not belong to the target parameter range, wherein the current target area has the same position information as the target area in the target image, and the target image is an overlay layer or a layer to be displayed. When the target image is a layer to be displayed, the target area is the third area, and when the target image is an overlay layer, the target area is the fourth area in the overlay layer having the same position information as the third area.

[0184] For each pixel point in the adjusted target image, when the target pixel parameter of the pixel point does not fall within the target parameter range, pixel parameters of two pixels in the current overlay layer and the current layer to be displayed that have the same position information as the pixel point are fused, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer to be displayed that has the same position information as the pixel point; when the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point in the current layer to be displayed that has the same position information as the pixel point is used as the pixel parameter of the pixel point in the overlay layer to be displayed that has the same position information as the pixel point, to obtain the overlay layer to be displayed, wherein, when the target image is the layer to be displayed, the current layer to be displayed is the layer to be displayed or the adjusted layer to be displayed, and the current overlay layer is the overlay layer; when the target image is the overlay layer, the current target watermark image is the overlay layer or the adjusted overlay layer, and the current target layer is the layer to be displayed; an interface including the overlay layer to be displayed is displayed.

[0185] For example, after copying the layer to be displayed, the electronic device determines a third region of the layer to be displayed containing information that cannot be obscured by watermark characters in the superimposed layer. The electronic device can determine a parameter range to which the target pixel parameters of each pixel in the third region of the layer to be displayed belong, and determine this as a new target parameter range for the target pixel parameters. The electronic device then uses this new target parameter range to adjust the target pixel parameters of each pixel in the image area outside the third region of the layer to be displayed so that the target pixel parameters do not fall within the new target parameter range, thereby obtaining an adjusted layer to be displayed.

[0186] In order to avoid the watermark characters on the overlay layer blocking the information in the adjusted layer to be displayed that cannot be blocked by the watermark characters, the overlay layer can be used as the foreground bitmap, and the adjusted layer to be displayed can be used as the background bitmap. A colorkey operation is performed on the background bitmap to obtain the overlay layer to be displayed, and the overlay layer to be displayed is displayed.

[0187] As can be seen from the above, by applying the solution provided by the embodiment of the present application, by setting a pixel parameter range, and using the pixel parameter range to screen the image area of ​​the display interface or the target watermark image. That is, the target pixel parameters of the target pixel parameters of the pixel points are used to adjust the target layer or the target watermark image. The target pixel parameters of each pixel point in the image area corresponding to the target information that cannot be blocked by the watermark in the adjusted image are different from the target pixel parameters of each pixel point outside the image area. In this way, when generating a watermark superimposed image, the pixel parameters of each pixel point in the target area where the target information is located can be retained so that the target information is not blocked by the watermark characters. That is, using the adjusted image, it is possible to distinguish between the image area that needs to be watermarked and the image area that does not need to be watermarked. Therefore, when performing watermark superposition, there is no need to perform watermark superposition on the image area where the target information that cannot be blocked by the watermark is located in the target layer, but the image area is directly exposed from the target watermark image, thereby avoiding the watermark information affecting the user's operation on the target information and enhancing the user's usage experience.

[0188] Optionally, in a specific implementation, the current target layer is the target layer, the current target watermark image is the target watermark image, and the above step S103 may include the following step 31:

[0189] Step 31: For each pixel point in the adjusted target image, if the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel parameters of the two pixel points in the target layer and the target watermark image with the same position information as the pixel point are fused, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer. If the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point with the same position information as the pixel point in the target layer is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer.

[0190] In this specific implementation, when the target image is a target layer, the adjusted target image is the adjusted target layer; when the target image is a target watermark image, the adjusted target image is the adjusted target watermark image. The adjusted target image can be used to distinguish between the current target area that does not require watermark superposition and the image area outside the current target area that requires watermark superposition. However, since the adjusted target image contains pixels whose pixel parameters are adjusted, in order to avoid the influence on the display effect of the superimposed layer by superposition using the pixel parameters of the adjusted pixel points, the area distinction result of the adjusted target image can be used to perform watermark superposition on the target layer and the target watermark image.

[0191] In this way, no matter the target image is the target layer or the target watermark image, the current target layer is the target layer, and the current target watermark image is the target watermark image. To superimpose the watermark on the current target layer and the current target watermark image is to superimpose the watermark on the target layer and the target watermark image.

[0192] In one embodiment, when the target image is a target layer, the adjusted target image is the adjusted target layer, the current target layer is the target layer, and the current target watermark image is the target watermark image. Specifically, the target layer is adjusted using the target parameter range of the target pixel parameter to obtain the adjusted target layer. The target layer and the target watermark image are then superimposed using the adjusted target layer to obtain a superimposed layer of the target layer and the target watermark image.

[0193] In another case, when the target image is the target watermark image, the adjusted target image is the adjusted target watermark image, the current target layer is the target layer, and the current target watermark image is the target watermark image. That is, the target watermark image is adjusted using the target parameter range of the target pixel parameter to obtain the adjusted target watermark image. The target layer and the target watermark image are then superimposed using the adjusted target watermark image to obtain a superimposed layer of the target layer and the target watermark image.

[0194] When watermarking the target layer and the target watermark image, the electronic device can use the target parameter range of the target pixel parameter to determine whether the pixel point corresponds to the current target area that does not need to be watermarked, that is, determine whether the pixel point corresponds to a pixel point that does not participate in pixel parameter fusion.

[0195] Specifically, for each pixel point in the adjusted target image, if the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point does not correspond to a pixel point that does not participate in pixel parameter fusion, then the pixel point corresponding to the pixel point needs to participate in pixel parameter fusion, then the electronic device can perform pixel parameter fusion on two pixel points in the target layer and the target watermark image that have the same position information as the pixel point to obtain a fusion result, and use the fusion result as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer of the current target layer and the current target watermark image; if the target pixel parameter of the pixel point falls within the target parameter range, the pixel point corresponds to a pixel point that does not participate in pixel parameter fusion, then the pixel point corresponding to the pixel point does not need to participate in pixel parameter fusion, that is, the electronic device can use the pixel parameter of the pixel point with the same position information as the pixel point in the target layer as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer.

[0196] In this way, the target layer and the target watermark image are watermarked using the adjusted target image and the target parameter range of the target pixel parameter. In the resulting superimposed layer, the image area where the target information is located can be directly displayed through the watermark, and the target information will not be blocked by the watermark.

[0197] Optionally, in a specific implementation, the target image is the target layer, the current target layer is the adjusted target layer, and the current target watermark image is the target watermark image; the above step S103 may include the following step 32:

[0198] Step 32: For each pixel point in the adjusted target layer, if the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point is fused with the pixel point in the target watermark image having the same position information as the pixel point, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer having the same position information as the pixel point. If the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point is used as the pixel parameter of the pixel point in the overlay layer having the same position information as the pixel point, to obtain the overlay layer.

[0199] In this specific implementation, when the target image is a target layer, the adjusted target image is the adjusted target layer. Using the target pixel parameters, the current target area that does not need to be watermarked and the image area that needs to be watermarked can be distinguished in the adjusted target layer. Since only the target pixel parameters of some pixels in the target layer are adjusted, for example, when the target pixel parameter is transparency, the transparency of some pixels in the target layer is adjusted, which has little impact on the display effect of the superimposed image. In order to improve the efficiency of watermark superposition, the adjusted target layer and the target watermark image can be directly used for watermark superposition.

[0200] When watermarking the adjusted target layer and the target watermark image, the electronic device can use the target parameter range of the target pixel parameter to determine whether the pixel point in the adjusted target layer belongs to the current target area that does not require watermarking, that is, to determine whether the pixel point is a pixel point that does not participate in pixel parameter fusion.

[0201] Specifically, for each pixel point in the adjusted target layer, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point is a pixel point participating in pixel parameter fusion, and the electronic device can fuse the pixel point with the pixel point in the target watermark image with the same position information as the pixel point to obtain a fusion result, and use the fusion result as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer of the current target layer and the current target watermark image; when the target pixel parameter of the pixel point falls within the target parameter range, the pixel point is a pixel point that does not participate in pixel parameter fusion, and the area where the pixel point is located corresponds to the first area where the target information that cannot be obscured by the watermark is located. The pixel parameter of the pixel point is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer.

[0202] In this way, the adjusted target layer and the target parameter range of the target pixel parameter are used to watermark the adjusted target layer and the target watermark image. In the resulting superimposed layer, the image area where the target information is located can be directly displayed through the watermark, and the target information will not be blocked by the watermark.

[0203] Optionally, in a specific implementation, the target image is the target watermark image, the current target layer is the target layer, and the current target watermark image is the adjusted target watermark image; the above step S103 may include the following step 33:

[0204] Step 33: For each pixel point in the adjusted target watermark image, if the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point is fused with the pixel point in the target layer having the same position information as the pixel point, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer having the same position information as the pixel point. If the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point in the target layer having the same position information as the pixel point is used as the pixel parameter of the pixel point in the overlay layer having the same position information as the pixel point, to obtain the overlay layer.

[0205] In this specific implementation, when the target image is a target watermark image, the adjusted target image is the adjusted target watermark image. The adjusted target watermark image can distinguish between the current target area that does not require watermark superposition and the image area that requires watermark superposition. Since only the target pixel parameters of some pixels in the target watermark image are adjusted, for example, when the target pixel parameter is transparency, the transparency of some pixels in the target watermark image is adjusted, which has little impact on the display effect of the superimposed image. In order to improve the efficiency of watermark superposition, the adjusted target watermark image and the target layer can be directly used for watermark superposition.

[0206] When watermarking the adjusted target watermark image and the target layer, the electronic device can use the target parameter range of the target pixel parameter to determine whether the pixel point in the adjusted target watermark image belongs to the current target area that does not need to be watermarked, that is, to determine whether the pixel point is a pixel point that does not participate in pixel parameter fusion.

[0207] Specifically, for each pixel point in the adjusted target watermark image, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point is a pixel point participating in pixel parameter fusion, and the electronic device can fuse the pixel point with the pixel point in the target layer with the same position information as the pixel point to obtain a fusion result, and use the fusion result as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer of the current target layer and the current target watermark image; when the target pixel parameter of the pixel point falls within the target parameter range, the pixel point is a pixel point that does not participate in pixel parameter fusion, and the area where the pixel point with the same position information as the pixel point is located in the target layer corresponds to the first area where the target information that cannot be obscured by the watermark is located, and the electronic device can use the pixel parameter of the pixel point in the target layer with the same position information as the pixel point as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point to obtain the overlay layer.

[0208] In this way, the adjusted target watermark image and the target parameter range of the target pixel parameter are used to watermark the adjusted target watermark image and the target layer. In the resulting superimposed layer, the image area where the target information is located can be directly displayed through the watermark, and the target information will not be blocked by the watermark.

[0209] Optionally, in a specific implementation, the target area is the first area, and the above step 32 may include the following steps 321-325:

[0210] Step 321: Set the current target watermark image as the foreground bitmap, and set the current target layer as the background bitmap;

[0211] Step 322: traverse each pixel in the background bitmap, and when traversing each pixel, determine whether the specified pixel parameter of the pixel falls within the pixel parameter range; if not, execute step 323; if so, execute step 324;

[0212] Step 323: Determine the pixel point as a first-category pixel point, and determine the superposition calculation result of the pixel parameters of the first-category pixel point and the pixel point with the same image position information in the foreground bitmap, and use the result as the pixel parameter of the pixel with the same position information as the first-category pixel point in the overlay layer to be generated, and traverse the next pixel point;

[0213] Step 324: Determine the pixel parameters of the pixel point as the pixel parameters of the pixel point with the same position information as the pixel point in the overlay layer, and traverse the next pixel point;

[0214] Step 325: After traversing all the pixels in the background bitmap, an overlay layer is obtained.

[0215] That is: the target watermark image is used as the foreground bitmap, and the adjusted target layer is used as the background bitmap, and a colorkey operation is performed on the background bitmap, so that when the target pixel parameter of the pixel point in the background bitmap does not fall within the target parameter range, the pixel point and the pixel point in the foreground bitmap with the same position information as the pixel point are fused, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer; when the target pixel parameter of the pixel point in the background bitmap falls within the target parameter range, the pixel parameter of the pixel point is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer.

[0216] In this specific implementation, the target area is the first area. When performing the preset processing operation on the current target layer and the current target watermark image, the current target watermark image can be set as the foreground bitmap, and the current target layer can be set as the background bitmap. The foreground bitmap is located on the upper layer of the background bitmap.

[0217] In this way, each pixel point in the background bitmap can be traversed in sequence, and when each pixel point is traversed, it is determined whether the target pixel parameter of the pixel point belongs to the pixel parameter range.

[0218] Furthermore, if the target pixel parameter of the pixel point does not fall within the pixel parameter range, the pixel point is located in the area of ​​the background bitmap where the watermark is superimposed. The pixel point can be determined as a first-category pixel point, and the pixel parameters of the first-category pixel point and the pixel point with the same position information in the foreground bitmap are superimposed and calculated (pixel parameter fusion). Furthermore, the superimposition calculation result (pixel parameter fusion result) of the first-category pixel point is determined as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to be generated, and the next pixel point is traversed.

[0219] Among them, the superposition calculation of multiple pixel parameters can be to directly add the multiple pixel parameters, or to add the weighted parameters of the multiple pixel parameters, which is reasonable and is not specifically limited in the embodiments of the present application.

[0220] If the target pixel parameter of the pixel point belongs to the pixel parameter range, the pixel point is located in the area of ​​the background bitmap where the watermark is not superimposed. The pixel parameter of the pixel point can be directly determined as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to be generated, and then the next pixel point is traversed.

[0221] In this way, when all the pixels in the background bitmap are traversed, the overlay layer can be obtained.

[0222] When the above preset processing operation is a colorkey operation, the current target layer and the current target watermark image are processed according to the background mode in the colorkey operation, that is, by performing a colorkey operation on the background bitmap, a watermark overlay image of the foreground bitmap and the background bitmap is obtained.

[0223] Since the target area is the first area, the target image is the target layer, the current target layer is the adjusted target layer, and the current target watermark image is the target watermark image. Since the purpose of adjusting the image is to distinguish regions, when the target layer is adjusted to obtain the adjusted target layer, the target parameter range of the target pixel parameter can be used to distinguish regions of the adjusted target layer, and determine the image region in the adjusted target layer that participates in watermark superposition and the current target region that does not participate in watermark superposition.

[0224] The colorkey operation can be used to overlay the target watermark image and the adjusted target layer. When overlaying the target watermark image and the adjusted target layer using the colorkey operation, the target watermark image can be used as the foreground bitmap and the adjusted target layer as the background bitmap.

[0225] Since the adjusted target layer can be used to distinguish the image area participating in the watermark superposition and the current target area that does not need to participate in the watermark superposition, the colorkey operation can be performed on the adjusted target layer, that is, the background mode is used to calculate the superposition layer of the target watermark image and the adjusted target layer.

[0226] Specifically, the pixel points at the pixel positions that meet the target parameter range do not participate in the pixel parameter fusion, and the pixel parameters of the pixel points with the same position information as the pixel points in the background bitmap are directly output.

[0227] When the colorkey operation is performed on the adjusted target layer, it may be determined in sequence whether the target pixel parameter of each pixel point in the adjusted target layer falls within the target parameter range.

[0228] Furthermore, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point in the foreground bitmap with the same position information as the pixel point is fused with the pixel point to obtain a fusion result, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer of the current target layer and the current target watermark image.

[0229] That is to say, by performing colorkey operation on the adjusted target layer, when the target pixel parameter of the pixel point in the adjusted target layer does not fall within the target parameter range, the pixel parameter of the pixel point can be fused with the pixel parameter of the pixel point with the same position information as the pixel point in the target watermark image to obtain the fusion result, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer of the current target layer and the current target watermark image.

[0230] When the target pixel parameters of the pixel point in the adjusted target layer fall within the target parameter range, the electronic device can directly output the pixel parameters of the pixel point, that is, use the pixel parameters of the pixel point as the pixel parameters of the pixel point in the overlay layer with the same position information as the pixel point to obtain the overlay layer.

[0231] That is to say, by performing colorkey operation on the adjusted target layer, when the target pixel parameters of the pixel points in the adjusted target layer belong to the target parameter range, the pixel parameters of the pixel points can be directly used as the pixel parameters of the pixel points in the overlay layer with the same position information as the pixel points.

[0232] In this way, by performing colorkey operation on the adjusted target layer, when all pixels in the adjusted target layer are traversed, the superposition result of the adjusted target layer and the target watermark image can be obtained, that is, the superposition layer with the watermark superimposed on the target layer can be obtained.

[0233] Exemplarily, as shown in FIG3(a), the foreground bitmap is the target watermark image, and the background bitmap is the adjusted target layer. Traverse each pixel point in the adjusted target layer, and when traversing to each pixel point, determine whether the target pixel parameter of the pixel point belongs to the target parameter range. If the target pixel parameter of the pixel point does not belong to the target parameter range, the pixel parameter of the pixel point can be fused with the pixel parameter of the pixel point in the foreground bitmap with the same position information as the pixel point, and the fusion result can be used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to be generated. If the target pixel parameter of the pixel point belongs to the target parameter range, the pixel parameter of the pixel point can be directly determined as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to be generated.

[0234] In this way, when all the pixels in the adjusted target layer are traversed, the pixel parameters of each pixel in the target area 310 in the background bitmap are not superimposed, and the pixel parameters of the pixel are directly used as the pixel parameters of the pixel in the superimposed layer with the same position information as the pixel. Therefore, in the superimposed layer, the pixel parameters of each pixel in the superimposed area 340 are the pixel parameters of the pixel with the same position information in the first area 310, that is, the target information in the first area 310 is not blocked by the watermark.

[0235] Each pixel in image region 320, excluding first region 310, of the background bitmap is subjected to pixel parameter overlay calculation with the pixel in the foreground bitmap that has the same position information as the pixel. Accordingly, in the generated overlay layer, the pixel parameters of each pixel in region 330 are the fusion result of the pixel parameter fusion of each pixel in region 320 and the pixel parameters of the pixel in the foreground bitmap that has the same position information as the pixel.

[0236] Optionally, in a specific implementation, the target area is a second area in the target watermark image having the same position information as the first area, and the above step 33 may include the following steps 41-45:

[0237] Step 41: Set the target watermark image as the foreground image, and set the display interface as the background image;

[0238] Step 42: traverse each pixel in the foreground image, and when traversing each pixel, determine whether the specified pixel parameter of the pixel falls within the pixel parameter range; if not, step 43: if yes, execute step 44;

[0239] Step 43: Determine the pixel point as a second-category pixel point, and determine the superposition calculation result of the pixel parameters of the second-category pixel point and the pixel point with the same image position information in the background image, as the pixel parameter of the pixel point with the same position information as the second-category pixel point in the watermark superimposed image to be generated, and traverse the next pixel point;

[0240] Step 44: Determine the pixel parameter of the pixel point as the pixel parameter of the pixel point at the same position as the pixel point in the watermark superimposed image, and traverse the next pixel point;

[0241] Step 45: After traversing all the pixels in the foreground image, a watermark superimposed image is obtained.

[0242] That is: the adjusted target watermark image is used as the foreground bitmap, and the target layer is used as the background bitmap, and a colorkey operation is performed on the foreground bitmap, so that when the target pixel parameter of the pixel point in the foreground bitmap does not fall within the target parameter range, the pixel point and the pixel point in the background bitmap with the same position information as the pixel point are fused, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer; when the target pixel parameter of the pixel point in the foreground bitmap falls within the target parameter range, the pixel parameter of the pixel point in the background bitmap with the same position information as the pixel point is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer.

[0243] In this specific implementation, the target area is the second area in the target watermark image with the same position information as the first area, and the current target watermark image can be set as the foreground bitmap, and the current target interface can be set as the background bitmap.

[0244] Afterwards, each pixel point in the foreground bitmap may be traversed, and when each pixel point is traversed, it is determined whether the target pixel parameter of the pixel point falls within the target parameter range.

[0245] Furthermore, if the target pixel parameter of the pixel point does not belong to the target parameter range, the pixel point is located in the area for watermark superposition in the foreground bitmap, and the pixel point can be determined as a second-type pixel point. After that, the pixel parameter of the pixel point and the pixel point with the same position information in the background bitmap are superimposed and calculated (pixel parameter fusion), and the superimposition calculation result (pixel parameter fusion result) is determined as the pixel parameter of the pixel point with the same position information as the second-type pixel point in the overlay layer to be generated, and the next pixel point is traversed.

[0246] If the target pixel parameter of the pixel point belongs to the target parameter range, the pixel point is located in the area of ​​the foreground bitmap where the watermark is not superimposed. The pixel parameter of the pixel point in the background bitmap with the same position information as the pixel point can be directly determined as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to be generated, and the next pixel point can be traversed.

[0247] In this way, when all the pixels in the foreground bitmap are traversed, the watermark superimposed image can be obtained.

[0248] When the above preset processing operation is a colorkey operation, the current target layer and the current target watermark image are processed according to the foreground mode in the colorkey operation, that is, by performing a colorkey operation on the foreground bitmap, a watermark superimposed image of the foreground bitmap and the background bitmap is obtained.

[0249] When the target area is the second area, the target image is the target watermark image, the current target layer is the target layer, and the current target watermark image is the adjusted target watermark image. Since the purpose of adjusting the image is to distinguish regions, when the target watermark image is adjusted to obtain the adjusted target watermark image, the target parameter range of the target pixel parameter can be used to distinguish regions of the adjusted target watermark image, and determine the image region in the adjusted target watermark image that participates in watermark superposition and the current target region that does not need to participate in watermark superposition.

[0250] The colorkey operation can be used to overlay the target layer and the adjusted target watermark image. When overlaying the target layer and the adjusted target watermark image using the colorkey operation, the adjusted target watermark image can be used as the foreground bitmap and the target layer as the background bitmap.

[0251] Since the adjusted target watermark image can be used to distinguish the image area participating in the watermark superposition and the current target area that does not need to participate in the watermark superposition, the colorkey operation can be performed on the adjusted target watermark image, that is, the foreground mode is used to calculate the superposition layer of the adjusted target watermark image and the target layer.

[0252] Specifically, the pixel points at the pixel positions that meet the target parameter range do not participate in the pixel parameter fusion, and the pixel parameters of the pixel points with the same position information as the pixel points in the background bitmap are directly output.

[0253] When performing colorkey operation on the adjusted target watermark image, it can be determined in sequence whether the target pixel parameter of each pixel point in the adjusted target watermark image belongs to the target parameter range.

[0254] Furthermore, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point with the same position information as the pixel point in the foreground bitmap and the pixel point with the same position information as the pixel point in the background bitmap are fused to obtain a fusion result, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the superimposed layer of the current target layer and the current target watermark image.

[0255] That is to say, by performing colorkey operation on the adjusted target watermark image, when the target pixel parameter of the pixel point in the adjusted target watermark image does not fall within the target parameter range, the pixel parameters of two pixel points in the target layer and the adjusted target watermark image with the same position information as the pixel point can be fused to obtain a fusion result, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer of the current target layer and the current target watermark image.

[0256] Among them, the fusion result can be the sum of the pixel parameters or the weighted sum of the pixel parameters, which is reasonable and is not specifically limited in the embodiments of this application.

[0257] When the target pixel parameters of the pixel points in the adjusted target watermark image fall within the target parameter range, the electronic device can directly output the pixel parameters of the pixel points in the background bitmap that have the same position information as the pixel points, that is, use the pixel parameters of the pixel points in the background bitmap that have the same position information as the pixel points as the pixel parameters in the overlay layer that have the same position information as the pixel points to obtain the overlay layer.

[0258] That is to say, by performing colorkey operation on the adjusted target watermark image, when the target pixel parameters of the pixel points in the adjusted target watermark image belong to the target parameter range, the pixel parameters of the pixel points in the target layer with the same position information as the pixel points can be used as the pixel parameters of the pixel points in the overlay layer with the same position information as the pixel points.

[0259] In this way, by performing colorkey operation on the adjusted target watermark image, when all pixels in the adjusted target watermark image are traversed, the superposition result of the target layer and the adjusted target watermark image can be obtained, that is, the superposition layer with the target layer watermark superimposed can be obtained.

[0260] Exemplarily, as shown in FIG3(b), the foreground bitmap is the adjusted target watermark image, and the background bitmap is the target layer. Traverse each pixel point in the adjusted target watermark image, and when traversing to each pixel point, determine whether the target pixel parameter of the pixel point belongs to the target parameter range. If the target pixel parameter of the pixel point does not belong to the target parameter range, the two pixel parameters of the pixel point with the same position information as the pixel point in the foreground bitmap and the background bitmap can be fused, and the fusion result can be used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to be generated. If the target pixel parameter of the pixel point belongs to the target parameter range, the pixel parameter of the pixel point with the same position information as the pixel point in the background bitmap can be determined as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to be generated.

[0261] In this way, after traversing all the pixels in the adjusted target watermark image, the pixel parameter overlay operation is not performed on each pixel in the foreground bitmap located in the second area 350. Moreover, for each pixel in the second area 350, the pixel parameters of the pixel in the background bitmap with the same pixel position information as the pixel can be determined as the pixel parameters of the pixel with the same position information in the overlay layer to be generated. Therefore, in the overlay layer, the pixel parameters of each pixel in the overlay area 340 are the pixel parameters of the pixel in the background bitmap with the same pixel position information as the pixel, that is, the information in the first area is not blocked by the watermark.

[0262] Each pixel in region 360 of the foreground bitmap undergoes pixel parameter fusion with the pixel parameters of the background bitmap pixel with the same position information as the pixel. Accordingly, in the generated overlay layer, the pixel parameters of each pixel in region 330 are the fusion result of the pixel parameter fusion of the pixel in region 360 with the same position information as the pixel and the background bitmap pixel with the same position information as the pixel.

[0263] As can be seen from the above, regardless of whether the foreground bitmap or the background bitmap is traversed, the first area can be unobstructed by the watermark. In other words, by setting the pixel parameter range and using the target parameter range to perform a colorkey operation on the adjusted target watermark image, it is possible to filter out the pixels that do not require pixel parameter fusion, thereby achieving image area differentiation of the adjusted target watermark image. After the watermark is superimposed, the first area where the target information is located in the target layer can be seen through the target watermark image. In this way, the target information can be prevented from being obscured by the watermark, improving the user experience.

[0264] Optionally, the target area is the first area. The adjusted target layer is set as the foreground bitmap, and the current target watermark image is set as the background bitmap; each pixel in the foreground bitmap is traversed, and when traversing each pixel, it is determined whether the target pixel parameter of the pixel falls within the target parameter range; if not, the pixel is determined as a third-category pixel, and the superposition calculation result of the pixel parameters of the third-category pixel and the pixel with the same image position information in the background bitmap is determined as the pixel parameter of the pixel with the same position information as the third-category pixel in the superposition layer to be generated, and the next pixel is traversed; if so, the pixel parameter of the pixel is determined as the pixel parameter of the pixel with the same position information as the pixel in the superposition layer, and the next pixel is traversed; when all the pixels in the foreground bitmap are traversed, the superposition layer is obtained.

[0265] Optionally, the target area is the second area. The current target layer is set as the foreground bitmap, and the adjusted target watermark image is set as the background bitmap; each pixel in the background bitmap is traversed, and when traversing each pixel, it is determined whether the target pixel parameter of the pixel belongs to the target parameter range; if not, the pixel is determined as a fourth-category pixel, and the superposition calculation result of the pixel parameters of the fourth-category pixel and the pixel with the same image position information in the foreground bitmap is determined as the pixel parameter of the pixel with the same position information as the fourth-category pixel in the superposition layer to be generated, and the next pixel is traversed; if so, the pixel parameter of the pixel with the same position information as the pixel in the foreground bitmap is determined as the pixel parameter of the pixel with the same position as the pixel in the superposition layer, and the next pixel is traversed; when all the pixels in the background bitmap are traversed, the superposition layer is obtained.

[0266] Optionally, in a specific implementation, the target area is the first area; the above step 31 may include the following step 311:

[0267] Step 311: Use the target watermark image as the foreground bitmap and the target layer as the background bitmap, perform colorkey operation on the adjusted target image, so that when the target pixel parameter of the pixel point in the adjusted target image does not fall within the target parameter range, perform pixel parameter fusion on the two pixels in the foreground bitmap and the background bitmap with the same position information as the pixel point, and use the fusion result as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer; when the target pixel parameter of the pixel point in the adjusted target image falls within the target parameter range, use the pixel parameter of the pixel point in the background bitmap with the same position information as the pixel point as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point, and obtain the overlay layer.

[0268] In this specific implementation method, when the target image is the target layer, the target area is the first area, then the adjusted target image is the adjusted target layer. Since the purpose of adjusting the image is to distinguish areas, when the target layer is adjusted to obtain the adjusted target layer, since the first area in the target layer is the same as the position information of the current target area in the adjusted target layer, the position information of the current target area distinguished by performing area distinction on the adjusted target layer corresponds to the first area in the target layer, that is, the purpose of performing area distinction on the target layer can be achieved by performing area distinction on the adjusted target layer.

[0269] The adjusted target layer and colorkey operation can be used to overlay the target layer and the target watermark image. Specifically, the target watermark image can be used as the foreground bitmap and the target layer as the background bitmap. The foreground bitmap is placed on top of the background bitmap. Then, the overlay layer of the foreground mode and the background mode can be calculated based on the result of the colorkey operation on the adjusted target layer.

[0270] Colorkey operation includes foreground mode and background mode. Foreground mode is to perform colorkey operation on the foreground bitmap, and background mode is to perform colorkey operation on the background bitmap.

[0271] Since the target layer is located in the background bitmap, and the areas of the target layer that need to be watermarked and those that do not need to be watermarked correspond to the areas of the adjusted target layer that need to be watermarked and those that do not need to be watermarked, respectively, the result of the colorkey operation on the adjusted target layer is the result of the colorkey operation on the target layer. The colorkey operation on the target layer is to use the background mode to calculate the superimposed layer of the foreground mode and the background mode.

[0272] That is to say, by performing a colorkey operation on the adjusted target layer, the target layer can be regionally screened, and the effect achieved is to perform a colorkey operation on the target layer (background bitmap).

[0273] Specifically, the pixel points at the pixel positions that meet the target parameter range do not participate in the pixel parameter fusion, and the pixel parameters of the pixel points with the same position information as the pixel points in the background bitmap are directly output.

[0274] When the colorkey operation is performed on the adjusted target layer, it may be determined in sequence whether the target pixel parameter of each pixel point in the adjusted target layer falls within the target parameter range.

[0275] Furthermore, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point in the foreground bitmap with the same position information as the pixel point and the pixel point in the background bitmap with the same position information as the pixel point are fused to obtain a fusion result, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point.

[0276] That is to say, by performing colorkey operation on the adjusted target layer, when the target pixel parameters of the pixel points in the adjusted target layer do not fall within the target parameter range, the pixel parameters of the two pixel points in the target layer and the target watermark image with the same position information as the pixel point can be fused to obtain the fusion result, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point.

[0277] Among them, the fusion result can be the sum of the pixel parameters or the weighted sum of the pixel parameters, which is reasonable and is not specifically limited in the embodiments of the present application.

[0278] When the target pixel parameters of the pixel points in the adjusted target layer belong to the target parameter range, then the pixel points in the background bitmap with the same position information as the pixel points belong to the first area, and the electronic device can use the pixel parameters of the pixel points in the background bitmap with the same position information as the pixel points in the overlay layer as the pixel parameters of the pixel points with the same position information as the pixel points to obtain the overlay layer.

[0279] That is to say, by performing colorkey operation on the adjusted target layer, when the target pixel parameters of the pixel points in the adjusted target layer belong to the target parameter range, the pixel parameters of the pixel points in the target layer with the same position information as the pixel points can be used as the pixel parameters of the pixel points in the overlay layer with the same position information as the pixel points.

[0280] In this way, when all the pixels in the adjusted target layer are traversed, the superposition result of the target layer and the target watermark image can be obtained, that is, the superposition layer in which the watermark is superimposed on the target layer can be obtained.

[0281] Optionally, in a specific implementation, the target area is the second area, and the above step 31 may include the following step 312:

[0282] Step 312: Use the target watermark image as the foreground bitmap and the layer as the background bitmap, perform colorkey operation on the adjusted target image, so that when the target pixel parameter of the pixel point in the adjusted target image does not fall within the target parameter range, perform pixel parameter fusion on the two pixels in the foreground bitmap and the background bitmap with the same position information as the pixel point, and use the fusion result as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer; when the target pixel parameter of the pixel point in the adjusted target image falls within the target parameter range, use the pixel parameter of the pixel point in the background bitmap with the same position information as the pixel point as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point, to obtain the overlay layer.

[0283] In this specific implementation method, when the target image is the target watermark image, the target area is the second area in the target watermark image, then the adjusted target image is the adjusted target watermark image. Since the purpose of adjusting the image is to distinguish regions, when the target watermark image is adjusted to obtain the adjusted target watermark image, since the second area in the target watermark image has the same position information as the current target area in the adjusted target watermark image, the position information of the current target area distinguished by performing regional distinction on the adjusted target watermark image corresponds to the second area in the target watermark image, that is, the purpose of regional distinction of the target watermark image can be achieved by performing regional distinction on the adjusted target watermark image.

[0284] The target layer and the target watermark image can be watermarked using the colorkey operation. When using the colorkey operation to watermark the target layer and the target watermark image, the target watermark image can be used as the foreground bitmap and the target layer as the background bitmap. Then, the foreground and background overlay layers can be calculated based on the result of the colorkey operation on the adjusted target watermark image.

[0285] Since the target watermark image is located in the foreground bitmap, and the areas in the target watermark image that need to be watermarked and those that do not need to be watermarked correspond to the areas in the adjusted target watermark image that need to be watermarked and those that do not need to be watermarked, respectively, the result of the colorkey operation on the adjusted target watermark image is the result of the colorkey operation on the target watermark image. The colorkey operation on the target watermark image is to use the foreground mode to calculate the superimposed layer of the foreground mode and the background mode.

[0286] That is to say, by performing a colorkey operation on the adjusted target watermark image, the target watermark image can be region-screened, and the effect achieved is that a colorkey operation is performed on the target watermark image (foreground bitmap).

[0287] Specifically, the pixel points at the pixel positions that meet the target parameter range do not participate in the pixel parameter fusion, and the pixel parameters of the pixel points with the same position information as the pixel points in the background bitmap are directly output.

[0288] When performing colorkey operation on the adjusted target watermark image, it can be determined in sequence whether the target pixel parameter of each pixel point in the adjusted target watermark image belongs to the target parameter range.

[0289] Furthermore, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point in the foreground bitmap with the same position information as the pixel point and the pixel point in the background bitmap with the same position information as the pixel point are fused to obtain a fusion result, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point.

[0290] That is to say, by performing colorkey operation on the adjusted target watermark image, when the target pixel parameter of the pixel point in the adjusted target watermark image does not fall within the target parameter range, the pixel parameters of the two pixel points in the target layer and the target watermark image with the same position information as the pixel point can be fused to obtain a fusion result, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point.

[0291] Among them, the fusion result can be the sum of the pixel parameters or the weighted sum of the pixel parameters, which is reasonable and is not specifically limited in the embodiments of this application.

[0292] When the target pixel parameters of the pixel points in the adjusted target watermark image belong to the target parameter range, then the pixel points in the foreground bitmap with the same position information as the pixel points belong to the second area, and the second area has the same position information as the first area where the target information is located in the target layer. Then the electronic device can use the pixel parameters of the pixel points in the background bitmap with the same position information as the pixel points in the overlay layer with the same position information as the pixel points to obtain the overlay layer.

[0293] That is to say, by performing colorkey operation on the adjusted target watermark image, when the target pixel parameters of the pixel points in the adjusted target watermark image belong to the target parameter range, the pixel parameters of the pixel points in the target layer with the same position information as the pixel points can be used as the pixel parameters of the pixel points in the overlay layer with the same position information as the pixel points.

[0294] In this way, when all the pixels in the adjusted target watermark image are traversed, the superposition result of the target layer and the target watermark image can be obtained, that is, the superposition layer in which the watermark is superimposed on the target layer can be obtained.

[0295] Next, the method of generating the target watermark image is described in detail.

[0296] In order to perform watermark superposition, the electronic device may generate a target watermark image for watermark superposition when receiving a watermark image generation instruction sent by a user.

[0297] Optionally, in a specific implementation, the above step 11, generating a target watermark image with a target transparency based on the watermark characters, may include the following steps 51-54:

[0298] Step 51: Generate a vector diagram of the watermark character indicated by the watermark image generation instruction;

[0299] Step 52: converting the vector image into a basic watermark image with a target transparency;

[0300] Step 53: determining the number of the basic watermark images included in the target watermark image and the position of each basic watermark image based on the image size of the target watermark image to be generated, the image size of the basic watermark images in the target watermark image, and a preset interval, wherein the preset interval is a preset interval between two adjacent basic watermark images in the target watermark image;

[0301] Step 54: Generate a target watermark image including multiple basic watermark images according to the quantity and position.

[0302] In this specific implementation, when the electronic device receives a watermark image generation instruction sent by the user, it can extract the watermark characters indicated by the watermark image generation instruction and extract the target transparency carried by the watermark image generation instruction. Thereafter, a target watermark image including multiple watermark characters and the transparency of the watermark characters being the target transparency is generated.

[0303] Specifically, in order to avoid jagged edges of watermark characters that affect the display effect of the generated target watermark image, the electronic device may generate a vector image of the watermark characters.

[0304] Optionally, in a specific implementation, the electronic device may utilize a freetype font engine to generate a vector image of the watermark character indicated by the watermark image generation instruction.

[0305] For example, an electronic device can be equipped with an APP (Application) and a DSP (Digital Signal Processing). When the APP receives a user instruction, it can obtain the username carried in the instruction and send the username to the DSP. The DSP can then receive the username sent by the APP, obtain the current system time, concatenate the username and the current system time, and use the concatenation result as the watermark character.

[0306] Optionally, the user instruction may further include a character format for the watermark character, and the character format may include character size and character rotation angle. Before generating the vector image of the watermark character, the electronic device may adjust the character size of the watermark character according to the character format and rotate the watermark character. This produces a watermark character whose rotated character size satisfies the character format, and generates a vector image for the watermark character.

[0307] When the electronic device acquires a new watermark character, it can generate a new vector diagram of the new watermark character and use the new vector diagram to update the generated target watermark image.

[0308] Afterwards, the electronic device can convert the vector image into a base watermark image with a target transparency.

[0309] Optionally, the image format of the basic watermark image can be set according to actual needs. For example, it can be ARGB8888 format, ARGB4888 format, etc., which are all reasonable and are not specifically limited in the embodiments of the present application.

[0310] When the electronic device obtains a new target transparency, the generated target watermark image may be updated using the new target transparency.

[0311] Since the generated target watermark image is used to superimpose the watermark on the target layer, the layer size of the target layer can be used as the image size of the target watermark image. The electronic device can obtain the resolution of the target layer and then determine the resolution as the resolution of the target watermark image to be generated. The electronic device can determine the target image size corresponding to the above resolution from the stored correspondence between resolution and image size as the image size of the target watermark image; optionally, an original image with an image size of the above target image size can be determined according to the target image size corresponding to the above resolution. The original image is a blank image and is used to generate the target watermark image.

[0312] Optionally, the original image used to generate the target watermark image can be determined, the arrangement of multiple basic watermark images in the original image can be determined, and the position information of the multiple basic watermark images arranged according to the above arrangement in the original image can be determined. The user can also set the image size of each basic watermark image in the target watermark image to be generated, and pre-set the interval between two adjacent basic watermark images in the target watermark image as a preset interval. The preset interval includes the interval between two adjacent basic watermark images in the length direction of the target watermark image, and the interval between two adjacent basic watermark images in the width direction of the target watermark image.

[0313] Based on this, the electronic device can determine the image size of the target watermark image to be generated, and then determine the number of basic watermark images included in the target watermark image and the position of each basic watermark image based on the image size of the target watermark image to be generated, the image size of the basic watermark image in the target watermark image, and the preset interval.

[0314] Optionally, the original image used to generate the target watermark image can be determined, and the arrangement of multiple basic watermark images in the original image can be determined, and the position information of the multiple basic watermark images arranged according to the above arrangement in the original image can be determined. Then, the electronic device can superimpose the above-determined number of basic watermark images on the original image according to the positions of the above-determined basic watermark images to generate a target watermark image including the above-determined number of basic watermark images. Once the target watermark image is obtained, it can be used to superimpose the watermark on the layer.

[0315] As can be seen from the above, users can set the watermark characters to be displayed in the target watermark image they want to generate, the target transparency of each watermark character, the image size of the basic watermark image in the target watermark image, and the preset interval between adjacent basic watermark images. When the electronic device obtains the target watermark image according to the user, it can use the target watermark image to superimpose the watermark on the display interface. Moreover, since the watermark characters and the target transparency are both set by the user to generate a target watermark image that meets the user's needs, the user's customization needs are met. Moreover, since the above-mentioned basic watermark image is generated based on the vector diagram of the watermark character, the generated basic watermark image can reduce the jagged edges of the characters and improve the display effect of the target watermark image.

[0316] Optionally, in a specific implementation, the above step 52, i.e., the step of converting the vector image into a basic watermark image with a target transparency, may include steps 521-522:

[0317] Step 521: determining the RGB value of each pixel in the basic watermark image to be generated according to the pixel parameters of each pixel in the vector graph and the pixel value conversion relationship between the vector graph and the RGB image;

[0318] Step 522: setting the transparency of each pixel to the target transparency to obtain the basic watermark image.

[0319] In this specific implementation, the user can set the image format of the basic watermark image that he or she wishes to generate, and issue the image format through a watermark image generation instruction.

[0320] After generating the vector graph, the electronic device can extract the image format of the desired basic watermark image. When the desired basic watermark image is an RGB image, the electronic device can determine the RGB value of each pixel in the basic watermark image to be generated based on the pixel parameters of each pixel in the vector graph and the pixel value conversion relationship between the vector graph and the RGB image.

[0321] Furthermore, for each pixel in the base watermark image to be generated, the electronic device can set the transparency of each pixel to the target transparency. In this way, after determining the RGB value of each pixel in the base watermark image to be generated and setting the transparency of each pixel to the target transparency, the electronic device can obtain the base watermark image and use it to generate the target watermark image.

[0322] Optionally, in a specific implementation, a watermark overlay image is displayed in layers on top of the currently displayed image.

[0323] That is, optionally, in a specific implementation, a watermark superposition method provided in an embodiment of the present application may further include steps 61-62:

[0324] Step 61: When receiving the picture information, superimposing the overlay layer on the picture information;

[0325] Step 62: Display the superimposed image information.

[0326] In this specific implementation, since the above-mentioned overlay layer is obtained by superimposing the target watermark image on the target layer, it is the layer after the watermark is superimposed. Therefore, the overlay layer replaces the target layer and is located at the top of each layer in the interface. The electronic device can receive the picture information transmitted by each video channel. When the picture information is received, the electronic device can superimpose the generated overlay layer on the upper layer of the received picture information. Then, when the electronic device displays an image, the overlay layer is above the currently displayed image and is superimposed on the currently displayed image.

[0327] In this way, when the electronic device displays an image, the image viewed by the user includes the watermark characters, and the watermark characters will not block target information such as the LOGO and menu bar in the target layer.

[0328] Correspondingly, watermarks can also be superimposed on the capture layer and the web display layer. The specific implementation of watermarking the capture layer and the web display layer is the same as that of the target layer, and will not be repeated here. Furthermore, the target layer, capture layer, and web display layer described above are merely examples of images to be watermarked and include images that cannot be obscured by the watermark information. Using this method to superimpose watermarks on other display layers located above the displayed image is also within the scope of protection of this application.

[0329] In order to facilitate understanding of a watermark superposition method provided in an embodiment of the present application, a specific example of superimposing a watermark on a target layer as shown in FIG4(a), FIG4(b), FIG5 and FIG6 is described in detail below.

[0330] As shown in Figure 4(a), when a menu layer is watermarked, the target watermark image is generated. The electronic device then extracts the watermark characters, character format, and target transparency specified by the user in the watermark image generation instruction. The electronic device then uses its own app to send the watermark characters and target transparency to the DSP, which receives them. The character format includes the character rotation angle.

[0331] The DSP can load the font engine, copy the watermark characters to the FreeType font engine, and send the character format to the FreeType font engine. The FreeType font engine then receives the watermark characters, rotates them according to the character format, and generates a vector image of the rotated watermark characters. The FreeType font engine then sends the generated vector image to the DSP.

[0332] The DSP receives a vector diagram of the watermark character and converts the vector diagram into a base watermark image with a target transparency, thereby generating a base watermark image. The DSP then determines the number of base watermark images included in the target watermark image and the position of each base watermark image based on the image size of the target watermark image to be generated, the image size of the base watermark images in the target watermark image, and the preset intervals. The DSP then overlays the aforementioned number of base watermark images at each location to generate the target watermark image.

[0333] As shown in Figure 4(b), when a user needs to reconfigure the watermark transparency, they can send a watermark parameter change command to the electronic device's app through the GUI. The app then obtains the modified watermark parameters and sends them to the DSP via the host command HOST_CMD_SET_WATERMARK_PARAM. The DSP receives the watermark parameters, loads the font engine, and sends them to the FreeType font engine. The FreeType font engine receives the watermark parameters and, based on the watermark parameters, rotates the watermark characters to regenerate a vector image of the watermark characters. After generating the vector image of the watermark characters, it sends the vector image of the watermark characters to the DSP. The DSP receives the vector image of the watermark characters and, in the process of converting the vector image into a basic watermark image, sequentially reassigns the transparency of each pixel based on the received watermark parameters, thereby updating the menu watermark image. Accordingly, if it is desired to update the target watermark image used for watermarking the screenshot layer and the target watermark image used for watermarking the web layer, the aforementioned methods can be used to update the screenshot watermark image and the web watermark image, respectively.

[0334] As shown in FIG5 , the process of adding a watermark to a menu layer may include the following steps S501 to S511:

[0335] S501: receiving a watermark superimposition instruction;

[0336] S502: Obtain watermark characters, watermark format and target transparency, and determine whether the image generation process is enabled; if so, execute S503; if not, execute step S508;

[0337] S503: Start the FreeType font engine and use the FreeType font engine to generate a vector diagram of the watermark character;

[0338] S504: converting the vector image into a basic watermark image whose transparency satisfies the target transparency;

[0339] S505: Calculate the number m*n of superimposed reference watermark images in the target watermark image according to the image size of the target watermark image to be generated, and determine the position of each base watermark image;

[0340] S506: Generate a target watermark image including m*n basic watermark images;

[0341] S507: TDE copies the target watermark image and caches the target watermark image;

[0342] S508: Acquire the target watermark image;

[0343] S509: Acquire the menu layer and determine the first area where the target information is located;

[0344] S510: Perform colorkey operation on the menu layer and the target watermark image;

[0345] S511: Refresh the menu layer.

[0346] When a user wishes to overlay a watermark image on a display interface, they can send a watermark overlay instruction to the electronic device. The electronic device then receives the watermark overlay instruction, obtains the watermark character, watermark format, and target transparency, and determines whether the image generation process is enabled.

[0347] When the image generation process starts, the electronic device can start the FreeType font engine and use it to generate a vector image of the watermark characters, and convert the vector image into a basic watermark image whose transparency meets the target transparency. After that, the image size of the target watermark image to be generated is determined, and based on the image size of the target watermark image to be generated, the number m*n of superimposed base watermark images in the target watermark image is calculated. Then, the position of each base watermark image is determined, and based on the above position, a target watermark image including m*n base watermark images is generated. In this way, the TDE copies the target watermark image and caches the target watermark image.

[0348] When the image generation process is not started, the electronic device can obtain the target watermark image according to the watermark characters, watermark format and target transparency.

[0349] When obtaining the target watermark image, the electronic device can obtain the menu layer to be watermarked, determine a first area where target information that cannot be obscured by the watermark is located, and then determine the target pixel parameters of each pixel in the first area as a target parameter range for the target pixel parameters. Furthermore, the electronic device can use the target parameter range to adjust the target parameter range of each pixel in the image area outside the first area of ​​the menu layer to a range outside the target parameter range, thereby obtaining an adjusted menu layer. The electronic device can perform colorkey operations on the adjusted menu layer and the target watermark image. Specifically, the electronic device can use the target watermark image as the foreground bitmap and the adjusted menu layer as the background bitmap, and perform colorkey operations on the background bitmap. That is, when the target pixel parameter of the pixel point in the background bitmap does not fall within the target parameter range, the pixel parameter of the pixel point is fused with the pixel point in the foreground bitmap with the same position information as the pixel point, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point; when the target pixel parameter of the pixel point in the background bitmap falls within the target parameter range, the pixel parameter of the pixel point is used as the pixel parameter of the pixel point in the overlay layer with the same position information as the pixel point, to obtain a menu layer superimposed with watermark characters, and refresh the menu layer.

[0350] When watermarking the menu layer, the interaction process between the APP and the DSP is shown in Figure 6. After receiving the watermark overlay instruction, the APP sets the watermark and sends the set watermark to the DSP.

[0351] In this way, the DSP can receive the watermark and generate a target watermark image. The DSP can then copy the target watermark image and the menu layer. A first region of the menu layer containing target information that cannot be obscured by the watermark is determined. A target parameter range for the target pixel parameters is then determined based on the parameter range to which the target pixel parameters of each pixel in the first region belong. Furthermore, the electronic device can use the target parameter range to adjust the menu layer to obtain an adjusted menu layer. The electronic device can then use the target parameter range to perform a colorkey operation on the adjusted menu layer and the target watermark image, determining the pixel parameters of each pixel in the adjusted first region as the pixel parameters of the pixel in the overlay layer to be generated that has the same position information as the pixel. The electronic device can then fuse the pixel parameters of each pixel in the menu layer (excluding the first region) with the pixel parameters of the pixel in the target watermark image that has the same position information as the pixel, determining the pixel parameters of the pixel in the overlay layer that has the same position information as the pixel, to obtain the overlay layer. Upon receiving image information, the electronic device can overlay the overlay layer on the image information and display the overlaid image information.

[0352] When the APP receives the refresh menu command sys_osd_refreshGraphicsLayer or sys_osd_doPrevOsd, it can send a refresh menu command to the DSP. The DSP determines the layer where the OSD_LOGO is located indicated by the refresh menu command, copies the overlay layer, and then after copying the OSD_LOGO layer, determines the information in the OSD_LOGO layer that cannot be blocked by the watermark characters in the overlay layer, and determines the parameter range of the target pixel parameters of each pixel in the image area where the information is located in the OSD_LOGO layer as the new target parameter range for the target pixel parameters. Using the new target parameter range, the target pixel parameters of each pixel in the image area outside the image area where the information is located in the OSD_LOGO layer are adjusted to not belong to the new target parameter range, thereby obtaining the adjusted OSD_LOGO layer. The overlay layer is used as the foreground bitmap, and the adjusted OSD_LOGO layer is used as the background bitmap. A colorkey operation is performed on the background bitmap to obtain the OSD_LOGO layer after the watermark is superimposed, and the superimposed result is displayed.

[0353] The APP can send watermark parameters to the DSP through HOST_CMD_SET_WATERMARK_PARAM. After receiving the watermark parameters, the DSP can update the canvas watermark based on the watermark parameters and send the overlay layer with the updated watermark to the VO (Output Unit) so that the VO outputs the overlay layer.

[0354] Based on the same inventive concept, corresponding to the watermark superposition method shown in FIG1 provided in the above embodiment of the present application, the embodiment of the present application further provides a watermark superposition device.

[0355] FIG7 is a schematic diagram of the structure of a watermark superimposition device provided in an embodiment of the present application. As shown in FIG7 , the device may include the following modules:

[0356] The image acquisition module 710 is used to determine the target area where the target information in the display interface is located; that is, to obtain the target layer and the target watermark image used to superimpose the watermark on the target layer, and to determine the first area in the target layer where the target information that cannot be obscured by the watermark is located;

[0357] a range determination module 720 for determining, as a pixel parameter range, a parameter range to which the designated pixel parameters of each pixel in a designated area belong; wherein the designated area includes the target area, or a reference area in a target watermark image having the same position information as the target area; that is, taking one of the target layer or the target watermark image as the target image, determining a target parameter range for the target pixel parameters based on the target pixel parameters of each pixel in the target image, and adjusting the target pixel parameters of the pixels in the target image so that, in the adjusted target image, the target pixel parameters of each pixel in the current target area belong to the target parameter range, and the target pixel parameters of each pixel in an image area outside the current target area do not belong to the target parameter range, wherein the current target area has the same position information as the target area in the target image; when the target image is the target layer, the target area is the first area; and when the target image is the target watermark image, the target area is the second area in the target watermark image having the same position information as the first area;

[0358] The adjustment module 730 is configured to adjust the specified pixel parameters of each pixel point in the image area other than the specified area in the image where the specified area is located so as not to fall within the pixel parameter range; that is, for each pixel point in the adjusted target image, if the target pixel parameter of the pixel point does not fall within the target parameter range, perform pixel parameter fusion on two pixels in the current target layer and the current target watermark image that have the same position information as the pixel point, and use the fusion result as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer; if the target pixel parameter of the pixel point falls within the target parameter range, use the pixel parameter of the pixel point with the same position information as the pixel point in the current target layer as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer, to obtain the overlay layer, wherein, if the target image is the target layer, the current target layer is the target layer or the adjusted target layer, and the current target watermark image is the target watermark image; if the target image is the target watermark image, the current target watermark image is the target watermark image or the adjusted target watermark image, and the current target layer is the target layer;

[0359] An execution module 740 is used to perform preset processing operations on the display interface and the target watermark image to obtain a watermark overlay image; wherein, in the watermark overlay image, the pixel parameters of each pixel point in the overlay area with the same position information as the target area are the pixel parameters of the pixel point with the same position information in the display interface, and in the watermark overlay image, the pixel parameters of each pixel point in the area other than the overlay area are obtained by fusion based on the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image, that is, the overlay layer is displayed.

[0360] As can be seen from the above, by applying the solution provided in the embodiments of the present application, by setting a pixel parameter range and using this pixel parameter range to filter the image area of ​​the display interface or the target watermark image, when generating the watermark overlay image, the pixel parameters of each pixel point in the target area where the target information is located can be retained, so that the target information is not obscured by the watermark characters, thereby preventing the watermark information from affecting the user's operation of the target information and enhancing the user's experience.

[0361] Optionally, in a specific implementation, the range determination module 720 is specifically configured to:

[0362] Determine a first parameter range to which target pixel parameters of each pixel point in an image area other than a target area in a target image, and determine a parameter range outside the first parameter range as a target parameter range; and adjust the target pixel parameters of each pixel point in the target area to fall within the target parameter range.

[0363] Optionally, in a specific implementation, the range determination module 720 is specifically configured to:

[0364] The step of determining a target parameter range for the target pixel parameter based on the target pixel parameter of each pixel point in the target image, and adjusting the target pixel parameter of the pixel point in the target image comprises:

[0365] The target pixel parameters of each pixel point in the target area of ​​the target image are determined as the second parameter range to which the target pixel parameters belong; and the target pixel parameters of each pixel point in the image area other than the target area of ​​the target image are adjusted to not belong to the target parameter range.

[0366] Optionally, in a specific implementation, the execution module 740 includes:

[0367] The result determination submodule is used to determine the pixel parameters of each pixel point in the target area as the pixel parameters of the pixel point with the same position information as the pixel point in the watermark overlay image to be generated, and to determine the fusion result of the pixel parameters of each pixel point in the area other than the target area in the display interface with the same image position information as the pixel point in the watermark overlay image with the same image position information as the pixel point, so as to obtain the watermark overlay image.

[0368] Optionally, in a specific implementation, the current target layer is the target layer, and the current target watermark image is the target watermark image; the adjustment module 730 includes:

[0369] For each pixel point in the adjusted target image, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel parameters of the two pixel points in the target layer and the target watermark image with the same position information as the pixel point are fused, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer. When the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point with the same position information as the pixel point in the target layer is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer.

[0370] Optionally, in a specific implementation, the designated area is the target area;

[0371] The result determination submodule is specifically used to:

[0372] The target watermark image is set as a foreground image, and the display interface is set as a background image; each pixel in the background image is traversed, and when traversing each pixel, it is determined whether the specified pixel parameter of the pixel falls within the pixel parameter range; if not, the pixel is determined to be a first-category pixel, and the superposition calculation result of the pixel parameters of the first-category pixel and the pixel with the same image position information in the foreground image is determined as the pixel parameter of the pixel with the same position information as the first-category pixel in the watermark superposition image to be generated, and the next pixel is traversed; if so, the pixel parameter of the pixel is determined as the pixel parameter of the pixel with the same position information as the pixel in the watermark superposition image, and the next pixel is traversed; when all the pixels in the background image are traversed, the watermark superposition image is obtained;

[0373] That is, the target image is the target layer, the current target layer is the adjusted target layer, and the current target watermark image is the target watermark image; for each pixel point in the adjusted target layer, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point is fused with the pixel point in the target watermark image that has the same position information as the pixel point, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer that has the same position information as the pixel point; when the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point is used as the pixel parameter of the pixel point in the overlay layer that has the same position information as the pixel point, to obtain the overlay layer.

[0374] Optionally, in a specific implementation, the designated area is the reference area;

[0375] The result determination submodule is specifically used to:

[0376] The target watermark image is set as a foreground image, and the display interface is set as a background image; each pixel in the foreground image is traversed, and when each pixel is traversed, it is determined whether the specified pixel parameter of the pixel belongs to the pixel parameter range; if not, the pixel is determined as a second-category pixel, and the superposition calculation result of the pixel parameters of the second-category pixel and the pixel with the same image position information in the background image is determined as the pixel parameter of the pixel with the same position information as the second-category pixel in the watermark superposition image to be generated, and the next pixel is traversed; if so, the pixel parameter of the pixel is determined as the pixel parameter of the pixel with the same position as the pixel in the watermark superposition image, and the next pixel is traversed; when all the pixels in the foreground image are traversed, the watermark superposition image is obtained. That is, the target image is the target watermark image, the current target layer is the target layer, and the current target watermark image is the adjusted target watermark image; for each pixel point in the adjusted target watermark image, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point is fused with the pixel point in the target layer having the same position information as the pixel point, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer having the same position information as the pixel point; when the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point in the target layer having the same position information as the pixel point is used as the pixel parameter of the pixel point in the overlay layer having the same position information as the pixel point, to obtain the overlay layer.

[0377] Optionally, in a specific implementation, the device further includes:

[0378] The summing module is used to weightedly sum the pixel parameters of the first pixel point with the same position information as the pixel point in the current target layer and the pixel parameters of the second pixel point with the same position information as the pixel point in the current target watermark image.

[0379] Optionally, in a specific implementation, the preset processing operation is a colorkey operation.

[0380] Optionally, in a specific implementation, the specified pixel parameter includes at least one of transparency, R value, G value, and B value.

[0381] Optionally, in a specific implementation, the device further includes:

[0382] The layered display module is used to display the watermark overlay image in a layered manner above the currently displayed image, that is, when receiving picture information, overlay the overlay layer on the picture information; and display the overlaid picture information.

[0383] Optionally, in a specific implementation, the device further includes a target watermark image acquisition module, and the target watermark image acquisition module includes:

[0384] an image generation submodule, configured to generate, in response to a watermark image generation instruction sent by a user, a target watermark image including a plurality of the watermark characters and having a target transparency, wherein the watermark image generation instruction includes the target transparency;

[0385] or,

[0386] The image receiving submodule is used to receive the target watermark image sent by the user.

[0387] Optionally, in a specific implementation, the image generation submodule is specifically configured to:

[0388] Generate a vector diagram of the watermark character indicated by the watermark image generation instruction;

[0389] Converting the vector image into a basic watermark image with a target transparency;

[0390] determining the number of the base watermark images included in the target watermark image and the position of each base watermark image based on the image size of the target watermark image to be generated, the image size of the base watermark images in the target watermark image, and a preset interval, wherein the preset interval is a preset interval between two adjacent base watermark images in the target watermark image;

[0391] A target watermark image including a plurality of base watermark images is generated according to the number and positions.

[0392] Optionally, in a specific implementation, the image generation submodule is specifically configured to:

[0393] According to the pixel parameters of each pixel in the vector graph and the pixel value conversion relationship between the vector graph and the RGB image, the RGB value of each pixel in the basic watermark image to be generated is determined; the transparency of each pixel is set to the target transparency to obtain the basic watermark image.

[0394] The embodiment of the present application further provides an electronic device, as shown in FIG8 , comprising:

[0395] Memory 801, used for storing computer programs;

[0396] The processor 802 is configured to implement the steps of a watermark superimposition method provided in an embodiment of the present application when executing the program stored in the memory 801.

[0397] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 802, the communication interface, and the memory 801 communicate with each other via the communication bus.

[0398] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0399] The communication interface is used for communication between the above electronic device and other devices.

[0400] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0401] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0402] In another embodiment provided by the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of any of the above-mentioned watermark superimposition methods are implemented.

[0403] In another embodiment provided by the present application, a computer program product including instructions is further provided, which, when executed on a computer, enables the computer to execute any one of the watermark superimposition methods in the above embodiments.

[0404] In another embodiment provided by the present application, a computer program including instructions is further provided. When the computer program is run on a computer, the computer is enabled to execute any watermark superimposition method in the above embodiments.

[0405] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state drive (SSD).

[0406] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0407] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, since the apparatus embodiments, electronic device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are generally similar to the method embodiments, their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.

[0408] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.

Claims

1. A watermark superposition method, characterized in that: The method comprises: Acquire a target layer and a target watermark image for watermarking the target layer, and determine a first area in the target layer where target information that cannot be obscured by the watermark is located; Taking one of the target layer or the target watermark image as the target image, determining a target parameter range about the target pixel parameter based on the target pixel parameter of each pixel in the target image, and adjusting the target pixel parameter of the pixel in the target image so that, in the adjusted target image, the target pixel parameter of each pixel in the current target area belongs to the target parameter range, and the target pixel parameter of each pixel in the image area outside the current target area does not belong to the target parameter range, wherein the current target area has the same position information as the target area in the target image, when the target image is the target layer, the target area is the first area, and when the target image is the target watermark image, the target area is the second area in the target watermark image having the same position information as the first area; For each pixel in the adjusted target image, when the target pixel parameter of the pixel does not fall within the target parameter range, two pixels in the current target layer and the current target watermark image with the same position information as the pixel are subjected to pixel parameter fusion, and the fusion result is used as the pixel parameter of the pixel with the same position information as the pixel in the overlay layer, and when the target pixel parameter of the pixel falls within the target parameter range, the pixel parameter of the pixel with the same position information as the pixel in the current target layer is used as the pixel parameter of the pixel with the same position information as the pixel in the overlay layer to obtain the overlay layer, wherein, when the target image is the target layer, the current target layer is the target layer or the adjusted target layer, and the current target watermark image is the target watermark image; when the target image is the target watermark image, the current target watermark image is the target watermark image or the adjusted target watermark image, and the current target layer is the target layer; The overlay layer is displayed.

2. The method according to claim 1, characterized in that The step of determining a target parameter range about the target pixel parameter based on the target pixel parameter of each pixel in the target image, and adjusting the target pixel parameter of the pixel in the target image comprises: Determine a first parameter range to which a target pixel parameter of each pixel point in an image area other than a target area in a target image belongs, and determine a parameter range other than the first parameter range as a target parameter range; The target pixel parameter of each pixel point in the target area is adjusted to fall within the target parameter range.

3. The method according to claim 1, characterized in that: The step of determining a target parameter range about the target pixel parameter based on the target pixel parameter of each pixel in the target image, and adjusting the target pixel parameter of the pixel in the target image comprises: Determine a second parameter range to which a target pixel parameter of each pixel point in a target area in a target image belongs as a target parameter range; The target pixel parameter of each pixel point in the image area other than the target area in the target image is adjusted to be out of the target parameter range.

4. The method according to claim 2 or 3, characterized in that: The current target layer is the target layer, and the current target watermark image is the target watermark image; For each pixel point in the adjusted target image, when the target pixel parameter of the pixel point does not fall within the target parameter range, two pixel points in the current target layer and the current target watermark image with the same position information as the pixel point are subjected to pixel parameter fusion, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer, and when the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point with the same position information as the pixel point in the current target layer is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer, to obtain the overlay layer, comprising: For each pixel point in the adjusted target image, when the target pixel parameter of the pixel point does not fall within the target parameter range, the two pixel points in the target layer and the target watermark image with the same position information as the pixel point are fused with pixel parameters, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer. When the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point with the same position information as the pixel point in the target layer is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer to obtain the overlay layer.

5. The method according to claim 2 or 3, characterized in that: The target image is the target layer, the current target layer is the adjusted target layer, and the current target watermark image is the target watermark image; For each pixel point in the adjusted target image, when the target pixel parameter of the pixel point does not fall within the target parameter range, two pixel points in the current target layer and the current target watermark image with the same position information as the pixel point are subjected to pixel parameter fusion, and the fusion result is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer, and when the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point with the same position information as the pixel point in the current target layer is used as the pixel parameter of the pixel point with the same position information as the pixel point in the overlay layer, to obtain the overlay layer, comprising: For each pixel point in the adjusted target layer, when the target pixel parameter of the pixel point does not fall within the target parameter range, the pixel point is fused with the pixel point in the target watermark image whose position information is the same as that of the pixel point, and the fusion result is used as the pixel parameter of the pixel point in the overlay layer whose position information is the same as that of the pixel point. When the target pixel parameter of the pixel point falls within the target parameter range, the pixel parameter of the pixel point is used as the pixel parameter of the pixel point in the overlay layer whose position information is the same as that of the pixel point, to obtain the overlay layer.

6. The method according to claim 2 or 3, characterized in that: The target image is the target watermark image, the current target layer is the target layer, and the current target watermark image is the adjusted target watermark image; The step of fusing pixel parameters of two pixels in the current target layer and the current target watermark image with the same position information as the pixel for each pixel in the adjusted target image when the target pixel parameter of the pixel does not fall within the target parameter range, and using the fusion result as the pixel parameter of the pixel with the same position information as the pixel in the overlay layer, and using the pixel parameter of the pixel with the same position information as the pixel in the current target layer as the pixel parameter of the pixel with the same position information as the pixel in the overlay layer when the target pixel parameter of the pixel falls within the target parameter range, to obtain the overlay layer comprises: For each pixel in the adjusted target watermark image, when the target pixel parameter of the pixel does not fall within the target parameter range, the pixel is fused with the pixel in the target layer having the same position information as the pixel, and the fusion result is used as the pixel parameter of the pixel in the overlay layer having the same position information as the pixel. When the target pixel parameter of the pixel falls within the target parameter range, the pixel parameter of the pixel in the target layer having the same position information as the pixel is used as the pixel parameter of the pixel in the overlay layer having the same position information as the pixel, to obtain the overlay layer.

7. The method according to any one of claims 1 to 3, characterized in that: The step of fusing pixel parameters of two pixels in the current target layer and the current target watermark image that have the same position information as the pixel point comprises: The pixel parameter of the first pixel point with the same position information as the pixel point in the current target layer and the pixel parameter of the second pixel point with the same position information as the pixel point in the current target watermark image are weightedly summed.

8. The method according to any one of claims 1 to 3, characterized in that: The target pixel parameter includes at least one of transparency, R value, G value and B value.

9. The method according to claim 1, characterized in that: The method further comprises: When receiving the picture information, superimposing the overlay layer on the picture information; Displays the superimposed screen information.

10. The method according to claim 1, characterized in that The method for obtaining the target watermark image comprises: In response to a watermark image generation instruction sent by a user, a target watermark image is generated, which includes a plurality of watermark characters and the transparency of the watermark characters is a target transparency, wherein the watermark image generation instruction includes the target transparency; or, Receive the target watermark image sent by the user.

11. The method according to claim 10, characterized in that The step of generating a target watermark image including a plurality of watermark characters and the transparency of the watermark characters being a target transparency comprises: Generate a vector diagram of the watermark character indicated by the watermark image generation instruction; Converting the vector image into a basic watermark image with a transparency of the target transparency; Determining the number of the basic watermark images included in the target watermark image and the position of each basic watermark image based on the image size of the target watermark image to be generated, the image size of the basic watermark images in the target watermark image, and a preset interval, wherein the preset interval is a preset interval between two adjacent basic watermark images in the target watermark image; According to the number and position, a target watermark image including a plurality of base watermark images is generated.

12. The method according to claim 11, characterized in that The step of converting the vector image into a basic watermark image with the target transparency comprises: Determine the RGB value of each pixel in the basic watermark image to be generated according to the pixel parameter of each pixel in the vector graph and the pixel value conversion relationship between the vector graph and the RGB image; The transparency of each pixel is set to the target transparency to obtain the basic watermark image.

13. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-12 when executing a program stored in a memory.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

15. A computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Image processing method and apparatus, and storage medium

    CN108550101A

  • Image processing method and device

    CN115841413A

  • Watermark superposition method and electronic equipment

    CN117812192A

  • Signal processor

    JP2000295456A

  • Information processing device

    US20070035775A1