[go: up one dir, main page]

CN111491171B - Watermark embedding, watermark extracting, data processing and video frame detecting method - Google Patents

Watermark embedding, watermark extracting, data processing and video frame detecting method Download PDF

Info

Publication number
CN111491171B
CN111491171B CN201910079180.XA CN201910079180A CN111491171B CN 111491171 B CN111491171 B CN 111491171B CN 201910079180 A CN201910079180 A CN 201910079180A CN 111491171 B CN111491171 B CN 111491171B
Authority
CN
China
Prior art keywords
watermark information
video frame
frame image
channel
channel coding
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.)
Active
Application number
CN201910079180.XA
Other languages
Chinese (zh)
Other versions
CN111491171A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910079180.XA priority Critical patent/CN111491171B/en
Publication of CN111491171A publication Critical patent/CN111491171A/en
Application granted granted Critical
Publication of CN111491171B publication Critical patent/CN111491171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/467Embedding additional information in the video signal during the compression process characterised by the embedded information being invisible, e.g. watermarking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application discloses a watermark embedding method, which comprises the following steps: obtaining a video frame image; obtaining an original watermark; performing channel coding on the original watermark information to obtain channel coded watermark information; and embedding the watermark information after the channel coding into the video frame image.

Description

Watermark embedding, watermark extracting, data processing and video frame detecting method
Technical Field
The present application relates to the field of digital watermarking technologies, and in particular, to a watermark embedding method and apparatus, an electronic device, and a storage device. The application also relates to a watermark extraction method, a watermark extraction device, electronic equipment and storage equipment. The application also relates to two data processing methods and a video frame image detection method.
Background
With the rapid development of multimedia technology and the popularization of mobile internet, picture and video technology is applied to various fields of people's life. The transmission and the acquisition of the video information become more and more convenient, but the internet itself has openness, sharing and the like, so that the video information is easy to be stolen, tampered and the like by lawless persons in the storage or transmission process. The creative enthusiasm and benefits of the author are seriously damaged. Copyright protection of digital content has thus become a social hotspot, in which case video watermarking techniques have emerged. The basic principle of video watermarking is to embed information capable of proving copyright identity in a video so as to achieve the purpose of protecting copyright.
In the prior art, in an embedding algorithm for video watermarking in a spatial domain, both an H & G algorithm and a JAWS algorithm are thought based on a spread spectrum communication principle. In the embedding algorithm of video watermarking in a transform domain, a relatively typical DCT video watermarking method is that Cox et al propose to embed the watermark in DCT low-frequency coefficients by adopting a spread spectrum sequence technology and the correlation of human visual characteristics. The existing video watermark embedding method has poor watermark robustness, and the watermark is easy to generate distortion and blocking effect in the compression process. Because the watermark is easy to be damaged in the compression process, the schemes in the prior art can not meet the frame deletion detection requirement of the compressed video.
Disclosure of Invention
The application provides a watermark embedding method to solve the problem that the existing method cannot meet the frame deletion detection requirement of a compressed video.
The application provides a watermark embedding method, which comprises the following steps:
obtaining a video frame image;
obtaining original watermark information;
performing channel coding on the original watermark information to obtain channel coded watermark information;
and embedding the watermark information after the channel coding into the video frame image.
Optionally, the performing channel coding on the original watermark information to obtain the channel-coded watermark information includes:
Converting the original watermark information into binary watermark information;
and carrying out channel coding on the binary watermark information to obtain the channel coded watermark information.
Optionally, the method further includes: performing spread spectrum processing on the watermark information after the channel coding to obtain the watermark information after the spread spectrum processing;
the embedding the channel-coded watermark information into a video frame image includes: and embedding the watermark information after the spread spectrum processing into the video frame image.
Optionally, the method further includes:
determining a spread spectrum factor of spread spectrum processing according to the number of video frame image blocks after the video frame image block processing and the binary digit number of watermark information to be embedded in the video frame image blocks;
the performing spread spectrum processing on the channel-coded watermark information to obtain the spread spectrum-processed watermark information includes: and performing spread spectrum processing on the watermark information after the channel coding by using the spread spectrum factor of the spread spectrum processing to obtain the watermark information after the spread spectrum processing.
Optionally, the determining a spreading factor of spreading processing according to the number of video frame image blocks after the video frame image is converted into the frequency domain image and the binary bit number of the watermark information embedded in each video frame image block includes:
Multiplying the number of the video frame image blocks by the binary digit number of each video frame image block embedded with the watermark information to obtain the binary digit number of the embedded information;
dividing the binary digit number of the embedded information with the binary digit number of the watermark information after the channel coding to obtain a quotient of the binary digit numbers;
and taking the maximum integer not greater than the quotient of the binary digits as the spreading factor of the spreading processing.
Optionally, the converting the original watermark information into binary watermark information includes:
determining the binary digit number of the binary watermark information according to the binary digit number required by the channel coded watermark information to be obtained;
and converting the original watermark information into binary watermark information according to the binary digit number of the binary watermark information.
Optionally, the method further includes: and determining original watermark information according to the positions of the video frame images in all the video frame images included in the video file.
Optionally, the embedding the channel-coded watermark information into the video frame image includes:
carrying out blocking processing on the video frame image to obtain a video frame image block;
Performing discrete cosine transform on the video frame image blocks to obtain a first coefficient matrix;
embedding the watermark information after the channel coding into the first coefficient matrix to obtain a second coefficient matrix;
and carrying out inverse discrete cosine transform on the second coefficient matrix to obtain a video frame image embedded with watermark information.
Optionally, the embedding the channel-coded watermark information into the first coefficient matrix includes:
and embedding one bit of information in the channel-coded watermark information in a coefficient matrix block contained in the first coefficient matrix.
Optionally, the embedding a bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix includes:
and respectively embedding each bit information in the channel-coded watermark information into different coefficient matrix blocks according to the sequence of the coefficient matrix blocks in the first coefficient matrix.
Optionally, the method further includes:
determining the size of a video frame image block adopted during the video frame image blocking processing according to the image resolution of the video frame image;
the blocking processing of the video frame image to obtain a video frame image block includes: and according to the determined size of the video frame image block, carrying out blocking processing on the video frame image to obtain the video frame image block.
Optionally, the embedding a bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix includes:
when the bit information to be embedded is 1, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)+weight*abs(point(poj,poi,dct_num));
when the bit information to be embedded is 0, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)-weight*abs(point(poj,poi,dct_num));
wherein dct _ num represents a coefficient matrix block position where bit information is embedded in the first coefficient matrix,
point (poj, poi, dct _ num) bit information is embedded into the coefficient value with row position poj and column position poi in the coefficient matrix block before embedding;
point (point, poj, dct _ num) bit information is embedded into the coefficient value with the row position being point and the column position being poj in the coefficient matrix block;
weight is the strength of the modified watermark and abs represents the absolute value.
Optionally, the method further includes:
and performing video compression on the video frame image embedded with the watermark information to obtain a video code stream file.
The application also provides a watermark extraction method, which comprises the following steps:
acquiring a video frame image;
extracting watermark information after channel coding from the video frame image;
and carrying out channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information.
Optionally, the acquiring the video frame image includes:
and carrying out video decompression on the video code stream file containing the video frame image to obtain the video frame image.
Optionally, the extracting, from the video frame image, watermark information after channel coding includes:
performing discrete cosine transform on the video frame image to obtain a discrete cosine transform coefficient matrix;
and extracting the watermark information after channel coding from the discrete cosine transform coefficient matrix.
Optionally, the extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix includes:
extracting binary data representing watermark information from a coefficient matrix block in a discrete cosine transform coefficient matrix;
and obtaining the watermark information after channel coding according to the binary data.
Optionally, the extracting binary data representing watermark information from a coefficient matrix block in the discrete cosine transform coefficient matrix includes:
when in the discrete cosine transform coefficient matrix
When point (point, poj, dct _ num) > point (poj, point, dct _ num), it is determined that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 1;
When in the coefficient matrix of the discrete cosine transform coefficient
When point (point, poj, dct _ num) < point (poj, point, dct _ num), determining that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 0;
point (poi, poj, dct _ num) represents a coefficient value with row position of poi and column position of poj in a coefficient matrix block with position dct _ num;
point (poj, poi, dct _ num) represents a coefficient value with row position poj and column position poi in a coefficient matrix block with position dct _ num.
Optionally, the extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix includes:
and extracting channel coding code words from the discrete cosine transform coefficient matrix, wherein the number of the extracted channel coding code words is the same as the number of the spreading factors.
Optionally, the method further includes:
de-spreading the channel coding code words with the number of the spreading factors to obtain de-spread channel coding code words;
the channel decoding processing is performed on the channel-coded watermark information to obtain original watermark information, and the channel decoding processing includes: and carrying out channel decoding processing on the despread channel coding code word to obtain original watermark information.
Optionally, the method includes: despreading the channel coding code words with the spreading factor number to obtain despread channel coding code words, wherein the despreading channel coding code words comprise:
according to the channel coding code words with the number of the spreading factors, determining binary data of each position of the despread channel coding code words;
and combining the binary data of each position into a despread channel coding code word.
Optionally, the determining the binary data of each position of the despread channel coded codeword according to the channel coded codewords of the spreading factor number includes:
if the number of binary data 1 at a certain position in the channel coding code words with the number of the spreading factors is larger than the number of binary data 0, determining that the binary data at the position is 1;
if the number of binary data of a certain position in the channel-coded codeword of the spreading factor number is 1 is smaller than the number of binary data of 0, it is determined that the binary data of the position is 0.
Optionally, the despreading the channel coding code word with the spreading factor number to obtain a despread channel coding code word includes:
judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors; and if so, taking the channel coding code word which is the same as the actually embedded channel coding code word as the despread channel coding code word.
Optionally, the despreading the channel coding code word with the spreading factor number to obtain a despread channel coding code word includes:
judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors;
if not, screening the channel coding code words with the number of the spread spectrum factors to obtain screened channel coding code words;
and extracting the despread channel coding code words from the screened channel coding code words.
Optionally, the screening the channel coding code words with the spreading factor number to obtain the screened channel coding code words includes:
and taking the channel coding code words with the error rates ranked within a preset rank in the channel coding code words with the spreading factor number as the screened channel coding code words.
Optionally, the performing channel decoding processing on the channel-coded watermark information to obtain original watermark information includes:
performing channel decoding processing on the watermark information subjected to channel coding to obtain channel original code words with spreading factor quantity;
and despreading the channel original code words with the number of the spreading factors to obtain original watermark information.
Optionally, the channel decoding processing is performed on the watermark information after channel coding to obtain original watermark information, and the channel decoding processing includes:
performing channel decoding processing on the watermark information subjected to channel coding to obtain watermark information in a binary format;
and converting the watermark information in the binary format into the watermark information in the decimal format to obtain the original watermark information.
The application also provides a method for detecting the video frame image, which comprises the following steps:
obtaining a video frame image to be detected;
extracting watermark information after channel coding from the video frame image;
performing channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information;
and detecting whether the video frame image is subjected to frame deletion processing or not according to the original watermark information.
Optionally, the method further includes: de-spreading the watermark information after channel coding to obtain de-spread watermark information;
the channel decoding processing is performed on the channel-coded watermark information to obtain original watermark information, and the channel decoding processing includes:
and carrying out channel decoding processing on the despread watermark information to obtain first original watermark information.
The detecting whether the video frame image is subjected to frame deletion processing according to the original watermark information includes:
and detecting whether the video frame image is subjected to frame deletion processing or not according to the first original watermark information.
Optionally, the performing channel decoding processing on the channel-coded watermark information to obtain original watermark information includes:
performing channel decoding processing on the watermark information subjected to channel coding to obtain channel original code words with spreading factor quantity;
despreading the channel original code words with the spreading factor quantity to obtain second original watermark information;
the detecting whether the video frame image is subjected to frame deletion processing according to the original watermark information includes:
and detecting whether the video frame image is subjected to frame deletion processing or not according to the second original watermark information.
The present application further provides a data processing method, including:
obtaining a carrier object;
obtaining original data;
performing channel coding on the original data to obtain channel coded data;
embedding the channel-coded data into the carrier object.
Optionally, the performing channel coding on the original data to obtain channel-coded data includes:
Converting the raw data into binary data;
and carrying out channel coding on the binary data to obtain the channel coded binary data.
Optionally, the method further includes: performing spread spectrum processing on the binary data after the channel coding to obtain the binary data after the spread spectrum processing;
the embedding the channel-coded data into the carrier object includes: and embedding the binary data after the spread spectrum processing into the video frame image.
The application also provides a data processing method, which comprises the following steps:
acquiring a carrier object;
extracting data subjected to channel coding from the carrier object;
and carrying out channel decoding processing on the data subjected to channel coding to obtain original data.
The present application also provides a watermark embedding apparatus, comprising:
a video frame image obtaining unit for obtaining a video frame image;
an original watermark information obtaining unit, configured to obtain original watermark information;
a watermark information obtaining unit, configured to perform channel coding on the original watermark information to obtain channel-coded watermark information;
and the watermark information embedding unit is used for embedding the watermark information after the channel coding into the video frame image.
The present application further provides an electronic device, including:
a processor; and
a memory for storing a program of a watermark embedding method, the apparatus performing the following steps after being powered on and running the program of the watermark embedding method by the processor:
obtaining a video frame image;
obtaining original watermark information;
performing channel coding on the original watermark information to obtain channel coded watermark information;
and embedding the watermark information after the channel coding into the video frame image.
The present application also provides a storage device storing a program of a watermark embedding method, the program being executed by a processor and performing the steps of:
obtaining a video frame image;
obtaining original watermark information;
performing channel coding on the original watermark information to obtain channel coded watermark information;
and embedding the watermark information after the channel coding into the video frame image.
The present application further provides a watermark extraction apparatus, including:
a video frame image acquisition unit for acquiring a video frame image;
the watermark information extraction unit is used for extracting the watermark information after channel coding from the video frame image;
and the original watermark information obtaining unit is used for carrying out channel decoding processing on the watermark information subjected to channel coding to obtain the original watermark information.
The present application further provides an electronic device, comprising:
a processor; and
a memory for storing a program of a watermark extraction method, the apparatus performing the following steps after being powered on and running the program of the watermark extraction method by the processor:
acquiring a video frame image;
extracting watermark information after channel coding from the video frame image;
and carrying out channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information.
The present application also provides a storage device storing a program of a watermark extraction method, the program being executed by a processor and performing the steps of:
acquiring a video frame image;
extracting watermark information after channel coding from the video frame image;
and carrying out channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information.
Compared with the prior art, the method has the following advantages:
the application provides a watermark embedding method, which comprises the steps of carrying out channel coding on original watermark information to obtain the watermark information after the channel coding; and embedding the watermark information after the channel coding into the video frame image, and the application introduces the channel coding to correct the watermark information, thereby improving the stability of embedding the watermark and meeting the requirement of video frame deletion detection.
Drawings
Fig. 1 is a flowchart of a watermark embedding method according to a first embodiment of the present application.
Fig. 2 is a flowchart for embedding the channel-coded watermark information into the video frame image according to the first embodiment of the present application.
Fig. 3 is a flowchart of a preferred embodiment of a watermark embedding method according to the first embodiment of the present application.
Fig. 4 is a flowchart of a watermark extraction method according to a second embodiment of the present application.
Fig. 5-12 are schematic flow diagrams of several embodiments provided in the second embodiment of the present application.
Fig. 13 is a flowchart of a method for detecting a video frame image according to a third embodiment of the present application.
Fig. 14 is a flowchart of an implementation of a method for detecting a video frame image according to a third embodiment of the present application.
Fig. 15 is a flowchart of a data processing method according to a fourth embodiment of the present application.
Fig. 16 is a flowchart of a data processing method according to a fifth embodiment of the present application.
Fig. 17 is a schematic diagram of a watermark embedding apparatus according to a sixth embodiment of the present application.
Fig. 18 is a schematic view of an electronic device according to a seventh embodiment of the present application.
Fig. 19 is a schematic diagram of a watermark extraction apparatus according to a ninth embodiment of the present application.
Fig. 20 is a schematic diagram of an electronic device according to a tenth embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather construed as limited to the embodiments set forth herein.
A first embodiment of the present application provides a watermark embedding method, which is described below with reference to fig. 1.
As shown in fig. 1, in step S101, a video frame image is obtained.
The video frame image can be obtained from a video file or a video code stream file.
As shown in fig. 1, in step S102, original watermark information is obtained.
The original watermark information may be determined according to the positions of the video frame images in all the video frame images included in the video file. For example, if the video frame image is the 25 th frame in the video file, the original watermark information may be 25.
As shown in fig. 1, in step S103, the original watermark information is channel-coded to obtain channel-coded watermark information.
Digital signals are often interfered and faded in transmission, so that error correction and detection techniques, i.e. error correction and detection coding techniques, are often required to be adopted for the digital signals, so as to enhance the capability of resisting various interferences when the data are transmitted in a channel and improve the reliability of a system. The error correction and detection coding performed on signals transmitted in a channel is the channel coding. The channel coding may be a BCH code.
The channel coding the original watermark information to obtain the channel coded watermark information includes:
converting the original watermark information into binary watermark information;
and carrying out channel coding on the binary watermark information to obtain the channel coded watermark information.
The converting the original watermark information into binary watermark information includes:
determining the binary digit number of the binary watermark information according to the binary digit number required by the channel coded watermark information to be obtained;
and converting the original watermark information into binary watermark information according to the binary digit number of the binary watermark information.
For example, if the binary number of bits of the channel-coded watermark information (na _ bw) to be obtained is 31 bits, i.e., the code length bits 31, the corresponding message length ka may be 26, 21, 16, 11, 6. The number of bits (message length ka before channel coding) of the pre-coding watermark information binarization is determined by the total video frame number and the channel coding selectable message length ka. Assuming that the total frame number of a video is 15, a binary number of 4 bits can represent watermark information of all video frames; on the other hand, when the length of the watermark after channel coding is required to be 31, the message length ka can be selected from 26, 21, 16, 11 and 6. So when the total frame number of a video is 15, the bit number of the watermark information binary can be selected to be 6. If the video frame is 25, the binary bit number of the binary watermark information is determined to be 6, the binary watermark information is firstly converted into binary information of '11001', '11001' is 5 bits, then a 0 is added in front of the binary information to enable the binary information to meet the requirement that the message length is 6, and the original watermark information 25 is converted into binary watermark information of '011001'.
If ka is 21 and na is 31, a video with a frame number of 2097152 can be detected, which corresponds to a video with a frame rate of 30 frames per second for 19 hours.
As shown in fig. 1, in step S104, the channel-coded watermark information is embedded into the video frame image.
Further, spread spectrum processing can be performed on the watermark information after the channel coding to obtain the watermark information after the spread spectrum processing; the embedding the channel-coded watermark information into a video frame image includes: and embedding the watermark information after the spread spectrum processing into the video frame image.
The spreading factor used in the spreading process can be determined according to the number of video frame image blocks after the video frame image block processing and the binary bit number of the watermark information to be embedded in the video frame image blocks. Specifically, the number of the video frame image blocks and the binary digit number of each video frame image block embedded with the watermark information may be multiplied to obtain the binary digit number of the embedded information; then dividing the binary digit number of the embedded information and the binary digit number of the watermark information after channel coding to obtain a quotient of the binary digit numbers; and finally, taking the maximum integer not greater than the quotient of the binary digits as the spreading factor of the spreading processing. And if the number of the video frame image blocks is dct _ num, the number of binary bits of each video frame image block for embedding the watermark information is m, and the number of binary bits of the watermark information after channel coding is na, the spreading factor n is the largest integer not greater than dct _ num × m/na. For example, if the number of video frame image blocks is 12, the number of binary bits of each video frame image block in which watermark information is embedded is 1, and the number of binary bits of the channel-coded watermark information is 6, the spreading factor n is a maximum integer 2 that is not greater than 12 × 1/6.
The performing spread spectrum processing on the channel-coded watermark information to obtain the spread spectrum-processed watermark information includes: and performing spread spectrum processing on the watermark information after the channel coding by using the spread spectrum factor of the spread spectrum processing to obtain the watermark information after the spread spectrum processing. For example, the spreading factor of channel-coded watermark information is "011001" and the spreading factor of channel-coded watermark information is "011001011001".
As shown in fig. 2, the embedding the channel-coded watermark information into the video frame image includes:
and step S104-1, performing blocking processing on the video frame image to obtain a video frame image block.
The blocking processing of the video frame image to obtain a video frame image block includes: and according to the determined size of the video frame image block, carrying out blocking processing on the video frame image to obtain the video frame image block.
Specifically, the size of the video frame image block adopted in the video frame image blocking processing may be determined according to the image resolution of the video frame image. The video frame image block size bs for performing DCT (discrete cosine transform) is set according to the resolution of the video. Common DCT transforms are 4 x 4, 8 x 8, 16 x 16. When the resolution of the video frame image is small, bs is selected to be 4, and when the resolution of the video frame image is large, bs is selected to be 8 or 16. For example, when the resolution of the video is Sm × Sn and bs is 4, assuming that a is the largest integer not greater than Sm/4 and b is the largest integer not greater than Sn/4, the number DCT _ num of 4 × 4DCT transform blocks into which one frame image can be divided is a × b. If the resolution of the video frame image is 16 × 12, bs is 4, the number of 4 × 4DCT matrix blocks that can be divided is 4 × 3 — 12.
And step S104-2, performing discrete cosine transform on the video frame image blocks to obtain a first coefficient matrix.
The first coefficient matrix comprises coefficient matrix blocks, and each coefficient matrix block corresponds to one video frame image block.
And step S104-3, embedding the watermark information after the channel coding into the first coefficient matrix to obtain a second coefficient matrix.
The embedding the channel-coded watermark information into the first coefficient matrix includes:
and embedding one bit of information in the channel-coded watermark information in a coefficient matrix block contained in the first coefficient matrix.
The embedding of one bit of information in the channel-coded watermark information in one coefficient matrix block included in the first coefficient matrix includes:
and respectively embedding each bit information in the channel-coded watermark information into different coefficient matrix blocks according to the sequence of the coefficient matrix blocks in the first coefficient matrix.
For example, if the watermark information after the spread spectrum processing is "011001011001", a binary data "0" may be embedded in a first coefficient matrix block in the first coefficient matrix, a binary data "1" may be embedded in a second coefficient matrix block in the first coefficient matrix, and a binary data "1" … … may be embedded in a third coefficient matrix block in the first coefficient matrix until all watermark information is embedded.
It should be noted that, if a DCT coefficient block is used to embed a bit in na _ bw, when the bits in n pieces of spread watermark information na _ bw are completely embedded in the DCT coefficient block, the watermark embedding operation for the frame is completed. The last (DCT _ num-n na) DCT coefficient blocks in each frame have no embedded watermark information.
Embedding one bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix, which may be implemented as follows:
when the bit information to be embedded is 1, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)+weight*abs(point(poj,poi,dct_num));
when the bit information to be embedded is 0, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)-weight*abs(point(poj,poi,dct_num));
wherein dct _ num represents a coefficient matrix block position where bit information is embedded in the first coefficient matrix,
point (poj, poi, dct _ num) bit information is embedded into the coefficient value with row position poj and column position poi in the coefficient matrix block before embedding;
point (point, poj, dct _ num) bit information is embedded into the coefficient value with the row position being point and the column position being poj in the coefficient matrix block;
weight is the strength of the modified watermark and abs represents the absolute value. To resist video compression, weight >1 is typically chosen.
weight decides to modify the strength of the watermark, and weight >1 can be set according to the extraction method. According to the embedding mode, the following can be found:
When the bit "1" is embedded, point (point, poj, dct _ num) > point (poj, point, dct _ num), and when the bit "0" is embedded, point (point, poj, dct _ num) < point (poj, point, dct _ num), the extraction of watermark bit information can be performed according to this feature. In this embodiment, poi ═ 2, poj ═ 3, and weight ═ 1.5 may be set.
And step S104-4, performing inverse discrete cosine transform on the second coefficient matrix to obtain a video frame image embedded with watermark information.
After the video frame image embedded with the watermark information is obtained, the video frame image embedded with the watermark information can be subjected to video compression to obtain a video code stream file.
Fig. 3 is a flowchart of a preferred embodiment of a watermark embedding method according to the first embodiment of the present application. Firstly, the watermark information is binarized and converted into binary watermark information, then the binary watermark information is subjected to BCH coding to generate BCH coded watermark information, then the channel coded watermark information is subjected to spread spectrum processing to obtain spread spectrum processed watermark information (spread spectrum BCH code word), then the spread spectrum processed BCH code word is embedded into a DCT coefficient matrix of video frame picture conversion to generate a DCT coefficient matrix containing the watermark information, then the DCT coefficient matrix containing the watermark information is subjected to IDCT conversion to generate a frame picture containing the watermark information, and finally a video file containing the watermark information is generated.
In correspondence with the watermark embedding method provided in the first embodiment of the present application, a second embodiment of the present application provides a watermark extraction method, which is described below with reference to fig. 4.
As shown in fig. 4, in step S401, a video frame image is acquired.
The acquiring of the video frame image comprises: and carrying out video decompression on the video code stream file containing the video frame image to obtain the video frame image.
As shown in fig. 4, in step S402, channel-coded watermark information is extracted from the video frame image.
Extracting the watermark information after channel coding from the video frame image, including:
performing discrete cosine transform on the video frame image to obtain a discrete cosine transform coefficient matrix;
and extracting the watermark information after channel coding from the discrete cosine transform coefficient matrix.
If a binary data representing watermark information is embedded in a coefficient matrix when watermark information is embedded, extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix, which may include the following steps:
extracting binary data representing watermark information from a coefficient matrix block in a discrete cosine transform coefficient matrix;
And obtaining the watermark information after channel coding according to the binary data.
Specifically, the extracting binary data representing watermark information from a coefficient matrix block in a discrete cosine transform coefficient matrix includes:
when in the discrete cosine transform coefficient matrix
When point (point, poj, dct _ num) > point (poj, point, dct _ num), it is determined that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 1;
when in the coefficient matrix of discrete cosine transform coefficient
When point (point, poj, dct _ num) < point (poj, point, dct _ num), determining that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 0;
point (poi, poj, dct _ num) represents a coefficient value with row position of poi and column position of poj in a coefficient matrix block with position dct _ num;
point (poj, poi, dct _ num) represents a coefficient value with row position poj and column position poi in a coefficient matrix block with position dct _ num.
The extracting of the channel-coded watermark information from the discrete cosine transform coefficient matrix includes:
and extracting channel coding code words from the discrete cosine transform coefficient matrix, wherein the number of the extracted channel coding code words is the same as the number of the spreading factors.
If the watermark information of the spread spectrum is embedded when the watermark is embedded, the extracted watermark information after channel coding is the channel coding code word with the same number of the spread spectrum factors.
If the channel coding code words with the same number as the spreading factors are extracted, the channel coding code words with the same number as the spreading factors can be subjected to de-spreading processing, and de-spread channel coding code words are obtained.
In specific implementation, the despreading processing is performed on the channel coding code words with the spreading factor number to obtain despread channel coding code words, and the method comprises the following steps:
according to the channel coding code words with the number of the spreading factors, determining binary data of each position of the despread channel coding code words;
and combining the binary data of each position into a despread channel coding code word.
The determining the binary data of each position of the despread channel coding code word according to the channel coding code words of the spreading factor number includes:
if the number of binary data 1 at a certain position in the channel coding code words with the number of the spreading factors is larger than the number of binary data 0, determining that the binary data at the position is 1;
if the number of binary data of a certain position in the channel-coded codeword of the spreading factor number is 1 is smaller than the number of binary data of 0, it is determined that the binary data of the position is 0.
For example, if the spreading factor is 4, if there are 3 "1" s and 1 "0" s on the 1 st bit in the 4 channel-coded codewords, it is determined that the binary data of the 1 st bit is 1; if there are 3 "0" s and 1 "s on the 1 st bit in the 4 channel-coded codewords, the binary data of the 1 st bit is determined to be 0.
The despreading the channel coding code words with the spreading factor number to obtain despread channel coding code words comprises the following steps:
judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors; and if so, taking the channel coding code word which is the same as the actually embedded channel coding code word as the despread channel coding code word.
The despreading the channel coding code words with the spreading factor number to obtain despread channel coding code words comprises the following steps:
judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors;
if not, screening the channel coding code words with the number of the spread spectrum factors to obtain screened channel coding code words;
And extracting the despread channel coding code words from the screened channel coding code words.
The screening the channel coding code words with the spreading factor number to obtain the screened channel coding code words includes:
and taking the channel coding code words with the error rates ranked within a preset rank in the channel coding code words with the spreading factor number as the screened channel coding code words.
For example, the channel coding codewords with errors may be sorted according to the number of error bits, and n/2(n represents the number of spreading factors) channel coding codewords with fewer errors may be used as the channel coding codewords after being screened.
The method for extracting the despread channel coding code words from the screened channel coding code words is similar to the method for despreading the channel coding code words with the spreading factor number to obtain the despread channel coding code words, and only the channel coding code words with the spreading factor number are required to be replaced by the screened channel coding code words.
As shown in fig. 4, in step S403, the channel coding is performed on the watermark information after channel coding, so as to obtain the original watermark information.
The channel decoding processing is performed on the channel-coded watermark information to obtain original watermark information, and the channel decoding processing includes:
Performing channel decoding processing on the watermark information subjected to channel coding to obtain watermark information in a binary format;
and converting the watermark information in the binary format into the watermark information in the decimal format to obtain the original watermark information.
If the channel coding code words with the same number as the spreading factors are extracted, in step S302, performing despreading processing on the channel coding code words with the same number as the spreading factors to obtain despread channel coding code words, and then performing channel decoding processing on the channel coded watermark information to obtain original watermark information, including: and carrying out channel decoding processing on the despread channel coding code word to obtain original watermark information.
In this way (way 1), the channel coding code words with the number of spreading factors are despread first, and then the despread channel coding code words are decoded to obtain the original watermark information.
If the channel coding code words with the same number as the spreading factors are extracted and the channel coding code words with the same number as the spreading factors are not despread in step S302, the channel decoding processing is performed on the channel coded watermark information to obtain the original watermark information, including:
Performing channel decoding processing on the watermark information subjected to channel coding to obtain channel original code words with spreading factor quantity;
and despreading the channel original code words with the number of the spreading factors to obtain original watermark information.
In this way (way 2), the channel-coded watermark information is first subjected to channel decoding processing and then to despreading, so as to obtain the original watermark information.
Before the channel decoding processing is performed on the channel-coded watermark information to obtain the channel original code words with the spreading factor number, the channel-coded watermark information may be first screened to obtain screened channel-coded code words, and then the channel decoding processing is performed on the screened channel-coded code words to obtain the screened channel original code words. The despreading processing is performed on the channel original code words with the spreading factor quantity to obtain original watermark information, and the method comprises the following steps: and carrying out de-spread processing on the screened channel original code words to obtain original watermark information. See figure 7.
As another preferred embodiment, the screening step may also be arranged after decoding and before despreading. Before despreading the channel original code words with the number of the spread spectrum factors to obtain original watermark information, screening the channel original code words with the number of the spread spectrum factors to obtain screened channel original code words; the despreading processing is performed on the channel original code words with the spreading factor quantity to obtain original watermark information, and the method comprises the following steps: and carrying out de-spread processing on the screened channel original code words to obtain original watermark information. As shown in fig. 11, the binary watermark information to be detected is the channel original code word with the spreading factor number, after BCH decoding, the binary information of the original watermark is adopted to screen the binary watermark information to be detected, so as to obtain screened binary watermark information (the screened channel original code word), and then the screened binary watermark information is subjected to despreading and decimal processing, so as to obtain the original watermark information.
Compared with the mode 2, the mode 1 has a fast extraction speed, and the mode 2 has a strong error correction capability, so that in specific implementation, the mode 1 can be firstly adopted to extract the watermark information 1, if the watermark information 1 is the same as the real watermark information, the watermark extraction process is ended, and if the watermark information 1 is different from the real watermark information, the mode 2 can be adopted to continuously extract the watermark information 2.
The various preferred embodiments described above can be combined in any combination, and the flow diagrams of several embodiments are shown below by fig. 5-12. The two boxes "video code stream to be detected" and "video to be detected" in the upper left corners in fig. 5 to 12 can be both used as the source of frame pictures (video frame images), and in practice, one of the two boxes is used as input. The difference between fig. 5 and fig. 12 mainly lies in the processing of BCH codewords to be detected when extracting watermark information. FIG. 5 is a schematic diagram illustrating that a true embedded BCH codeword is used to screen a BCH codeword to be detected, so as to obtain a screened BCH codeword, and the screened BCH codeword is despread, then BCH decoded and decimal to obtain watermark information 1; and carrying out BCH decoding, despreading and decimal treatment on the screened BCH code words to obtain watermark information 2. Fig. 6 shows that the BCH codeword to be detected is screened by using the truly embedded BCH codeword to obtain the screened BCH codeword, and the screened BCH codeword is despread, then BCH decoding and decimal to obtain the watermark information 1, and only the watermark information 1 is extracted. Fig. 7 shows that the BCH codeword to be detected is screened by using the truly embedded BCH codeword to obtain the screened BCH codeword, and the screened BCH codeword is subjected to BCH decoding, then despreading and decimal to obtain the watermark information 2, and only the watermark information 2 is extracted. Figure 8 differs from figure 6 only in that no true embedded BCH codewords are used for screening. FIG. 9 is compared to FIG. 7, except that no true embedded BCH codewords are used for screening. Fig. 10 is different from fig. 5 in that neither watermark information 1 nor watermark information 2 is extracted by using a true embedded BCH codeword for screening. Fig. 11 is a flowchart of BCH decoding on a BCH codeword to be detected to generate binary watermark information to be detected, then screening the binary watermark information to be detected by using the binary information of the original watermark to generate screened binary watermark information, and then despreading and decimating the screened binary watermark information to obtain watermark information 2. Fig. 12 shows extraction of watermark information 1 by the method of fig. 6 and extraction of watermark information 2 by the method of fig. 11.
A third embodiment of the present application provides a method for detecting a video frame image, which is described below with reference to fig. 13 and 14.
As shown in fig. 13, in step S1301, a video frame image to be detected is obtained.
As shown in fig. 13, in step S1302, channel-coded watermark information is extracted from the video frame image.
As shown in fig. 13, in step S1303, the channel coding is performed on the watermark information after channel coding to obtain the original watermark information.
In specific implementation, the watermark information after channel coding may be despread first, and then decoded, that is, in the mode 1 of the second embodiment of the present application.
Before performing channel decoding processing on the channel-coded watermark information, despreading processing may be performed on the channel-coded watermark information to obtain despread watermark information.
The channel decoding processing is performed on the channel-coded watermark information to obtain original watermark information, and the channel decoding processing includes:
and carrying out channel decoding processing on the despread watermark information to obtain first original watermark information.
In specific implementation, the channel decoding process may be performed on the watermark information after the channel coding, and then the despreading process may be performed, that is, in the mode 2 in the second embodiment of the present application.
The channel decoding processing is performed on the watermark information after the channel coding to obtain the original watermark information, and the channel decoding processing includes:
performing channel decoding processing on the watermark information subjected to channel coding to obtain channel original code words with spreading factor quantity;
despreading the channel original code words with the spreading factor quantity to obtain second original watermark information;
as shown in fig. 13, in step S1304, it is detected whether the video frame image is subjected to frame deletion processing according to the original watermark information.
The detecting whether the video frame image is subjected to frame deletion processing according to the original watermark information includes:
and detecting whether the video frame image is subjected to frame deletion processing or not according to the first original watermark information.
The detecting whether the video frame image is subjected to frame deletion processing according to the original watermark information includes:
and detecting whether the video frame image is subjected to frame deletion processing or not according to the second original watermark information.
In the method 1, the extraction speed is higher than that in the method 2, and the error correction capability is higher in the method 2. As shown in fig. 14, the method 1 may be adopted to extract the watermark information 1, and if the watermark information 1 is the same as the embedded watermark information, it is determined that the video frame image has not undergone frame deletion processing, and the watermark extraction process is ended; if the watermark information 1 is different from the real watermark information, continuously extracting the watermark information 2 by adopting a mode 2, detecting whether the video frame image is subjected to frame deletion by using the watermark information 2, and if the watermark information 2 is the same as the real watermark information, judging that the video frame image is not subjected to frame deletion; and if the watermark information 2 is different from the real watermark information, judging that the video frame image is subjected to frame deletion processing.
The technical effects of the present application are described below with reference to tables 1 to 4, and the present application improves the robustness of the watermark by the following operations.
1. BCH coding is introduced at the embedded end to code the watermark information, BCH decoding is introduced at the extraction end to carry out error correction decoding on the watermark information, and the robustness of the watermark is improved.
2. The advantages of BCH decoding and despreading are comprehensively considered at the extraction end, the error correction capability of watermark extraction is improved on the premise of ensuring the extraction rate, and damaged watermark information can be extracted as far as possible.
Frame deletion detection is carried out on 100 frames of the video with the resolutions of 176, 352, 288 and 704, 576, the missing detection rate and the false detection rate of the scheme are counted, and the video quality of the embedded watermark is calculated to represent the counting effect achieved by the scheme.
Table 1: different resolution video dropped frame detection performance
Figure GDA0003446055900000191
As can be seen from the data in table 1, for most videos, the scheme can perform the operation of detecting the frame deletion of the video well. For some video frame watermarks of a small part of videos, false detection can occur, namely, a video frame without video deletion frame tampering is mistakenly detected as a video frame with deletion frame tampering, and the false detection rate of the video with false detection is far smaller than that of a watermark scheme in the prior art. And all the video frames distorted by deleted frames are detected, and the omission ratio of all the experimental videos in the scheme is 0%.
Table 2: 176 x 144 video after embedding watermark video quality
Figure GDA0003446055900000201
Table 3: 352 by 288 video watermarked video quality
Figure GDA0003446055900000202
Table 4: 704 x 576 video quality after video embedding watermark
Figure GDA0003446055900000203
Figure GDA0003446055900000211
Tables 2, 3 and 4 embed watermarks and compressed PSNR and SSIM for different resolution videos. Because the watermark is only embedded in the brightness channel Y, the PSNR and SSIM of the Y channel are reduced after the watermark is embedded, and the U channel and the V channel are not influenced. PSNR and SSIM of the compressed YUV three channels are reduced. Although the quality of the video after embedding the watermark is reduced, the reduction amount is relatively less, and the requirement of embedding the video watermark is met. The scheme of the application can improve the robustness of the video watermark, and the video watermark after lossy compression can be well extracted. A small part of video frames are damaged too severely, so that correct watermarks cannot be extracted, false detection is caused, and the video frames with deleted frame detection can be detected and positioned.
A fourth embodiment of the present application provides a data processing method, which is described below with reference to fig. 15.
As shown in fig. 15, in step S1501, a carrier object is obtained.
The carrier object includes: images, video, etc.
As shown in fig. 15, in step S1502, raw data is obtained.
As shown in fig. 15, in step S1503, the original data is channel-coded to obtain channel-coded data.
The channel coding the original data to obtain the channel coded data includes:
converting the raw data into binary data;
and carrying out channel coding on the binary data to obtain the channel coded binary data.
As shown in fig. 15, in step S1504, the channel coded data is embedded in the carrier object.
The method further comprises the following steps: performing spread spectrum processing on the binary data after the channel coding to obtain the binary data after the spread spectrum processing;
the embedding the channel-coded data into the carrier object includes: and embedding the binary data after the spread spectrum processing into the video frame image.
A fourth embodiment of the present application provides a data processing method, which is similar to the first embodiment, and specifically, refer to the description of the first embodiment.
A fifth embodiment of the present application provides a data processing method, which is described below with reference to fig. 16.
As shown in fig. 16, in step S1601, a carrier object is acquired;
As shown in fig. 16, in step S1602, channel-coded data is extracted from the carrier object;
as shown in fig. 16, in step S1603, the channel coding data is subjected to channel decoding processing to obtain original data.
A fifth embodiment of the present application provides a data processing method, which is similar to the second embodiment, and specifically, refer to the description of the second embodiment.
A sixth embodiment of the present application provides a watermark embedding apparatus corresponding to the watermark embedding method provided in the first embodiment of the present application.
As shown in fig. 17, the apparatus includes:
a video frame image obtaining unit 1701 for obtaining a video frame image;
an original watermark information obtaining unit 1702, configured to obtain original watermark information;
a watermark information obtaining unit 1703, configured to perform channel coding on the original watermark information to obtain channel-coded watermark information;
a watermark information embedding unit 1704, configured to embed the channel-coded watermark information into the video frame image.
Optionally, the watermark information obtaining unit is specifically configured to:
converting the original watermark information into binary watermark information;
And carrying out channel coding on the binary watermark information to obtain the channel coded watermark information.
Optionally, the apparatus further comprises: the spread spectrum processing unit is used for carrying out spread spectrum processing on the watermark information after the channel coding to obtain the watermark information after the spread spectrum processing;
the embedding the channel-coded watermark information into a video frame image includes: and embedding the watermark information after the spread spectrum processing into the video frame image.
Optionally, the apparatus further comprises: further comprising:
the spread spectrum factor determining unit is used for determining the spread spectrum factor of spread spectrum processing according to the number of video frame image blocks subjected to the video frame image blocking processing and the binary bit number of the watermark information to be embedded in the video frame image blocks;
the performing spread spectrum processing on the channel-coded watermark information to obtain the spread spectrum-processed watermark information includes: and performing spread spectrum processing on the watermark information after the channel coding by using the spread spectrum factor of the spread spectrum processing to obtain the watermark information after the spread spectrum processing.
Optionally, the determining a spreading factor of spreading processing according to the number of video frame image blocks after the video frame image is converted into the frequency domain image and the binary bit number of the watermark information embedded in each video frame image block includes:
Multiplying the number of the video frame image blocks by the binary digit number of each video frame image block embedded with the watermark information to obtain the binary digit number of the embedded information;
dividing the binary digit number of the embedded information with the binary digit number of the watermark information after the channel coding to obtain a quotient of the binary digit numbers;
and taking the maximum integer not greater than the quotient of the binary digits as the spreading factor of the spreading processing.
Optionally, the converting the original watermark information into binary watermark information includes:
determining the binary digit number of the binary watermark information according to the binary digit number required by the channel coded watermark information to be obtained;
and converting the original watermark information into binary watermark information according to the binary digit number of the binary watermark information.
Optionally, the apparatus further comprises: and the original watermark information determining unit is used for determining the original watermark information according to the positions of the video frame images in all the video frame images included in the video file.
Optionally, the watermark information embedding unit is specifically configured to:
carrying out blocking processing on the video frame image to obtain a video frame image block;
Performing discrete cosine transform on the video frame image blocks to obtain a first coefficient matrix;
embedding the watermark information after the channel coding into the first coefficient matrix to obtain a second coefficient matrix;
and carrying out inverse discrete cosine transform on the second coefficient matrix to obtain a video frame image embedded with watermark information.
Optionally, the embedding the channel-coded watermark information into the first coefficient matrix includes:
and embedding one bit of information in the channel-coded watermark information in a coefficient matrix block contained in the first coefficient matrix.
Optionally, the embedding a bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix includes:
and respectively embedding each bit information in the channel-coded watermark information into different coefficient matrix blocks according to the sequence of the coefficient matrix blocks in the first coefficient matrix.
Optionally, the apparatus further comprises: a size determination unit for an image block of a video frame,
the size of the video frame image block adopted during the video frame image blocking processing is determined according to the image resolution of the video frame image;
The blocking processing of the video frame image to obtain a video frame image block includes: and according to the determined size of the video frame image block, carrying out blocking processing on the video frame image to obtain the video frame image block.
Optionally, the embedding a bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix includes:
when the bit information to be embedded is 1, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)+weight*abs(point(poj,poi,dct_num));
when the bit information to be embedded is 0, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)-weight*abs(point(poj,poi,dct_num));
wherein dct _ num represents a coefficient matrix block position where bit information is embedded in the first coefficient matrix,
point (poj, poi, dct _ num) bit information is embedded into the coefficient value with row position poj and column position poi in the coefficient matrix block before embedding;
point (point, poj, dct _ num) bit information is embedded into the coefficient value with the row position being point and the column position being poj in the coefficient matrix block;
weight is the strength of the modified watermark and abs represents the absolute value.
Optionally, the apparatus further comprises:
and the video compression unit is used for carrying out video compression on the video frame image embedded with the watermark information to obtain a video code stream file.
It should be noted that, for the detailed description of the watermark embedding apparatus provided in the sixth embodiment of the present application, reference may be made to the related description of the first embodiment of the present application, and details are not described here again.
A seventh embodiment of the present application further provides an electronic device corresponding to the watermark embedding method provided in the first embodiment of the present application.
As shown in fig. 18, the electronic apparatus includes:
a processor 1801; and
a memory 1802 for storing a program of a watermark embedding method, the apparatus performing the following steps after being powered on and running the program of the watermark embedding method by the processor:
obtaining a video frame image;
obtaining original watermark information;
performing channel coding on the original watermark information to obtain channel coded watermark information;
and embedding the watermark information after the channel coding into the video frame image.
Optionally, the performing channel coding on the original watermark information to obtain the channel-coded watermark information includes:
converting the original watermark information into binary watermark information;
and carrying out channel coding on the binary watermark information to obtain the channel coded watermark information.
Optionally, the electronic device further performs the following steps: performing spread spectrum processing on the watermark information after the channel coding to obtain the watermark information after the spread spectrum processing;
The embedding the channel-coded watermark information into the video frame image includes: and embedding the watermark information after the spread spectrum processing into the video frame image.
Optionally, the electronic device further performs the following steps:
determining a spread spectrum factor of spread spectrum processing according to the number of video frame image blocks after the video frame image block processing and the binary digit number of watermark information to be embedded in the video frame image blocks;
the performing spread spectrum processing on the channel-coded watermark information to obtain the spread spectrum-processed watermark information includes: and performing spread spectrum processing on the watermark information after the channel coding by using the spread spectrum factor of the spread spectrum processing to obtain the watermark information after the spread spectrum processing.
Optionally, the determining a spreading factor of spreading processing according to the number of video frame image blocks after the video frame image is converted into the frequency domain image and the binary bit number of the watermark information embedded in each video frame image block includes:
multiplying the number of the video frame image blocks by the binary digit number of each video frame image block embedded with the watermark information to obtain the binary digit number of the embedded information;
dividing the binary digit number of the embedded information with the binary digit number of the watermark information after the channel coding to obtain a quotient of the binary digit numbers;
And taking the maximum integer not greater than the quotient of the binary digits as a spreading factor of the spreading processing.
Optionally, the converting the original watermark information into binary watermark information includes:
determining the binary digit number of the binary watermark information according to the binary digit number required by the channel coded watermark information to be obtained;
and converting the original watermark information into binary watermark information according to the binary digit number of the binary watermark information.
Optionally, the electronic device further performs the following steps: and determining original watermark information according to the positions of the video frame images in all the video frame images included in the video file.
Optionally, the embedding the channel-coded watermark information into the video frame image includes:
carrying out blocking processing on the video frame image to obtain a video frame image block;
performing discrete cosine transform on the video frame image blocks to obtain a first coefficient matrix;
embedding the watermark information after the channel coding into the first coefficient matrix to obtain a second coefficient matrix;
and carrying out inverse discrete cosine transform on the second coefficient matrix to obtain a video frame image embedded with watermark information.
Optionally, the embedding the channel-coded watermark information into the first coefficient matrix includes:
and embedding one bit of information in the channel-coded watermark information in a coefficient matrix block contained in the first coefficient matrix.
Optionally, the embedding a bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix includes:
and respectively embedding each bit information in the channel-coded watermark information into different coefficient matrix blocks according to the sequence of the coefficient matrix blocks in the first coefficient matrix.
Optionally, the electronic device further performs the following steps:
determining the size of a video frame image block adopted during the video frame image blocking processing according to the image resolution of the video frame image;
the blocking processing of the video frame image to obtain a video frame image block includes: and according to the determined size of the video frame image block, carrying out blocking processing on the video frame image to obtain the video frame image block.
Optionally, the embedding a bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix includes:
When the bit information to be embedded is 1, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)+weight*abs(point(poj,poi,dct_num));
when the bit information to be embedded is 0, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)-weight*abs(point(poj,poi,dct_num));
wherein dct _ num represents a coefficient matrix block position where bit information is embedded in the first coefficient matrix,
point (poj, poi, dct _ num) bit information is embedded into the coefficient value with row position poj and column position poi in the coefficient matrix block before embedding;
point (point, poj, dct _ num) bit information is embedded into the coefficient value with the row position being point and the column position being poj in the coefficient matrix block;
weight is the strength of the modified watermark and abs represents the absolute value.
Optionally, the electronic device further performs the following steps:
and performing video compression on the video frame image embedded with the watermark information to obtain a video code stream file.
It should be noted that, for the detailed description of the electronic device provided in the seventh embodiment of the present application, reference may be made to the related description of the first embodiment of the present application, and details are not repeated here.
In accordance with a watermark embedding method provided in the first embodiment of the present application, an eighth embodiment of the present application also provides a storage device storing a program of the watermark embedding method, the program being executed by a processor to perform the steps of:
Obtaining a video frame image;
obtaining original watermark information;
performing channel coding on the original watermark information to obtain channel coded watermark information;
and embedding the watermark information after the channel coding into the video frame image.
It should be noted that, for the detailed description of the storage device provided in the eighth embodiment of the present application, reference may be made to the related description of the first embodiment of the present application, and details are not described here again.
A ninth embodiment of the present application provides a watermark extraction apparatus corresponding to the watermark extraction method provided in the second embodiment of the present application.
As shown in fig. 19, the apparatus includes:
a video frame image acquisition unit 1901 configured to acquire a video frame image;
a watermark information extraction unit 1902, configured to extract channel-coded watermark information from the video frame image;
an original watermark information obtaining unit 1903, configured to perform channel decoding processing on the channel-coded watermark information to obtain original watermark information.
Optionally, the video frame image obtaining unit is specifically configured to:
and carrying out video decompression on the video code stream file containing the video frame image to obtain the video frame image.
Optionally, extracting the watermark information after channel coding from the video frame image includes:
performing discrete cosine transform on the video frame image to obtain a discrete cosine transform coefficient matrix;
and extracting the watermark information after channel coding from the discrete cosine transform coefficient matrix.
Optionally, the extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix includes:
extracting binary data representing watermark information from a coefficient matrix block in a discrete cosine transform coefficient matrix;
and obtaining the watermark information after channel coding according to the binary data.
Optionally, the extracting binary data representing watermark information from a coefficient matrix block in the discrete cosine transform coefficient matrix includes:
when in the discrete cosine transform coefficient matrix
When point (point, poj, dct _ num) > point (poj, point, dct _ num), it is determined that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 1;
when in the coefficient matrix of discrete cosine transform coefficient
When point (point, poj, dct _ num) < point (poj, point, dct _ num), determining that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 0;
point (poi, poj, dct _ num) represents a coefficient value with row position of poi and column position of poj in a coefficient matrix block with position dct _ num;
point (poj, poi, dct _ num) represents a coefficient value with row position poj and column position poi in a coefficient matrix block with position dct _ num.
Optionally, the extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix includes:
and extracting channel coding code words from the discrete cosine transform coefficient matrix, wherein the number of the extracted channel coding code words is the same as the number of the spreading factors.
Optionally, the apparatus further comprises: a de-spread processing unit for de-spreading the data,
the code word processing module is used for carrying out despreading processing on the channel coding code words with the number of the spreading factors to obtain despread channel coding code words;
the channel decoding processing is performed on the channel-coded watermark information to obtain original watermark information, and the channel decoding processing includes: and carrying out channel decoding processing on the despread channel coding code word to obtain original watermark information.
Optionally, the despreading the channel coding code word with the spreading factor number to obtain a despread channel coding code word includes:
according to the channel coding code words with the number of the spreading factors, determining binary data of each position of the despread channel coding code words;
And combining the binary data of each position into a despread channel coding code word.
Optionally, the determining the binary data of each position of the despread channel coded codeword according to the channel coded codewords of the spreading factor number includes:
if the number of binary data 1 at a certain position in the channel coding code words with the number of the spreading factors is larger than the number of binary data 0, determining that the binary data at the position is 1;
if the number of binary data of a certain position in the channel-coded codeword of the spreading factor number is 1 is smaller than the number of binary data of 0, it is determined that the binary data of the position is 0.
Optionally, the despreading the channel coding code word with the spreading factor number to obtain a despread channel coding code word includes:
judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors; and if so, taking the channel coding code word which is the same as the actually embedded channel coding code word as the despread channel coding code word.
Optionally, the despreading the channel coding code word with the spreading factor number to obtain a despread channel coding code word includes:
Judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors;
if not, screening the channel coding code words with the number of the spread spectrum factors to obtain screened channel coding code words;
and extracting the despread channel coding code words from the screened channel coding code words.
Optionally, the screening the channel coding code words with the spreading factor number to obtain the screened channel coding code words includes:
and taking the channel coding code words with the error rates ranked within a preset rank in the channel coding code words with the spreading factor number as the screened channel coding code words.
Optionally, the performing channel decoding processing on the channel-coded watermark information to obtain original watermark information includes:
performing channel decoding processing on the watermark information subjected to channel coding to obtain channel original code words with spreading factor quantity;
and despreading the channel original code words with the number of the spreading factors to obtain original watermark information.
Optionally, the channel decoding processing is performed on the watermark information after channel coding to obtain original watermark information, and the channel decoding processing includes:
Performing channel decoding processing on the watermark information subjected to channel coding to obtain watermark information in a binary format;
and converting the watermark information in the binary format into the watermark information in the decimal format to obtain the original watermark information.
It should be noted that, for the detailed description of the watermark extraction apparatus provided in the ninth embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not described here again.
As shown in fig. 20, the electronic apparatus includes:
a processor 2001; and
a memory 2002 for storing a program of a watermark extraction method, wherein the following steps are executed after the device is powered on and the program of the watermark extraction method is executed by the processor:
acquiring a video frame image;
extracting watermark information after channel coding from the video frame image;
and carrying out channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information.
Optionally, the acquiring the video frame image includes:
and carrying out video decompression on the video code stream file containing the video frame image to obtain the video frame image.
Optionally, the extracting, from the video frame image, watermark information after channel coding includes:
Performing discrete cosine transform on the video frame image to obtain a discrete cosine transform coefficient matrix;
and extracting the watermark information after channel coding from the discrete cosine transform coefficient matrix.
Optionally, the extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix includes:
extracting binary data representing watermark information from a coefficient matrix block in a discrete cosine transform coefficient matrix;
and obtaining the watermark information after channel coding according to the binary data.
Optionally, the extracting binary data representing watermark information from a coefficient matrix block in the discrete cosine transform coefficient matrix includes:
when in the discrete cosine transform coefficient matrix
When point (point, poj, dct _ num) > point (poj, point, dct _ num), it is determined that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 1;
when in the coefficient matrix of discrete cosine transform coefficient
When point (point, poj, dct _ num) < point (poj, point, dct _ num), determining that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 0;
point (point, poj, dct _ num) represents a coefficient value having a row position of point and a column position of poj in a coefficient matrix block having a position of dct _ num;
point (poj, poi, dct _ num) represents a coefficient value with row position poj and column position poi in a coefficient matrix block with position dct _ num.
Optionally, the extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix includes:
and extracting channel coding code words from the discrete cosine transform coefficient matrix, wherein the number of the extracted channel coding code words is the same as the number of the spreading factors.
Optionally, the electronic device further performs the following steps:
de-spreading the channel coding code words with the number of the spreading factors to obtain de-spread channel coding code words;
the channel decoding processing is performed on the channel-coded watermark information to obtain original watermark information, and the channel decoding processing includes: and carrying out channel decoding processing on the despread channel coding code word to obtain original watermark information.
Optionally, the despreading the channel coding code word with the spreading factor number to obtain a despread channel coding code word includes:
according to the channel coding code words with the number of the spreading factors, determining binary data of each position of the despread channel coding code words;
And combining the binary data of each position into a despread channel coding code word.
Optionally, the determining the binary data of each position of the despread channel coded codeword according to the channel coded codewords of the spreading factor number includes:
if the number of binary data 1 at a certain position in the channel coding code words with the number of the spreading factors is larger than the number of binary data 0, determining that the binary data at the position is 1;
if the number of binary data of a certain position in the channel-coded codeword of the spreading factor number is 1 is smaller than the number of binary data of 0, it is determined that the binary data of the position is 0.
Optionally, the despreading the channel coding code word with the spreading factor number to obtain a despread channel coding code word includes:
judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors; and if so, taking the channel coding code word which is the same as the actually embedded channel coding code word as the despread channel coding code word.
Optionally, the despreading the channel coding code word with the spreading factor number to obtain a despread channel coding code word includes:
Judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors;
if not, screening the channel coding code words with the spreading factor quantity to obtain the screened channel coding code words;
and extracting the despread channel coding code words from the screened channel coding code words.
Optionally, the screening the channel coding code words with the spreading factor number to obtain the screened channel coding code words includes:
and taking the channel coding code words with the error rates ranked within a preset rank in the channel coding code words with the spreading factor number as the screened channel coding code words.
Optionally, the performing channel decoding processing on the channel-coded watermark information to obtain original watermark information includes:
performing channel decoding processing on the watermark information subjected to channel coding to obtain channel original code words with spreading factor quantity;
and despreading the channel original code words with the number of the spreading factors to obtain original watermark information.
Optionally, the channel decoding processing is performed on the watermark information after channel coding to obtain original watermark information, and the channel decoding processing includes:
Performing channel decoding processing on the watermark information subjected to channel coding to obtain watermark information in a binary format;
and converting the watermark information in the binary format into the watermark information in the decimal format to obtain the original watermark information.
It should be noted that, for the detailed description of the electronic device provided in the tenth embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not repeated here.
In accordance with a watermark extraction method provided in the second embodiment of the present application, an eleventh embodiment of the present application provides a storage device storing a program of the watermark extraction method, the program being executed by a processor to perform the steps of:
acquiring a video frame image;
extracting watermark information after channel coding from the video frame image;
and carrying out channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information.
It should be noted that, for the detailed description of the storage device provided in the eleventh embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not repeated here.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

Claims (38)

1. A watermark embedding method, comprising:
obtaining a video frame image;
obtaining original watermark information;
performing channel coding on the original watermark information to obtain channel coded watermark information; the channel coding watermark information needs to be subjected to spread spectrum processing, a spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to the video frame image block processing and the binary bit number of the watermark information needing to be embedded in the video frame image blocks, and the spread spectrum factor of the spread spectrum processing is utilized to carry out the spread spectrum processing on the channel coding watermark information to obtain the spread spectrum processed watermark information;
And embedding the watermark information after the spread spectrum processing into the video frame image.
2. The method of claim 1, wherein the channel-coding the original watermark information to obtain the channel-coded watermark information comprises:
converting the original watermark information into binary watermark information;
and carrying out channel coding on the binary watermark information to obtain the channel coded watermark information.
3. The method according to claim 1, wherein determining the spreading factor of the spreading process according to the number of video frame image blocks after the video frame image is converted into the frequency domain image and the number of binary bits of each video frame image block embedded with the watermark information comprises:
multiplying the number of the video frame image blocks by the binary digit number of each video frame image block embedded with the watermark information to obtain the binary digit number of the embedded information;
dividing the binary digit number of the embedded information with the binary digit number of the watermark information after the channel coding to obtain a quotient of the binary digit numbers;
and taking the maximum integer not greater than the quotient of the binary digits as the spreading factor of the spreading processing.
4. The method according to claim 2, wherein the converting the original watermark information into binary watermark information comprises:
determining the binary digit number of the binary watermark information according to the binary digit number required by the watermark information after channel coding to be obtained;
and converting the original watermark information into binary watermark information according to the binary digit number of the binary watermark information.
5. The method of claim 1, further comprising: and determining original watermark information according to the positions of the video frame images in all the video frame images included in the video file.
6. The method of claim 1, wherein embedding the channel-coded watermark information into the video frame image comprises:
carrying out blocking processing on the video frame image to obtain a video frame image block;
performing discrete cosine transform on the video frame image blocks to obtain a first coefficient matrix;
embedding the watermark information after the channel coding into the first coefficient matrix to obtain a second coefficient matrix;
and carrying out inverse discrete cosine transform on the second coefficient matrix to obtain a video frame image embedded with watermark information.
7. The method of claim 6, wherein the embedding the channel-encoded watermark information into the first coefficient matrix comprises:
and embedding one bit of information in the channel-coded watermark information in a coefficient matrix block contained in the first coefficient matrix.
8. The method of claim 7, wherein embedding one bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix comprises:
and respectively embedding each bit information in the channel-coded watermark information into different coefficient matrix blocks according to the sequence of the coefficient matrix blocks in the first coefficient matrix.
9. The method of claim 6, further comprising:
determining the size of a video frame image block adopted during the video frame image blocking processing according to the image resolution of the video frame image;
the blocking processing of the video frame image to obtain a video frame image block includes: and according to the determined size of the video frame image block, carrying out blocking processing on the video frame image to obtain the video frame image block.
10. The method of claim 7, wherein embedding one bit of information in the channel-coded watermark information in a coefficient matrix block included in the first coefficient matrix comprises:
When the bit information to be embedded is 1, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)+weight*abs(point(poj,poi,dct_num));
when the bit information to be embedded is 0, the coefficient value is replaced by adopting the following formula:
point(poi,poj,dct_num)=point(poj,poi,dct_num)-weight*abs(point(poj,poi,dct_num));
wherein dct _ num represents a coefficient matrix block position where bit information is embedded in the first coefficient matrix,
point (poj, poi, dct _ num) represents a coefficient value having a row position of poj and a column position of poi in the coefficient matrix block before bit information is embedded;
point (poi, poj, dct _ num) represents a coefficient value with a row position of poi and a column position of poj in the coefficient matrix block after bit information is embedded;
weight is the strength of the modified watermark and abs represents the absolute value.
11. The method of claim 6, further comprising:
and performing video compression on the video frame image embedded with the watermark information to obtain a video code stream file.
12. A watermark extraction method, comprising:
acquiring a video frame image;
extracting watermark information after channel coding from the video frame image; the channel coding watermark information is subjected to spread spectrum processing, and the spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to block processing of the video frame image and the binary bit number of the watermark information to be embedded in the video frame image blocks;
And carrying out channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information.
13. The method of claim 12, wherein said obtaining video frame images comprises:
and carrying out video decompression on the video code stream file containing the video frame image to obtain the video frame image.
14. The method of claim 12, wherein extracting the channel-coded watermark information from the video frame image comprises:
performing discrete cosine transform on the video frame image to obtain a discrete cosine transform coefficient matrix;
and extracting the watermark information after channel coding from the discrete cosine transform coefficient matrix.
15. The method according to claim 14, wherein the extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix comprises:
extracting binary data representing watermark information from a coefficient matrix block in a discrete cosine transform coefficient matrix;
and obtaining the watermark information after channel coding according to the binary data.
16. The method of claim 15, wherein extracting binary data representing watermark information from a block of a matrix of discrete cosine transform coefficients comprises:
When the discrete cosine transform coefficient matrix is
When point (point, poj, dct _ num) > point (poj, point, dct _ num), it is determined that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 1;
when in the coefficient matrix of discrete cosine transform coefficient
When point (point, poj, dct _ num) < point (poj, point, dct _ num), determining that binary data embedded in a coefficient matrix block whose embedding position is dct _ num in the first coefficient matrix is 0;
point (poi, poj, dct _ num) represents a coefficient value with row position of poi and column position of poj in a coefficient matrix block with position dct _ num;
point (poj, poi, dct _ num) represents a coefficient value with row position poj and column position poi in a coefficient matrix block with position dct _ num.
17. The method according to claim 14, wherein the extracting the channel-coded watermark information from the discrete cosine transform coefficient matrix comprises:
and extracting channel coding code words from the discrete cosine transform coefficient matrix, wherein the number of the extracted channel coding code words is the same as the number of the spreading factors.
18. The method of claim 17, further comprising:
de-spreading the channel coding code words with the number of the spreading factors to obtain de-spread channel coding code words;
The channel decoding processing is performed on the watermark information after the channel coding to obtain the original watermark information, and the channel decoding processing includes: and carrying out channel decoding processing on the despread channel coding code word to obtain original watermark information.
19. The method of claim 18, wherein despreading the number of spreading factor channel coded codewords to obtain despread channel coded codewords comprises:
according to the channel coding code words with the number of the spreading factors, determining binary data of each position of the despread channel coding code words;
and combining the binary data of each position into a despread channel coding code word.
20. The method of claim 19, wherein determining the binary data for each position of the despread channel-coded codeword from the number of channel-coded codewords at the spreading factor comprises:
if the number of binary data 1 at a certain position in the channel coding code words with the number of the spreading factors is larger than the number of binary data 0, determining that the binary data at the position is 1;
if the number of binary data of a certain position in the channel-coded codeword of the spreading factor number is 1 is smaller than the number of binary data of 0, it is determined that the binary data of the position is 0.
21. The method of claim 18, wherein the despreading the channel coding codeword with the spreading factor number to obtain a despread channel coding codeword comprises:
judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors; and if so, taking the channel coding code word which is the same as the actually embedded channel coding code word as the despread channel coding code word.
22. The method of claim 18, wherein the despreading the channel coding codeword with the spreading factor number to obtain a despread channel coding codeword comprises:
judging whether the channel coding code words with the same quantity as the actually embedded channel coding code words exist in the channel coding code words with the quantity of the spreading factors;
if not, screening the channel coding code words with the number of the spread spectrum factors to obtain screened channel coding code words;
and extracting the despread channel coding code words from the screened channel coding code words.
23. The method of claim 22, wherein the screening the channel coding codewords of the spreading factor number to obtain the screened channel coding codewords comprises:
And taking the channel coding code words with the error rates ranked within a preset rank in the channel coding code words with the spreading factor number as the screened channel coding code words.
24. The method according to claim 12, wherein the performing channel decoding processing on the channel-coded watermark information to obtain original watermark information comprises:
performing channel decoding processing on the watermark information subjected to channel coding to obtain channel original code words with spreading factor quantity;
and despreading the channel original code words with the number of the spreading factors to obtain original watermark information.
25. The method of claim 12, wherein performing channel decoding processing on the channel-coded watermark information to obtain original watermark information comprises:
performing channel decoding processing on the watermark information subjected to channel coding to obtain watermark information in a binary format;
and converting the watermark information in the binary format into the watermark information in the decimal format to obtain the original watermark information.
26. A method for detecting video frame images, comprising:
obtaining a video frame image to be detected;
Extracting channel-coded watermark information from the video frame image, wherein the channel-coded watermark information is subjected to spread spectrum processing, and the spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to block processing of the video frame image and the binary bit number of the watermark information to be embedded in the video frame image blocks;
performing channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information;
and detecting whether the video frame image is subjected to frame deletion processing or not according to the original watermark information.
27. The method of claim 26, further comprising: de-spreading the watermark information after channel coding to obtain de-spread watermark information;
the channel decoding processing is performed on the channel-coded watermark information to obtain original watermark information, and the channel decoding processing includes:
performing channel decoding processing on the despread watermark information to obtain first original watermark information;
the detecting whether the video frame image is subjected to frame deletion processing according to the original watermark information includes:
and detecting whether the video frame image is subjected to frame deletion processing or not according to the first original watermark information.
28. The method of claim 26, wherein performing channel decoding processing on the channel-coded watermark information to obtain original watermark information comprises:
performing channel decoding processing on the watermark information subjected to channel coding to obtain channel original code words with spreading factor quantity;
despreading the channel original code words with the spreading factor quantity to obtain second original watermark information;
the detecting whether the video frame image is subjected to frame deletion processing according to the original watermark information includes:
and detecting whether the video frame image is subjected to frame deletion processing or not according to the second original watermark information.
29. A method of data processing, comprising:
obtaining a carrier object;
obtaining original data;
performing channel coding on the original data to obtain channel coded data, wherein the channel coded data needs to be subjected to spread spectrum processing, determining a spreading factor of the spread spectrum processing according to the number of carrier object blocks subjected to the carrier object block processing and the binary digit number of the data needing to be embedded in the carrier object blocks, and performing the spread spectrum processing on the channel coded data by using the spreading factor of the spread spectrum processing to obtain the spread spectrum processed data;
And embedding the data after the spread spectrum processing into the carrier object.
30. The method of claim 29, wherein channel coding the original data to obtain channel coded data comprises:
converting the raw data into binary data;
and carrying out channel coding on the binary data to obtain the channel coded binary data.
31. The method of claim 30, further comprising: and carrying out spread spectrum processing on the binary data after the channel coding to obtain the binary data after the spread spectrum processing.
32. A data processing method, comprising:
acquiring a carrier object;
extracting data subjected to channel coding from the carrier object, wherein the data subjected to channel coding is subjected to spread spectrum processing, and the spreading factor of the spread spectrum processing is determined according to the number of carrier object blocks subjected to carrier object block processing and the binary digit number of the data needing to be embedded in the carrier object blocks;
and carrying out channel decoding processing on the data subjected to channel coding to obtain original data.
33. A watermark embedding apparatus, comprising:
A video frame image obtaining unit for obtaining a video frame image;
an original watermark information obtaining unit, configured to obtain original watermark information;
a watermark information obtaining unit, configured to perform channel coding on the original watermark information to obtain channel-coded watermark information; the channel coding watermark information needs to be subjected to spread spectrum processing, a spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to the video frame image block processing and the binary bit number of the watermark information needing to be embedded in the video frame image blocks, and the spread spectrum factor of the spread spectrum processing is utilized to carry out the spread spectrum processing on the channel coding watermark information to obtain the spread spectrum processed watermark information;
and the watermark information embedding unit is used for embedding the spread spectrum processed watermark information into the video frame image.
34. An electronic device, comprising:
a processor; and
a memory for storing a program of a watermark embedding method, the apparatus performing the following steps after being powered on and running the program of the watermark embedding method by the processor:
obtaining a video frame image;
obtaining original watermark information;
performing channel coding on the original watermark information to obtain channel coded watermark information; the channel coding watermark information needs to be subjected to spread spectrum processing, a spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to the video frame image block processing and the binary bit number of the watermark information needing to be embedded in the video frame image blocks, and the spread spectrum factor of the spread spectrum processing is utilized to carry out the spread spectrum processing on the channel coding watermark information to obtain the spread spectrum processed watermark information;
And embedding the watermark information after the spread spectrum processing into the video frame image.
35. A storage device, characterized in that,
a program storing a watermark embedding method, the program being executed by a processor to perform the steps of:
obtaining a video frame image;
obtaining original watermark information;
performing channel coding on the original watermark information to obtain channel coded watermark information; the channel coding watermark information needs to be subjected to spread spectrum processing, a spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to the video frame image block processing and the binary bit number of the watermark information needing to be embedded in the video frame image blocks, and the spread spectrum factor of the spread spectrum processing is utilized to carry out the spread spectrum processing on the channel coding watermark information to obtain the spread spectrum processed watermark information;
and embedding the watermark information after the spread spectrum processing into the video frame image.
36. A watermark extraction apparatus, comprising:
a video frame image acquisition unit for acquiring a video frame image;
the watermark information extraction unit is used for extracting the watermark information after channel coding from the video frame image; the channel coding watermark information is subjected to spread spectrum processing, and the spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to block processing of the video frame image and the binary bit number of the watermark information to be embedded in the video frame image blocks;
And the original watermark information obtaining unit is used for carrying out channel decoding processing on the watermark information subjected to channel coding to obtain the original watermark information.
37. An electronic device, comprising:
a processor; and
a memory for storing a program of a watermark extraction method, the apparatus performing the following steps after being powered on and running the program of the watermark extraction method by the processor:
acquiring a video frame image;
extracting watermark information after channel coding from the video frame image; the channel coding watermark information is subjected to spread spectrum processing, and the spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to block processing of the video frame image and the binary bit number of the watermark information to be embedded in the video frame image blocks;
and carrying out channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information.
38. A storage device, characterized in that,
a program storing a watermark extraction method, the program being executed by a processor to perform the steps of:
acquiring a video frame image;
extracting watermark information after channel coding from the video frame image; the channel coding watermark information is subjected to spread spectrum processing, and the spread spectrum factor of the spread spectrum processing is determined according to the number of video frame image blocks subjected to block processing of the video frame image and the binary bit number of the watermark information to be embedded in the video frame image blocks;
And carrying out channel decoding processing on the watermark information subjected to channel coding to obtain original watermark information.
CN201910079180.XA 2019-01-28 2019-01-28 Watermark embedding, watermark extracting, data processing and video frame detecting method Active CN111491171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910079180.XA CN111491171B (en) 2019-01-28 2019-01-28 Watermark embedding, watermark extracting, data processing and video frame detecting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910079180.XA CN111491171B (en) 2019-01-28 2019-01-28 Watermark embedding, watermark extracting, data processing and video frame detecting method

Publications (2)

Publication Number Publication Date
CN111491171A CN111491171A (en) 2020-08-04
CN111491171B true CN111491171B (en) 2022-07-29

Family

ID=71812130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910079180.XA Active CN111491171B (en) 2019-01-28 2019-01-28 Watermark embedding, watermark extracting, data processing and video frame detecting method

Country Status (1)

Country Link
CN (1) CN111491171B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112101155B (en) * 2020-09-02 2024-04-26 北京博睿维讯科技有限公司 Display content verification method, device, system and storage medium
CN114528531A (en) * 2020-11-23 2022-05-24 阿里巴巴集团控股有限公司 Data processing method, device and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010081182A (en) * 2000-02-10 2001-08-29 윤덕용 Digital Watermarking Using Variable Size of Blocks
CN101442672A (en) * 2007-11-23 2009-05-27 华为技术有限公司 System for processing digital watermarking, method and apparatus for embedding and detecting digital watermarking
CN102510490A (en) * 2011-09-13 2012-06-20 海南大学 Video watermark realizing method against geometric attack based on three-dimensional discrete cosine transform (DCT)
CN102750660A (en) * 2012-06-08 2012-10-24 北京京北方信息技术有限公司 Method and device for embedding and extracting digital watermarking
CN103455972A (en) * 2013-09-10 2013-12-18 山东省计算中心 Multiple-bit spread spectrum watermark method with robustness enhanced by utilization of carrier
CN103856829A (en) * 2012-11-30 2014-06-11 华为技术有限公司 Video digital watermark embedding and extracting method and device thereof
CN104134185A (en) * 2014-07-31 2014-11-05 江西理工大学 Image watermark embedding and extracting method and system for resisting combination attacks

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010081182A (en) * 2000-02-10 2001-08-29 윤덕용 Digital Watermarking Using Variable Size of Blocks
CN101442672A (en) * 2007-11-23 2009-05-27 华为技术有限公司 System for processing digital watermarking, method and apparatus for embedding and detecting digital watermarking
CN102510490A (en) * 2011-09-13 2012-06-20 海南大学 Video watermark realizing method against geometric attack based on three-dimensional discrete cosine transform (DCT)
CN102750660A (en) * 2012-06-08 2012-10-24 北京京北方信息技术有限公司 Method and device for embedding and extracting digital watermarking
CN103856829A (en) * 2012-11-30 2014-06-11 华为技术有限公司 Video digital watermark embedding and extracting method and device thereof
CN103455972A (en) * 2013-09-10 2013-12-18 山东省计算中心 Multiple-bit spread spectrum watermark method with robustness enhanced by utilization of carrier
CN104134185A (en) * 2014-07-31 2014-11-05 江西理工大学 Image watermark embedding and extracting method and system for resisting combination attacks

Also Published As

Publication number Publication date
CN111491171A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
Rabie et al. High-capacity steganography: a global-adaptive-region discrete cosine transform approach
JP4568732B2 (en) Method and system for processing digital images
RU2714103C1 (en) Methods for encoding, decoding and displaying high-dynamic range images
Huang et al. Metadata-based image watermarking for copyright protection
US6278792B1 (en) Robust digital watermarking
CN1108063C (en) MPEG2 moving picte encoding.decodind system
Wang et al. Real-time compressed-domain video watermarking resistance to geometric distortions
Langelaar et al. Copy protection for multimedia data based on labeling techniques
Rabie et al. On the embedding limits of the discrete cosine transform
JP2009514305A (en) How to embed data in an information signal
CN105100959A (en) Evidence-obtaining marking method and device and digital home theater
CN111491171B (en) Watermark embedding, watermark extracting, data processing and video frame detecting method
Ramkumar et al. Uncompressed digital video watermarking using stationary wavelet transform
US7630512B2 (en) Method for performing recoverable video and image watermarking which survives block-based video and image compression
US6724913B1 (en) Digital watermarking
Mobasseri et al. Watermarking of MPEG-2 video in compressed domain using VLC mapping
CA2523345A1 (en) Watermarking
Ting et al. Format-compliant perceptual encryption method for JPEG XT
CN108616757A (en) Can be extracted after a kind of reproduction watermark video watermark is embedded and extracting method
HK40034898A (en) Watermark embedding, watermark extracting, data processing and video frame detecting method
HK40034898B (en) Watermark embedding, watermark extracting, data processing and video frame detecting method
KR101703330B1 (en) Method and apparatus for re-encoding an image
Chen et al. JPEG compatible coding of high dynamic range imagery using tone mapping operators
Iwata et al. Watermarking method for embedding index data into images utilizing features of wavelet transform
Kumar et al. Video quality evaluation using DWT-SPIHT based watermarking technique

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40034898

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant