[go: up one dir, main page]

CN117812192A - A watermark superposition method and electronic device - Google Patents

A watermark superposition method and electronic device Download PDF

Info

Publication number
CN117812192A
CN117812192A CN202311786390.5A CN202311786390A CN117812192A CN 117812192 A CN117812192 A CN 117812192A CN 202311786390 A CN202311786390 A CN 202311786390A CN 117812192 A CN117812192 A CN 117812192A
Authority
CN
China
Prior art keywords
pixel
image
watermark
target
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311786390.5A
Other languages
Chinese (zh)
Inventor
余永顺
赵杰磊
张腾飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202311786390.5A priority Critical patent/CN117812192A/en
Publication of CN117812192A publication Critical patent/CN117812192A/en
Priority to PCT/CN2024/140997 priority patent/WO2025131065A1/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/3232Robust embedding or watermarking
    • H04N1/32325Robust embedding or watermarking the embedded data being visible
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/0028Adaptive watermarking, e.g. Human Visual System [HVS]-based watermarking

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The embodiment of the application provides a watermark superposition method and electronic equipment, and relates to the technical field of image processing. Determining a target area where target information in a display interface is located; determining a parameter range of a specified pixel parameter of each pixel point in the specified area as a pixel parameter range; in the image of the appointed area, the appointed pixel parameters of all pixel points in the image area except the appointed area are adjusted to be not in the pixel parameter range; performing preset processing operation on the display interface and the target watermark image to obtain a watermark superposition image; the pixel parameters of each pixel point in the superposition area with the same position information as the target area in the watermark superposition image are the pixel parameters of the pixel points with the same position information in the display interface. By applying the method provided by the embodiment of the application, the situation that the watermark characters block the target information in the display interface can be avoided.

Description

Watermark superposition method and electronic equipment
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a watermark superimposing method and an electronic device.
Background
When it is desired to include watermark information in all of the pictures presented by the electronic device, watermark characters may be superimposed on the display interface. Thus, when the electronic equipment displays the picture, the displayed picture is the picture comprising the watermark information, and the image obtained by carrying out secondary acquisition on the picture displayed by the electronic equipment is also the image comprising the watermark information.
For example, the electronic device may receive video data transmitted by each NVR (Network Video Recorder ) through a video channel, and simultaneously display video pictures corresponding to the video data of each video channel. Thus, when the electronic equipment displays the video pictures, a display interface overlapped with watermark information can be displayed on the upper layer of each video picture, and each video picture observed by a worker is overlapped with watermark information.
However, the watermark information may obscure the operation item identifier such as GUI (Graphical User Interface ), OSD (on-screen display), etc. in the display interface, affecting the user to perform related operations on the operation item.
Disclosure of Invention
The embodiment of the application aims to provide a watermark superposition method and electronic equipment, which can superpose watermarks in a display interface and avoid watermark characters from shielding target information in the display interface. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a watermark superimposing method, where the method includes:
determining a target area where target information in a display interface is located;
Determining a parameter range of a specified pixel parameter of each pixel point in the specified area as a pixel parameter range; the appointed area comprises the target area or a reference area which is the same as the position information of the target area in the target watermark image;
adjusting the appointed pixel parameters of all pixel points in the image except the appointed area in the image where the appointed area is located to be not in the pixel parameter range;
performing preset processing operation on the display interface and the target watermark image to obtain a watermark superposition image;
the pixel parameters of each pixel point in the superimposed image, which are the same as the position information of the target area, are the pixel parameters of the pixel points, which are the same as the position information of the display interface, in the superimposed image, and the pixel parameters of each pixel point in the area except for the superimposed area in the superimposed image are obtained by fusing the pixel parameters of the pixel points, which are the same as the position information of the display interface and the target watermark image.
Optionally, in a specific implementation manner, the performing a preset processing operation on the display interface and the target watermark image to obtain a watermark superimposed image includes:
And determining the pixel parameters of each pixel in the target area as the pixel parameters of the pixel with the same position information as the pixel in the watermark superimposed image to be generated, and determining the fusion result of the pixel parameters of each pixel in the area except the target area in the display interface as the pixel with the same position information as the image in the target watermark image as the pixel parameters of the pixel with the same position information as the pixel in the watermark superimposed image to obtain the watermark superimposed image.
Optionally, in a specific implementation manner, the designated area is the target area;
determining the pixel parameter of each pixel in the target area as the pixel parameter of the pixel with the same position information as the pixel in the watermark superimposed image to be generated, and determining the result of superposition calculation of the pixel parameter of each pixel in the area except the target area in the display interface as the pixel parameter of the pixel with the same position information as the image in the target watermark image as the pixel parameter of the pixel with the same position information as the pixel in the watermark superimposed image, thereby obtaining the watermark superimposed image, comprising:
Setting the target watermark image as a foreground image and setting the display interface as a background image;
traversing each pixel point in the background image, and determining whether the appointed pixel parameter of each pixel point belongs to the pixel parameter range when traversing to each pixel point;
if not, determining the pixel point as a first type pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same image position information in the foreground image as the pixel parameters of the pixel point with the same position information in the watermark superposition image to be generated, and traversing the next pixel point;
if yes, determining 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 watermark superimposed image, and traversing the next pixel point;
and when all the pixel points in the background image are traversed, obtaining the watermark superposition image.
Optionally, in a specific implementation manner, the designated area is the reference area;
determining the pixel parameter of each pixel in the target area as the pixel parameter of the pixel with the same position information as the pixel in the watermark superimposed image to be generated, and determining the result of superposition calculation of the pixel parameter of each pixel in the area except the target area in the display interface as the pixel parameter of the pixel with the same position information as the image in the target watermark image as the pixel parameter of the pixel with the same position information as the pixel in the watermark superimposed image, thereby obtaining the watermark superimposed image, comprising:
Setting the target watermark image as a foreground image and setting the display interface as a background image;
traversing each pixel point in the foreground image, and determining whether the appointed pixel parameter of each pixel point belongs to the pixel parameter range when traversing to each pixel point;
if not, determining the pixel point as a second type pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same image position information in the background image as the pixel parameters of the pixel point with the same position information in the watermark superposition image to be generated, and traversing the next pixel point;
if yes, determining the pixel parameters of the pixel point as the pixel parameters of the pixel point which is the same as the pixel point in the watermark superimposed image, and traversing the next pixel point;
and when all the pixel points in the foreground image are traversed, obtaining the watermark superposition image.
Optionally, in a specific implementation manner, the preset processing operation is a color operation.
Optionally, in a specific implementation manner, the specified pixel parameter includes: transparency;
optionally, in a specific implementation manner, the method further includes:
And displaying the watermark superposition image above the currently displayed image in a layered superposition manner.
Optionally, in a specific implementation manner, the method for acquiring the target watermark image includes:
acquiring watermark characters determined based on user instructions, and generating a target watermark image with transparency being target transparency based on the watermark characters; wherein the user instruction includes the target transparency;
or,
and receiving the target watermark image sent by the user.
Optionally, in a specific implementation manner, the generating, based on the watermark character, the target watermark image with the transparency being the target transparency includes:
generating a vector diagram of the watermark characters;
converting the vector image into a basic watermark image with transparency being the target transparency;
determining the resolution of a target watermark image to be generated;
determining the position areas of a plurality of basic watermark images in an original image for generating the target watermark image based on the resolution;
and superposing the basic watermark image in the original image according to the position area to obtain a target watermark image.
In a second aspect, an embodiment of the present application provides a watermark superimposing apparatus, including:
The area determining module is used for determining a target area where target information in the display interface is located;
an image acquisition module for acquiring a target watermark image including a plurality of watermark characters;
the range determining module is used for determining a parameter range of a specified pixel parameter of each pixel point in the specified area as a pixel parameter range; the appointed area comprises the target area or a reference area which is the same as the position information of the target area in the target watermark image;
the adjustment module is used for adjusting the appointed pixel parameters of each pixel point in the image area except the appointed area in the image where the appointed area is located to be not in the pixel parameter range;
the execution module is used for executing preset processing operation on the display interface and the target watermark image to obtain a watermark superposition image; the pixel parameters of each pixel point in the superimposed image, which are the same as the position information of the target area, are the pixel parameters of the pixel points, which are the same as the position information of the display interface, in the superimposed image, and the pixel parameters of each pixel point in the area except for the superimposed area in the superimposed image are obtained by fusing the pixel parameters of the pixel points, which are the same as the position information of the display interface and the target watermark image.
Optionally, in a specific implementation manner, the execution module includes:
and the result determining submodule determines the pixel parameter of each pixel point in the target area as the pixel parameter of the pixel point with the same position information as the pixel point in the watermark superimposed image to be generated, and determines the fusion result of the pixel parameter of the pixel point with the same position information as the image in the watermark superimposed image as the pixel parameter of the pixel point with the same position information as the pixel point in the watermark superimposed image as the pixel point in the area except the target area in the display interface, so as to obtain the watermark superimposed image.
Optionally, in a specific implementation manner, the designated area is the target area;
the result determination submodule is specifically configured to:
setting the target watermark image as a foreground image and setting the display interface as a background image;
traversing each pixel point in the background image, and determining whether the appointed pixel parameter of each pixel point belongs to the pixel parameter range when traversing to each pixel point;
if not, determining the pixel point as a first type pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same image position information in the foreground image as the pixel parameters of the pixel point with the same position information in the watermark superposition image to be generated, and traversing the next pixel point;
If yes, determining 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 watermark superimposed image, and traversing the next pixel point;
and when all the pixel points in the background image are traversed, obtaining the watermark superposition image.
Optionally, in a specific implementation manner, the designated area is the reference area;
the result determination submodule is specifically configured to:
setting the target watermark image as a foreground image and setting the display interface as a background image;
traversing each pixel point in the foreground image, and determining whether the appointed pixel parameter of each pixel point belongs to the pixel parameter range when traversing to each pixel point;
if not, determining the pixel point as a second type pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same image position information in the background image as the pixel parameters of the pixel point with the same position information in the watermark superposition image to be generated, and traversing the next pixel point;
if yes, determining the pixel parameters of the pixel point as the pixel parameters of the pixel point which is the same as the pixel point in the watermark superimposed image, and traversing the next pixel point;
And when all the pixel points in the foreground image are traversed, obtaining the watermark superposition image.
Optionally, in a specific implementation manner, the preset processing operation is a color operation.
Optionally, in a specific implementation manner, the specified pixel parameter includes: transparency.
Optionally, in a specific implementation manner, the apparatus further includes:
and the layered display module is used for layered superposition display of the watermark superposition image above the currently displayed image.
Optionally, in a specific implementation manner, the apparatus further includes a target watermark image acquisition module, where the target watermark image acquisition module includes:
the image generation sub-module is used for acquiring watermark characters determined based on a user instruction and generating a target watermark image with transparency being target transparency based on the watermark characters; wherein the user instruction includes the target transparency;
or,
and the image receiving sub-module is used for receiving the target watermark image sent by the user.
Optionally, in a specific implementation manner, the image generating sub-module is specifically configured to:
generating a vector diagram of the watermark characters;
converting the vector image into a basic watermark image with transparency being the target transparency;
Determining the resolution of a target watermark image to be generated;
determining the position areas of a plurality of basic watermark images in an original image for generating the target watermark image based on the resolution;
and superposing the basic watermark image in the original image according to the position area to obtain a target watermark image.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of any method embodiment when executing the program stored in the memory.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having a computer program stored therein, which when executed by a processor, implements the steps of any of the method embodiments described above.
In a fifth aspect, the present application embodiment also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of any of the method embodiments described above.
The beneficial effects of the embodiment of the application are that:
the above can be seen that, by applying the solution provided by the embodiment of the present application, the target area where the target information in the display interface is located may be determined first; then, determining a parameter range of a specified pixel parameter of each pixel point in the specified area as a pixel parameter range; the designated area comprises a target area or a reference area which is the same as the position information of the target area in the target watermark image; then, the appointed pixel parameters of each pixel point in the image except the appointed area in the image where the appointed area is located can be adjusted to be not in the pixel parameter range; and then, carrying out preset processing operation on the display interface and the target watermark image to obtain a watermark superimposed image, wherein the pixel parameter of each pixel point in the superimposed area with the same position information as the target area in the obtained watermark superimposed image is the pixel parameter of the pixel point with the same position information in the display interface, and the pixel parameter of each pixel point in the area except the superimposed area in the watermark superimposed image is obtained by fusing the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image.
Based on the above, by applying the scheme provided by the embodiment of the application, the image area screening is performed on the display interface or the target watermark image by setting the pixel parameter range and utilizing the pixel parameter range. Therefore, when the watermark superimposed image is generated, pixel parameters of each pixel point in the target area where the target information is located can be reserved, so that the target information is not blocked by watermark characters, further, the influence of the watermark information on the operation of a user on the target information is avoided, and the use experience of the user is enhanced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other embodiments may also be obtained according to these drawings to those skilled in the art.
Fig. 1 is a schematic flow chart of a watermark superimposing method according to an embodiment of the present application;
FIG. 2 (a) is an exemplary diagram of a display interface provided by an embodiment of the present application;
FIG. 2 (b) is another exemplary diagram of a display interface provided by an embodiment of the present application;
Fig. 2 (c) is an exemplary diagram of a watermark superimposing effect of a display interface provided in an embodiment of the present application;
fig. 2 (d) is an exemplary diagram of another watermark superimposing effect of the display interface provided in the embodiment of the present application;
FIG. 3 (a) is a schematic diagram illustrating an implementation method of the preset processing operation according to the embodiment of the present application;
FIG. 3 (b) is a schematic diagram illustrating another implementation method of the preset processing operation according to the embodiment of the present application;
fig. 4 is a schematic diagram of a specific example of a watermark superimposing method according to an embodiment of the present application;
fig. 5 is a flowchart of a specific example of a watermark superimposing method according to an embodiment of the present application;
fig. 6 is another schematic diagram of a specific example of a watermark superimposing method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a watermark superimposing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. Based on the embodiments herein, a person of ordinary skill in the art would be able to obtain all other embodiments based on the disclosure herein, which are within the scope of the disclosure herein.
The watermark information may block the operation item identifier such as GUI, OSD, etc. in the display interface, and affect the user to perform related operations on the operation item.
In order to solve the technical problems, embodiments of the present application provide a watermark superimposing method.
The method can be applied to various application scenes needing watermark superposition on the display interface, for example, watermark superposition is carried out on the display interface of the display equipment of the monitoring system; and when the electronic equipment runs the payment application program, carrying out watermark superposition and the like on a display interface of the electronic equipment.
In addition, the method can be applied to various electronic devices capable of performing data processing, such as mobile phones, notebook computers, desktop computers and the like; the electronic device may be an independent electronic device or a device cluster composed of a plurality of electronic devices, and for clarity of line, the electronic device will be hereinafter referred to as an electronic device.
Based on this, the embodiment of the present application does not specifically limit the application scenario and execution subject of the method.
The watermark superposition method provided by the embodiment of the application can comprise the following steps:
determining a target area where target information in a display interface is located;
Determining a parameter range of a specified pixel parameter of each pixel point in the specified area as a pixel parameter range; the appointed area comprises the target area or a reference area which is the same as the position information of the target area in the target watermark image;
adjusting the appointed pixel parameters of all pixel points in the image except the appointed area in the image where the appointed area is located to be not in the pixel parameter range;
performing preset processing operation on the display interface and the target watermark image to obtain a watermark superposition image;
the pixel parameters of each pixel point in the superimposed image, which are the same as the position information of the target area, are the pixel parameters of the pixel points, which are the same as the position information of the display interface, in the superimposed image, and the pixel parameters of each pixel point in the area except for the superimposed area in the superimposed image are obtained by fusing the pixel parameters of the pixel points, which are the same as the position information of the display interface and the target watermark image.
The above can be seen that, by applying the solution provided by the embodiment of the present application, the target area where the target information in the display interface is located may be determined first; then, determining a parameter range of a specified pixel parameter of each pixel point in the specified area as a pixel parameter range; the designated area comprises a target area or a reference area which is the same as the position information of the target area in the target watermark image; then, the appointed pixel parameters of each pixel point in the image except the appointed area in the image where the appointed area is located can be adjusted to be not in the pixel parameter range; and then, carrying out preset processing operation on the display interface and the target watermark image to obtain a watermark superimposed image, wherein the pixel parameter of each pixel point in the superimposed area with the same position information as the target area in the obtained watermark superimposed image is the pixel parameter of the pixel point with the same position information in the display interface, and the pixel parameter of each pixel point in the area except the superimposed area in the watermark superimposed image is obtained by fusing the pixel parameters of the pixel points with the same position information in the display interface and the target watermark image.
Based on the above, by applying the scheme provided by the embodiment of the application, the image area screening is performed on the display interface or the target watermark image by setting the pixel parameter range and utilizing the pixel parameter range. Therefore, when the watermark superimposed image is generated, pixel parameters of each pixel point in the target area where the target information is located can be reserved, so that the target information is not blocked by watermark characters, further, the influence of the watermark information on the operation of a user on the target information is avoided, and the use experience of the user is enhanced.
The following describes a watermark superimposing method provided in the embodiment of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a watermark superimposing method according to an embodiment of the present application, as shown in fig. 1, the method may include the following steps S101 to S104.
S101: determining a target area where target information in a display interface is located;
when the pictures displayed by the electronic equipment are expected to comprise watermarks, the display interface of the electronic equipment can be subjected to watermark superposition. The display interface is a menu layer, is an interface on the electronic device, and has operation information such as an OSD menu, and is located at the uppermost layer of each layer when the electronic device displays a screen. For example, as shown in fig. 2 (a), the display interface may include a menu bar, and the menu bar may include a power icon, a screen icon, and a system time.
When a watermark is superimposed on a display interface, it is often undesirable for the superimposed watermark to obscure certain information in the display interface, such as LOGO (LOGO), GUI, OSD, etc. in the display interface.
Illustratively, as shown in FIG. 2 (b), the display interface of the electronic device includes a plurality of video presentation areas and menu bars. Wherein, for each video presentation area, the video presentation area corresponds to a video picture transmitted by one video transmission, and each video presentation area comprises a LOGO; the menu bar includes icons for power, screen, and system time. Because the display interface is located at the uppermost part of the layers, when the electronic equipment displays video pictures, the pictures displayed by each video display area comprise LOGO, and the menu bar is always located at the uppermost layer and is not blocked by any video picture.
A plurality of watermark characters of company a are superimposed on the display interface, and the obtained picture is shown in fig. 2 (c), and in the display interface after the superimposed watermark, the watermark characters block the LOGO in the video display area 210 and the screen recording icons in the menu bar. In this way, when the electronic device displays the video frames, the video frames displayed in each video display area 210 include watermark characters, and when the user performs secondary shooting on the displayed video frames, the obtained images include watermark characters, but the LOGO in the video display area 210 cannot be clearly displayed due to being blocked; because the watermark character blocks the screen recording icon, the user may not recognize the screen recording identifier, and further, the screen recording operation of the user is affected.
In this case, before the watermark is superimposed on the display interface, the target area where the target information that is not desired to be blocked by the watermark is located in the display interface may be determined first, and then, when the watermark is superimposed on the display interface, the watermark may not be superimposed on the target area.
Optionally, target information which is carried in the watermark superposition instruction and is not hoped to be shielded by the watermark is obtained, and a target area where the target information is located is determined in a display interface.
For example, when the menu bar and each LOGO in fig. 2 (b) are not desired to be blocked by the watermark, the user may determine the menu bar and each LOGO as target information not desired to be blocked by the watermark, and send a watermark superimposing instruction carrying the target information to the electronic device, so that the electronic device obtains the target information, and determines a target area where the menu bar and each LOGO are located. Thus, when the electronic equipment carries out watermark superposition on the display interface, the target area can not be subjected to watermark superposition.
Optionally, when the watermark is superimposed, the user may select an image area on the display interface, and when the electronic device detects a selection instruction of the image area from the user, the image area selected by the user may be used as a target area where target information that is not desired to be blocked by the watermark is located.
Optionally, the electronic device may determine, in the display interface, display information that matches with key information in a pre-stored key information library, as target information in the display interface, and determine, as the target area, a display area in which the target information is located.
Based on the above, before watermark superposition, the electronic device may first determine the display interface to be displayed, and determine the target information in the display interface, which is not desired to be blocked by the watermark, and the target area where the target information is located.
And when the watermark superposition is carried out on the display interface, a target watermark image for watermark superposition can be obtained.
Optionally, the electronic device stores a plurality of watermark images in advance, and when receiving the watermark superposition instruction, the electronic device can determine a target watermark image for watermark superposition from the watermark images stored in the electronic device.
Optionally, in a specific implementation manner, the method for acquiring the target watermark image may include the following step 11:
step 11: acquiring watermark characters determined based on user instructions, and generating a target watermark image with transparency being target transparency based on the watermark characters; wherein the user instruction includes a target transparency.
In this specific implementation manner, when it is desired to superimpose watermark characters on the display interface, the user may send a user instruction about the watermark characters to the electronic device, for example, the user may send the user instruction to the electronic device by clicking the watermark characters in a watermark word stock of the electronic device, and further, the electronic device may determine the watermark characters indicated by the user instruction; for another example, the watermark superimposing instruction sent by the user for the display interface carries watermark characters, and when the electronic device receives the watermark superimposing instruction, the electronic device may acquire the watermark characters determined by the user instruction, and so on.
Further, the electronic device may generate the target watermark image based on the watermark character.
In addition, when the video picture is displayed, the display interface is always positioned at the uppermost layer of each layer, namely, the information displayed in the display interface is always positioned at the upper layer of the information displayed in the lower layer, so that in order to reduce the influence of watermark information in the display interface after the watermark is superimposed on the display effect of the video picture, the generated watermark character can meet the target watermark image with certain transparency.
When a user sends a user instruction to the electronic device, the target transparency of watermark characters in the target watermark image to be generated can be set. The electronic device may determine the target transparency and generate a target watermark image having the transparency as the target transparency based on the watermark character. The target transparency may be set according to an image format of the target watermark image desired to be generated, for example, when the target watermark image whose image format is the ARGB8888 format is desired to be generated, since the transparency range is 0-255, the target transparency may be 100 or 200, which is reasonable, and the embodiment of the present application is not limited specifically.
For example, the user may click on a watermark character in a watermark word library of the electronic device, and click on a target transparency in a transparency selection area, and send a user instruction to the electronic device, so that when the electronic device receives the user instruction, the electronic device may determine the watermark character and the target transparency determined by the user instruction.
Optionally, to facilitate watermark superimposition, the image shape and the image size of the generated target watermark image may be determined based on the display interface.
For clarity of line, the manner of generating the target watermark image will be described in detail below.
Therefore, when the watermark is superimposed on the display interface, the user can set the watermark character desired to be superimposed and the transparency of the target watermark image by himself, so that the display interface after the watermark is superimposed, which meets the requirements of the user, is generated.
Optionally, when it is desired to update the watermark characters in the display interface after the watermark superposition, the user may send an update instruction for the watermark characters of the display interface, which carries a new watermark character and/or a new target transparency, to the electronic device, and further, when the electronic device receives the update instruction, the electronic device may update the display interface after the watermark superposition based on the new watermark character and/or the new target transparency.
Optionally, in a specific implementation manner, the method for acquiring the target watermark image may include the following step 12:
step 12: and receiving the target watermark image sent by the user.
In this specific implementation manner, the user may send the target watermark image desired for watermark superimposition to the electronic device, so that the electronic device may receive the target watermark image sent by the user, and use the target watermark image to watermark the display interface.
Optionally, in order to achieve a better watermark superimposing effect, after receiving the target watermark image sent by the user, the electronic device may adjust the image shape of the target watermark image and the picture shape of the display interface based on the image shape and the image size of the display interface, so that the image shape of the target watermark image matches the image shape of the display interface, and the image size of the target watermark image matches the image size of the display interface.
Therefore, when the watermark superposition is carried out on the display interface, a user can set a target watermark image which is expected to be superimposed by himself, and thus, the display interface after the watermark superposition can meet the watermark superposition requirement of the user.
Optionally, when it is desired to update the target watermark image superimposed on the display interface after watermark superimposition, the user may send an update instruction about the display interface carrying a new target watermark image to the electronic device, and further, when the electronic device receives the update instruction, the electronic device may update the display interface after watermark superimposition based on the new target watermark image.
In addition, the target watermark image for watermark superposition often comprises a plurality of watermark characters, so that the phenomenon that the preset watermark superposition effect cannot be achieved due to the fact that only one watermark character is included in a display interface after watermark superposition is avoided.
When it is desired to superimpose a watermark in a display interface to be presented, a watermark image for watermark superimposition of the display interface may be acquired.
S102: determining a parameter range of a specified pixel parameter of each pixel point in the specified area as a pixel parameter range;
the designated area comprises a target area or a reference area which is the same as the position information of the target area in the target watermark image;
in order to avoid that the target area where the target information is located is blocked by watermark characters when the watermarks are superimposed, a pixel parameter range can be preset, so that the target area is distinguished from other image areas through the pixel parameter range when the watermarks are superimposed.
Since the target area where the target information is located in the display interface is not subjected to watermark superposition, namely the target area is directly displayed, when watermark superposition is performed, the target area can be distinguished from other areas in the display interface, and watermark superposition is not performed on the target area. Alternatively, the reference area, which is the same as the position information of the target area, in the target watermark image may be distinguished from other areas in the target watermark image, and the target area corresponding to the reference area may be directly displayed without watermark superimposition.
Based on this, the target area or the reference area in the target watermark image, which is the same as the target area position information, can be determined as the designated area.
When the display interface and the target watermark image are overlapped, the target area is overlapped with the reference area with the same position information.
Further, a parameter range to which a specified pixel parameter of each pixel in the specified region belongs may be determined as the pixel parameter range.
The above-mentioned specified pixel parameters may be set according to actual needs, for example, transparency, R value, G value, B value, etc., which are all reasonable, and are not specifically limited in the embodiment of the present application.
Optionally, in an embodiment of the present application, the specified pixel parameter includes: transparency.
Optionally, when the designated area is the target area, the first parameter range to which each pixel point in the area belongs may be determined as the pixel parameter range. For example, if the transparency of each pixel point in the target area belongs to the first parameter range [50, 150], the pixel parameter range is [50, 150], so that when watermark superimposition processing is performed, watermark superimposition processing is not performed on each pixel point in the display interface, where the transparency belongs to [50, 150], but watermark superimposition processing is performed on each pixel point in the transparency range [0, 50] and (150, 255 ].
Optionally, when the designated image is the target watermark image, the second parameter range to which each pixel point in the reference area in the target watermark image belongs may be determined as the pixel parameter range. For example, if the transparency of each pixel point in the reference area belongs to the second parameter range [100, 200], the pixel parameter range is [100, 200], so that when watermark superimposition processing is performed, watermark superimposition processing is not performed on each pixel point whose transparency belongs to [100, 200] in the target watermark image, but watermark superimposition processing is performed on each pixel point whose transparency belongs to the ranges of [0, 50] and (150,255).
Accordingly, when the specified pixel parameters are different, the pixel parameter ranges may also be different, that is, the pixel parameter ranges may be set according to the specified pixel parameters of each pixel point in the specified area, for example, when the display interface is in RGB format, if the specified pixel parameters are transparency, the pixel parameter ranges may be transparency ranges [ a, B ]; if the specified pixel parameter is an R value, the pixel parameter range may be an R value range C, D.
And the pixel parameter range is used for screening the image area which is not subjected to watermark superposition, namely aiming at the appointed area, if the appointed pixel parameters of all the pixel points in the appointed area belong to the pixel parameter range, watermark superposition processing is not performed on the appointed area.
Accordingly, when it is desired to screen an image area to be subjected to watermark superimposition using a pixel parameter range, the pixel parameter range may be determined using a parameter range to which a specified pixel parameter of each pixel point in the image area to be subjected to watermark superimposition belongs. Based on this, optionally, a parameter range to which a specified pixel parameter of each pixel point in an image region other than the specified region belongs in the image in which the specified region is located may be determined as a pixel parameter range; wherein the designated area includes a target area, or a reference area in the target watermark image that is identical to the position information of the target area.
S103: in the image of the appointed area, the appointed pixel parameters of all pixel points in the image area except the appointed area are adjusted to be not in the pixel parameter range;
in some cases, in an image in which a specified region is located, there may be pixels in an image region other than the specified region where specified pixel parameters satisfy the above-described pixel parameter ranges.
In this case, since the above pixel parameter range is used for screening a region where watermark superimposition is not performed, and region screening is achieved by screening pixel points. When the above pixel parameter ranges are used for region screening, the pixels in the image region except the specified region, in which the specified region is located, are screened out, that is, the screened region includes not only the specified region but also the region except the specified region, which results in inaccurate region screening results and inaccurate watermark superposition results.
After determining the pixel parameter range, the specified pixel parameters of each pixel point in the image except the specified region in the image in which the specified region is located can be adjusted according to the pixel parameter range, that is, the specified pixel parameters of each pixel point in the image except the specified region in the image in which the specified region is located are adjusted to be not in the pixel parameter range.
In this way, in the adjusted image in which the specified region is located, the specified pixel parameters of each pixel point in the specified region belong to the above-mentioned pixel parameter range, and the specified pixel parameters of each pixel point in the image region other than the above-mentioned specified region do not belong to the pixel parameter range. Further, the specified region can be distinguished from the image region other than the specified region by using the pixel parameter range for the image in which the specified image is located.
Optionally, when the designated area is the target area, the image where the designated area is located is a display interface. The specified pixel parameters of each pixel point in the area except the target area in the display interface can be adjusted to be not in the pixel parameter range. Illustratively, the pixel parameter is designated as transparency and the pixel parameter range is [50, 150]. If the pixel point a and the pixel point B having the transparency of [50, 150] exist in the region other than the target region in the display interface, the transparency of each of the pixel point a and the pixel point B may be adjusted to 0.
Optionally, when the designated area is the target watermark image and the position information of the target area is the reference area, the image where the designated area is located is the target watermark image. The specified pixel parameters of each pixel point in the region other than the reference region in the target watermark image may be adjusted to be not within the above-described pixel parameter range. Illustratively, the pixel parameter is designated as transparency and the pixel parameter range is [100, 200]. If there are a pixel point C and a pixel point D whose transparency belongs to [100, 200] in the target watermark image in an area other than the above-described reference area, the transparency of both the pixel point C and the pixel point D may be adjusted to 0.
If the determined pixel parameter range is too large, or if the specified pixel parameter range is too large, the number of pixels whose pixel parameters satisfy the pixel parameter range in the region other than the specified region is large in the image in which the specified region is located, the calculation amount for adjusting the region other than the specified region is large. Optionally, the above pixel parameter range may be adjusted, and according to the adjusted pixel parameter range, the specified pixel parameter of each pixel point in the specified area is adjusted to belong to the adjusted pixel parameter range, and the specified pixel parameter of each pixel point in the area other than the specified area in the image where the specified area is located is adjusted to not belong to the above pixel parameter range.
Illustratively, the pixel parameter range is determined to be [50, 150] based on the transparency of each pixel parameter in the target area. In the display interface, the transparency of the pixel points in the area other than the target area belongs to the range [50, 80], and the pixel parameter range can be adjusted to (80, 150], and the transparency of each pixel point in the target area, the transparency of which belongs to the range [50, 80], can be adjusted so that the transparency of each pixel point in the adjusted target area is within the range of (80, 150).
Optionally, if the specified pixel parameters of each pixel point in the area except the specified area do not meet the above pixel parameter range in the image where the specified area is located, the specified pixel parameters of any pixel point need not be adjusted.
Therefore, the pixel parameter range is utilized to distinguish the region of the image where the specified region is located, so that the accuracy of the region screening result is improved, and the accuracy of the watermark superposition result is further improved.
S104: performing preset processing operation on the display interface and the target watermark image to obtain a watermark superposition image;
in the watermark superimposed image, the pixel parameter of each pixel in the superimposed area with the same position information as the target area is the pixel parameter of the pixel with the same position information in the display interface, and in the watermark superimposed image, the pixel parameter of each pixel in the area except the superimposed area is obtained by fusing the pixel parameters of the pixel with the same position information in the display interface and the target watermark image.
And executing preset processing operation on the display interface and the target watermark image to obtain a watermark superposition image of the display interface and the target watermark image. In the watermark superimposed image, the pixel parameter of each pixel in the superimposed area with the same position information as the target area is the pixel parameter of the pixel with the same position information in the display interface, and the pixel parameter of each pixel in the area other than the superimposed area is the pixel parameter obtained by fusion based on the pixel parameters of the pixel with the same position information in the display interface and the target watermark image.
The preset processing operation is used for dividing the area of the image where the designated area is located, and then respectively taking the pixel parameters of each pixel point in the target area as the pixel parameters of each pixel point in the overlapped area which is the same as the position information of the target area in the watermark overlapped image; and taking the fusion result of the pixel parameters of all the pixel points in the areas except the target area as the pixel parameters of the pixel points with the same position information in the watermark superposition image.
The fusion result of the pixel parameters may be a sum value of the pixel parameters or a weighted sum value of the pixel parameters, which is reasonable, and the fusion manner is not specifically limited in the embodiment of the present application.
Optionally, in a specific implementation manner, the preset processing operation is a color operation.
In this specific implementation manner, a color operation may be performed on the display interface and the target watermark image, to obtain a watermark superimposed image.
The color operation refers to that the pixel points meeting the pixel parameter range do not participate in TDE (Two Dimensional Engine, two-dimensional engine) operation, the pixel parameters of the pixel points with the same position information as the pixel points in the background image are directly output, the pixel points not meeting the pixel parameter range participate in TDE operation, and the pixel parameter fusion result of the pixel points is output.
The color operation includes a foreground mode and a background mode. The foreground mode is to perform color operation on the foreground image, and the background mode is to perform color operation on the background image.
The TDE operation is an operation of providing image rendering operations such as color filling, pixel shifting, and scaling to OSD and GUI by hardware.
The pixel parameter range is the operating condition of color operation. Specifically, the pixel points at the pixel positions meeting the pixel 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 image are directly output. For example, executing color operation on the display interface and the target watermark image, and sequentially judging whether the designated pixel parameters of each pixel point belong to the pixel parameter range according to the display interface, if so, using 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 superimposed picture; if the specified pixel parameters of the pixel point do not meet the pixel parameter range, the pixel point is fused with the pixel point with the same position information as the pixel point in the target watermark image, 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 picture.
Therefore, by utilizing the pixel parameter range to carry out color operation on the display interface and the target watermark image, a watermark superposition image can be obtained, and the target area in the display interface in the obtained watermark superposition image is not blocked by watermark information.
Illustratively, as shown in fig. 2 (d), the LOGO, the power icon, the screen icon, and the system time icon in the display interface are taken as target information, and then the watermark superimposing method described above is performed on the display interface. In the obtained superimposed picture, watermarks are not superimposed in the target areas where the LOGO, the power supply icon, the screen recording icon and the system time icon are located, so that the LOGO, the power supply icon, the screen recording icon and the system time icon are not shielded by the watermarks.
Optionally, in a specific implementation manner, step S104 includes the following step 21:
step 21: and determining the pixel parameters of each pixel point in the target area as the pixel parameters of the pixel points with the same position information as the pixel points in the watermark superimposed image to be generated, and determining the fusion result of the pixel parameters of the pixel points with the same position information as the image in the watermark superimposed image as the pixel parameters of the pixel points with the same position information as the pixel points in the watermark superimposed image in the area except the target area in the display interface to obtain the watermark superimposed image.
In this embodiment, in order to avoid that the target area of the display interface is blocked by the watermark, the pixel parameter of each pixel point in the target area may be directly used as the pixel parameter of each pixel point in the overlay area that is the same as the position information of the target area in the overlay image. That is, when the preset processing operation is performed on the display interface and the target watermark image, the pixel parameters of the pixel points in the target area are not required to be fused with the pixel parameters of the pixel points in the reference area, which is the same as the position information of the target area, in the target watermark image.
The pixel parameter of each pixel in the target area can be used as the pixel parameter of the pixel with the same position information as the pixel in the superposition area of the watermark superposition image, and the pixel in the area except the target area in the display interface and the pixel with the same position information as the pixel in the target watermark image can be fused to obtain the fusion result, and the fusion result is determined to be the pixel parameter of the pixel with the same position information as the pixel in the watermark superposition image. In this way, in the obtained watermark superimposed image, the pixel parameter of each pixel in the superimposed area with the same position information as the target area is the pixel parameter of the pixel with the same position information in the target area, and the pixel parameter of each pixel in the area outside the superimposed area is the fusion result of the pixel parameters of the pixel with the same position information as the pixel in the display interface and the target watermark image.
The above can be seen that, by applying the scheme provided by the embodiment of the application, the pixel parameter range is set, and the image region screening is performed on the display interface or the target watermark image by using the pixel parameter range. Therefore, when the watermark superimposed image is generated, pixel parameters of each pixel point in the target area where the target information is located can be reserved, so that the target information is not blocked by watermark characters, further, the influence of the watermark information on the operation of a user on the target information is avoided, and the use experience of the user is enhanced.
Optionally, in a specific implementation manner, the step 21 may include the following steps 31 to 35, where the designated area is a target area:
step 31: setting a target watermark image as a foreground image and setting a display interface as a background image;
step 32: traversing each pixel point in the background image, and determining whether the appointed pixel parameter of each pixel point belongs to a pixel parameter range when traversing to each pixel point; if not, go to step 33; if yes, go to step 34;
step 33: determining the pixel point as a first type pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same position information as the first type pixel point in the foreground image, serving as the pixel parameters of the pixel point with the same position information as the first type pixel point in the watermark superposition image to be generated, and traversing the next pixel point;
Step 34: determining the pixel parameters of the pixel points as the pixel parameters of the pixel points with the same position information as the pixel points in the watermark superimposed image, and traversing the next pixel point;
step 35: and obtaining the watermark superposition image when all the pixel points in the background image are traversed.
In this specific implementation manner, the designated area is a target area, and when a preset processing operation is performed on the display area and the target watermark image, the target watermark image may be set as a foreground image, and the display interface may be set as a background image. Wherein the foreground image is positioned on the upper layer of the background image.
In this way, each pixel point in the background image can be traversed in turn, and when each pixel point is traversed, whether the specified pixel parameter of the pixel point belongs to the pixel parameter range is determined.
And if the specified pixel parameters of the pixel point do not belong to the pixel parameter range, determining the pixel point as a first type pixel point in the region for watermark superposition in the background image, performing superposition calculation on the pixel parameters of the pixel point with the same position information as the first type pixel point in the foreground image, further determining the superposition calculation result of the first type pixel point as the pixel parameters of the pixel point with the same position information as the pixel point in the watermark superposition image to be generated, and traversing the next pixel point.
The superposition calculation of the plurality of pixel parameters may be that the plurality of pixel parameters are directly added, or that the weighting parameters of the plurality of pixel parameters are added, which is reasonable, and is not specifically limited in the embodiment of the present application.
If the specified pixel parameter of the pixel belongs to the pixel parameter range, the pixel is located in the area where watermark superposition is not performed in the background image, the pixel parameter of the pixel can be directly determined as the pixel parameter of the pixel with the same position information as the pixel in the watermark superposition image to be generated, and then the next pixel is traversed.
Thus, when all the pixel points in the background image are traversed, the watermark superposition image can be obtained.
When the preset processing operation is a color operation, the background mode in the color operation is realized in the steps 31-35, that is, the watermark superimposed image of the foreground image and the background image is obtained by executing the color operation on the background image.
Illustratively, as shown in fig. 3 (a), the foreground image is a target watermark image, and the background image is a display interface. And traversing each pixel point in the background image, and determining whether the designated pixel parameter of each pixel point belongs to a pixel parameter range when traversing to each pixel point. If the watermark is not included, the pixel parameters of the pixel point, which are the same as the position information of the pixel point, in the pixel point and the foreground image can be subjected to superposition calculation, and the superposition calculation result is used as the pixel parameters of the pixel point, which are the same as the position information of the pixel point, in the watermark superposition image to be generated. If the watermark belongs to the watermark, the pixel parameter of the pixel point can be determined as the pixel parameter of the pixel point which is the same as the position information of the pixel point in the watermark superposition image to be generated.
In this way, when all the pixels in the background image are traversed, the pixel parameter superposition calculation is not performed on each pixel in the target area 310 in the background image, but the pixel parameter of the pixel is directly used as the pixel parameter of the pixel with the same position information as the pixel in the watermark superposition image, so that in the watermark superposition image, the pixel parameter of each pixel in the superposition area 340 is the pixel parameter of the pixel with the same position information in the target area 310, that is, the target area 310 is not blocked by the watermark.
And each pixel point in the area 320 except the target area 310 in the background image is identical to the pixel point in the foreground image, which is identical to the position information of the pixel point, to perform the pixel parameter superposition calculation. Accordingly, in the generated watermark superposition image, the pixel parameters of each pixel located in the region 330, that is, the superposition calculation result of the pixel parameters of each pixel of the region 320 and the pixel with the same position information as the pixel in the foreground image.
Optionally, in a specific implementation manner, the designated area is a reference area in the target watermark image, where the reference area is the same as the target area position information, and step 21 may include the following steps 41 to 45:
Step 41: setting a target watermark image as a foreground image and setting a display interface as a background image;
step 42: traversing each pixel point in the foreground image, and determining whether the appointed pixel parameter of each pixel point belongs to a pixel parameter range when traversing to each pixel point; if not, step 43: if yes, go to step 44;
step 43: determining the pixel point as a second type pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same position information as the image in the background image, serving as the pixel parameters of the pixel point with the same position information as the second type pixel point in the watermark superposition image to be generated, and traversing the next pixel point;
step 44: determining the pixel parameters of the pixel points as the pixel parameters of the pixel points which are the same as the pixel points in the watermark superimposed image, and traversing the next pixel point;
step 45: and obtaining the watermark superposition image when all the pixel points in the foreground image are traversed.
In this specific implementation manner, if the designated area is the reference area with the same position information as the target area in the target watermark image, the target watermark image may be set as the foreground image, and the display interface may be set as the background image.
Then, each pixel point in the foreground image can be traversed, and when each pixel point is traversed, whether the pixel point belongs to the pixel parameter range or not is determined.
And if the specified pixel parameter of the pixel point does not belong to the pixel parameter range, the pixel point is located in the region where watermark superposition is performed in the foreground image, the pixel point can be determined as a second type pixel point, then, superposition calculation is performed on the pixel parameter of the pixel point with the same position information as that in the background image, the superposition calculation result is determined as the pixel parameter of the pixel point with the same position information as that of the second type pixel point in the watermark superposition image to be generated, and the next pixel point is traversed.
If the specified pixel parameter of the pixel belongs to the pixel parameter range, the pixel is located in the area where watermark superposition is not performed in the foreground image, the pixel parameter of the pixel with the same position information as the pixel in the background image can be directly determined as the pixel parameter of the pixel with the same position information as the pixel in the watermark superposition image to be generated, and the next pixel can be traversed.
Thus, when all the pixel points in the foreground image are traversed, a watermark superposition image can be obtained.
When the preset processing operation is a color operation, the foreground mode in the color operation is realized in the steps 41-45, that is, the watermark superimposed image of the foreground image and the background image is obtained by executing the color operation on the foreground image.
Illustratively, as shown in fig. 3 (b), the foreground image is a target watermark image, and the background image is a display interface. And traversing each pixel point in the foreground image, and determining whether the appointed pixel parameter of each pixel point belongs to a pixel parameter range when traversing to each pixel point. If the watermark is not included, the pixel parameters of the pixel point, which are the same as the position information of the pixel point, in the pixel point and the background image can be subjected to superposition calculation, so that the pixel parameters of the pixel point, which are the same as the position information of the pixel point, in the watermark superposition image to be generated are obtained. If the watermark belongs to the watermark, the pixel parameters of the pixel points, which are the same as the pixel position information of the pixel points, in the background image can be determined as the pixel parameters of the pixel points, which are the same as the pixel position information of the pixel points, in the watermark superimposed image to be generated.
In this way, when all the pixels in the foreground image are traversed, the pixel parameters of each pixel in the region 350 in the foreground image are not subjected to the pixel parameter superposition operation, and for each pixel in the region 350, the pixel parameters of the pixel in the background image, which are the same as the pixel position information of the pixel, can be determined as the pixel parameters of the pixel in the watermark superposition image to be generated, which are the same as the pixel position information of the pixel. Thus, in the watermark superimposed image, the pixel parameter of each pixel in the superimposed area 340 is the pixel parameter of the pixel in the background image, which is the same as the position information of the pixel, i.e. the area in the background image, which is the same as the position information of the superimposed area 340, is not blocked by the watermark.
And each pixel point in the area 360 in the foreground image is overlapped with the pixel parameter of the pixel point with the same position information as the pixel point in the background image. Accordingly, in the generated watermark superposition image, the pixel parameter of each pixel located in the region 330, that is, the pixel with the same position information as the pixel in the region 360, is the superposition calculation result of the superposition calculation performed on the pixel with the same position information as the pixel in the background image.
As can be seen from the above, the target region may not be obscured by the watermark, whether traversing the foreground or background map. That is, by setting a pixel parameter range and performing pixel point traversal on an image for setting the pixel parameter range using the pixel parameter range, it is possible to perform region division on the image at the time of watermark superimposition processing. And, through the above-mentioned preset processing operation and pixel parameter range that is set up, can be from the goal area in the goal watermark picture to permeate out. Therefore, through the preset processing operation, the menu bar and the LOGO can be penetrated out from the target watermark image, and further, the menu bar and the LOGO are prevented from being shielded by the watermark, and the use experience of a user is improved.
Optionally, the designated area is a target area. Setting a display interface as a foreground image and setting a target watermark image as a background image; traversing each pixel point in the foreground image, and determining whether the appointed pixel parameter of each pixel point belongs to a pixel parameter range when traversing to each pixel point; if not, determining the pixel point as a third type of pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same position information as the third type of pixel point in the background image, serving as the pixel parameters of the pixel point with the same position information as the third type of pixel point in the watermark superposition image to be generated, and traversing the next pixel point; if yes, determining the pixel parameters of the pixel points as the pixel parameters of the pixel points with the same position information as the pixel points in the watermark superimposed image, and traversing the next pixel point; and obtaining the watermark superposition image when all the pixel points in the foreground image are traversed.
Optionally, the designated area is a reference area. Setting a display interface as a foreground image and setting a target watermark image as a background image; traversing each pixel point in the background image, and determining whether the appointed pixel parameter of each pixel point belongs to a pixel parameter range when traversing to each pixel point; if not, determining the pixel point as a fourth type of pixel point, determining a superposition calculation result of pixel parameters of the fourth type of pixel point which are the same as the image position information in the foreground image, serving as the pixel parameters of the pixel point which is the same as the fourth type of pixel point in the watermark superposition image to be generated, and traversing the next pixel point; if yes, determining the pixel parameters of the pixel points which are the same as the pixel point position information in the foreground image as the pixel parameters of the pixel points which are the same as the pixel point position information in the watermark superimposed image, and traversing the next pixel point; and obtaining the watermark superposition image when all the pixel points in the background image are traversed.
Next, a specific description will be given of a generation method of the target watermark image.
When watermark superposition is performed, when the designated pixel parameter is transparency, the electronic device can generate a target watermark image with transparency as target transparency based on watermark characters after acquiring the watermark characters determined based on the user instructions.
Optionally, in a specific implementation manner, step 11 of generating the target watermark image with the transparency being the target transparency based on the watermark character may include the following steps 51-55:
step 51: generating a vector diagram of watermark characters;
step 52: converting the vector image into a basic watermark image with the transparency being the target transparency;
step 53: determining the resolution of a target watermark image to be generated;
step 54: determining a location area of the plurality of base watermark images in an original image used for generating the target watermark image based on the resolution;
step 55: and superposing the basic watermark image in the original image according to the position area to obtain the target watermark image.
In this embodiment, when the specified pixel parameter is transparency, the electronic device may further obtain the target transparency in the user instruction when obtaining the watermark character determined based on the user instruction. And then, generating a target watermark image for watermark superposition based on the watermark characters and the target transparency.
Specifically, in order to avoid edge jaggies of watermark characters, the electronic device may generate a vector diagram of the watermark characters, which affects the display effect of the generated target watermark image.
Alternatively, the electronic device may generate a vector image of watermark characters using a freetype word library.
By way of example, the electronic device may be equipped with an APP (Application) and DSP (Digital Signal Processing, digital signal processor). Thus, when receiving the user instruction, the APP can acquire the user name carried by the user instruction and issue the user name to the DSP. In this way, the DSP can receive the user name issued by the APP, acquire the current system time, splice the user name and the current system time, and take the spliced result as watermark characters.
Optionally, the user instruction may further include a character format of the watermark character, and the character format includes a character size and a character rotation angle. Before the electronic device generates the vector diagram 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. Thus, a watermark character having a rotated character size satisfying the character format described above is obtained, and a vector diagram concerning the watermark character is generated.
When the electronic device acquires a new watermark character, a new vector diagram of the new watermark character can be generated, and the generated target watermark image is updated by using the new vector diagram.
The electronic device may then convert the vector image into a base watermark image having a transparency that is the target transparency.
Alternatively, the image format of the basic watermark image may be set according to actual needs, for example, may be an ARGB8888 format, an ARGB4888 format, etc., which are all reasonable, and are not specifically limited in the embodiment of the present application.
When the electronic device acquires a new target transparency, the generated target watermark image may be updated with the new target transparency.
Since the generated target watermark image is used for watermark superposition on the display interface, in order to unify display definition, the resolution of the display interface can be used as the resolution of the target watermark image. Based on this, the electronic device may acquire the resolution of the display interface, and then determine the resolution as the resolution of the target watermark image to be generated.
Then, the electronic device may determine a target image size corresponding to the resolution in the stored correspondence between the resolution and the image size, and acquire an original image having an image size equal to the target image size for generating the target watermark image.
Further, the arrangement of the plurality of basic watermark images in the original image is determined, the positional information of the plurality of basic watermark images arranged in the arrangement is determined in the original image, and further, the plurality of basic watermark images are superimposed in the original image in accordance with the positional region, thereby obtaining a target watermark image including the plurality of basic watermark images. When the target watermark image is obtained, the watermark superposition can be carried out on the display interface by utilizing the target watermark image.
The above can be seen that when the target watermark image is obtained, the watermark superposition can be performed on the display interface by using the target watermark image. Moreover, as the watermark characters and the target transparency are specified by the user, the customization requirement of the user on the generated target watermark image can be met. And, because the above-mentioned basic watermark image is based on vector diagram generation of watermark character, then, the basic watermark image that is produced can reduce the sawtooth of the character edge, improve the display effect of the target watermark image.
Optionally, in a specific implementation manner, the watermark superimposed image is displayed in a layered manner above the currently displayed image.
In this embodiment, the watermark superimposing image is obtained by superimposing the target watermark image on the display interface, that is, the display interface after superimposing the watermark. Thus, the watermark overlay image is positioned uppermost in the layer instead of the display interface. When the electronic equipment displays the image, the watermark is overlapped on the upper image layer of the currently displayed image, and is overlapped with the currently displayed image for display.
Therefore, when the electronic equipment displays the image, the image watched by the user comprises watermark characters, and the watermark characters can not shade target information such as LOGO, menu bars and the like in the display interface.
Correspondingly, watermark superposition can be performed on the capture image layer and the WEB (network) display image layer, and the specific implementation manner of watermark superposition on the capture image layer and the WEB display image layer is the same as that of watermark superposition on the display interface, and is not repeated here. The display interface, the capture layer and the WEB display layer are only examples of the display layer positioned on the upper layer of the display image, and a method for superposing watermarks on other display layers positioned on the upper layer of the display image by using the method is also within the protection scope of the application.
In order to facilitate understanding of the watermark superimposing method provided in the embodiments of the present application, a specific example of watermark superimposing on a display interface is described below with reference to fig. 4 to 6.
As shown in fig. 4, when it is desired to generate a target watermark image, the electronic device may obtain watermark characters, character formats, and target transparency determined by user instructions. Then, the electronic device may send the watermark character and the target transparency to the DSP by using the APP carried by the electronic device itself, so that the DSP may receive the watermark character, the character format and the target transparency.
The DSP may then load the freetype word stock engine, copy the watermark characters to the freetype word stock engine, and issue the character formats to the freetype word stock engine. Thus, the freetype word stock engine may receive the watermark characters and rotate the watermark characters according to a character format to generate a vector diagram of the rotated watermark characters. And sends the vector diagram to the DSP.
The DSP receives a vector image of watermark characters, converts the vector image into a basic watermark image with the transparency being the target transparency, then determines the target image size of the target watermark image according to the resolution of the target watermark image to be generated, determines a plurality of reference watermark images, determines the position areas in the original image for generating the target watermark image, and then respectively overlaps each reference watermark image in each position area in the original image to generate the target watermark image.
As shown in fig. 5, the watermarking process of the display interface may include the following steps S501-S511:
s501: receiving a watermark superposition instruction;
s502: obtaining watermark characters, watermark formats and target transparency, and judging whether an image generation process is started or not; if yes, executing S503; if not, executing step S508;
s503: starting a freetype word stock engine and generating a vector diagram of watermark characters by using the freetype word stock engine;
s504: converting the vector image into a basic watermark image with transparency meeting the target transparency;
s505: calculating the number m x n of superimposed reference watermark images in a target watermark image to be generated according to the resolution of a display interface, and determining the position information of each basic watermark image;
s506: generating a target watermark image comprising m x n base watermark images;
s507: copying the target watermark image by the TDE and caching the target watermark image;
s508: acquiring a target watermark image;
s509: acquiring a display interface and determining a target area where target information is located;
s510: performing color operation on the display interface and the target watermark image;
s511: a watermark overlay image is generated.
When the user wishes to superimpose the watermark image in the display interface, a watermark superimposing instruction may be sent to the electronic device. Thus, the electronic device can receive the watermark superposition instruction, acquire watermark characters, watermark formats and target transparency, and judge whether the image generation flow is started or not.
When the image generation flow is started, the electronic device can start a freetype word stock engine and generate a vector image of watermark characters by using the freetype word stock engine, convert the vector image into a basic watermark image with transparency meeting the target transparency, then determine the resolution of a display interface, calculate the number m x n of superimposed reference watermark images in the target watermark image to be generated according to the resolution of the display interface, further determine the position information of each basic watermark image, and generate the target watermark image comprising m x n basic watermark images according to the position information. Thus, the TDE copies the target watermark image and buffers the target watermark image.
When the image generation flow is not started, the electronic device can acquire the target watermark image according to the watermark characters, the watermark format and the target transparency.
When the target watermark image is obtained, the electronic equipment can obtain a display interface, determine a target area where target information is located, and then determine a pixel parameter range according to specified pixel parameters of each pixel point in the target area or specified pixel parameters of each pixel point in a reference area which is the same as the position information of the target area in the target watermark image. Furthermore, the electronic device can perform color operation on the display interface and the target watermark image by using the pixel parameter range to obtain a watermark superposition image.
When the watermark superposition is carried out on the display interface, the interaction flow of the APP and the DSP is shown in figure 6. After receiving the watermark superposition instruction, the APP acquires a display interface to be subjected to watermark superposition, and issues the display interface to the DSP. In this way, the DSP may receive the display interface, determine a target area in which the target information is located in the display interface, determine a pixel parameter range based on the execution pixel parameters of each pixel point in the target area or a reference area in which the target watermark image is identical to the target area position information, and then perform color operation on the display interface and the target watermark image by using the pixel parameter range, that is, determine the pixel parameters of each pixel point in the target area as the pixel parameters of the pixel point identical to the pixel point position information in the watermark superimposed image to be generated; and determining a fusion result of pixel parameters of each pixel point in the area except the target area in the display interface and the pixel parameters of the pixel points which are the same as the pixel point position information in the target watermark image as the pixel parameters of the pixel points which are the same as the pixel point position information in the watermark superimposed image, thereby obtaining the watermark superimposed image.
Further, the DSP sends the watermark superimposed image to a VO (Output Unit) to cause the VO to Output the watermark superimposed image.
Based on the same inventive concept, the embodiment of the present application further provides a watermark superimposing apparatus, corresponding to a watermark superimposing method shown in fig. 1 provided in the embodiment of the present application.
Fig. 7 is a schematic structural diagram of a watermark superimposing apparatus provided in an embodiment of the present application, and as shown in fig. 7, the apparatus may include the following modules:
an image acquisition module 710 for acquiring a target watermark image comprising a plurality of watermark characters;
a range determining module 720, configured to determine, as a pixel parameter range, a parameter range to which a specified pixel parameter of each pixel point in the specified area belongs; the appointed area comprises the target area or a reference area which is the same as the position information of the target area in the target watermark image;
an adjustment module 730, configured to adjust, in the image in which the specified area is located, specified pixel parameters of each pixel point in the image area except for the specified area to be not in the pixel parameter range;
the execution module 740 is configured to execute a preset processing operation on the display interface and the target watermark image, so as to obtain a watermark superimposed image; the pixel parameters of each pixel point in the superimposed image, which are the same as the position information of the target area, are the pixel parameters of the pixel points, which are the same as the position information of the display interface, in the superimposed image, and the pixel parameters of each pixel point in the area except for the superimposed area in the superimposed image are obtained by fusing the pixel parameters of the pixel points, which are the same as the position information of the display interface and the target watermark image.
The above can be seen that, by applying the scheme provided by the embodiment of the application, the pixel parameter range is set, and the image region screening is performed on the display interface or the target watermark image by using the pixel parameter range. Therefore, when the watermark superimposed image is generated, pixel parameters of each pixel point in the target area where the target information is located can be reserved, so that the target information is not blocked by watermark characters, further, the influence of the watermark information on the operation of a user on the target information is avoided, and the use experience of the user is enhanced.
Optionally, in a specific implementation manner, the executing module 740 includes:
and the result determining submodule determines the pixel parameter of each pixel point in the target area as the pixel parameter of the pixel point with the same position information as the pixel point in the watermark superimposed image to be generated, and determines the fusion result of the pixel parameter of the pixel point with the same position information as the image in the watermark superimposed image as the pixel parameter of the pixel point with the same position information as the pixel point in the watermark superimposed image as the pixel point in the area except the target area in the display interface, so as to obtain the watermark superimposed image.
Optionally, in a specific implementation manner, the designated area is the target area;
the result determination submodule is specifically configured to:
setting the target watermark image as a foreground image and setting the display interface as a background image;
traversing each pixel point in the background image, and determining whether the appointed pixel parameter of each pixel point belongs to the pixel parameter range when traversing to each pixel point;
if not, determining the pixel point as a first type pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same image position information in the foreground image as the pixel parameters of the pixel point with the same position information in the watermark superposition image to be generated, and traversing the next pixel point;
if yes, determining 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 watermark superimposed image, and traversing the next pixel point;
and when all the pixel points in the background image are traversed, obtaining the watermark superposition image.
Optionally, in a specific implementation manner, the designated area is the reference area;
The result determination submodule is specifically configured to:
setting the target watermark image as a foreground image and setting the display interface as a background image;
traversing each pixel point in the foreground image, and determining whether the appointed pixel parameter of each pixel point belongs to the pixel parameter range when traversing to each pixel point;
if not, determining the pixel point as a second type pixel point, determining a superposition calculation result of pixel parameters of the pixel point with the same image position information in the background image as the pixel parameters of the pixel point with the same position information in the watermark superposition image to be generated, and traversing the next pixel point;
if yes, determining the pixel parameters of the pixel point as the pixel parameters of the pixel point which is the same as the pixel point in the watermark superimposed image, and traversing the next pixel point;
and when all the pixel points in the foreground image are traversed, obtaining the watermark superposition image.
Optionally, in a specific implementation manner, the preset processing operation is a color operation.
Optionally, in a specific implementation manner, the specified pixel parameter includes: transparency.
Optionally, in a specific implementation manner, the apparatus further includes:
and the layered display module is used for layered superposition display of the watermark superposition image above the currently displayed image.
Optionally, in a specific implementation manner, the apparatus further includes a target watermark image acquisition module, where the target watermark image acquisition module includes:
the image generation sub-module is used for acquiring watermark characters determined based on a user instruction and generating a target watermark image with transparency being target transparency based on the watermark characters; wherein the user instruction includes the target transparency;
or,
and the image receiving sub-module is used for receiving the target watermark image sent by the user.
Optionally, in a specific implementation manner, the image generating sub-module is specifically configured to:
generating a vector diagram of the watermark characters;
converting the vector image into a basic watermark image with transparency being the target transparency;
determining the resolution of a target watermark image to be generated;
determining the position areas of a plurality of basic watermark images in an original image for generating the target watermark image based on the resolution;
And superposing the basic watermark image in the original image according to the position area to obtain a target watermark image.
The embodiment of the application also provides an electronic device, as shown in fig. 8, including:
a memory 801 for storing a computer program;
the processor 802 is configured to implement the steps of a watermark superimposing method provided in the embodiments of the present application when executing a program stored in the memory 801.
And the electronic device may further comprise a communication bus and/or a communication interface, through which the processor 802, the communication interface, and the memory 801 communicate with each other.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In a further embodiment provided herein, there is also provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the watermark superimposing methods described above.
In a further embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the watermark superimposing methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a Solid State Disk (SSD), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus embodiments, the electronic device embodiments, the computer-readable storage medium embodiments, and the computer program product embodiments, the description is relatively simple, and reference should be made to the description of method embodiments in part, since they are substantially similar to the method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (10)

1.一种水印叠加方法,其特征在于,所述方法包括:1. A watermark superposition method, characterized in that the method includes: 确定显示界面中的目标信息所在的目标区域;Determine the target area where the target information in the display interface is located; 将指定区域中的各像素点的指定像素参数所属的参数范围,确定为像素参数范围;其中,所述指定区域包括所述目标区域,或者,目标水印图像中与所述目标区域的位置信息相同的基准区域;Determine the parameter range to which the specified pixel parameters of each pixel point in the specified area belong as the 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; 将所述指定区域所在图像中,除所述指定区域之外的图像区域中各像素点的指定像素参数调整为不属于所述像素参数范围;In the image where the designated area is located, the designated pixel parameters of each pixel in the image area other than the designated area are adjusted so that they do not fall within the range of the pixel parameters; 对所述显示界面和所述目标水印图像执行预设处理操作,得到水印叠加图像;Perform preset processing operations on the display interface and the target watermark image to obtain a watermark superimposed image; 其中,所述水印叠加图像中,与所述目标区域位置信息相同的叠加区域中每个像素点的像素参数为所述显示界面中位置信息相同的像素点的像素参数,且所述水印叠加图像中,除所述叠加区域之外的区域中每个像素点的像素参数是基于所述显示界面和所述目标水印图像中位置信息相同的像素点的像素参数进行融合得到的。Wherein, in the watermark superimposed image, the pixel parameters of each pixel in the superimposed area with the same position information as the target area are the pixel parameters of the pixels with the same position information in the display interface, and the watermark superimposed image , the pixel parameters of each pixel in the area except the overlay area are obtained by fusion based on the pixel parameters of the pixels with the same position information in the display interface and the target watermark image. 2.根据权利要求1所述的方法,其特征在于,所述对所述显示界面和所述目标水印图像执行预设处理操作,得到水印叠加图像,包括:2. The method according to claim 1, characterized in that performing preset processing operations on the display interface and the target watermark image to obtain a watermark overlay image includes: 将所述目标区域中每个像素点的像素参数,确定为待生成的水印叠加图像中与该像素点位置信息相同的像素点的像素参数,并将所述显示界面中除所述目标区域之外的区域中每个像素点与所述目标水印图像中图像位置信息相同的像素点的像素参数的融合结果,确定为所述水印叠加图像中与该像素点位置信息相同的像素点的像素参数,得到所述水印叠加图像。The pixel parameters of each pixel in the target area are determined as the pixel parameters of the pixels in the watermark superimposed image to be generated that have the same position information as the pixel, and the display interface except the target area is The fusion result of the pixel parameters of each pixel in the area outside and the pixels with the same image position information in the target watermark image is determined as the pixel parameters of the pixels with the same position information as the pixel in the watermark superimposed image. , obtain the watermark superimposed image. 3.根据权利要求2所述的方法,其特征在于,所述指定区域为所述目标区域;3. The method according to claim 2, characterized in that the designated area is the target area; 所述将所述目标区域中每个像素点的像素参数,确定为待生成的水印叠加图像中与该像素点位置信息相同的像素点的像素参数,并将所述显示界面中除所述目标区域之外的区域中每个像素点与所述目标水印图像中图像位置信息相同的像素点的像素参数的叠加计算结果,确定为所述水印叠加图像中与该像素点位置信息相同的像素点的像素参数,得到所述水印叠加图像,包括:Determine the pixel parameter of each pixel in the target area as the pixel parameter of the pixel in the watermark overlay image to be generated that is the same as the position information of the pixel, and remove the target from the display interface. The superposition calculation result of the pixel parameters of each pixel in the area outside the target watermark image and the pixel with the same image position information in the target watermark image is determined as the pixel in the watermark superimposed image with the same position information as the pixel. The pixel parameters of the watermark superimposed image are obtained, including: 将所述目标水印图像设置为前景图,并将所述显示界面设置为背景图;Set the target watermark image as a foreground image, and set the display interface as a background image; 遍历所述背景图中的各像素点,并在遍历到每个像素点时,确定该像素点的指定像素参数是否属于所述像素参数范围;Traverse each pixel in the background image, and when traversing each pixel, determine whether the specified pixel parameter of the pixel belongs to the pixel parameter range; 若否,则将该像素点确定为第一类像素点,并确定该第一类像素点与所述前景图中图像位置信息相同的像素点的像素参数的叠加计算结果,作为待生成的水印叠加图像中与该第一类像素点位置信息相同的像素点的像素参数,并遍历下一像素点;If not, the pixel is determined to be a first type pixel, and the superposition calculation result of the pixel parameters of the first type pixel and the pixel with the same image position information in the foreground image is determined as the watermark to be generated. Overlay the pixel parameters of pixels in the image that have the same position information as the first type of pixel, and traverse the next pixel; 若是,则将该像素点的像素参数,确定为所述水印叠加图像中与该像素点位置信息相同的像素点的像素参数,并遍历下一像素点;If so, determine the pixel parameter of the pixel as the pixel parameter of the pixel with the same position information as the pixel in the watermark superimposed image, and traverse the next pixel; 在遍历完所述背景图中的全部像素点时,得到所述水印叠加图像。After traversing all pixels in the background image, the watermark superimposed image is obtained. 4.根据权利要求2所述的方法,其特征在于,指定区域为所述基准区域;4. The method according to claim 2, characterized in that the designated area is the reference area; 所述将所述目标区域中每个像素点的像素参数,确定为待生成的水印叠加图像中与该像素点位置信息相同的像素点的像素参数,并将所述显示界面中除所述目标区域之外的区域中每个像素点与所述目标水印图像中图像位置信息相同的像素点的像素参数的叠加计算结果,确定为所述水印叠加图像中与该像素点位置信息相同的像素点的像素参数,得到所述水印叠加图像,包括:Determine the pixel parameter of each pixel in the target area as the pixel parameter of the pixel in the watermark overlay image to be generated that is the same as the position information of the pixel, and remove the target from the display interface. The superposition calculation result of the pixel parameters of each pixel in the area outside the target watermark image and the pixel with the same image position information in the target watermark image is determined as the pixel in the watermark superimposed image with the same position information as the pixel. The pixel parameters of the watermark superimposed image are obtained, including: 将所述目标水印图像设置为前景图,并将所述显示界面设置为背景图;Setting the target watermark image as a foreground image and setting the display interface as a background image; 遍历所述前景图中的各像素点,并在遍历到每个像素点时,确定该像素点的指定像素参数是否属于所述像素参数范围;Traverse each pixel in the foreground image, and when traversing each pixel, determine whether the specified pixel parameter of the pixel belongs to the pixel parameter range; 若否,则将该像素点确定为第二类像素点,并确定该第二类像素点与所述背景图中图像位置信息相同的像素点的像素参数的叠加计算结果,作为待生成的水印叠加图像中与该第二类像素点位置信息相同的像素点的像素参数,并遍历下一像素点;If not, the pixel is determined to be a second type of pixel, and the superposition calculation result of the pixel parameters of the second type pixel and the pixel with the same image position information in the background image is determined as the watermark to be generated. Overlay the pixel parameters of pixels in the image that have the same position information as the second type of pixel, and traverse the next pixel; 若是,则将该像素点的像素参数,确定为所述水印叠加图像中与该像素点位置相同的像素点的像素参数,并遍历下一像素点;If yes, the pixel parameter of the pixel point is determined as the pixel parameter of the pixel point at the same position as the pixel point in the watermark superimposed image, and the next pixel point is traversed; 在遍历完所述前景图中的全部像素点时,得到所述水印叠加图像。After traversing all pixels in the foreground image, the watermark superimposed image is obtained. 5.根据权利要求3或4所述的方法,其特征在于,所述预设处理操作为colorkey操作。5. The method according to claim 3 or 4, characterized in that the preset processing operation is a colorkey operation. 6.根据权利要求1-4任一项所述的方法,其特征在于,所述指定像素参数包括:透明度。6. The method according to any one of claims 1-4, characterized in that the specified pixel parameters include: transparency. 7.根据权利要求1所述的方法,其特征在于,所述方法还包括:7. The method according to claim 1, characterized in that, the method further comprises: 在当前所展示的图像上方分层叠加显示所述水印叠加图像。The watermark overlay image is displayed in a layered overlay on top of the currently displayed image. 8.根据权利要求6所述的方法,其特征在于,所述目标水印图像的获取方法,包括:8. The method according to claim 6, characterized in that the method for obtaining the target watermark image includes: 获取基于用户指令所确定的水印字符,并基于所述水印字符生成透明度为目标透明度的目标水印图像;其中,所述用户指令包括所述目标透明度;Obtain the watermark character determined based on the user instruction, and generate a target watermark image with a transparency of a target transparency based on the watermark character; wherein the user instruction includes the target transparency; 或者,or, 接收用户发送的目标水印图像。Receive the target watermark image sent by the user. 9.根据权利要求8所述的方法,其特征在于,所述基于所述水印字符生成透明度为目标透明度的目标水印图像,包括:9. The method of claim 8, wherein generating a target watermark image whose transparency is a target transparency based on the watermark character includes: 生成所述水印字符的矢量图;Generate a vector image of the watermark characters; 将所述矢量图转换为透明度为所述目标透明度的基础水印图像;Convert the vector image into a basic watermark image whose transparency is the target transparency; 确定待生成的目标水印图像的分辨率;Determine the resolution of the target watermark image to be generated; 基于所述分辨率,确定多个所述基础水印图像在用于生成所述目标水印图像的原始图像中所在的位置区域;Based on the resolution, determine the location areas where a plurality of the basic watermark images are located in the original image used to generate the target watermark image; 按照所述位置区域,在所述原始图像中叠加所述基础水印图像,得到目标水印图像。According to the position area, the basic watermark image is superimposed on the original image to obtain a target watermark image. 10.一种电子设备,其特征在于,包括:10. An electronic device, characterized in that it includes: 存储器,用于存放计算机程序;Memory, used to store computer programs; 处理器,用于执行存储器上所存放的程序时,实现权利要求1-9任一所述的方法。A processor, for implementing any of the methods described in claims 1-9 when executing a program stored in a memory.
CN202311786390.5A 2023-12-22 2023-12-22 A watermark superposition method and electronic device Pending CN117812192A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311786390.5A CN117812192A (en) 2023-12-22 2023-12-22 A watermark superposition method and electronic device
PCT/CN2024/140997 WO2025131065A1 (en) 2023-12-22 2024-12-20 Watermark superimposition method, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311786390.5A CN117812192A (en) 2023-12-22 2023-12-22 A watermark superposition method and electronic device

Publications (1)

Publication Number Publication Date
CN117812192A true CN117812192A (en) 2024-04-02

Family

ID=90428993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311786390.5A Pending CN117812192A (en) 2023-12-22 2023-12-22 A watermark superposition method and electronic device

Country Status (2)

Country Link
CN (1) CN117812192A (en)
WO (1) WO2025131065A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025131065A1 (en) * 2023-12-22 2025-06-26 杭州海康威视数字技术股份有限公司 Watermark superimposition method, and electronic device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000295456A (en) * 1999-04-06 2000-10-20 Sony Corp Signal processing device
JP2007048160A (en) * 2005-08-11 2007-02-22 Brother Ind Ltd Information processing apparatus and program
US8385592B2 (en) * 2009-02-04 2013-02-26 Quicksilver Software, Inc. Digital watermarking system and method
JP5472471B2 (en) * 2010-08-27 2014-04-16 富士通株式会社 Digital watermark embedding apparatus, digital watermark embedding method, digital watermark embedding computer program, and digital watermark detection apparatus
CN108648132B (en) * 2018-04-16 2020-08-14 深圳市联软科技股份有限公司 Method, system, terminal and medium for generating watermark according to image
CN108550101B (en) * 2018-04-19 2023-07-25 腾讯科技(深圳)有限公司 Image processing method, device and storage medium
CN110971931A (en) * 2018-09-30 2020-04-07 北京微播视界科技有限公司 Video watermark adding method and device, electronic equipment and storage medium
CN115841413A (en) * 2022-12-14 2023-03-24 上海哔哩哔哩科技有限公司 Image processing method and device
CN117812192A (en) * 2023-12-22 2024-04-02 杭州海康威视数字技术股份有限公司 A watermark superposition method and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025131065A1 (en) * 2023-12-22 2025-06-26 杭州海康威视数字技术股份有限公司 Watermark superimposition method, and electronic device

Also Published As

Publication number Publication date
WO2025131065A1 (en) 2025-06-26

Similar Documents

Publication Publication Date Title
US7954067B2 (en) Parameter setting superimposed upon an image
CN108939556B (en) Screenshot method and device based on game platform
US20110103684A1 (en) Managing Raw and Processed Image File Pairs
CN113538316B (en) Image processing method, device, terminal equipment and readable storage medium
CN117812192A (en) A watermark superposition method and electronic device
CN111813466A (en) Watermark adding method, device, terminal equipment and computer storage medium
JP5303534B2 (en) Appearance information processing apparatus and method
CN113538318B (en) Image processing method, device, terminal equipment and readable storage medium
CN114928718B (en) Video monitoring method, device, electronic equipment and storage medium
JP6708407B2 (en) Image processing apparatus, image processing method and program
CN113205573B (en) Image display method, device, image processing device, and storage medium
AU2015264474A1 (en) Systems and methods for programming behavior of a website to respond to capabilities of different devices
JP7077054B2 (en) Image processing device, control method and program of image processing device
US7679625B1 (en) Straightening digital images
CN119537733A (en) Page jump method, device, electronic device, medium and product
CN112329384A (en) Method, device and equipment for realizing character shadow effect and storage medium
CN113657255A (en) Method for automatically selecting people and storage equipment
CN113763860B (en) Display color determining method, device, electronic equipment and storage medium
KR20170093466A (en) Apparatus and method for providing contents, and computer program recorded on computer readable recording medium for executing the method
US12524825B2 (en) Inspection of digital images through watermarks
US20230055775A1 (en) Apparatus and methods for publishing video content
CN117835009A (en) A watermark image generation method and electronic device
CN117315172B (en) Map page configuration method, map page configuration device, electronic equipment and computer readable medium
CN119583862B (en) Information display method and device, storage medium and electronic equipment
CN112835488B (en) Display window control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination