CN111131654A - Watermark embedding method and device and coder-decoder - Google Patents

Watermark embedding method and device and coder-decoder Download PDF

Info

Publication number
CN111131654A
CN111131654A CN201811274743.2A CN201811274743A CN111131654A CN 111131654 A CN111131654 A CN 111131654A CN 201811274743 A CN201811274743 A CN 201811274743A CN 111131654 A CN111131654 A CN 111131654A
Authority
CN
China
Prior art keywords
watermark
code stream
plane
acquired
transparent plane
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.)
Granted
Application number
CN201811274743.2A
Other languages
Chinese (zh)
Other versions
CN111131654B (en
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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201811274743.2A priority Critical patent/CN111131654B/en
Publication of CN111131654A publication Critical patent/CN111131654A/en
Application granted granted Critical
Publication of CN111131654B publication Critical patent/CN111131654B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/44Secrecy systems

Abstract

The embodiment of the invention provides a watermark embedding method, a watermark embedding device and a coder-decoder, and relates to the technical field of video monitoring. The method and the device form a watermark plane by acquiring the transparent plane and adding the acquired security information to the transparent plane, then encode the watermark plane by using the acquired encoding parameters to generate a first watermark code stream, and then generate an output code stream based on the first watermark code stream and the acquired input data. Therefore, in the transmission process of the video code stream, the watermark can be formed by adding the transmission path information and the user information of the video image on the transparent plane, so that the effect of displaying the complete information of the video code stream from the source end to the target end on the whole transmission path is achieved, and the effect of tracing when the video image is leaked is further achieved.

Description

Watermark embedding method and device and coder-decoder
Technical Field
The invention relates to the technical field of video monitoring, in particular to a watermark embedding method, a watermark embedding device and a coder-decoder.
Background
In video surveillance systems, especially in public security systems, video surveillance picture leakage prevention has been an important issue. Generally, in order to ensure information security and prevent a video image rendered and displayed by a decoder from being candid by a device such as a mobile phone, a watermark is added into a video monitoring picture, so that the watermark is shot when the mobile phone shoots, and then a client login user who leaks the video image can be found out by checking the visible watermark on the candid video or the photo, so that the purpose of tracing the information security is achieved.
In the prior art, a video code stream is decoded by a decoding client to obtain a video image, and a visible watermark is superimposed before rendering on a display; the superposition of the watermark can be realized by modifying the pixel values of pixel points one by one on the decoded image according to the content of the watermark image. That is, the visible display watermarks are all decoded from the video image code stream, that is, the visible watermark content for realizing information security is superimposed at the later stage of the client, and meanwhile, the visible watermark content cannot carry information from the source end of the video code stream and the video code stream on one or more forwarding paths in the whole video monitoring system, and if the video is leaked in the transmission process, the function of tracing cannot be achieved at all.
Disclosure of Invention
In view of the above, the present invention provides a watermark embedding method, device and codec to solve the above problems.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a watermark embedding method, where the watermark embedding method includes:
obtaining a transparent plane;
adding the acquired security information to the transparent plane to form a watermark plane;
encoding the watermark plane by using the acquired encoding parameters to generate a first watermark code stream;
and generating an output code stream based on the first watermark code stream and the acquired input data.
In a second aspect, an embodiment of the present invention further provides a watermark embedding apparatus, where the watermark embedding apparatus includes:
a transparent plane acquisition unit for acquiring a transparent plane;
a watermark adding unit for adding the acquired security information to the transparent plane to form a watermark plane;
the encoding unit is used for carrying out encoding operation on the watermark plane by using the acquired encoding parameters so as to generate a first watermark code stream;
the encoding unit is also used for generating an output code stream based on the first watermark code stream and the acquired input data.
In a third aspect, an embodiment of the present invention further provides a codec, where the codec includes
A memory;
a processor; and
a watermark embedding device installed in the memory and including one or more software functional modules executed by the processor, the watermark embedding device comprising:
a transparent plane acquisition unit for acquiring a transparent plane;
a watermark adding unit for adding the acquired security information to the transparent plane to form a watermark plane;
the encoding unit is used for carrying out encoding operation on the watermark plane by using the acquired encoding parameters so as to generate a first watermark code stream;
the encoding unit is also used for generating an output code stream based on the first watermark code stream and the acquired input data.
According to the watermark embedding method, the watermark embedding device and the codec, the transparent plane is obtained, the obtained safety information is added to the transparent plane to form the watermark plane, then the obtained coding parameters are utilized to carry out coding operation on the watermark plane to generate the first watermark code stream, and then the output code stream is generated based on the first watermark code stream and the obtained input data. Therefore, in the transmission process of the video code stream, the watermark can be formed by adding the transmission path information and the user information of the video image on the transparent plane, so that the effect of displaying the complete information of the video code stream from the source end to the target end on the whole transmission path is achieved, and the effect of tracing when the video image is leaked is further achieved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram of a codec according to an embodiment of the present invention.
Fig. 2 shows a flowchart of a watermark embedding method provided by a second embodiment of the present invention.
Fig. 3 shows a flowchart of a watermark embedding method provided by a third embodiment of the present invention.
Fig. 4 is a schematic diagram illustrating an application of the watermark embedding method according to the third embodiment of the present invention.
Fig. 5 shows a flowchart of a watermark embedding method according to a fourth embodiment of the present invention.
Fig. 6 is a schematic diagram illustrating an application of the watermark embedding method according to the fourth embodiment of the present invention.
Fig. 7 is a schematic diagram illustrating another application of the watermark embedding method according to the fourth embodiment of the present invention.
Fig. 8 shows a flowchart of a watermark embedding method provided by a fifth embodiment of the present invention.
Fig. 9 is a schematic diagram illustrating an application of the watermark embedding method according to the fifth embodiment of the present invention.
Fig. 10 is a functional block diagram of a watermark embedding apparatus according to a sixth embodiment of the present invention.
Fig. 11 is a functional block diagram of a watermark embedding apparatus according to a seventh embodiment of the present invention.
Fig. 12 is a functional block diagram of a watermark embedding apparatus according to an eighth embodiment of the present invention.
Icon: 100-a codec; 111-a memory; 112-a processor; 113-a communication unit; 200-watermark embedding means; 210-a transparent plane acquisition unit; 220-a watermark adding unit; 230-coding unit; 240-resolution acquisition unit; 250-decoding unit.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
First embodiment
Fig. 1 is a block diagram of a codec 100. The codec 100 includes a watermark embedding device 200, a memory 111, a processor 112, and a communication unit 113.
The memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The watermark embedding apparatus 200 includes at least one software functional module which can be stored in the memory 111 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the codec 100. The processor 112 is used for executing executable modules stored in the memory 111, such as software functional modules and computer programs included in the watermark embedding device 200.
The Memory 111 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 111 is used to store programs or data. The communication unit 113 is configured to establish a communication connection between the codec 100 and another communication terminal via the network, and to transceive data via the network.
It should be understood that the structure shown in fig. 1 is only a schematic application of the structure of the codec 100, and the codec 100 may also include more or less components than those shown in fig. 1, or have a different configuration than that shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Second embodiment
The embodiment of the invention provides a watermark embedding method, which is used for recording information of a user of a video image and transmission path information of the video image in a visible watermark mode in the process of transmitting the video image in the whole system in a video monitoring system. Fig. 2 is a flowchart of a watermark embedding method according to an embodiment of the present invention. The watermark embedding method comprises the following steps:
step S201: a transparent plane is obtained.
Generally, an input image is usually in YCbCr format, i.e., an input video signal includes a luminance plane Y, a chrominance plane Cb, and a chrominance plane Cr; if the resolution of the input image is W × H, the resolution of the luminance plane Y is W × H, and the resolutions of the chrominance plane Cb and the chrominance plane Cr are W/2 × H/2.
And for the subsequent higher definition of the watermark plane obtained on the basis of the transparent plane, the resolution of the transparent plane is identical to the resolution of the luminance plane Y of the input image.
Step S202: the acquired security information is added to the transparent plane to form a watermark plane.
The security information mainly includes address information of the current user terminal, user information, and the like. Therefore, once the video code stream is leaked, the leakage position can be inquired through the safety information so as to play a source tracing role.
In particular, the security information relates to the carrier on which the codec 100 is located. For example, if the carrier of the codec 100 is a camera, the security information includes information such as an IP address of the camera and a login user name of the camera. For another example, if the carrier of the codec 100 is a forwarding server, the security information includes information such as an IP address of the forwarding server, a login user name of the forwarding server, a forwarding routing node and a forwarding routing path through which the video stream passes.
In addition, in this embodiment, the security information is pre-stored and can be directly read when needed.
Step S203: and performing encoding operation on the watermark plane by using the acquired encoding parameters to generate a first watermark code stream.
It should be noted that, the watermark plane is encoded in an intra-frame prediction mode, so that when the first watermark code stream is decoded, decoding can be completed without depending on other frames/planes.
In particular, the watermark plane comprises a first area and a second area. The first area is a font area where the security information is located, and the second area is a transparent area not containing the font area.
In an optional embodiment, only the intra-frame prediction mode is adopted for coding the first area, and the skip (skip) mode is adopted for coding the second area, and as the skip mode does not write information such as reference indexes, motion vectors, residual errors and the like into the code stream, only macroblock mode information is written into the code stream or the number of continuous skip mode macroblocks is directly written into the code stream through run-length coding, the byte number of the obtained first watermark code stream is very small, and the influence on the code rate of the subsequently obtained output code stream is reduced.
Step S204: and generating an output code stream based on the first watermark code stream and the acquired input data.
It should be noted that the generated output code stream differs according to the type of the input data, and the specific manner is specifically described in the following content.
It will be understood that the formed output code stream should include the first watermark code stream as well as the image code stream. In addition, in order to reduce the influence of the first watermark code stream on the code rate of the output code stream, the first watermark code stream should be disposed at a position adjacent to the I frame of the image code stream.
In general, since the I-frame includes a luminance plane Y, a chrominance plane Cb, and a chrominance plane Cr, the first watermark code stream should be next to the luminance plane Y or the chrominance plane Cr.
It should be noted that, because the output code stream further includes the first watermark code stream, the codec 100, to which the watermark embedding method provided in the embodiment of the present invention is applied, needs to extend a frame/Slice (Slice) type to define the watermark code stream, which is convenient for decoding and encoding.
For example, in the h.264 codec 100, when a frame is encoded as an I frame/slice, the nal _ unit _ type takes a value of 5. At this time, the value of nal _ unit _ type added to the watermark code stream adjacent to the I frame can adopt a value in a value range (24-31) of an "unpeecified" type.
For example, in the h.265 codec 100, when a frame is encoded as an I frame/slice, the value of nal _ unit _ type is 19(IDR _ W _ RADL) or 20(IDR _ N _ LP), and the value of nal _ unit _ type of the watermark stream adjacent to the I frame may adopt the value in the range of "unpeecified" type values (48(UNSPEC48) to 63(UNSPEC 63)).
For the h.266/VVC video codec 100, which has not been released in the official state, a similar value of "unknown" type nal _ unit _ type is used to transmit the transparent flat bitstream.
Third embodiment
Please refer to fig. 3 and fig. 4, which are a flowchart and an application diagram of a watermark embedding method according to an embodiment of the present invention. It should be noted that the watermark embedding method provided in this embodiment is applied to a video camera including the codec 100 described in the first embodiment. The basic principle and the technical effects thereof are the same as those of the above embodiments, and for the sake of brief description, no part of this embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments.
Step S301: the resolution of the luminance plane of the input image is obtained.
The resolution of the luminance plane of an input image obtained by camera shooting is directly obtained from the input image. It is thus understood that the input data described in the present embodiment includes an input image.
Step S302: a transparent plane is selected from a pre-established library of transparent planes based on resolution.
Generally, the number of codecs 100 of one camera is fixed, and the resolution of the input image that each codec 100 can process is fixed, so that a user can implement the establishment of a plurality of transparent planes of different sizes according to the parameters of the codecs 100 to form a transparent plane library. And then selecting a transparent plane with the same actual resolution from the transparent plane library according to the actual resolution acquired by the input image.
Step S303: the acquired security information is added to the transparent plane to form a watermark plane.
In this embodiment, the security information is pre-stored and can be directly read when needed.
Step S304: and performing encoding operation on the watermark plane by using the acquired encoding parameters to generate a first watermark code stream.
In this embodiment, the encoding parameter is pre-stored, and may be directly obtained when the encoding operation needs to be performed on the watermark plane.
Step S305: and carrying out coding operation on the input image by using the coding parameters to form an image code stream.
Since the camera acquires the input image, not the video code stream, the input image needs to be also subjected to an encoding operation to form the image code stream.
Step S306: and inserting the first watermark code stream into a position adjacent to an I frame of the image code stream to form an output code stream.
Fourth embodiment
Please refer to fig. 5 and fig. 6, which are a flowchart and an application diagram of a watermark embedding method according to an embodiment of the present invention. It should be noted that the watermark embedding method provided in this embodiment is applied to a forwarding server including the codec 100 described in the first embodiment. The basic principle and the technical effects thereof are the same as those of the above embodiments, and for the sake of brief description, no part of this embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments.
Step S501: and decoding I frames contained in the acquired input code stream to acquire an input image and encoding parameters.
Due to the watermark embedding method provided by the present invention, the method is applied to a forwarding server including the codec 100 according to the first embodiment. While the usual input signal of the forwarding server is usually the input code stream. Therefore, the input data in the present embodiment includes an input codestream.
In addition, the size of the transparent plane is determined only by knowing the resolution of the brightness plane of the input image, the information of the brightness plane Y is located in the I frame, and the encoding parameters are stored in the I frame, so that the input image and the encoding parameters can be directly obtained by decoding the I frame without decoding other frames, the calculated amount is reduced, and the watermark embedding speed is improved.
Step S502: the resolution of the luminance plane of the input image is obtained.
Step S503: a transparent plane is selected from a pre-established library of transparent planes based on resolution.
Step S504: the acquired security information is added to the transparent plane to form a watermark plane.
In this embodiment, the security information is pre-stored and can be directly read when needed.
Step S505: and performing encoding operation on the watermark plane by using the acquired encoding parameters to generate a first watermark code stream.
In the present embodiment, the encoding parameter is obtained by performing a decoding operation on an I frame.
Step S506: and inserting the first watermark code stream into a position adjacent to an I frame of an image code stream contained in the input code stream to form an output code stream.
Because the forwarding server receives the input code stream directly, the first watermark code stream is directly inserted into the position adjacent to the I frame of the image code stream contained in the input code stream to form the output code stream without carrying out coding operation on the input image, and the operation time can be saved.
It should be further noted that, in this embodiment, whether the input code stream received by the forwarding server already includes the watermark code stream or not, the first watermark code stream is generated according to the methods of step S501 to step S505, but when the input code stream already includes the watermark code stream, the first watermark code stream may be inserted into a position adjacent to an I frame of an image code stream included in the input code stream to form an output code stream, and the first watermark code stream may be inserted into a position adjacent to the watermark code stream included in the input code stream to form an output code stream; that is, the first watermark code stream may be adjacent to the image code stream, or may be adjacent to an existing watermark code stream (as shown in fig. 7). It is understood that the output code stream at this time should include two independent watermark code streams to show the previous stage and the current stage of the transmission path.
Fifth embodiment
Please refer to fig. 8 and fig. 9, which are a flowchart and an application diagram of a watermark embedding method according to an embodiment of the present invention. It should be noted that the watermark embedding method provided in this embodiment is applied to a forwarding server including the codec 100 described in the first embodiment. The basic principle and the technical effects thereof are the same as those of the above embodiments, and for the sake of brief description, no part of this embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments.
Step S801: and decoding the I frame parameter set contained in the acquired input code stream to acquire the coding parameters.
It should be noted that the input code stream according to the embodiment of the present invention includes an image code stream and a second watermark code stream, that is, a watermark has been embedded in advance by another forwarding server or a camera.
In the embodiment of the invention, the transparent plane is not required to be selected by utilizing the resolution of the brightness plane of the input image, so that the whole I frame is not required to be decoded, and only the I frame parameter set is decoded to obtain the coding parameters.
Step S802: and decoding a second watermark code stream contained in the input code stream based on the coding parameters to acquire the transparent plane and the first safety information.
The resolution of the transparent plane obtained by decoding the second watermark code stream is necessarily consistent with the resolution of the input image brightness plane, so that the second watermark code stream is directly decoded to obtain the transparent plane and the first safety information originally carried under the condition that the input code stream already contains the second watermark code stream.
Step S803: and adding the first safety information and the pre-stored second safety information to the transparent plane to form a watermark plane.
The first safety information is the safety information of the previous forwarding node or the previous forwarding nodes in the video image transmission process; and the pre-stored second security information is the security information of the current forwarding server.
By adding the first safety information and the pre-stored second safety information to the transparent plane, the traceability problem in the whole transmission process of the video image can be really realized.
Step S804: and performing encoding operation on the watermark plane by using the acquired encoding parameters to generate a first watermark code stream.
In the present embodiment, the encoding parameter is obtained by performing a decoding operation on an I frame.
Step S805: and inserting the first watermark code stream into a position adjacent to an I frame of an image code stream contained in the input code stream to form an output code stream.
Because the forwarding server receives the input code stream directly, the first watermark code stream is directly inserted into the position adjacent to the I frame of the image code stream contained in the input code stream to form the output code stream without carrying out coding operation on the input image, and the operation time can be saved.
Sixth embodiment
Referring to fig. 10, a functional block diagram of a watermark embedding apparatus 200 according to an embodiment of the present invention is shown. It should be noted that the basic principle and the technical effect of the watermark embedding apparatus 200 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments. The watermark embedding apparatus 200 includes: a transparent plane acquisition unit 210, a watermarking unit 220, and an encoding unit 230.
The transparent plane obtaining unit 210 is configured to obtain a transparent plane.
It is to be understood that, in an alternative embodiment, the transparent plane acquisition unit 210 may be used to perform step S201.
The watermark adding unit 220 is configured to add the acquired security information to the transparent plane to form a watermark plane.
It is to be understood that in an alternative embodiment, the watermarking unit 220 may be configured to perform step S202.
The encoding unit 230 is configured to perform an encoding operation on the watermark plane by using the obtained encoding parameters to generate a first watermark code stream.
It is to be understood that, in an alternative embodiment, the encoding unit 230 may be configured to perform step S203.
The encoding unit 230 is further configured to generate an output code stream based on the first watermark code stream and the acquired input data.
It is to be understood that, in an alternative embodiment, the encoding unit 230 may be configured to perform step S204.
Seventh embodiment
Referring to fig. 11, a functional block diagram of a watermark embedding apparatus 200 according to an embodiment of the present invention is shown. It should be noted that the basic principle and the technical effect of the watermark embedding apparatus 200 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments. The watermark embedding apparatus 200 further includes a resolution obtaining unit 240.
The resolution obtaining unit 240 is configured to obtain a resolution of a luminance plane of the input image.
It is to be understood that, in a preferred embodiment, the resolution obtaining unit 240 may be configured to perform step S301.
The transparent plane acquisition unit 210 is configured to select a transparent plane from a pre-established library of transparent planes based on resolution.
It is to be understood that, in an alternative embodiment, the transparent plane acquisition unit 210 may be used to perform step S302.
The encoding unit 230 is configured to perform an encoding operation on the watermark plane by using the obtained encoding parameters to generate a first watermark code stream.
It is to be understood that, in an alternative embodiment, the encoding unit 230 may be configured to perform step S303.
The encoding unit 230 is further configured to perform an encoding operation on the watermark plane using the obtained encoding parameters to generate a first watermark code stream, and to perform an encoding operation on the input image using the encoding parameters to form an image code stream, and insert the first watermark code stream into a position adjacent to an I frame of the image code stream to form an output code stream.
It is to be understood that, in an alternative embodiment, the encoding unit 230 may be configured to perform step S304, step S305, and step S306.
Eighth embodiment
Referring to fig. 12, a functional block diagram of a watermark embedding apparatus 200 according to an embodiment of the present invention is shown. It should be noted that the basic principle and the technical effect of the watermark embedding apparatus 200 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments. The watermark embedding apparatus 200 further comprises a decoding unit 250.
In an alternative embodiment, the decoding unit 250 is configured to perform a decoding operation on an I frame included in the acquired input code stream to acquire an input image and encoding parameters.
It is to be understood that, in an alternative embodiment, the decoding unit 250 may be configured to perform step S501.
In another alternative embodiment, the decoding unit 250 is configured to perform a decoding operation on an I frame parameter set included in the obtained input code stream to obtain an encoding parameter, and to perform a decoding operation on a second watermark code stream included in the input code stream based on the encoding parameter to obtain the transparent plane and the first security information.
It is understood that, in an alternative embodiment, the decoding unit 250 may be configured to perform steps S801 and S802.
The encoding unit 230 is also configured to add the first security information and the pre-stored second security information to the transparent plane to form a watermark plane.
It is to be understood that, in an alternative embodiment, the decoding unit 250 may be configured to execute step S803.
In summary, the watermark embedding method, the watermark embedding apparatus, and the codec according to the embodiments of the present invention form a watermark plane by obtaining a transparent plane and adding the obtained security information to the transparent plane, then perform an encoding operation on the watermark plane by using the obtained encoding parameters to generate a first watermark code stream, and then generate an output code stream based on the first watermark code stream and the obtained input data. Therefore, in the transmission process of the video code stream, the watermark can be formed by adding the transmission path information and the user information of the video image on the transparent plane, so that the effect of displaying the complete information of the video code stream from the source end to the target end on the whole transmission path is achieved, and the effect of tracing when the video image is leaked is further achieved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a codec, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A watermark embedding method, characterized in that the watermark embedding method comprises:
obtaining a transparent plane;
adding the acquired security information to the transparent plane to form a watermark plane;
encoding the watermark plane by using the acquired encoding parameters to generate a first watermark code stream;
and generating an output code stream based on the first watermark code stream and the acquired input data.
2. The watermark embedding method according to claim 1, wherein, prior to the step of obtaining the transparent plane, the watermark embedding method further comprises:
acquiring the resolution of a brightness plane of an input image;
the step of obtaining the transparent plane comprises:
and selecting a transparent plane from a pre-established transparent plane library based on the resolution.
3. The watermark embedding method according to claim 2, wherein the input data includes the input image, and the step of generating an output code stream based on the first watermark code stream and the acquired input data includes:
encoding the input image by using the encoding parameters to form an image code stream;
and inserting the first watermark code stream into a position adjacent to an I frame of the image code stream to form the output code stream.
4. The watermark embedding method according to claim 2, wherein before the step of obtaining the resolution of the luminance plane of the input image, the watermark embedding method further comprises:
and decoding I frames contained in the acquired input code stream to acquire the input image and the encoding parameters.
5. The watermark embedding method according to claim 1, wherein the step of obtaining the transparent plane comprises:
decoding an I frame parameter set contained in the acquired input code stream to acquire a coding parameter;
decoding a second watermark code stream contained in the input code stream based on the coding parameters to acquire the transparent plane and first safety information;
the step of adding the acquired security information to the transparent plane to form a watermark plane comprises:
adding the first security information and pre-stored second security information to the transparent plane to form a watermark plane.
6. The watermark embedding method according to claim 4 or 5, wherein the input data comprises the input code stream, and the step of generating an output code stream based on the first watermark code stream and the acquired input data comprises:
and inserting the first watermark code stream into a position adjacent to an I frame of an image code stream contained in the input code stream to form the output code stream.
7. A watermark embedding apparatus, characterized in that the watermark embedding apparatus comprises:
a transparent plane acquisition unit for acquiring a transparent plane;
a watermark adding unit for adding the acquired security information to the transparent plane to form a watermark plane;
the encoding unit is used for carrying out encoding operation on the watermark plane by using the acquired encoding parameters so as to generate a first watermark code stream;
the encoding unit is also used for generating an output code stream based on the first watermark code stream and the acquired input data.
8. The watermark embedding apparatus according to claim 7, wherein the watermark embedding apparatus further comprises:
a resolution acquisition unit for acquiring a resolution of a luminance plane of an input image;
the transparent plane acquisition unit is further used for selecting a transparent plane from a pre-established transparent plane library based on the resolution.
9. The watermark embedding apparatus according to claim 8, wherein the input data includes the input image, and the encoding unit is configured to perform an encoding operation on the input image using the encoding parameters to form an image code stream;
the encoding unit is further configured to insert the first watermark code stream into a position adjacent to an I frame of the image code stream to form the output code stream.
10. A codec, characterized in that the codec comprises
A memory;
a processor; and
a watermark embedding device installed in the memory and including one or more software functional modules executed by the processor, the watermark embedding device comprising:
a transparent plane acquisition unit for acquiring a transparent plane;
a watermark adding unit for adding the acquired security information to the transparent plane to form a watermark plane;
the encoding unit is used for carrying out encoding operation on the watermark plane by using the acquired encoding parameters so as to generate a first watermark code stream;
the encoding unit is also used for generating an output code stream based on the first watermark code stream and the acquired input data.
CN201811274743.2A 2018-10-30 2018-10-30 Watermark embedding method and device and coder-decoder Active CN111131654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811274743.2A CN111131654B (en) 2018-10-30 2018-10-30 Watermark embedding method and device and coder-decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811274743.2A CN111131654B (en) 2018-10-30 2018-10-30 Watermark embedding method and device and coder-decoder

Publications (2)

Publication Number Publication Date
CN111131654A true CN111131654A (en) 2020-05-08
CN111131654B CN111131654B (en) 2022-07-19

Family

ID=70484200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811274743.2A Active CN111131654B (en) 2018-10-30 2018-10-30 Watermark embedding method and device and coder-decoder

Country Status (1)

Country Link
CN (1) CN111131654B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111639313A (en) * 2020-05-13 2020-09-08 广州国音智能科技有限公司 File transmission method, device, terminal and computer readable storage medium
CN112333559A (en) * 2020-10-29 2021-02-05 重庆紫光华山智安科技有限公司 Data processing method and device, server and storage medium
CN115396742A (en) * 2022-07-11 2022-11-25 浙江大华系统工程有限公司 Video watermark superposition method and device, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006115237A (en) * 2004-10-14 2006-04-27 Intelligent Wave Inc Watermark embedding program, watermark embedding method, and watermark embedding device
US20080240490A1 (en) * 2007-03-30 2008-10-02 Microsoft Corporation Source authentication and usage tracking of video
CN101340579A (en) * 2007-07-03 2009-01-07 华为技术有限公司 Embedding, extracting authentication method and device of digital water mark
CN102622545A (en) * 2012-03-01 2012-08-01 重庆大学 Picture file tracking method
CN106454368A (en) * 2016-10-21 2017-02-22 浙江宇视科技有限公司 Method for superposing watermark in video image and device thereof
CN106998475A (en) * 2017-03-24 2017-08-01 浙江宇视科技有限公司 Video transmission path tracking and device
CN107027055A (en) * 2017-04-28 2017-08-08 安徽四创电子股份有限公司 A kind of video based on digital watermark is traced to the source and encryption method
CN107688731A (en) * 2017-08-29 2018-02-13 中新网络信息安全股份有限公司 A kind of digital watermarking algorithm based on text document protection

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006115237A (en) * 2004-10-14 2006-04-27 Intelligent Wave Inc Watermark embedding program, watermark embedding method, and watermark embedding device
US20080240490A1 (en) * 2007-03-30 2008-10-02 Microsoft Corporation Source authentication and usage tracking of video
CN101340579A (en) * 2007-07-03 2009-01-07 华为技术有限公司 Embedding, extracting authentication method and device of digital water mark
CN102622545A (en) * 2012-03-01 2012-08-01 重庆大学 Picture file tracking method
CN106454368A (en) * 2016-10-21 2017-02-22 浙江宇视科技有限公司 Method for superposing watermark in video image and device thereof
CN106998475A (en) * 2017-03-24 2017-08-01 浙江宇视科技有限公司 Video transmission path tracking and device
CN107027055A (en) * 2017-04-28 2017-08-08 安徽四创电子股份有限公司 A kind of video based on digital watermark is traced to the source and encryption method
CN107688731A (en) * 2017-08-29 2018-02-13 中新网络信息安全股份有限公司 A kind of digital watermarking algorithm based on text document protection

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111639313A (en) * 2020-05-13 2020-09-08 广州国音智能科技有限公司 File transmission method, device, terminal and computer readable storage medium
CN111639313B (en) * 2020-05-13 2023-08-11 广州国音智能科技有限公司 File transmission method, device, terminal and computer readable storage medium
CN112333559A (en) * 2020-10-29 2021-02-05 重庆紫光华山智安科技有限公司 Data processing method and device, server and storage medium
CN115396742A (en) * 2022-07-11 2022-11-25 浙江大华系统工程有限公司 Video watermark superposition method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111131654B (en) 2022-07-19

Similar Documents

Publication Publication Date Title
US11070833B2 (en) Method and system for encoding video with overlay
CN111131654B (en) Watermark embedding method and device and coder-decoder
US10419778B2 (en) JCTVC-L0227: VPS_extension with updates of profile-tier-level syntax structure
JP6348188B2 (en) Robust encoding and decoding of pictures in video
BR112019027833A2 (en) improved signaling of regions of interest in container files and video bit streams
KR102336179B1 (en) Video data processing system
KR20200057105A (en) Techniques for encoding, decoding and representing high dynamic range images
CN109587478B (en) Media information processing method and device
JP2016518771A5 (en)
KR20230125723A (en) Subpicture signaling in video coding
US20240056586A1 (en) Arrangements and methods of encoding picture belonging to a temporal level
JP6107970B2 (en) JCTVC-L0227: VPS_EXTENSION with profile-hierarchy-level syntax structure update
CN111836054B (en) Video anti-piracy method, electronic device and computer readable storage medium
EP2816807A1 (en) Processing and reproduction of frames
KR20240006461A (en) Method and image-capturing device for endoding image frames of an image stream and transmitting encoded image frames on a communications network
CN115941958A (en) Video coding method and device, electronic equipment and storage medium
EP4294021A1 (en) Data processing method and apparatus, computer device and storage medium
CN112468883A (en) Video stream playing method and video stream playing equipment
CN114531528B (en) Method for video processing and image processing apparatus
TWI789662B (en) Video coding in relation to subpictures
KR20230124551A (en) Decoding the video stream within the browser
CN113422960A (en) Image transmission method and device
US20200077096A1 (en) Compression of segmented video
CN113672761B (en) Video processing method and device
JP2015142275A (en) Image processing apparatus, image processing method, display device, display method and program

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
GR01 Patent grant
GR01 Patent grant