WO2021093648A1 - Watermark information embedding method and apparatus - Google Patents

Watermark information embedding method and apparatus Download PDF

Info

Publication number
WO2021093648A1
WO2021093648A1 PCT/CN2020/126360 CN2020126360W WO2021093648A1 WO 2021093648 A1 WO2021093648 A1 WO 2021093648A1 CN 2020126360 W CN2020126360 W CN 2020126360W WO 2021093648 A1 WO2021093648 A1 WO 2021093648A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence
target
sub
gray
bit sequence
Prior art date
Application number
PCT/CN2020/126360
Other languages
French (fr)
Chinese (zh)
Inventor
刘永亮
曾晶华
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2021093648A1 publication Critical patent/WO2021093648A1/en

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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/20Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding
    • 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

Definitions

  • This application relates to the field of computer technology, in particular to a method and device for embedding watermark information. This application also relates to an electronic device. This application also relates to a method for extracting watermark information, a device for extracting watermark information, and an electronic device.
  • Digital watermarking technology embeds the watermark information into the carrier object to be protected. Without affecting the normal use of the carrier object, encryption and other methods are used to prevent the content from being copied or changed at will, for example, when there is a piracy or copyright dispute , Can extract watermark information from disputed works as evidence of copyright, thereby safeguarding the rights and interests of the owner; in addition, video watermarking technology can also determine whether the carrier object has been arbitrarily changed through the embedded identification information, thereby tracking the change To achieve the purpose of protecting the basic rights and interests of copyright owners, video watermarking technology is widely used in the copyright protection of digital film and television, information security and other fields.
  • the signal processing process related to video images includes channel noise, filtering, digital/analog and analog/digital conversion, resampling, image cropping, image shifting, image scale change, and image compression coding.
  • Robustness means that the watermark information can still maintain integrity and be accurately detected after a variety of unintentional or intentional signal processing procedures.
  • the existing watermark embedding and extraction algorithms for video sequences can effectively resist the signal processing processes of image compression, noise addition and filtering, but they lack robustness against geometric attacks. That is, after the attacker performs geometric transformations that do not affect the visual effect of the target image, most watermark detectors cannot detect the embedded watermark information again.
  • the watermark embedding method based on image block
  • Another example is the use of image feature points-based watermark embedding methods to resist geometry Attacks require a lot of searches, and the realization of this method depends on whether the image feature points are accurately located, which increases the complexity of the watermark embedding process.
  • the watermark embedding method based on the image's gray histogram Since the shape of the image's gray histogram is invariant after geometric transformations such as image rotation and scaling, the watermark embedding method based on the image's gray histogram has achieved good results in resisting geometric attacks.
  • the watermarking algorithm based on gray histogram searches for the average gray value of the image to determine the embedding position of the watermark information. In this process, multiple watermark information needs to be detected and matched with the original watermark information. This determines whether the original watermark information is embedded in the detected image.
  • the above-mentioned watermark embedding method based on image gray histogram will bring a great false positive probability in the process of extracting watermark information, that is, in the process of determining the embedding position of watermark information, due to a large number of watermark sequences It has a high degree of similarity before and after the shift. Therefore, even if the detected watermark information is the watermark information after the shift, when it is matched with the original watermark information, a higher degree of credibility can be obtained Or, use a completely wrong watermark information (non-original watermark information) to match multiple watermark information detected, or extract watermark information with high reliability from the carrier image. Therefore, the watermark information cannot be guaranteed. Uniqueness. For a video frame sequence, since the embedding position of the watermark information also needs to be determined, and multiple detected watermark information needs to be matched with the original watermark information, the uniqueness of the watermark information cannot also be achieved.
  • the embodiment of the present application provides a watermark information embedding method to solve the problem that the uniqueness of the watermark information cannot be guaranteed in the existing watermark information embedding method.
  • Another embodiment of the present application provides a watermark information embedding device and an electronic device. This application also provides a method for extracting watermark information, a device for extracting watermark information, and an electronic device.
  • the embodiment of the present application provides a method for embedding watermark information, including:
  • Obtain the carrier object obtain the watermark information to be embedded; obtain the target preamble sequence; embed the watermark information to be embedded and the target preamble sequence into the carrier object; wherein the target preamble sequence meets the following conditions: After the target preamble sequence is shifted, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than the preset degree of discrimination.
  • the target amble sequence is a binary bit sequence
  • the embedding the watermark information to be embedded and the target amble sequence into the carrier object includes: adding the target amble sequence to Obtaining the target bit sequence at the front end or the back end of the watermark information to be embedded; embedding the target bit sequence in the carrier object.
  • the carrier object includes a carrier image
  • embedding the target bit sequence into the carrier object includes: obtaining a grayscale histogram of the carrier image; The shape of the grayscale histogram is adjusted to obtain an adjusted grayscale histogram; according to the adjusted grayscale histogram, the grayscale value of the pixel in the carrier image is adjusted to obtain the The target image of the target bit sequence.
  • the adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes: obtaining the target grayscale interval of the grayscale histogram; For the number of bits of the target bit sequence, the target gray-scale interval is divided to obtain gray-scale sub-intervals corresponding to the number of bits, wherein each gray-scale sub-interval includes at least two adjacent gray-scale sub-intervals.
  • the gray level is used to indicate the number of pixels with the same gray value; obtain the number relationship information of the pixels in the gray sub-interval corresponding to the bit value; according to the target bit sequence and the bit
  • the number relationship information of the pixel points in the gray level sub-interval corresponding to the value, the number of pixels contained in at least two adjacent gray levels of the gray-level sub-interval is adjusted to obtain an adjusted gray histogram .
  • the obtaining the target grayscale interval of the grayscale histogram includes: calculating the grayscale mean value of the carrier image; based on the representation range of the grayscale histogram and the number of bits of the target bit sequence Calculating the target grayscale interval of the grayscale histogram according to the grayscale average value.
  • the obtaining the number relationship information of the pixel points in the gray sub-interval corresponding to the bit value includes: when the bit value is 1, obtaining two adjacent gray levels in the gray sub-interval corresponding to the bit value The first comparison relationship between the ratio of the number of pixel points contained in the level and the predetermined embedding intensity; and, when the bit value is 0, obtain two adjacent gray levels in the gray level subinterval corresponding to the bit value The second comparison relationship between the ratio of the number of pixels included in the level and the predetermined embedding intensity;
  • the determination of the pixel points contained in at least two adjacent gray-scale levels in the gray-scale sub-interval is Adjust the quantity to obtain the adjusted gray histogram, including:
  • the value of the bit to be embedded in the target bit sequence is 1, if the ratio of the number of pixels contained in two adjacent gray levels in the gray subinterval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the first comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the first comparison relationship, the first number of pixels are selected from the pixels contained in the gray level with a larger gray value and moved to the gray with a smaller gray level.
  • the value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is less than the predetermined embedding intensity
  • the relationship between the two is consistent with the second comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the second comparison relationship, a second number of pixels are selected from the pixels contained in the gray level with a smaller gray value and moved to the gray with a larger gray value.
  • the first number and the second number are calculated based on the predetermined embedding intensity and the number of pixels included in two adjacent gray levels in the gray sub-interval.
  • the selecting a first number of pixel points from the pixel points included in the gray level with a larger gray value to move to the gray level with a smaller gray level includes: adopting a random method from the gray level Select the first number of pixels from the pixels contained in the gray level with the larger value to move to the gray level with the smaller gray level;
  • the selecting the second number of pixel points from the pixel points included in the gray level with the smaller gray value to move to the gray level with the larger gray value includes: adopting a random method from the smaller gray value The pixel points of the second number selected from the pixel points included in the gray level are moved to a gray level with a larger gray value.
  • the method before obtaining the grayscale histogram of the carrier image, further includes: performing Gaussian filtering processing on the carrier image to obtain the low-frequency signal part of the carrier image; and obtaining the grayscale of the carrier image
  • the histogram includes: obtaining a grayscale histogram of the low-frequency signal part of the carrier image.
  • the obtaining a grayscale histogram of the low-frequency signal part of the carrier image includes: performing block processing on the low-frequency signal part of the carrier image to obtain a block image; calculating the grayscale of the block image Degree average value; according to the average gray value of the block image, the gray level histogram of the block image is statistically obtained.
  • the method further includes: calculating and obtaining the mean square error of the block image; the adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes: According to the order of the mean square error of the segmented images, the gray histograms of a predetermined number of segmented images are selected; according to the target bit sequence, the grayscale histograms of the predetermined number of segmented images The shape of the image is adjusted to obtain the grayscale histogram of the adjusted block image.
  • the carrier object includes a video frame sequence
  • the embedding of the target bit sequence into the carrier object includes: obtaining the first bit value “0” in the target bit sequence.
  • the target video image in the sequence, the target video image refers to the video image to be embedded in the target bit sequence; the target bit value of the target video image to be embedded is obtained; the first bit value that will be used to represent the target bit value A sub-bit sequence or the second sub-bit sequence is embedded in the target video image.
  • the first sub-bit sequence satisfies the following condition: after the first sub-bit sequence is shifted, the difference between the obtained shifted bit sequence and the first sub-bit sequence Degree is greater than the preset discrimination degree; and, the second sub-bit sequence satisfies the following conditions: after the second sub-bit sequence is shifted, the obtained shifted bit sequence is the same as the second sub-bit sequence.
  • the degree of discrimination between sequences is greater than the preset degree of discrimination.
  • the first sub-bit sequence includes a first sub-preamble sequence and first sub-watermark information, and the first sub-preamble sequence satisfies the following condition: After processing, the degree of discrimination between the obtained shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination; and, the second sub-bit sequence includes a second sub-amble sequence and a second sub-amble sequence.
  • the second sub-preamble sequence satisfies the following condition: after the second sub-preamble sequence is shifted, the obtained shifted bit sequence and the second sub-preamble sequence The degree of discrimination between the two is greater than the preset degree of discrimination; wherein, the first sub-watermark information is different from the second sub-watermark information.
  • the first sub-preamble sequence is the same as the second sub-preamble sequence.
  • the first sub-preamble sequence and the target preamble sequence are the same bit sequence
  • the second sub-preamble sequence and the target preamble sequence are the same bit sequence
  • the obtaining the target video image in the video frame sequence includes: according to a manner of embedding a bit value in a frame of the video image of the video frame sequence, according to the bit value contained in the target bit sequence
  • the target video image to be embedded in the target bit sequence is obtained from the video frame sequence.
  • the embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image includes: obtaining a gray scale of the target video image Degree histogram; according to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value, the shape of the gray-scale histogram of the target video image is adjusted to obtain an adjustment After the grayscale histogram; according to the adjusted grayscale histogram, adjust the grayscale value of the pixel in the target video image to obtain the first sub-bit sequence or the second sub-bit sequence embedded The target video image of the bit sequence.
  • the carrier object includes a video frame sequence
  • embedding the target bit sequence into the carrier object includes: repeatedly embedding the target bit sequence into the video frame sequence according to a predetermined number of embedding times in.
  • the embodiment of the application also provides a method for extracting watermark information, including:
  • the object to be detected Obtain the reference bit sequence containing the pilot code sequence and the original watermark information.
  • the pilot code sequence satisfies the following conditions: after the pilot code sequence is shifted, the obtained shifted sequence is the same as the The degree of discrimination between the preamble sequences is greater than the preset degree of discrimination. Extracting a target bit sequence from the object to be detected; matching the target bit sequence with the reference bit sequence to determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
  • the preamble sequence is set at the front end of the original watermark information
  • the extracting the target bit sequence from the object to be detected includes: taking the start position of the embedding range of the target bit sequence as The initial detection point of the target bit sequence is extracted, and the target bit sequence is extracted from the object to be detected.
  • the amble sequence is set at the back end of the original watermark information
  • the extracting the target bit sequence from the object to be detected includes: taking the end position of the embedding range of the target bit sequence as The initial detection point of the target bit sequence is extracted, and the target bit sequence is extracted from the object to be detected.
  • the object to be detected includes an image to be detected, and extracting a target watermark sequence from the object to be detected includes: obtaining a grayscale histogram of the image to be detected; based on the grayscale histogram , Extract the target watermark sequence from the object to be detected.
  • the object to be detected includes a video frame sequence
  • the extracting a target watermark sequence from the object to be detected includes: obtaining a first bit value "0" in the target bit sequence.
  • the extracting the target watermark sequence from the object to be detected based on the gray-level histogram includes: calculating the gray-level average value of the image to be detected; and calculating the gray-level average value according to the gray-level average value.
  • the target grayscale interval of the grayscale histogram according to the predetermined number of bit values of the watermark sequence embedded in the image to be detected, the target grayscale interval is divided to obtain the bit value of the embedded watermark sequence
  • the number of gray-scale sub-intervals corresponding to the number of gray-scale sub-intervals, each of the gray-scale sub-intervals includes at least two adjacent gray levels, and the gray levels are used to represent the number of pixels with the same gray value;
  • Bit value extraction data according to the number of pixels in at least two adjacent gray levels of the gray sub-interval and the bit value extraction data, the bit values embedded in the image to be detected are respectively extracted, Obtain the target bit sequence.
  • Another embodiment of the present application also provides a watermark information embedding device, including:
  • the carrier object obtaining unit is used to obtain the carrier object
  • a unit for obtaining watermark information to be embedded configured to obtain watermark information to be embedded
  • the target amble sequence obtaining unit is configured to obtain a target amble sequence, and the target amble sequence satisfies the following condition: after the target amble sequence is shifted, the obtained shifted sequence is the same as the target amble sequence.
  • the degree of discrimination between code sequences is greater than the preset degree of discrimination;
  • the information embedding unit is used to embed the watermark information to be embedded and the target preamble sequence into the carrier object.
  • Another embodiment of the present application further provides an electronic device, including: a processor and a memory, the memory is used to store a watermark information embedding program, and when the program is read and executed by the processor, the following operations are performed: Obtain a carrier object ; Obtain the watermark information to be embedded; Obtain the target amble sequence, the target amble sequence meets the following conditions: after the target amble sequence is shifted, the obtained shifted sequence and the target amble sequence The degree of discrimination between is greater than the preset degree of discrimination; the watermark information to be embedded and the target preamble sequence are embedded in the carrier object.
  • Another embodiment of the present application also provides a watermark information extraction device, including:
  • the object to be detected obtaining unit is used to obtain the object to be detected
  • the reference bit sequence obtaining unit is configured to obtain a preset reference bit sequence containing a amble sequence and original watermark information, where the amble sequence satisfies the following condition: after shifting the amble sequence, the obtained shift The degree of discrimination between the post-bit sequence and the preamble sequence is greater than the preset degree of discrimination;
  • a target bit sequence extraction unit configured to extract a target bit sequence from the object to be detected
  • the information matching unit is configured to match the target bit sequence with the reference bit sequence, and determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
  • Another embodiment of the present application further provides an electronic device, including: a processor and a memory, the memory is used to store a watermark information extraction program, and when the program is read and executed by the processor, the following operations are performed: Object; Obtain a preset reference bit sequence containing the amble sequence and the original watermark information, the amble sequence meets the following conditions: after the amble sequence is shifted, the obtained shifted sequence and the The degree of discrimination between the preamble sequences is greater than the preset degree of discrimination; the target bit sequence is extracted from the object to be detected; the target bit sequence is matched with the reference bit sequence to determine whether the target bit sequence is A reference bit sequence embedded in the object to be detected.
  • Another embodiment of the present application further provides a method for embedding watermark information, including: obtaining a carrier object; obtaining at least two pieces of watermark information to be embedded; adding different target code sequences to the at least two pieces of watermark information to be embedded to obtain at least Two target embedding sequences; embedding the at least two target embedding sequences into the carrier object; wherein, the target preamble sequence satisfies the following condition: after shifting the target preamble sequence, obtain The degree of discrimination between the shifted sequence of and the target preamble sequence is greater than the preset degree of discrimination.
  • the adding different target code sequences to the at least two watermark information to be embedded includes: adding and the watermark information to be embedded to each of the at least two watermark information to be embedded.
  • the target amble sequence is embedded at the same time, and the target amble sequence meets the following conditions: after the target amble sequence is shifted, the obtained shift
  • the degree of discrimination between the post-bit sequence and the target preamble sequence is greater than the preset degree of discrimination. Since the target preamble sequence is more distinguishable after the shift and before the shift, when the watermark information is extracted at the watermark information extraction end, accurate matching of the preamble sequence can be achieved, and the embedding interval of the watermark information can be accurately located. So as to realize the accurate positioning of the watermark information.
  • the watermark information that is completely consistent with the embedded watermark information can be extracted, and the existing problem that the uniqueness of the watermark information cannot be guaranteed because the embedded watermark information and the extracted watermark information are not completely matched.
  • Fig. 1 is a flowchart of a watermark information embedding method provided by the first embodiment of the present application
  • Fig. 1-A is a schematic diagram of a gray-scale histogram of a carrier image after embedding watermark information provided by the first embodiment of the present application;
  • Figure 1-B is a schematic diagram of embedding the watermark information to be embedded and the target preamble sequence into a carrier object provided by the first embodiment of the present application;
  • FIG. 2 is a flow chart of the watermark information extraction method provided by the second embodiment of the present application.
  • Fig. 3 is a block diagram of the watermark information embedding device provided by the third embodiment of the present application.
  • FIG. 4 is a schematic diagram of a logical structure of an electronic device provided by a fourth embodiment of the present application.
  • Fig. 5 is a block diagram of the unit of the watermark information extraction device provided by the fifth embodiment of the present application.
  • FIG. 6 is a schematic diagram of the logical structure of an electronic device provided by a sixth embodiment of the present application.
  • this application provides a watermark information embedding method, for the watermark information embedding device and electronic equipment corresponding to this method, this application also provides a watermark information extraction method, a watermark information extraction device and electronic equipment corresponding to the method. Examples are provided below to describe the method, device, and electronic equipment in detail.
  • the first embodiment of the present application provides a method for embedding watermark information, which is described below with reference to FIG. 1.
  • the embodiments involved in the following description are used to explain the principle of the method, and are not a limitation of actual use.
  • step S101 a carrier object is obtained.
  • Digital watermarking technology is a content-based, non-cryptographic computer information hiding technology, which means that it will not be easy to detect and modify, and can be identified and identified by a designated subject without affecting the use value of the carrier object.
  • the watermark information is directly embedded in the carrier object, or the structure of a specific area of the carrier object is modified. Through these watermark information hidden in the carrier object, the purpose of confirming the content creator, purchaser, transmitting secret information or judging whether the carrier object has been tampered with can be achieved. It is an effective way to protect information security, realize anti-counterfeiting traceability, and copyright protection.
  • Carrier objects include multimedia information, documents, software, etc.
  • the carrier object is mainly a carrier image or a sequence of video frames.
  • step S102 the watermark information to be embedded is obtained.
  • Watermark information is a kind of protection information embedded in a carrier object using a computer algorithm, which is mainly a digital sequence or a bit sequence, for example, watermark information 1010110101 containing ten bit values.
  • the watermark information to be embedded refers to the watermark information preset to be embedded in the above-mentioned carrier image or video frame sequence.
  • step S103 a target preamble sequence is obtained.
  • the target amble sequence satisfies the following conditions: after the target amble sequence is shifted, the degree of discrimination between the obtained shifted sequence and the target amble sequence is greater than the preset degree of discrimination, that is, according to the target amble sequence After shifting it forward or backward in the sorting direction, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than the preset degree of discrimination.
  • the discrimination degree is greater than the preset discrimination degree, which is used to indicate that the target code sequence has strong discrimination before and after the shift, for example, for two bit sequences with the same number of bits and strong discrimination After aligning the two bit sequences according to the number of bits, they are compared, and the number of the same bit values corresponding to each bit is less than a predetermined threshold.
  • the target code sequence is preferably a binary bit sequence.
  • the bit sequence 110110010 is shifted forward (the bit sequence moves to the left as a whole) by one bit, and the shifted bit sequence is 100110010, and the last bit sequence is 100110010.
  • the bit corresponds to a random bit value of 0 or 1.
  • bit sequence after the shift After aligning the bit sequence after the shift with the bit sequence before the shift, it can be seen that the difference between the bit sequence after the shift and the bit sequence before the shift
  • the bit sequence is relatively large; the bit sequence is shifted forward by two bits (the bit sequence is shifted to the left as a whole).
  • the shifted bit sequence is 00110010, and the last two bits are random.
  • the shifted bit sequence is the same as the shifted bit sequence.
  • the distinction between the previous bit sequence is relatively large; the bit sequence is reversed (shifted to the right as a whole) by one bit.
  • the last nine bits of the resulting bit sequence have a value of 11011001, and the first bit is random , Assuming that the bit value corresponding to the first bit is 0, the bit sequence after the shift is 0110011001, which is equally distinguishable from the bit sequence before the shift. Therefore, the bit sequence 110110010 can be used as the target preamble sequence.
  • the watermark algorithm based on gray histogram is adopted. It is assumed that the carrier image after the watermark information is embedded is I W. When the carrier image is subjected to various possible attacks, it will be The carrier image after the attack is I′ W.
  • the gray average value calculated from I′ W and the gray average value of I W Different, so according to the formula Set the search interval, and traverse the search interval, extract multiple watermark information, and compare it with the input original watermark information.
  • the process of determining the embedding position of the watermark information due to the large number of watermark sequences in the process of determining the embedded position of the watermark information. Before and after the shift, there is a high degree of similarity.
  • the detected watermark information is the watermark information after the shift, when the original watermark information is aligned with the number of bits and then matched, it can be obtained High credibility, or, using a completely wrong watermark information (non-original watermark information) to match multiple watermark information detected, it is also possible to extract watermark information with high credibility from the carrier image.
  • There is a false positive problem that is, inputting unembedded watermark information may also extract watermark information that is very similar to the original watermark information. Therefore, the above method cannot guarantee the uniqueness of the watermark information.
  • a watermark sequence containing 10 bit values is embedded in the embedding range of the gray histogram: 1010110101, as shown in Figure 1-A (the image of the carrier image after the watermark is embedded)
  • the schematic diagram of the grayscale histogram) shows: in Figure 1-A, the grayscale with a grayscale value of 12 is used as the left end point (the initial embedding position of the watermark information) of the original watermark information.
  • the bit sequence opposite to the original watermark information can be extracted, and when the gray level with the gray value of 16 is searched, the original watermark information can be extracted to the left
  • the bit value corresponding to the first nine bits of the bit sequence is: 01011010, and the last bit bit corresponds to the random bit value 0 or 1.
  • the above-mentioned bit sequence opposite to the original watermark information and the bit sequence obtained after the original watermark information is shifted to the left have a higher degree of matching with the original watermark information, so they all have a higher degree of credibility, for example, If the original watermark information is very similar to the above-mentioned shifted watermark information, in the process of searching the left endpoint, the bit sequence obtained after the original watermark information is shifted is matched with the original watermark information, and a high credibility can be obtained. Degree of watermark information cannot guarantee the uniqueness of watermark information.
  • the above-mentioned target amble sequence before embedding the above-mentioned watermark information to be embedded into the carrier object, the above-mentioned target amble sequence is obtained first, and the amble sequence is used to locate the above-mentioned watermark information to be embedded.
  • the watermark information to be embedded is 1010110101
  • the target preamble sequence is 1100110010.
  • step S104 the watermark information to be embedded and the target preamble sequence are embedded into the carrier object.
  • this step is used to embed the watermark information to be embedded and the target code sequence into the carrier object to obtain Embed the target object to be embedded with the watermark information and the target preamble sequence.
  • the process specifically includes: adding the target preamble sequence to the front or back end of the watermark information to be embedded to obtain a target bit sequence; embedding the target bit sequence into the carrier object, and in this process, The target preamble sequence can be used as the unique identification code of the watermark information to be embedded.
  • the obtained target bit sequence is 110110010 1010110101, and the target bit sequence is embedded into the carrier object according to a predetermined watermark information embedding method.
  • the aforementioned carrier object may refer to a single frame of carrier image or a sequence of video frames.
  • the foregoing process of embedding the target bit sequence into the carrier object may include the following content:
  • the process of obtaining the grayscale histogram of the carrier image is specifically as follows:
  • I Low (x, y) G (x, y, ⁇ ) * I (x, y), where , I represents the carrier image, I Low represents the low-frequency signal part of the carrier image obtained after the carrier image is Gaussian filtering, and G represents the Gaussian low-pass filter; after Gaussian filtering is performed on the carrier image, the watermark information can filter, Attacks such as adding noise have good robustness, that is, embedding watermark information in the low-frequency signal part of the carrier image can make the watermark information more robust.
  • the Gaussian low-pass filter is defined as follows:
  • is the standard deviation of the Gaussian distribution.
  • the gray histogram of the low-frequency signal part of the carrier image is obtained, that is, the gray histogram of the statistics I Low .
  • the gray histogram is the statistical feature of the image, which depends on the gray level contained in the image. The number of pixels has nothing to do with the specific location of the pixels.
  • the shape of the grayscale histogram is used to indicate the ratio of the number of pixels contained in each grayscale to the total number of pixels in the image. When an image is geometrically attacked, the size and spatial position of the image will change accordingly, but the ratio of the number of pixels contained in each gray level to the total number of pixels in the image does not change, that is, the gray value
  • the shape of the square graph can remain stable under geometric attacks, so it can be used in watermarking algorithms against geometric attacks.
  • the process specifically includes the following content:
  • B-1 Obtain a target grayscale interval of the grayscale histogram, where the target grayscale interval is used to indicate the embedding range of the target bit sequence.
  • the process of obtaining the target gray-scale interval of the gray-scale histogram is specifically: calculating and obtaining the gray-scale mean value of the carrier image Then use the following formula to calculate and obtain the target gray-scale interval B of the gray-scale histogram: Among them, the positive decimal ⁇ satisfies the following conditions: B cannot exceed the representation range of the gray histogram, and B satisfies the number of bits of the target bit sequence.
  • each gray-scale sub-interval includes at least Two adjacent gray levels, where the gray levels are used to indicate the number of pixels with the same gray value;
  • the process of obtaining the quantity relationship information of pixels in the gray sub-interval corresponding to the bit value is specifically: when the bit value is 1, obtain two adjacent gray sub-intervals corresponding to the bit value.
  • the number relationship information of pixels in the gray-scale sub-interval corresponding to the bit value is:
  • w(i) represents the bit value
  • a and b respectively represent the number of pixels contained in two adjacent gray levels in the gray sub-interval
  • a represents the gray level bin1 with a smaller gray value
  • b represents the number of pixels included in the gray level bin2 with a larger gray value
  • T represents the predetermined embedding intensity
  • the pixels corresponding to at least two adjacent gray levels in the gray sub-interval Adjust the number of points to obtain the adjusted gray histogram.
  • the process of adjusting the pixel points is specifically: when the value of the bit to be embedded in the target bit sequence is 1, if the value of the bit to be embedded corresponds to two adjacent gray levels in the gray sub-interval The relationship between the ratio of the number of pixel points included in the level and the predetermined embedding intensity meets the above-mentioned first comparison relationship, the pixel points are not adjusted; if the two phases in the gray sub-interval corresponding to the bit value to be embedded The relationship between the ratio of the number of pixels contained in adjacent gray levels and the predetermined embedding intensity does not conform to the above-mentioned first comparison relationship, and the first comparison is selected from the pixels contained in the gray level with the larger gray value. A number of pixels are moved to a gray level with a smaller gray level;
  • the value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is equal to the predetermined embedding value The relationship between the intensities conforms to the second comparison relationship, then the pixels are not adjusted; if the bit value to be embedded corresponds to the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval , The relationship between the predetermined embedding intensity and the predetermined embedding intensity does not meet the second comparison relationship, and the second number of pixels are selected from the pixels contained in the gray level with the smaller gray value and moved to the larger gray value In the gray scale.
  • the value of the bit to be embedded in the target bit sequence is 1, if a/b ⁇ T, there is no need to adjust the pixel points. If a/b ⁇ T, I1 pixel points are selected from the pixels contained in the gray level bin2 Move to the gray level bin1; the value of the bit to be embedded in the target bit sequence is 0, if b/a ⁇ T, there is no need to adjust the pixel point, if b/a ⁇ T, from the gray level bin1 contained I0 pixel points are selected from the pixel points and moved to the gray level bin2.
  • the first number and the second number are calculated according to the embedding intensity and the number of pixels contained in two adjacent gray levels in the gray sub-interval, for example:
  • the above-mentioned selection of the first number of pixels from the pixels contained in the gray level with a larger gray value to move to the gray level with a smaller gray level may refer to: adopting a random method Select the first number of pixels from the pixels contained in the gray level with the larger gray value to move to the gray level with the smaller gray level; Selecting the second number of pixels from the pixels to move to the gray level with a larger gray value can mean: randomly selecting the second number from the pixels contained in the gray level with a smaller gray value The pixel points of move to the gray level with larger gray value. For example, using a random method to select I1 pixels from the pixels contained in the gray level bin2 to move to the gray level bin1, and using a random method to select I0 pixels from the pixels contained in the gray level bin1 to move To the gray level bin2.
  • I 1 and I 0 are the minimum number of pixels to be adjusted, (a)1 ⁇ a/b ⁇ T;(b)a/b>T>1;(c)1 ⁇ b/a ⁇ T;(d)b/a>T>1
  • M is the width of the gray level
  • f 1 (i) is the i-th pixel selected from bin1
  • f 2 (j) is the j-th pixel selected from bin2.
  • the above process of obtaining the gray-scale histogram of the low-frequency signal part of the carrier image may also be the following content: block the low-frequency signal part of the carrier image to obtain the block image, for example, the carrier image
  • the low-frequency signal part of the image is divided into blocks according to 8*8; calculate the average gray value of each block image; according to the gray average value of each block image, statistically obtain the gray histogram of each block image, and calculate
  • the mean square error of each block image, and the mean square error of the block image can be used to indicate the smoothness of the block image.
  • the adjusting the shape of the gray-scale histogram according to the target code sequence to obtain the adjusted gray-scale histogram may refer to: for the gray-scale sub-intervals for which the number of pixels needs to be adjusted, according to the block image Select a predetermined number of block images with a larger mean square error, and adjust the shape of the grayscale histogram of the block image with a larger mean square error according to the above target code sequence to obtain The adjusted grayscale histogram of the segmented image. In this way, non-smooth areas of the carrier image can be selected in advance for modification, so as to improve the quality of the carrier image.
  • the process of embedding the target bit sequence into the carrier object may include the following:
  • A1 Obtain a first sub-bit sequence representing the bit value "0" in the target bit sequence, and obtain a second sub-bit sequence representing the bit value "1” in the target bit sequence, so The first sub-bit sequence is different from the second sub-bit sequence.
  • the above-mentioned first sub-bit sequence and the second sub-bit sequence can be set in the manner of the above-mentioned target amble sequence, and the purpose is to embed the first sub-bit sequence or the second sub-bit sequence in the video frame sequence.
  • the embedded first sub-bit sequence or the second sub-bit sequence can be accurately detected through the correlation characteristics of the target code sequence.
  • the first sub-bit sequence may satisfy the following condition: after the first sub-bit sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the first sub-bit sequence Greater than the preset degree of discrimination, that is, the difference between the obtained shifted sequence and the first sub-bit sequence after shifting it forward or backward according to the ordering direction of the first sub-bit sequence Degree is greater than the preset discrimination degree; the second sub-bit sequence may satisfy the following condition: after the second sub-bit sequence is shifted, the obtained shifted bit sequence is the same as the second sub-bit sequence The degree of discrimination between is greater than the preset degree of discrimination, that is, after the second sub-bit sequence is shifted forward or backward according to the ordering direction of the second sub-bit sequence, the obtained shifted sequence is compared with the second sub-bit sequence. The degree of discrimination between sequences is greater than the preset degree of discrimination.
  • first sub-bit sequence and second sub-bit sequence may also be set as follows:
  • the first sub-bit sequence includes a first sub-preamble sequence and first sub-watermark information
  • the first sub-preamble sequence may satisfy the following conditions: after shifting the first sub-preamble sequence, the first sub-preamble sequence is obtained The degree of discrimination between the shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination, that is, the first sub-amble sequence is shifted forward or backward according to the ordering direction of the first sub-amble sequence Then, the degree of discrimination between the obtained shifted sequence and the first sub-amble sequence is greater than the preset degree of discrimination; the second sub-bit sequence includes a second sub-amble sequence and second sub-watermark information, The second sub-amble sequence may satisfy the following condition: after the second sub-amble sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the second sub-amble sequence is greater than The preset degree of discrimination, that is, after the second sub-amble sequence is shifted forward or backward according to the ordering
  • the first sub-preamble sequence and the second sub-preamble sequence may be the same bit sequence, and the first sub-preamble sequence and the second sub-preamble sequence may be the same bit as the target sequence. Sequence, for example, 0: 1100110010 1100110010; 1: 1100110010 0011001101. In this way, the first sub-bit sequence or the second sub-bit sequence is set. When the first sub-bit sequence or the second sub-bit sequence is embedded in the video image in the video frame sequence, it is embedded in the carrier image to be embedded.
  • the watermark information is in the same manner as the target preamble sequence, and its purpose is that for a single frame of video image used to embed the first sub-bit sequence or the second sub-bit sequence in the video frame sequence, each can be adjusted according to a unified preamble sequence.
  • the watermark information embedded in the carrier object (video image and video frame sequence) is located.
  • the target video image refers to the video image to be embedded in the target bit sequence.
  • the video frame sequence to be embedded is obtained from the video frame sequence.
  • the target video image of the target bit sequence For example, if the target bit sequence is 1100110010 1010110101, the 20 bit values contained in the target bit sequence need to be embedded in 20 frames of video images of the video frame sequence. The 20 frames of video images are used to embed the target bit sequence. Target video image.
  • C1 Obtain the target bit value of the target video image to be embedded. For example, if the current target video image to be embedded is the 9th frame of the above 20 target video images, the value of the target bit to be embedded is 1.
  • D1 embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image.
  • the bit value "1" corresponds to the second sub-bit sequence, so the second sub-bit sequence is embedded in the 9th frame image.
  • the embedding process includes the following: obtaining a grayscale histogram of the target video image; according to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value Bit sequence, adjust the shape of the grayscale histogram of the target video image to obtain the adjusted grayscale histogram; according to the adjusted grayscale histogram, calculate the grayscale of the pixels in the target video image The degree value is adjusted to obtain a target video image embedded with the first sub-bit sequence or the second sub-bit sequence.
  • the embedding process please refer to the above process of embedding the target bit sequence in the carrier image, which will not be repeated here.
  • the target bit sequence is embedded
  • embedding may be repeated multiple times in the time sequence, that is, the target bit sequence is repeatedly embedded into the video frame sequence according to a predetermined number of embedding times. For example, after embedding the target bit sequence 110110010-1010110101 in the video frame sequence, the above embedding process is repeated for each frame of the video image of the video frame sequence multiple times subsequently.
  • the values in the following table represent the watermark information detection result obtained after matching the input reverse watermark sequence of the original watermark information with the extracted watermark information in the watermark information detection process.
  • This embodiment Compared with the provided watermark information embedding method using the target amble sequence, the watermark information embedding method obtained by the former is significantly lower than the latter.
  • the watermark information embedding method using the target pilot code sequence has a low false detection rate in the watermark information detection process, and it can be judged whether the input watermark information is the original watermark information embedded in the carrier object.
  • the above-mentioned target preamble sequence can correspond to multiple watermark information, that is, when multiple watermark information is embedded in the same carrier object or embedded in multiple carrier objects, the same target preamble sequence can be combined It is added to the front end or the back end of the multiple watermark information to respectively locate the multiple watermark information.
  • multiple watermark information of the same category can correspond to a target code sequence, or, according to different use requirements and applicable scenarios of the watermark information (for example, the different encryption levels provided by the watermark information), match them with the use requirements The target preamble sequence corresponding to the applicable scenario.
  • the above method can also be used to simultaneously embed multiple watermark information for a carrier object.
  • the process specifically includes the following content: obtaining a carrier object, which can be a carrier image or a sequence of video frames; obtaining at least two pending objects.
  • Embedding watermark information the at least two watermark information to be embedded may be multiple watermark information of different categories, or multiple watermark information of the same category; adding different target code sequences to the at least two watermark information to be embedded ,
  • a predetermined target amble sequence corresponding to the type of watermark information can be added to them, wherein the target amble sequence is shifted After bit processing, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than the preset degree of discrimination; the at least two target embedding sequences are embedded in the carrier object.
  • the foregoing manner of adding different target code sequences to the at least two watermark information to be embedded may specifically be: adding a predetermined and the watermark information to be embedded to each of the at least two watermark information to be embedded.
  • the corresponding target preamble sequence may specifically be: adding a predetermined and the watermark information to be embedded to each of the at least two watermark information to be embedded.
  • the corresponding target preamble sequence may specifically be: adding a predetermined and the watermark information to be embedded to each of the at least two watermark information to be embedded.
  • the corresponding target preamble sequence may specifically be: adding a predetermined and the watermark information to be embedded to each of the at least two watermark information to be embedded.
  • the corresponding target preamble sequence may specifically be: adding a predetermined and the watermark information to be embedded to each of the at least two watermark information to be embedded.
  • the corresponding target preamble sequence may specifically be: adding a predetermined and the watermark information to be embedded to each of the at least two watermark
  • the target amble sequence when the watermark information is embedded in the carrier object, the target amble sequence is embedded at the same time, and the target amble sequence meets the following conditions:
  • the degree of discrimination between the shifted sequence and the target preamble sequence is greater than the preset degree of discrimination. Since the target preamble sequence is more distinguishable after the shift and before the shift, when the watermark information is extracted at the watermark information extraction end, accurate matching of the preamble sequence can be achieved, and the embedding interval of the watermark information can be accurately located. So as to realize the accurate positioning of the watermark information.
  • the watermark information that is completely consistent with the embedded watermark information can be extracted, avoiding the existing problem that the uniqueness of the watermark information cannot be guaranteed because the embedded watermark information does not completely match the extracted watermark information.
  • the second embodiment of the present application provides a watermark information extraction method, which is described below with reference to FIG. 2.
  • the object to be detected is obtained.
  • the object to be detected may be an image to be detected or a sequence of video frames to be detected.
  • step S202 a reference bit sequence containing a amble sequence and original watermark information is obtained, and the amble sequence satisfies the following condition: after shifting the amble sequence, the obtained shift is The degree of discrimination between the post-bit sequence and the preamble sequence is greater than the preset degree of discrimination.
  • the amble sequence may be set at the front end or the back end of the original watermark information.
  • This step is used to extract the watermark sequence embedded in the object to be detected, and may specifically include the following content: obtaining the grayscale histogram of the image to be detected; calculating the average gray value of the image to be detected; according to the gray average value Calculate and obtain the target grayscale interval of the grayscale histogram; divide the target grayscale interval according to the predetermined number of bits embedded in the watermark sequence to obtain the grayscale subinterval corresponding to the number of bits, each Each of the gray-scale sub-intervals includes at least two adjacent gray-levels; the extraction strategy corresponding to the bit value is obtained; and the number of pixels in the at least two adjacent gray-levels of the gray-level sub-intervals and the bit The extraction strategy corresponding to the value extracts the watermark sequence of the image to be detected, and obtains the watermark sequence embedded in the image to be detected.
  • step S203 a target bit sequence is extracted from the object to be detected.
  • the method of extracting the target bit sequence is related to the predetermined original watermark information and the setting method of the amble sequence.
  • the target bit sequence is extracted according to the forward direction. Extraction is performed in the manner of extraction, that is, the start position of the embedding range of the target bit sequence is used as the initial detection point for extracting the target bit sequence, and the target bit sequence is sequentially extracted from the object to be detected;
  • the target bit sequence is extracted according to the reverse extraction method, that is, the end position of the embedding range of the target bit sequence is used as the initial point for extracting the target bit sequence.
  • the target bit sequence is sequentially extracted from the object to be detected.
  • the foregoing extraction of the target bit sequence from the object to be detected specifically includes the following content:
  • the target bit sequence is extracted from the object to be detected. For example, calculating the average gray value of the image to be detected; calculating the target grayscale interval of the grayscale histogram according to the average gray value; according to a predetermined bit value of the watermark sequence embedded in the image to be detected
  • the target gray-scale interval is divided to obtain the gray-scale sub-intervals corresponding to the number of bit values of the embedded watermark sequence, each of the gray-scale sub-intervals includes at least two adjacent gray levels
  • the gray level is used to represent the number of pixels with the same gray value; to obtain a predetermined bit value to extract data; according to the number of pixels in at least two adjacent gray levels in the gray sub-interval, and
  • the bit value extracting data respectively extracting the bit value embedded in the image to be detected, to obtain the target bit sequence.
  • extracting the target bit sequence from the object to be detected above specifically includes the following content:
  • first reference sub-bit sequence used to represent the bit value "0" in the target bit sequence
  • second reference sub-bit sequence used to represent the bit value "1" in the target bit sequence
  • the first reference sub-bit sequence is different from the second reference sub-bit sequence.
  • multiple target sub-bit sequences are extracted from the video images of the video frame sequence.
  • Each video image embedded with the original watermark information or amble sequence corresponds to a target sub-bit sequence.
  • the watermark information is extracted separately, and the maximum election method is used to determine the sub-bit sequence.
  • the information extracted from each video frame of the video frame sequence to be detected is counted, and finally multiple target sub-bit sequences consistent with the number of bit values in the target bit sequence are obtained.
  • the target sub-bit sequence is compared with the first reference sub-bit sequence and the second reference sub-bit sequence to determine the value of the bit embedded in the video image of the video frame sequence. 0" or "1", and so on, until all the bit values embedded in the video frame sequence are extracted, and the extracted bit values constitute the target bit sequence.
  • step S202 and step S203 is not limited, that is, after the target bit sequence is extracted from the object to be detected, the reference bit sequence including the amble sequence and the original watermark information can be obtained.
  • the target bit sequence is matched with the reference bit sequence to determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected. For example, according to the amble sequence in the reference bit sequence set at the front or back end of the original watermark information, the target bit sequence is combined with the target bit sequence in a forward matching or reverse matching method (consistent with the above-mentioned forward extraction or reverse extraction). The reference bit sequence is matched. Since the information obtained after the amble sequence is shifted forward or reversely according to its sorting direction, the degree of discrimination from the amble sequence is greater than the preset degree of discrimination, therefore, the reference bit sequence and the extraction The exact match of the target bit sequence.
  • the watermark information extraction method provided in this embodiment can achieve accurate matching of the preamble sequence when extracting the watermark information, and can accurately locate the embedding interval of the watermark information, thereby achieving accurate positioning of the watermark information.
  • the watermark information that is completely consistent with the embedded watermark information can be extracted, and the existing problem that the uniqueness of the watermark information cannot be guaranteed because the embedded watermark information and the extracted watermark information are not completely matched.
  • the above first embodiment provides a watermark information embedding method.
  • the third embodiment of this application also provides a watermark information embedding device. Since the device embodiment is basically similar to the method embodiment, the description is It is relatively simple. For details of related technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the device embodiment is only illustrative.
  • FIG. 3 is a unit block diagram of the apparatus provided in this embodiment. As shown in FIG. 3, the apparatus provided in this embodiment includes:
  • the carrier object obtaining unit 301 is used to obtain the carrier object
  • the to-be-embedded watermark information obtaining unit 302 is configured to obtain the to-be-embedded watermark information
  • the target amble sequence obtaining unit 303 is configured to obtain a target amble sequence, which satisfies the following condition: after performing shift processing on the amble sequence, the obtained shifted sequence and the amble are The degree of discrimination between sequences is greater than the preset degree of discrimination;
  • the information embedding unit 304 is configured to embed the watermark information to be embedded and the target preamble sequence into the carrier object.
  • the target preamble sequence is a binary bit sequence
  • the embedding the watermark information to be embedded and the target preamble sequence into the carrier object includes: adding the target preamble sequence to the to be embedded
  • the front end or the back end of the watermark information obtains a target bit sequence; and the target bit sequence is embedded in the carrier object.
  • the carrier object includes a carrier image
  • the embedding of the target bit sequence into the carrier object includes: obtaining a grayscale histogram of the carrier image; and calculating the grayscale histogram according to the target bit sequence
  • the shape of the graph is adjusted to obtain an adjusted gray histogram; according to the adjusted gray histogram, the gray values of pixels in the carrier image are adjusted to obtain the target bit sequence embedded Target image.
  • the adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes: obtaining the target grayscale interval of the grayscale histogram; and according to the target bit sequence.
  • the number of bits in the sequence is divided into the target gray-scale interval to obtain gray-scale sub-intervals corresponding to the number of bits, wherein each of the gray-scale sub-intervals includes at least two adjacent gray levels, so
  • the gray level is used to indicate the number of pixels with the same gray value; obtain the number relationship information of the pixels in the gray sub-interval corresponding to the bit value; according to the target bit sequence and the gray corresponding to the bit value
  • the number relationship information of the pixel points in the degree sub-interval is adjusted to the number of pixels contained in at least two adjacent gray levels of the gray-level sub-interval to obtain an adjusted gray-level histogram.
  • the obtaining the target gray scale interval of the gray scale histogram includes: calculating the gray scale mean value of the carrier image; based on the representation range of the gray scale histogram and the number of bits of the target bit sequence, according to the The gray-level mean value calculates the target gray-level interval of the gray-level histogram.
  • the obtaining the quantity relationship information of the pixels in the gray sub-interval corresponding to the bit value includes: when the bit value is 1, obtaining the information contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value The first comparison relationship between the ratio of the number of pixel points and the predetermined embedding intensity; and, when the bit value is 0, obtain the two adjacent gray levels contained in the gray sub-interval corresponding to the bit value The second comparison relationship between the ratio of the number of pixels and the predetermined embedding intensity;
  • the determination of the pixel points contained in at least two adjacent gray-scale levels in the gray-scale sub-interval is Adjust the quantity to obtain the adjusted gray histogram, including:
  • the value of the bit to be embedded in the target bit sequence is 1, if the ratio of the number of pixels contained in two adjacent gray levels in the gray subinterval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the first comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the first comparison relationship, the first number of pixels are selected from the pixels contained in the gray level with a larger gray value and moved to the gray with a smaller gray level.
  • the value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is less than the predetermined embedding intensity
  • the relationship between the two is consistent with the second comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the second comparison relationship, a second number of pixels are selected from the pixels contained in the gray level with a smaller gray value and moved to the gray with a larger gray value.
  • the first number and the second number are calculated based on the predetermined embedding intensity and the number of pixels included in two adjacent gray levels in the gray sub-interval.
  • the selecting the first number of pixel points from the pixel points included in the gray level with the larger gray value to move to the gray level with the smaller gray level includes: randomly selecting from the gray level with the larger gray value Select the first number of pixels from the pixels included in the gray level to move to a gray level with a smaller gray level;
  • the selecting the second number of pixel points from the pixel points included in the gray level with the smaller gray value to move to the gray level with the larger gray value includes: adopting a random method from the smaller gray value The pixel points of the second number selected from the pixel points included in the gray level are moved to a gray level with a larger gray value.
  • the method further includes: performing Gaussian filtering processing on the carrier image to obtain the low-frequency signal part of the carrier image; and obtaining the grayscale histogram of the carrier image includes : Obtain a grayscale histogram of the low-frequency signal part of the carrier image.
  • the obtaining the grayscale histogram of the low-frequency signal portion of the carrier image includes: performing block processing on the low-frequency signal portion of the carrier image to obtain a block image; calculating the gray average value of the block image; The gray-level average value of the block image is statistically obtained to obtain the gray-level histogram of the block image.
  • It also includes: calculating the mean square error of the block image; said adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram, including: according to the division Select the grayscale histograms of a predetermined number of block images in descending order of the mean square error of the block images; adjust the shape of the grayscale histograms of the predetermined number of block images according to the target bit sequence , To obtain the gray histogram of the adjusted block image.
  • the carrier object includes a video frame sequence
  • embedding the target bit sequence into the carrier object includes: obtaining a first sub-bit sequence that is used to represent a bit value "0" in the target bit sequence, And obtaining a second sub-bit sequence for representing the bit value "1" in the target bit sequence, where the first sub-bit sequence is different from the second sub-bit sequence; and obtaining the target in the video frame sequence
  • the target video image refers to the video image to be embedded in the target bit sequence; the target bit value of the target video image to be embedded is obtained; the first sub-bit sequence to be used to represent the target bit value Or the second sub-bit sequence is embedded in the target video image.
  • the first sub-bit sequence satisfies the following condition: after the first sub-bit sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the first sub-bit sequence is greater than a preset Degree of discrimination; and, the second sub-bit sequence satisfies the following conditions: after the second sub-bit sequence is shifted, the obtained shifted bit sequence is between the second sub-bit sequence The degree of discrimination is greater than the preset degree of discrimination.
  • the first sub-bit sequence includes a first sub-preamble sequence and first sub-watermark information, and the first sub-preamble sequence satisfies the following condition: after performing shift processing on the first sub-preamble sequence, obtain The degree of discrimination between the shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination; and, the second sub-bit sequence includes a second sub-amble sequence and second sub-watermark information, The second sub-amble sequence satisfies the following condition: after the second sub-amble sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the second sub-amble sequence Greater than the preset discrimination degree; wherein, the first sub-watermark information is different from the second sub-watermark information.
  • the first sub-preamble sequence is the same as the second sub-preamble sequence.
  • the first sub-preamble sequence and the target preamble sequence are the same bit sequence, and the second sub-preamble sequence and the target preamble sequence are the same bit sequence.
  • the obtaining the target video image in the video frame sequence includes: embedding a bit value in a frame of the video frame sequence of the video frame sequence, and according to the number of bit values contained in the target bit sequence, from Obtain a target video image to be embedded in the target bit sequence from the video frame sequence.
  • the embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image includes: obtaining a grayscale histogram of the target video image; According to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value, the shape of the grayscale histogram of the target video image is adjusted to obtain the adjusted grayscale Histogram; according to the adjusted gray histogram, adjust the gray value of the pixel in the target video image to obtain the target embedded with the first sub-bit sequence or the second sub-bit sequence Video image.
  • the carrier object includes a video frame sequence
  • the embedding of the target bit sequence into the carrier object includes: repeating the embedding of the target bit sequence into the video frame sequence according to a predetermined number of embedding times.
  • a watermark information embedding method and a watermark information embedding device are provided.
  • the fourth embodiment of the present application also provides an electronic device. Since the electronic device embodiment is basically similar to the method embodiment, Therefore, the description is relatively simple. For details of related technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the electronic device embodiment is only illustrative. An example of the electronic device is as follows:
  • FIG. 4 is a schematic diagram of the electronic device provided in this embodiment.
  • the electronic device includes: a processor 401; a memory 402;
  • the memory 402 is configured to store a watermark information embedding program, and when the program is read and executed by the processor, the following operations are performed:
  • the target preamble sequence satisfies the following condition: after the shift processing is performed on the preamble sequence, the degree of discrimination between the obtained shifted sequence and the preamble sequence is greater than the preset distinction degree;
  • the target preamble sequence is a binary bit sequence
  • the embedding the watermark information to be embedded and the target preamble sequence into the carrier object includes: adding the target preamble sequence to the to be embedded
  • the front end or the back end of the watermark information obtains a target bit sequence; and the target bit sequence is embedded in the carrier object.
  • the carrier object includes a carrier image
  • the embedding of the target bit sequence into the carrier object includes: obtaining a grayscale histogram of the carrier image; and calculating the grayscale histogram according to the target bit sequence
  • the shape of the graph is adjusted to obtain an adjusted gray histogram; according to the adjusted gray histogram, the gray values of pixels in the carrier image are adjusted to obtain the target bit sequence embedded Target image.
  • the adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes: obtaining the target grayscale interval of the grayscale histogram; and according to the target bit sequence.
  • the number of bits in the sequence is divided into the target gray-scale interval to obtain gray-scale sub-intervals corresponding to the number of bits, wherein each of the gray-scale sub-intervals includes at least two adjacent gray levels, so
  • the gray level is used to indicate the number of pixels with the same gray value; obtain the number relationship information of the pixels in the gray sub-interval corresponding to the bit value; according to the target bit sequence and the gray corresponding to the bit value
  • the number relationship information of the pixel points in the degree sub-interval is adjusted to the number of pixels contained in at least two adjacent gray levels of the gray-level sub-interval to obtain an adjusted gray-level histogram.
  • the obtaining the target gray scale interval of the gray scale histogram includes: calculating the gray scale mean value of the carrier image; based on the representation range of the gray scale histogram and the number of bits of the target bit sequence, according to the The gray-level mean value calculates the target gray-level interval of the gray-level histogram.
  • the obtaining the quantity relationship information of the pixels in the gray sub-interval corresponding to the bit value includes: when the bit value is 1, obtaining the information contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value The first comparison relationship between the ratio of the number of pixel points and the predetermined embedding intensity; and, when the bit value is 0, obtain the two adjacent gray levels contained in the gray sub-interval corresponding to the bit value The second comparison relationship between the ratio of the number of pixels and the predetermined embedding intensity;
  • the determination of the pixel points contained in at least two adjacent gray-scale levels in the gray-scale sub-interval is Adjust the quantity to obtain the adjusted gray histogram, including:
  • the value of the bit to be embedded in the target bit sequence is 1, if the ratio of the number of pixels contained in two adjacent gray levels in the gray subinterval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the first comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the first comparison relationship, the first number of pixels are selected from the pixels contained in the gray level with a larger gray value and moved to the gray with a smaller gray level.
  • the value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is less than the predetermined embedding intensity
  • the relationship between the two is consistent with the second comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the second comparison relationship, a second number of pixels are selected from the pixels contained in the gray level with a smaller gray value and moved to the gray with a larger gray value.
  • the first number and the second number are calculated based on the predetermined embedding intensity and the number of pixels included in two adjacent gray levels in the gray sub-interval.
  • the selecting the first number of pixel points from the pixel points included in the gray level with the larger gray value to move to the gray level with the smaller gray level includes: randomly selecting from the gray level with the larger gray value Select the first number of pixels from the pixels included in the gray level to move to a gray level with a smaller gray level;
  • the selecting the second number of pixel points from the pixel points included in the gray level with the smaller gray value to move to the gray level with the larger gray value includes: adopting a random method from the smaller gray value The pixel points of the second number selected from the pixel points included in the gray level are moved to a gray level with a larger gray value.
  • the method further includes: performing Gaussian filtering processing on the carrier image to obtain the low-frequency signal part of the carrier image; and obtaining the grayscale histogram of the carrier image includes : Obtain a grayscale histogram of the low-frequency signal part of the carrier image.
  • the obtaining the grayscale histogram of the low-frequency signal portion of the carrier image includes: performing block processing on the low-frequency signal portion of the carrier image to obtain a block image; calculating the gray average value of the block image; The gray-level average value of the block image is statistically obtained to obtain the gray-level histogram of the block image.
  • It also includes: calculating the mean square error of the block image; said adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram, including: according to the division Select the grayscale histograms of a predetermined number of block images in descending order of the mean square error of the block images; adjust the shape of the grayscale histograms of the predetermined number of block images according to the target bit sequence , To obtain the gray histogram of the adjusted block image.
  • the carrier object includes a video frame sequence
  • embedding the target bit sequence into the carrier object includes: obtaining a first sub-bit sequence that is used to represent a bit value "0" in the target bit sequence, And obtaining a second sub-bit sequence for representing the bit value "1" in the target bit sequence, where the first sub-bit sequence is different from the second sub-bit sequence; and obtaining the target in the video frame sequence
  • the target video image refers to the video image to be embedded in the target bit sequence; the target bit value of the target video image to be embedded is obtained; the first sub-bit sequence to be used to represent the target bit value Or the second sub-bit sequence is embedded in the target video image.
  • the first sub-bit sequence satisfies the following condition: after the first sub-bit sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the first sub-bit sequence is greater than a preset Degree of discrimination; and, the second sub-bit sequence satisfies the following conditions: after the second sub-bit sequence is shifted, the obtained shifted bit sequence is between the second sub-bit sequence The degree of discrimination is greater than the preset degree of discrimination.
  • the first sub-bit sequence includes a first sub-preamble sequence and first sub-watermark information, and the first sub-preamble sequence satisfies the following condition: after performing shift processing on the first sub-preamble sequence, obtain The degree of discrimination between the shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination; and, the second sub-bit sequence includes a second sub-amble sequence and second sub-watermark information, The second sub-amble sequence satisfies the following condition: after the second sub-amble sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the second sub-amble sequence Greater than the preset discrimination degree; wherein, the first sub-watermark information is different from the second sub-watermark information.
  • the first sub-preamble sequence is the same as the second sub-preamble sequence.
  • the first sub-preamble sequence and the target preamble sequence are the same bit sequence, and the second sub-preamble sequence and the target preamble sequence are the same bit sequence.
  • the obtaining the target video image in the video frame sequence includes: embedding a bit value in a frame of the video frame sequence of the video frame sequence, and according to the number of bit values contained in the target bit sequence, from Obtain a target video image to be embedded in the target bit sequence from the video frame sequence.
  • the embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image includes: obtaining a grayscale histogram of the target video image; According to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value, the shape of the grayscale histogram of the target video image is adjusted to obtain the adjusted grayscale Histogram; according to the adjusted gray histogram, adjust the gray value of the pixel in the target video image to obtain the target embedded with the first sub-bit sequence or the second sub-bit sequence Video image.
  • the carrier object includes a video frame sequence
  • the embedding of the target bit sequence into the carrier object includes: repeating the embedding of the target bit sequence into the video frame sequence according to a predetermined number of embedding times.
  • the above-mentioned second embodiment provides a watermark information extraction method.
  • the fifth embodiment of the present application also provides a watermark information extraction device. Since the device embodiment is basically similar to the method embodiment, the description is as follows: It is relatively simple. For details of related technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the device embodiment is only illustrative.
  • FIG. 5 is a unit block diagram of the apparatus provided in this embodiment. As shown in FIG. 5, the apparatus provided in this embodiment includes:
  • the object to be detected obtaining unit 501 is configured to obtain the object to be detected
  • the reference bit sequence obtaining unit 502 is configured to obtain a preset reference bit sequence containing a amble sequence and original watermark information, where the amble sequence satisfies the following conditions: the amble sequence is obtained after shifting the amble sequence The degree of discrimination between the shifted sequence and the preamble sequence is greater than the preset degree of discrimination;
  • the target bit sequence extraction unit 503 is configured to extract a target bit sequence from the object to be detected
  • the information matching unit 504 is configured to match the target bit sequence with the reference bit sequence, and determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
  • the preamble sequence is set at the front end of the original watermark information, and the extraction of the target bit sequence from the object to be detected includes: taking the start position of the embedding range of the target bit sequence as the extraction target The initial detection point of the bit sequence extracts the target bit sequence from the object to be detected.
  • the preamble sequence is set at the back end of the original watermark information
  • the extracting the target bit sequence from the object to be detected includes: taking the end position of the embedding range of the target bit sequence as the extracting target
  • the initial detection point of the bit sequence extracts the target bit sequence from the object to be detected.
  • the object to be detected includes an image to be detected, and extracting a target watermark sequence from the object to be detected includes: obtaining a grayscale histogram of the image to be detected; The target watermark sequence is extracted from the object to be detected.
  • the object to be detected includes a sequence of video frames, and extracting a target watermark sequence from the object to be detected includes: obtaining a first reference sub-bit sequence for representing a bit value "0" in the target bit sequence , And obtaining a second reference sub-bit sequence used to represent the bit value "1" in the target bit sequence, where the first reference sub-bit sequence is different from the second reference sub-bit sequence; from the video frame A plurality of target sub-bit sequences are extracted from the sequence of video images; the target sub-bit sequence is compared with the first reference sub-bit sequence and the second reference sub-bit sequence, respectively, to determine the video frame The value of the bit embedded in the video image of the sequence is "0" or "1".
  • the extracting the target watermark sequence from the object to be detected based on the gray level histogram includes: calculating the gray level average value of the image to be detected; calculating the gray level histogram according to the gray level average value
  • the target gray-scale interval according to the predetermined number of bit values of the watermark sequence embedded in the image to be detected, the target gray-scale interval is divided to obtain a number corresponding to the number of bit values of the embedded watermark sequence
  • Each of the gray-scale sub-intervals includes at least two adjacent gray-scale levels, and the gray-scale levels are used to indicate the number of pixels with the same gray-scale value; obtaining predetermined bit values to extract data According to the number of pixels in at least two adjacent gray levels of the gray sub-interval and the bit value extraction data, the bit values embedded in the image to be detected are extracted respectively to obtain the target Bit sequence.
  • a method for extracting watermark information and a device for extracting watermark information are provided.
  • the sixth embodiment of the present application also provides an electronic device. Since the electronic device embodiment is basically similar to the method embodiment, Therefore, the description is relatively simple. For details of related technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the electronic device embodiment is only illustrative. An example of the electronic device is as follows:
  • FIG. 6 is a schematic diagram of the electronic device provided in this embodiment.
  • the electronic device includes: a processor 601; a memory 602;
  • the memory 602 is configured to store a watermark information extraction program, and when the program is read and executed by the processor, the following operations are performed:
  • the target bit sequence is matched with the reference bit sequence, and it is determined whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
  • the preamble sequence is set at the front end of the original watermark information, and the extraction of the target bit sequence from the object to be detected includes: taking the start position of the embedding range of the target bit sequence as the extraction target The initial detection point of the bit sequence extracts the target bit sequence from the object to be detected.
  • the preamble sequence is set at the back end of the original watermark information
  • the extracting the target bit sequence from the object to be detected includes: taking the end position of the embedding range of the target bit sequence as the extracting target
  • the initial detection point of the bit sequence extracts the target bit sequence from the object to be detected.
  • the object to be detected includes an image to be detected, and extracting a target watermark sequence from the object to be detected includes: obtaining a grayscale histogram of the image to be detected; The target watermark sequence is extracted from the object to be detected.
  • the object to be detected includes a sequence of video frames, and extracting a target watermark sequence from the object to be detected includes: obtaining a first reference sub-bit sequence for representing a bit value "0" in the target bit sequence , And obtaining a second reference sub-bit sequence used to represent the bit value "1" in the target bit sequence, where the first reference sub-bit sequence is different from the second reference sub-bit sequence; from the video frame A plurality of target sub-bit sequences are extracted from the sequence of video images; the target sub-bit sequence is compared with the first reference sub-bit sequence and the second reference sub-bit sequence, respectively, to determine the video frame The value of the bit embedded in the video image of the sequence is "0" or "1".
  • the extracting the target watermark sequence from the object to be detected based on the gray level histogram includes: calculating the gray level average value of the image to be detected; calculating the gray level histogram according to the gray level average value
  • the target gray-scale interval according to the predetermined number of bit values of the watermark sequence embedded in the image to be detected, the target gray-scale interval is divided to obtain a number corresponding to the number of bit values of the embedded watermark sequence
  • Each of the gray-scale sub-intervals includes at least two adjacent gray-scale levels, and the gray-scale levels are used to indicate the number of pixels with the same gray-scale value; obtaining predetermined bit values to extract data According to the number of pixels in at least two adjacent gray levels of the gray sub-interval and the bit value extraction data, the bit values embedded in the image to be detected are extracted respectively to obtain the target Bit sequence.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent 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 computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, 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, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include non-transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
  • this application can be provided as methods, systems or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.

Landscapes

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

Abstract

Disclosed in the present application are a watermark information embedding method and apparatus. The method comprises: obtaining a carrier object; obtaining watermark information to be embedded; obtaining a target pilot sequence, wherein the target pilot sequence satisfies the following condition: after the target pilot sequence is shifted, an obtained degree of discrimination between a shifted sequence and the target pilot sequence is greater than a preset degree of discrimination; and embedding the watermark information to be embedded and the target pilot sequence into the carrier object. By means of the method, the watermark information completely consistent with the embedded watermark information can be extracted, thereby avoiding the existing problem of failing to ensure the uniqueness of the watermark information because the embedded watermark information is not completely matched with the extracted watermark information.

Description

一种水印信息嵌入方法以及装置Method and device for embedding watermark information
本申请要求2019年11月11日递交的申请号为201911093370.3、发明名称为“一种水印信息嵌入方法以及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on November 11, 2019 with the application number 201911093370.3 and the invention title "A method and device for embedding watermark information", the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及计算机技术领域,具体涉及一种水印信息嵌入方法以及装置。本申请同时涉及一种电子设备。本申请还涉及一种水印信息提取方法、一种水印信息提取装置以及一种电子设备。This application relates to the field of computer technology, in particular to a method and device for embedding watermark information. This application also relates to an electronic device. This application also relates to a method for extracting watermark information, a device for extracting watermark information, and an electronic device.
背景技术Background technique
随着通信技术和多媒体技术的飞速发展,利用数字水印技术解决数字媒体的安全、版权保护和认证等方面的问题已经成为研究热点,便利的网络传播条件使得非法分发的现象日渐猖獗,严重侵害了版权所有者的基本利益。为防止数字影视作品被肆意地非法分发、篡改,数字水印技术作为实现版权保护、防伪追踪的有效方法,已被广泛应用在多媒体信息、文档、软件等载体对象中。With the rapid development of communication technology and multimedia technology, the use of digital watermarking technology to solve the problems of digital media security, copyright protection and authentication has become a research hotspot. Convenient network communication conditions have made illegal distribution increasingly rampant and severely infringed. The basic interests of copyright owners. In order to prevent digital film and television works from being illegally distributed and tampered with, digital watermarking technology, as an effective method to realize copyright protection and anti-counterfeiting tracking, has been widely used in multimedia information, documents, software and other carrier objects.
数字水印技术是将水印信息嵌入到要被保护的载体对象中,在不影响载体对象正常使用的情况下,通过加密等方法,防止内容被随意复制、更改,例如,当出现盗版或者版权纠纷时,可以从有纠纷的作品中提取水印信息,作为版权所有的证据,从而维护了所有者的权益;此外,视频水印技术还可以通过嵌入的标识信息判断载体对象是否被随意改动,从而追踪到更改者,达到保护版权所有者基本权益的目的,因此,视频水印技术在数字影视的版权保护、信息安全等领域应用广泛。Digital watermarking technology embeds the watermark information into the carrier object to be protected. Without affecting the normal use of the carrier object, encryption and other methods are used to prevent the content from being copied or changed at will, for example, when there is a piracy or copyright dispute , Can extract watermark information from disputed works as evidence of copyright, thereby safeguarding the rights and interests of the owner; in addition, video watermarking technology can also determine whether the carrier object has been arbitrarily changed through the embedded identification information, thereby tracking the change To achieve the purpose of protecting the basic rights and interests of copyright owners, video watermarking technology is widely used in the copyright protection of digital film and television, information security and other fields.
与视频图像相关的信号处理过程包括信道噪声、滤波、数/模与模/数转换、重采样、图像剪切、图像移位、图像尺度变化以及图像压缩编码等。鲁棒性是指在经历多种无意或有意的信号处理过程后,水印信息仍能保持完整性并能被准确检测到。现有的针对视频序列的水印嵌入和提取算法能够有效对抗图像压缩、加噪以及滤波等信号处理过程,然而对于几何攻击则缺乏鲁棒性。即,当攻击者对目标图像进行旋转、缩放等不影响其视觉效果的几何变换后,绝大多数水印检测器无法再次检测到已嵌入的水印信息,例如,基于图像分块的水印嵌入方法,当上述几何变换过程破坏了图像块之间的同步性后,则无法取得与嵌入水印信息时相同的分块方式,导致水印信息提取错误,再例如,利用基 于图像特征点的水印嵌入方法抵抗几何攻击,需要进行大量搜索,并且该方法的实现取决于图像特征点是否被准确定位,增加了水印嵌入过程的复杂度。The signal processing process related to video images includes channel noise, filtering, digital/analog and analog/digital conversion, resampling, image cropping, image shifting, image scale change, and image compression coding. Robustness means that the watermark information can still maintain integrity and be accurately detected after a variety of unintentional or intentional signal processing procedures. The existing watermark embedding and extraction algorithms for video sequences can effectively resist the signal processing processes of image compression, noise addition and filtering, but they lack robustness against geometric attacks. That is, after the attacker performs geometric transformations that do not affect the visual effect of the target image, most watermark detectors cannot detect the embedded watermark information again. For example, the watermark embedding method based on image block, When the above geometric transformation process destroys the synchronization between image blocks, the same block method as when embedding watermark information cannot be obtained, resulting in watermark information extraction errors. Another example is the use of image feature points-based watermark embedding methods to resist geometry Attacks require a lot of searches, and the realization of this method depends on whether the image feature points are accurately located, which increases the complexity of the watermark embedding process.
由于图像的灰度直方图的形状在图像旋转、缩放等几何变换后具有不变性,因此,基于图像的灰度直方图的水印嵌入方法在抵抗几何攻击方面取得了较好效果。基于灰度直方图的水印算法通过对图像的灰度均值进行搜索,以此确定水印信息的嵌入位置,在该过程中需检测出多个水印信息,并将其与原始水印信息进行匹配,以此确定被检测的图像中是否嵌入有原始水印信息。Since the shape of the image's gray histogram is invariant after geometric transformations such as image rotation and scaling, the watermark embedding method based on the image's gray histogram has achieved good results in resisting geometric attacks. The watermarking algorithm based on gray histogram searches for the average gray value of the image to determine the embedding position of the watermark information. In this process, multiple watermark information needs to be detected and matched with the original watermark information. This determines whether the original watermark information is embedded in the detected image.
然而,上述基于图像的灰度直方图的水印嵌入方法,在提取水印信息的过程中会带来极大的假阳性概率,即,在确定水印信息的嵌入位置的过程中,由于大量的水印序列在移位前和移位后具有较高的相似度,因此,即使检测出的水印信息为发生移位后的水印信息,将其与原始水印信息匹配时,也可获得较高的可信度,或者,用一个完全错误的水印信息(非原始水印信息)与检测出多个水印信息进行匹配,也可从载体图像中提取出具有高可信度的水印信息,因此,无法保证水印信息的唯一性。对于视频帧序列,由于同样需要确定水印信息的嵌入位置,且也需要将检测出的多个水印信息与原始水印信息进行匹配,因此,同样无法实现水印信息的唯一性。However, the above-mentioned watermark embedding method based on image gray histogram will bring a great false positive probability in the process of extracting watermark information, that is, in the process of determining the embedding position of watermark information, due to a large number of watermark sequences It has a high degree of similarity before and after the shift. Therefore, even if the detected watermark information is the watermark information after the shift, when it is matched with the original watermark information, a higher degree of credibility can be obtained Or, use a completely wrong watermark information (non-original watermark information) to match multiple watermark information detected, or extract watermark information with high reliability from the carrier image. Therefore, the watermark information cannot be guaranteed. Uniqueness. For a video frame sequence, since the embedding position of the watermark information also needs to be determined, and multiple detected watermark information needs to be matched with the original watermark information, the uniqueness of the watermark information cannot also be achieved.
发明内容Summary of the invention
本申请实施例提供一种水印信息嵌入方法,以解决现有水印信息嵌入方法中无法保证水印信息的唯一性的问题。本申请另外的实施例提供一种水印信息嵌入装置以及一种电子设备。本申请还提供一种水印信息提取方法、一种水印信息提取装置以及一种电子设备。The embodiment of the present application provides a watermark information embedding method to solve the problem that the uniqueness of the watermark information cannot be guaranteed in the existing watermark information embedding method. Another embodiment of the present application provides a watermark information embedding device and an electronic device. This application also provides a method for extracting watermark information, a device for extracting watermark information, and an electronic device.
本申请实施例提供一种水印信息嵌入方法,包括:The embodiment of the present application provides a method for embedding watermark information, including:
获得载体对象;获得待嵌入水印信息;获得目标导码序列;将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中;其中,所述目标导码序列满足如下条件:在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度。Obtain the carrier object; obtain the watermark information to be embedded; obtain the target preamble sequence; embed the watermark information to be embedded and the target preamble sequence into the carrier object; wherein the target preamble sequence meets the following conditions: After the target preamble sequence is shifted, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than the preset degree of discrimination.
可选的,所述目标导码序列为二进制比特序列,所述将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中,包括:将所述目标导码序列加入到所述待嵌入水印信息的前端或后端,获得目标比特序列;将所述目标比特序列嵌入到所述载体对象中。Optionally, the target amble sequence is a binary bit sequence, and the embedding the watermark information to be embedded and the target amble sequence into the carrier object includes: adding the target amble sequence to Obtaining the target bit sequence at the front end or the back end of the watermark information to be embedded; embedding the target bit sequence in the carrier object.
可选的,所述载体对象包括载体图像,所述将所述目标比特序列嵌入到所述载体对 象中,包括:获得所述载体图像的灰度直方图;根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图;根据所述调整后的灰度直方图,对所述载体图像中像素点的灰度值进行调整,获得嵌入有所述目标比特序列的目标图像。Optionally, the carrier object includes a carrier image, and embedding the target bit sequence into the carrier object includes: obtaining a grayscale histogram of the carrier image; The shape of the grayscale histogram is adjusted to obtain an adjusted grayscale histogram; according to the adjusted grayscale histogram, the grayscale value of the pixel in the carrier image is adjusted to obtain the The target image of the target bit sequence.
可选的,所述根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,包括:获得所述灰度直方图的目标灰度区间;根据所述目标比特序列的比特数量,对所述目标灰度区间进行划分,获得与所述比特数量相对应的灰度子区间,其中,每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;获得比特值对应的灰度子区间中的像素点的数量关系信息;根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所包含的像素点的数量进行调整,获得调整后的灰度直方图。Optionally, the adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes: obtaining the target grayscale interval of the grayscale histogram; For the number of bits of the target bit sequence, the target gray-scale interval is divided to obtain gray-scale sub-intervals corresponding to the number of bits, wherein each gray-scale sub-interval includes at least two adjacent gray-scale sub-intervals. Degree level, the gray level is used to indicate the number of pixels with the same gray value; obtain the number relationship information of the pixels in the gray sub-interval corresponding to the bit value; according to the target bit sequence and the bit The number relationship information of the pixel points in the gray level sub-interval corresponding to the value, the number of pixels contained in at least two adjacent gray levels of the gray-level sub-interval is adjusted to obtain an adjusted gray histogram .
可选的,所述获得所述灰度直方图的目标灰度区间,包括:计算所述载体图像的灰度均值;基于所述灰度直方图的表示范围和所述目标比特序列的比特数量,根据所述灰度均值计算所述灰度直方图的目标灰度区间。Optionally, the obtaining the target grayscale interval of the grayscale histogram includes: calculating the grayscale mean value of the carrier image; based on the representation range of the grayscale histogram and the number of bits of the target bit sequence Calculating the target grayscale interval of the grayscale histogram according to the grayscale average value.
可选的,所述获得比特值对应的灰度子区间中的像素点的数量关系信息,包括:当比特值为1时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第一比对关系;以及,当比特值为0时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第二比对关系;Optionally, the obtaining the number relationship information of the pixel points in the gray sub-interval corresponding to the bit value includes: when the bit value is 1, obtaining two adjacent gray levels in the gray sub-interval corresponding to the bit value The first comparison relationship between the ratio of the number of pixel points contained in the level and the predetermined embedding intensity; and, when the bit value is 0, obtain two adjacent gray levels in the gray level subinterval corresponding to the bit value The second comparison relationship between the ratio of the number of pixels included in the level and the predetermined embedding intensity;
所述根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所包含的像素点的数量进行调整,获得调整后的灰度直方图,包括:According to the target bit sequence and the number relationship information of the pixel points in the gray-scale sub-interval corresponding to the bit value, the determination of the pixel points contained in at least two adjacent gray-scale levels in the gray-scale sub-interval is Adjust the quantity to obtain the adjusted gray histogram, including:
所述目标比特序列的待嵌入的比特值为1,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所述第一比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第一比对关系,则从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;The value of the bit to be embedded in the target bit sequence is 1, if the ratio of the number of pixels contained in two adjacent gray levels in the gray subinterval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the first comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the first comparison relationship, the first number of pixels are selected from the pixels contained in the gray level with a larger gray value and moved to the gray with a smaller gray level. Degree
所述目标比特序列的待嵌入的比特值为0,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所 述第二比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第二比对关系,则从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中;The value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the second comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the second comparison relationship, a second number of pixels are selected from the pixels contained in the gray level with a smaller gray value and moved to the gray with a larger gray value. Degree
其中,所述第一数量和所述第二数量,根据所述预定嵌入强度和所述灰度子区间中两个相邻灰度级所包含的像素点的数量计算获得。Wherein, the first number and the second number are calculated based on the predetermined embedding intensity and the number of pixels included in two adjacent gray levels in the gray sub-interval.
可选的,所述从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中,包括:采用随机方式从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;Optionally, the selecting a first number of pixel points from the pixel points included in the gray level with a larger gray value to move to the gray level with a smaller gray level includes: adopting a random method from the gray level Select the first number of pixels from the pixels contained in the gray level with the larger value to move to the gray level with the smaller gray level;
所述从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中,包括:采用随机方式从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中。The selecting the second number of pixel points from the pixel points included in the gray level with the smaller gray value to move to the gray level with the larger gray value includes: adopting a random method from the smaller gray value The pixel points of the second number selected from the pixel points included in the gray level are moved to a gray level with a larger gray value.
可选的,在获得所述载体图像的灰度直方图之前,还包括:对所述载体图像进行高斯滤波处理,获得所述载体图像的低频信号部分;所述获得所述载体图像的灰度直方图,包括:获得所述载体图像的低频信号部分的灰度直方图。Optionally, before obtaining the grayscale histogram of the carrier image, the method further includes: performing Gaussian filtering processing on the carrier image to obtain the low-frequency signal part of the carrier image; and obtaining the grayscale of the carrier image The histogram includes: obtaining a grayscale histogram of the low-frequency signal part of the carrier image.
可选的,所述获得所述载体图像的低频信号部分的灰度直方图,包括:对所述载体图像的低频信号部分进行分块处理,获得分块图像;计算所述分块图像的灰度均值;根据所述分块图像的灰度均值,统计获得所述分块图像的灰度直方图。Optionally, the obtaining a grayscale histogram of the low-frequency signal part of the carrier image includes: performing block processing on the low-frequency signal part of the carrier image to obtain a block image; calculating the grayscale of the block image Degree average value; according to the average gray value of the block image, the gray level histogram of the block image is statistically obtained.
可选的,还包括:计算获得所述分块图像的均方差;所述根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,包括:按照所述分块图像的均方差从大到小的顺序,选取预定数量的分块图像的灰度直方图;根据所述目标比特序列,对所述预定数量的分块图像的灰度直方图的形状进行调整,获得调整后的分块图像的灰度直方图。Optionally, the method further includes: calculating and obtaining the mean square error of the block image; the adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes: According to the order of the mean square error of the segmented images, the gray histograms of a predetermined number of segmented images are selected; according to the target bit sequence, the grayscale histograms of the predetermined number of segmented images The shape of the image is adjusted to obtain the grayscale histogram of the adjusted block image.
可选的,所述载体对象包括视频帧序列,所述将所述目标比特序列嵌入到所述载体对象中,包括:获得用于表示所述目标比特序列中的比特值“0”的第一子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二子比特序列,所述第一子比特序列区别于所述第二子比特序列;获得所述视频帧序列中的目标视频图像,目标视频图像指的是欲嵌入所述目标比特序列的视频图像;获得待嵌入所述目标视频图像的目标比特值;将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中。Optionally, the carrier object includes a video frame sequence, and the embedding of the target bit sequence into the carrier object includes: obtaining the first bit value “0” in the target bit sequence. Sub-bit sequence, and obtaining a second sub-bit sequence used to represent the bit value "1" in the target bit sequence, the first sub-bit sequence being different from the second sub-bit sequence; obtaining the video frame The target video image in the sequence, the target video image refers to the video image to be embedded in the target bit sequence; the target bit value of the target video image to be embedded is obtained; the first bit value that will be used to represent the target bit value A sub-bit sequence or the second sub-bit sequence is embedded in the target video image.
可选的,所述第一子比特序列满足如下条件:在对所述第一子比特序列进行移位处理后,获得的移位后的比特序列与所述第一子比特序列之间的区分度大于预设区分度;以及,所述第二子比特序列满足如下条件:在对所述第二子比特序列进行移位处理后,获得的移位后的比特序列与所述第二子比特序列之间的区分度大于预设区分度。Optionally, the first sub-bit sequence satisfies the following condition: after the first sub-bit sequence is shifted, the difference between the obtained shifted bit sequence and the first sub-bit sequence Degree is greater than the preset discrimination degree; and, the second sub-bit sequence satisfies the following conditions: after the second sub-bit sequence is shifted, the obtained shifted bit sequence is the same as the second sub-bit sequence. The degree of discrimination between sequences is greater than the preset degree of discrimination.
可选的,所述第一子比特序列包括第一子导码序列和第一子水印信息,所述第一子导码序列满足如下条件:在对所述第一子导码序列进行移位处理后,获得的移位后的比特序列与所述第一子导码序列之间的区分度大于预设区分度;以及,所述第二子比特序列包括第二子导码序列和第二子水印信息,所述第二子导码序满足如下条件:在对所述第二子导码序列进行移位处理后,获得的移位后的比特序列与所述第二子导码序列之间的区分度大于预设区分度;其中,所述第一子水印信息区别于所述第二子水印信息。Optionally, the first sub-bit sequence includes a first sub-preamble sequence and first sub-watermark information, and the first sub-preamble sequence satisfies the following condition: After processing, the degree of discrimination between the obtained shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination; and, the second sub-bit sequence includes a second sub-amble sequence and a second sub-amble sequence. Sub-watermark information, the second sub-preamble sequence satisfies the following condition: after the second sub-preamble sequence is shifted, the obtained shifted bit sequence and the second sub-preamble sequence The degree of discrimination between the two is greater than the preset degree of discrimination; wherein, the first sub-watermark information is different from the second sub-watermark information.
可选的,所述第一子导码序列与所述第二子导码序列相同。Optionally, the first sub-preamble sequence is the same as the second sub-preamble sequence.
可选的,所述第一子导码序列与所述目标导码序列为相同比特序列,以及所述第二子导码序列与所述目标导码序列为相同比特序列。Optionally, the first sub-preamble sequence and the target preamble sequence are the same bit sequence, and the second sub-preamble sequence and the target preamble sequence are the same bit sequence.
可选的,所述获得所述视频帧序列中的目标视频图像,包括:按照所述视频帧序列的一帧视频图像中嵌入一个比特值的方式,根据所述目标比特序列所包含的比特值的数量,从所述视频帧序列中获得欲嵌入所述目标比特序列的目标视频图像。Optionally, the obtaining the target video image in the video frame sequence includes: according to a manner of embedding a bit value in a frame of the video image of the video frame sequence, according to the bit value contained in the target bit sequence The target video image to be embedded in the target bit sequence is obtained from the video frame sequence.
可选的,所述将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中,包括:获得所述目标视频图像的灰度直方图;根据所述用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列,对所述目标视频图像的灰度直方图的形状进行调整,获得调整后的灰度直方图;根据所述调整后的灰度直方图,对所述目标视频图像中像素点的灰度值进行调整,获得嵌入有所述第一子比特序列或所述第二子比特序列的目标视频图像。Optionally, the embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image includes: obtaining a gray scale of the target video image Degree histogram; according to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value, the shape of the gray-scale histogram of the target video image is adjusted to obtain an adjustment After the grayscale histogram; according to the adjusted grayscale histogram, adjust the grayscale value of the pixel in the target video image to obtain the first sub-bit sequence or the second sub-bit sequence embedded The target video image of the bit sequence.
可选的,所述载体对象包括视频帧序列,所述将所述目标比特序列嵌入到所述载体对象中,包括:按照预定嵌入次数,将所述目标比特序列重复嵌入到所述视频帧序列中。Optionally, the carrier object includes a video frame sequence, and embedding the target bit sequence into the carrier object includes: repeatedly embedding the target bit sequence into the video frame sequence according to a predetermined number of embedding times in.
本申请实施例还提供一种水印信息提取方法,包括:The embodiment of the application also provides a method for extracting watermark information, including:
获得待检测对象;获得包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度。;从所述待检测对象中提取出目标比特序列;将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。Obtain the object to be detected; Obtain the reference bit sequence containing the pilot code sequence and the original watermark information. The pilot code sequence satisfies the following conditions: after the pilot code sequence is shifted, the obtained shifted sequence is the same as the The degree of discrimination between the preamble sequences is greater than the preset degree of discrimination. Extracting a target bit sequence from the object to be detected; matching the target bit sequence with the reference bit sequence to determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
可选的,所述导码序列设置于所述原始水印信息的前端,所述从所述待检测对象中提取出目标比特序列,包括:以所述目标比特序列的嵌入范围的起始位置作为提取所述目标比特序列的初始检测点,从所述待检测对象中提取出目标比特序列。Optionally, the preamble sequence is set at the front end of the original watermark information, and the extracting the target bit sequence from the object to be detected includes: taking the start position of the embedding range of the target bit sequence as The initial detection point of the target bit sequence is extracted, and the target bit sequence is extracted from the object to be detected.
可选的,所述导码序列设置于所述原始水印信息的后端,所述从所述待检测对象中提取出目标比特序列,包括:以所述目标比特序列的嵌入范围的末尾位置作为提取所述目标比特序列的初始检测点,从所述待检测对象中提取出目标比特序列。Optionally, the amble sequence is set at the back end of the original watermark information, and the extracting the target bit sequence from the object to be detected includes: taking the end position of the embedding range of the target bit sequence as The initial detection point of the target bit sequence is extracted, and the target bit sequence is extracted from the object to be detected.
可选的,所述待检测对象包括待检测图像,所述从所述待检测对象中提取出目标水印序列,包括:获得所述待检测图像的灰度直方图;基于所述灰度直方图,从所述待检测对象中提取出目标水印序列。Optionally, the object to be detected includes an image to be detected, and extracting a target watermark sequence from the object to be detected includes: obtaining a grayscale histogram of the image to be detected; based on the grayscale histogram , Extract the target watermark sequence from the object to be detected.
可选的,所述待检测对象包括视频帧序列,所述从所述待检测对象中提取出目标水印序列,包括:获得用于表示所述目标比特序列中的比特值“0”的第一参考子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二参考子比特序列,所述第一参考子比特序列区别于所述第二参考子比特序列;从所述视频帧序列的视频图像中提取出多个目标子比特序列;将所述目标子比特序列分别与所述第一参考子比特序列和所述第二参考子比特序列进行比对,以确定所述视频帧序列的视频图像中所嵌入的比特值为“0”或“1”。Optionally, the object to be detected includes a video frame sequence, and the extracting a target watermark sequence from the object to be detected includes: obtaining a first bit value "0" in the target bit sequence. A reference sub-bit sequence, and obtaining a second reference sub-bit sequence used to represent a bit value "1" in the target bit sequence, where the first reference sub-bit sequence is different from the second reference sub-bit sequence; Extract multiple target sub-bit sequences from the video image of the video frame sequence; compare the target sub-bit sequence with the first reference sub-bit sequence and the second reference sub-bit sequence to determine The value of the bit embedded in the video image of the video frame sequence is "0" or "1".
可选的,所述基于所述灰度直方图,从所述待检测对象中提取出目标水印序列,包括:计算所述待检测图像的灰度均值;根据所述灰度均值,计算所述灰度直方图的目标灰度区间;根据预定的嵌入到所述待检测图像中的水印序列的比特值的数量,对所述目标灰度区间进行划分,获得与所述嵌入水印序列的比特值的数量相对应的灰度子区间,每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;获得预定的比特值提取数据;根据所述灰度子区间的至少两个相邻灰度级中像素点的数量以及所述比特值提取数据,对嵌入到所述待检测图像中的比特值分别进行提取,获得所述目标比特序列。Optionally, the extracting the target watermark sequence from the object to be detected based on the gray-level histogram includes: calculating the gray-level average value of the image to be detected; and calculating the gray-level average value according to the gray-level average value. The target grayscale interval of the grayscale histogram; according to the predetermined number of bit values of the watermark sequence embedded in the image to be detected, the target grayscale interval is divided to obtain the bit value of the embedded watermark sequence The number of gray-scale sub-intervals corresponding to the number of gray-scale sub-intervals, each of the gray-scale sub-intervals includes at least two adjacent gray levels, and the gray levels are used to represent the number of pixels with the same gray value; Bit value extraction data; according to the number of pixels in at least two adjacent gray levels of the gray sub-interval and the bit value extraction data, the bit values embedded in the image to be detected are respectively extracted, Obtain the target bit sequence.
本申请另一实施例还提供一种水印信息嵌入装置,包括:Another embodiment of the present application also provides a watermark information embedding device, including:
载体对象获得单元,用于获得载体对象;The carrier object obtaining unit is used to obtain the carrier object;
待嵌入水印信息获得单元,用于获得待嵌入水印信息;A unit for obtaining watermark information to be embedded, configured to obtain watermark information to be embedded;
目标导码序列获得单元,用于获得目标导码序列,所述目标导码序列满足如下条件:在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度;The target amble sequence obtaining unit is configured to obtain a target amble sequence, and the target amble sequence satisfies the following condition: after the target amble sequence is shifted, the obtained shifted sequence is the same as the target amble sequence. The degree of discrimination between code sequences is greater than the preset degree of discrimination;
信息嵌入单元,用于将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中。The information embedding unit is used to embed the watermark information to be embedded and the target preamble sequence into the carrier object.
本申请另一实施例还提供一种电子设备,包括:处理器和存储器,存储器用于存储水印信息嵌入程序,所述程序在被所述处理器读取执行时,执行如下操作:获得载体对象;获得待嵌入水印信息;获得目标导码序列,所述目标导码序列满足如下条件:在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度;将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中。Another embodiment of the present application further provides an electronic device, including: a processor and a memory, the memory is used to store a watermark information embedding program, and when the program is read and executed by the processor, the following operations are performed: Obtain a carrier object ; Obtain the watermark information to be embedded; Obtain the target amble sequence, the target amble sequence meets the following conditions: after the target amble sequence is shifted, the obtained shifted sequence and the target amble sequence The degree of discrimination between is greater than the preset degree of discrimination; the watermark information to be embedded and the target preamble sequence are embedded in the carrier object.
本申请另一实施例还提供一种水印信息提取装置,包括:Another embodiment of the present application also provides a watermark information extraction device, including:
待检测对象获得单元,用于获得待检测对象;The object to be detected obtaining unit is used to obtain the object to be detected;
参考比特序列获得单元,用于获得预设的包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;The reference bit sequence obtaining unit is configured to obtain a preset reference bit sequence containing a amble sequence and original watermark information, where the amble sequence satisfies the following condition: after shifting the amble sequence, the obtained shift The degree of discrimination between the post-bit sequence and the preamble sequence is greater than the preset degree of discrimination;
目标比特序列提取单元,用于从所述待检测对象中提取出目标比特序列;A target bit sequence extraction unit, configured to extract a target bit sequence from the object to be detected;
信息匹配单元,用于将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。The information matching unit is configured to match the target bit sequence with the reference bit sequence, and determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
本申请另一实施例还提供一种电子设备,包括:处理器和存储器,存储器用于存储水印信息提取程序,所述程序在被所述处理器读取执行时,执行如下操作:获得待检测对象;获得预设的包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;从所述待检测对象中提取出目标比特序列;将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。Another embodiment of the present application further provides an electronic device, including: a processor and a memory, the memory is used to store a watermark information extraction program, and when the program is read and executed by the processor, the following operations are performed: Object; Obtain a preset reference bit sequence containing the amble sequence and the original watermark information, the amble sequence meets the following conditions: after the amble sequence is shifted, the obtained shifted sequence and the The degree of discrimination between the preamble sequences is greater than the preset degree of discrimination; the target bit sequence is extracted from the object to be detected; the target bit sequence is matched with the reference bit sequence to determine whether the target bit sequence is A reference bit sequence embedded in the object to be detected.
本申请另一实施例还提供一种水印信息嵌入方法,包括:获得载体对象;获得至少两个待嵌入水印信息;为所述至少两个待嵌入水印信息添加不同的目标导码序列,获得至少两个目标嵌入序列;将所述至少两个目标嵌入序列嵌入到所述载体对象中;其中,所述目标导码序列满足如下条件:在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度。Another embodiment of the present application further provides a method for embedding watermark information, including: obtaining a carrier object; obtaining at least two pieces of watermark information to be embedded; adding different target code sequences to the at least two pieces of watermark information to be embedded to obtain at least Two target embedding sequences; embedding the at least two target embedding sequences into the carrier object; wherein, the target preamble sequence satisfies the following condition: after shifting the target preamble sequence, obtain The degree of discrimination between the shifted sequence of and the target preamble sequence is greater than the preset degree of discrimination.
可选的,所述为所述至少两个待嵌入水印信息添加不同的目标导码序列,包括:为所述至少两个待嵌入水印信息中的每个待嵌入水印信息分别添加与该待嵌入水印信息相对应的目标导码序列。Optionally, the adding different target code sequences to the at least two watermark information to be embedded includes: adding and the watermark information to be embedded to each of the at least two watermark information to be embedded. The target preamble sequence corresponding to the watermark information.
与现有技术相比,本申请具有以下优点:Compared with the prior art, this application has the following advantages:
本申请提供的水印信息嵌入方法,在载体对象中嵌入水印信息时,同时嵌入目标导码序列,该目标导码序列满足如下条件:在对该目标导码序列进行移位处理后,获得的移位后序列与该目标导码序列之间的区分度大于预设区分度。由于该目标导码序列在移位后与移位前的区分度较大,因此,在水印信息提取端提取水印信息时,可实现导码序列的准确匹配,可准确定位水印信息的嵌入区间,从而实现对水印信息进行精确定位。通过使用该方法,可提取出与嵌入的水印信息完全一致的水印信息,避免现有的因嵌入的水印信息与提取出的水印信息未完全匹配而无法保证水印信息唯一性的问题。In the watermark information embedding method provided by this application, when the watermark information is embedded in the carrier object, the target amble sequence is embedded at the same time, and the target amble sequence meets the following conditions: after the target amble sequence is shifted, the obtained shift The degree of discrimination between the post-bit sequence and the target preamble sequence is greater than the preset degree of discrimination. Since the target preamble sequence is more distinguishable after the shift and before the shift, when the watermark information is extracted at the watermark information extraction end, accurate matching of the preamble sequence can be achieved, and the embedding interval of the watermark information can be accurately located. So as to realize the accurate positioning of the watermark information. By using this method, the watermark information that is completely consistent with the embedded watermark information can be extracted, and the existing problem that the uniqueness of the watermark information cannot be guaranteed because the embedded watermark information and the extracted watermark information are not completely matched.
附图说明Description of the drawings
图1是本申请第一实施例提供的水印信息嵌入方法流程图;Fig. 1 is a flowchart of a watermark information embedding method provided by the first embodiment of the present application;
图1-A是本申请第一实施例提供的嵌入水印信息后的载体图像的灰度直方图的示意图;Fig. 1-A is a schematic diagram of a gray-scale histogram of a carrier image after embedding watermark information provided by the first embodiment of the present application;
图1-B是本申请第一实施例提供的将待嵌入水印信息和目标导码序列嵌入载体对象的示意图;Figure 1-B is a schematic diagram of embedding the watermark information to be embedded and the target preamble sequence into a carrier object provided by the first embodiment of the present application;
图2是本申请第二实施例提供的水印信息提取方法流程图;Figure 2 is a flow chart of the watermark information extraction method provided by the second embodiment of the present application;
图3是本申请第三实施例提供的水印信息嵌入装置的单元框图;Fig. 3 is a block diagram of the watermark information embedding device provided by the third embodiment of the present application;
图4是本申请第四实施例提供的电子设备的逻辑结构示意图;4 is a schematic diagram of a logical structure of an electronic device provided by a fourth embodiment of the present application;
图5是本申请第五实施例提供的水印信息提取装置的单元框图;Fig. 5 is a block diagram of the unit of the watermark information extraction device provided by the fifth embodiment of the present application;
图6是本申请第六实施例提供的电子设备的逻辑结构示意图。FIG. 6 is a schematic diagram of the logical structure of an electronic device provided by a sixth embodiment of the present application.
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。In the following description, many specific details are set forth in order to fully understand this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar promotion without violating the connotation of this application. Therefore, this application is not limited by the specific implementation disclosed below.
针对水印信息嵌入和提取场景,为了在水印信息的提取过程中能够准确对水印信息进行准确定位,以提取出与嵌入的水印信息完全一致的水印信息,本申请提供了一种水印信息嵌入方法、与该方法相对应的水印信息嵌入装置以及电子设备,本申请还提供一种水印信息提取方法、与该方法相对应的水印信息提取装置以及电子设备。以下提供实施例对所述方法、装置以及电子设备进行详细说明。For watermark information embedding and extraction scenarios, in order to accurately locate the watermark information during the watermark information extraction process to extract watermark information that is completely consistent with the embedded watermark information, this application provides a watermark information embedding method, For the watermark information embedding device and electronic equipment corresponding to this method, this application also provides a watermark information extraction method, a watermark information extraction device and electronic equipment corresponding to the method. Examples are provided below to describe the method, device, and electronic equipment in detail.
本申请第一实施例提供一种水印信息嵌入方法,以下结合图1进行说明。以下描述所涉及的实施例是用来解释说明方法原理,不是实际使用的限定。The first embodiment of the present application provides a method for embedding watermark information, which is described below with reference to FIG. 1. The embodiments involved in the following description are used to explain the principle of the method, and are not a limitation of actual use.
如图1所示,在步骤S101中,获得载体对象。As shown in Fig. 1, in step S101, a carrier object is obtained.
数字水印技术是一种基于内容的、非密码机制的计算机信息隐藏技术,指的是在不影响载体对象的使用价值的情况下,将不容易被探知和修改、且可以被指定主体识别和辨认的水印信息直接嵌入载体对象当中,或者修改载体对象的特定区域的结构。通过这些隐藏在载体对象中的水印信息,可达到确认内容创建者、购买者、传送隐秘信息或者判断载体对象是否被篡改等目的,是保护信息安全、实现防伪溯源、版权保护的有效办法。载体对象包括多媒体信息、文档、软件等。在本实施例中,该载体对象主要为载体图像或者视频帧序列。Digital watermarking technology is a content-based, non-cryptographic computer information hiding technology, which means that it will not be easy to detect and modify, and can be identified and identified by a designated subject without affecting the use value of the carrier object. The watermark information is directly embedded in the carrier object, or the structure of a specific area of the carrier object is modified. Through these watermark information hidden in the carrier object, the purpose of confirming the content creator, purchaser, transmitting secret information or judging whether the carrier object has been tampered with can be achieved. It is an effective way to protect information security, realize anti-counterfeiting traceability, and copyright protection. Carrier objects include multimedia information, documents, software, etc. In this embodiment, the carrier object is mainly a carrier image or a sequence of video frames.
如图1所示,在步骤S102中,获得待嵌入水印信息。As shown in Fig. 1, in step S102, the watermark information to be embedded is obtained.
水印信息是一种应用计算机算法嵌入载体对象的保护信息,主要为数字序列或比特序列,例如,包含十个比特值的水印信息1010110101。待嵌入水印信息指的是预先设定的用于嵌入上述载体图像中或者视频帧序列中的水印信息。Watermark information is a kind of protection information embedded in a carrier object using a computer algorithm, which is mainly a digital sequence or a bit sequence, for example, watermark information 1010110101 containing ten bit values. The watermark information to be embedded refers to the watermark information preset to be embedded in the above-mentioned carrier image or video frame sequence.
如图1所示,在步骤S103中,获得目标导码序列。As shown in Fig. 1, in step S103, a target preamble sequence is obtained.
目标导码序列满足如下条件:在对目标导码序列进行移位处理后,获得的移位后序列与目标导码序列之间的区分度大于预设区分度,即,按照该目标导码序列的排序方向对其进行正向移位或反向移位后,所获得的移位后的序列与该目标导码序列之间的区分度大于预设区分度。此处区分度大于预设区分度,用于表明目标导码序列在移位前和移位后具有强区分性,例如,对于具有相同比特位数且具有强区分性的两个比特序列而言,在将该两个比特序列按比特位数对齐之后进行比较,其各比特位所对应的相同比特值的数量小于预定阈值。在本实施例中,该目标导码序列优选的为二进制比特序列,例如,比特序列1100110010正向移动(比特序列整体向左移动)一个比特位后所得的移位后比特序列为100110010,最后一个比特位对应随机的比特值0或1,将该移位后的比特序列与移位前的比特序列对齐后进行比较可知,该移位后的比特序列与移位前的比特序列之间的区分度较大;将该比特序列正向移动(比特序列整体向左移动)两个比特位后所得的移位后的比特序列为00110010,后两位随机,该移位后的比特序列与移位前的比特序列之间的区分度较大;将该比特序列反向移动(比特序列整体向右移动)一个比特位后所得的比特序列的后九位比特值为110011001,第一个比特位随机,假设第一个比特位对应的比特值为0,则移位后的比特序列为0110011001,其与移位前的比特序列之间的 区分度同样较大。因此,可将该比特序列1100110010作为目标导码序列。The target amble sequence satisfies the following conditions: after the target amble sequence is shifted, the degree of discrimination between the obtained shifted sequence and the target amble sequence is greater than the preset degree of discrimination, that is, according to the target amble sequence After shifting it forward or backward in the sorting direction, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than the preset degree of discrimination. Here the discrimination degree is greater than the preset discrimination degree, which is used to indicate that the target code sequence has strong discrimination before and after the shift, for example, for two bit sequences with the same number of bits and strong discrimination After aligning the two bit sequences according to the number of bits, they are compared, and the number of the same bit values corresponding to each bit is less than a predetermined threshold. In this embodiment, the target code sequence is preferably a binary bit sequence. For example, the bit sequence 110110010 is shifted forward (the bit sequence moves to the left as a whole) by one bit, and the shifted bit sequence is 100110010, and the last bit sequence is 100110010. The bit corresponds to a random bit value of 0 or 1. After aligning the bit sequence after the shift with the bit sequence before the shift, it can be seen that the difference between the bit sequence after the shift and the bit sequence before the shift The bit sequence is relatively large; the bit sequence is shifted forward by two bits (the bit sequence is shifted to the left as a whole). The shifted bit sequence is 00110010, and the last two bits are random. The shifted bit sequence is the same as the shifted bit sequence. The distinction between the previous bit sequence is relatively large; the bit sequence is reversed (shifted to the right as a whole) by one bit. The last nine bits of the resulting bit sequence have a value of 11011001, and the first bit is random , Assuming that the bit value corresponding to the first bit is 0, the bit sequence after the shift is 0110011001, which is equally distinguishable from the bit sequence before the shift. Therefore, the bit sequence 110110010 can be used as the target preamble sequence.
现有的水印信息嵌入方法中,在水印信息的提取阶段,需要对水印信息的嵌入位置进行详细搜索。例如,针对单一图像的水印信息嵌入和提取过程中,采用基于灰度直方图的水印算法,假设嵌入水印信息后的载体图像为I W,当该载体图像在受到各种可能的攻击后,被攻击后的载体图像为I′ W,在确定水印信息嵌入范围的过程中,从I′ W计算出的灰度均值与I W的灰度均值
Figure PCTCN2020126360-appb-000001
不同,因此,需根据公式
Figure PCTCN2020126360-appb-000002
设置搜索区间,并对该搜索区间进行遍历,提取出多个水印信息,并将其与输入的原始水印信息进行比较,然而,在确定水印信息的嵌入位置的过程中,由于大量的水印序列在移位前和移位后具有较高的相似度,因此,即使检测出的水印信息为发生移位后的水印信息,将其与原始水印信息按比特位数对齐之后进行匹配时,也可获得较高的可信度,或者,用一个完全错误的水印信息(非原始水印信息)与检测出多个水印信息进行匹配,也可从载体图像中提取出具有高可信度的水印信息,其存在假阳性问题,即,输入未嵌入的水印信息,也可能提取出与原始水印信息相似度很大的水印信息,因此,上述方法无法保证水印信息的唯一性。
In the existing watermark information embedding method, in the extraction stage of the watermark information, it is necessary to perform a detailed search on the embedding position of the watermark information. For example, in the process of embedding and extracting the watermark information of a single image, the watermark algorithm based on gray histogram is adopted. It is assumed that the carrier image after the watermark information is embedded is I W. When the carrier image is subjected to various possible attacks, it will be The carrier image after the attack is I′ W. In the process of determining the embedding range of the watermark information, the gray average value calculated from I′ W and the gray average value of I W
Figure PCTCN2020126360-appb-000001
Different, so according to the formula
Figure PCTCN2020126360-appb-000002
Set the search interval, and traverse the search interval, extract multiple watermark information, and compare it with the input original watermark information. However, in the process of determining the embedding position of the watermark information, due to the large number of watermark sequences in the process of determining the embedded position of the watermark information. Before and after the shift, there is a high degree of similarity. Therefore, even if the detected watermark information is the watermark information after the shift, when the original watermark information is aligned with the number of bits and then matched, it can be obtained High credibility, or, using a completely wrong watermark information (non-original watermark information) to match multiple watermark information detected, it is also possible to extract watermark information with high credibility from the carrier image. There is a false positive problem, that is, inputting unembedded watermark information may also extract watermark information that is very similar to the original watermark information. Therefore, the above method cannot guarantee the uniqueness of the watermark information.
例如,以两个灰度级作为一个灰度子区间,在灰度直方图的嵌入范围内嵌入包含10个比特值的水印序列:1010110101,如图1-A(嵌入水印信息后的载体图像的灰度直方图的示意图)所示:在图1-A中,以灰度值为12的灰度级作为嵌入原始水印信息的左端点(水印信息的起始嵌入位置),在提取水印信息时,需根据载体图像的均值、水印信息的长度以及分组的大小对上述左端点进行搜索,并基于该左端点按序提取水印信息。然而,当搜索到灰度值为15的灰度级时,可提取出与原始水印信息相反的比特序列,当搜索到灰度值为16的灰度级时,可提取出原始水印信息向左移位之后的比特序列,该比特序列的前九位比特位对应的比特值为:01011010,最后一个比特位对应随机比特值0或1。通过比较可知,上述与原始水印信息相反的比特序列以及原始水印信息向左移位之后所得的比特序列均与原始水印信息具有较高的匹配度,因此其都具有较高的可信度,例如,如果原始水印信息与上述移位后的水印信息很相似,搜索左端点的过程中,将原始水印信息经移位后所获得的比特序列与原始水印信息进行匹配,也可获得具有高可信度的水印信息,无法保证水印信息的唯一性。For example, taking two gray levels as a gray sub-interval, a watermark sequence containing 10 bit values is embedded in the embedding range of the gray histogram: 1010110101, as shown in Figure 1-A (the image of the carrier image after the watermark is embedded) The schematic diagram of the grayscale histogram) shows: in Figure 1-A, the grayscale with a grayscale value of 12 is used as the left end point (the initial embedding position of the watermark information) of the original watermark information. When extracting the watermark information , It is necessary to search the above-mentioned left endpoint according to the mean value of the carrier image, the length of the watermark information, and the size of the group, and extract the watermark information in order based on the left endpoint. However, when the gray level with the gray value of 15 is searched, the bit sequence opposite to the original watermark information can be extracted, and when the gray level with the gray value of 16 is searched, the original watermark information can be extracted to the left After shifting the bit sequence, the bit value corresponding to the first nine bits of the bit sequence is: 01011010, and the last bit bit corresponds to the random bit value 0 or 1. Through comparison, it can be seen that the above-mentioned bit sequence opposite to the original watermark information and the bit sequence obtained after the original watermark information is shifted to the left have a higher degree of matching with the original watermark information, so they all have a higher degree of credibility, for example, If the original watermark information is very similar to the above-mentioned shifted watermark information, in the process of searching the left endpoint, the bit sequence obtained after the original watermark information is shifted is matched with the original watermark information, and a high credibility can be obtained. Degree of watermark information cannot guarantee the uniqueness of watermark information.
基于上述原因,在本申请实施例中,在将上述待嵌入水印信息嵌入载体对象之前,先获得上述目标导码序列,该导码序列用于对上述待嵌入水印信息进行定位。例如,待 嵌入水印信息为1010110101,目标导码序列为1100110010。Based on the foregoing reasons, in the embodiments of the present application, before embedding the above-mentioned watermark information to be embedded into the carrier object, the above-mentioned target amble sequence is obtained first, and the amble sequence is used to locate the above-mentioned watermark information to be embedded. For example, the watermark information to be embedded is 1010110101, and the target preamble sequence is 1100110010.
如图1所示,在步骤S104中,将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中。As shown in FIG. 1, in step S104, the watermark information to be embedded and the target preamble sequence are embedded into the carrier object.
在上述步骤获得待嵌入水印信息和目标导码序列之后,如图1-B所示,本步骤用于将上述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中,以获得嵌入有待嵌入水印信息和目标导码序列的目标对象。该过程具体为:将所述目标导码序列加入到所述待嵌入水印信息的前端或后端,获得目标比特序列;将所述目标比特序列嵌入到所述载体对象中,在该过程中,目标导码序列可作为上述待嵌入水印信息的唯一标识编码。例如,将上述目标导码序列1100110010加入到待嵌入水印信息1010110101的前端,所获得的目标比特序列为1100110010 1010110101,将该目标比特序列按照预定的水印信息嵌入方式嵌入到上述载体对象中。After obtaining the watermark information to be embedded and the target code sequence in the above steps, as shown in Figure 1-B, this step is used to embed the watermark information to be embedded and the target code sequence into the carrier object to obtain Embed the target object to be embedded with the watermark information and the target preamble sequence. The process specifically includes: adding the target preamble sequence to the front or back end of the watermark information to be embedded to obtain a target bit sequence; embedding the target bit sequence into the carrier object, and in this process, The target preamble sequence can be used as the unique identification code of the watermark information to be embedded. For example, adding the target code sequence 110110010 to the front end of the watermark information 1010110101 to be embedded, the obtained target bit sequence is 110110010 1010110101, and the target bit sequence is embedded into the carrier object according to a predetermined watermark information embedding method.
在本实施例中,上述载体对象可以是指单帧的载体图像或视频帧序列。In this embodiment, the aforementioned carrier object may refer to a single frame of carrier image or a sequence of video frames.
当载体对象为载体图像时,上述将所述目标比特序列嵌入到所述载体对象中的过程可以包括如下内容:When the carrier object is a carrier image, the foregoing process of embedding the target bit sequence into the carrier object may include the following content:
A,获得所述载体图像的灰度直方图。A. Obtain the grayscale histogram of the carrier image.
在本实施例中,获得载体图像的灰度直方图的过程具体为:In this embodiment, the process of obtaining the grayscale histogram of the carrier image is specifically as follows:
首先,采用如下公式对所述载体图像进行高斯滤波处理,获得所述载体图像的低频信号部分:I Low(x,y)=G(x,y,σ)*I(x,y),其中,I表示载体图像,I Low表示载体图像经过高斯滤波后得到的载体图像的低频信号部分,G表示高斯低通滤波器;对所述载体图像进行高斯滤波处理后,可使得水印信息对滤波、加噪等攻击具有很好的鲁棒性,即,在载体图像的低频信号部分嵌入水印信息,可以使得水印信息的鲁棒性更强。针对二维载体图像,高斯低通滤波器定义如下: First, the following formula is used to perform Gaussian filtering processing on the carrier image to obtain the low-frequency signal part of the carrier image: I Low (x, y) = G (x, y, σ) * I (x, y), where , I represents the carrier image, I Low represents the low-frequency signal part of the carrier image obtained after the carrier image is Gaussian filtering, and G represents the Gaussian low-pass filter; after Gaussian filtering is performed on the carrier image, the watermark information can filter, Attacks such as adding noise have good robustness, that is, embedding watermark information in the low-frequency signal part of the carrier image can make the watermark information more robust. For the two-dimensional carrier image, the Gaussian low-pass filter is defined as follows:
Figure PCTCN2020126360-appb-000003
其中,σ是高斯分布的标准差。
Figure PCTCN2020126360-appb-000003
Among them, σ is the standard deviation of the Gaussian distribution.
其次,获得所述载体图像的低频信号部分的灰度直方图,即,统计I Low的灰度直方图,灰度直方图作为图像的统计特征,其取决于图像中每个灰度级所包含的像素点的数量,与像素点的具体位置无关。灰度直方图的形状用于表示每个灰度级所包含的像素点的数量占图像的总的像素点数量的比例。当图像被几何攻击时,图像的大小和空间位置会发生相应变化,但每个灰度级所包含的像素点的数量占图像的总的像素点数量的比例 不发生变化,即,灰度值方图的形状在几何攻击下可保持稳定,因此可应用于抗几何攻击的水印算法中。 Secondly, the gray histogram of the low-frequency signal part of the carrier image is obtained, that is, the gray histogram of the statistics I Low . The gray histogram is the statistical feature of the image, which depends on the gray level contained in the image. The number of pixels has nothing to do with the specific location of the pixels. The shape of the grayscale histogram is used to indicate the ratio of the number of pixels contained in each grayscale to the total number of pixels in the image. When an image is geometrically attacked, the size and spatial position of the image will change accordingly, but the ratio of the number of pixels contained in each gray level to the total number of pixels in the image does not change, that is, the gray value The shape of the square graph can remain stable under geometric attacks, so it can be used in watermarking algorithms against geometric attacks.
B,根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图。B. Adjust the shape of the grayscale histogram according to the target bit sequence to obtain an adjusted grayscale histogram.
在本实施例中,该过程具体包括如下内容:In this embodiment, the process specifically includes the following content:
B-1,获得所述灰度直方图的目标灰度区间,该目标灰度区间用于表示上述目标比特序列的嵌入范围。获得灰度直方图的目标灰度区间的过程具体为:计算获得所述载体图像的灰度均值
Figure PCTCN2020126360-appb-000004
然后采用如下公式计算获得所述灰度直方图的目标灰度区间B:
Figure PCTCN2020126360-appb-000005
其中,正小数λ满足如下条件:B不能超过灰度直方图的表示范围,并且B满足目标比特序列的比特数量。
B-1. Obtain a target grayscale interval of the grayscale histogram, where the target grayscale interval is used to indicate the embedding range of the target bit sequence. The process of obtaining the target gray-scale interval of the gray-scale histogram is specifically: calculating and obtaining the gray-scale mean value of the carrier image
Figure PCTCN2020126360-appb-000004
Then use the following formula to calculate and obtain the target gray-scale interval B of the gray-scale histogram:
Figure PCTCN2020126360-appb-000005
Among them, the positive decimal λ satisfies the following conditions: B cannot exceed the representation range of the gray histogram, and B satisfies the number of bits of the target bit sequence.
B-2,根据所述目标比特序列的比特数量,对所述目标灰度区间进行划分,获得与所述比特数量相对应的灰度子区间,其中,每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;B-2. Divide the target gray-scale interval according to the number of bits of the target bit sequence to obtain gray-scale sub-intervals corresponding to the number of bits, wherein each gray-scale sub-interval includes at least Two adjacent gray levels, where the gray levels are used to indicate the number of pixels with the same gray value;
B-3,获得比特值对应的灰度子区间中的像素点的数量关系信息。在本实施例中,获得比特值对应的灰度子区间中的像素点的数量关系信息的过程具体为:当比特值为1时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第一比对关系;以及,当比特值为0时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第二比对关系。例如,所述比特值对应的灰度子区间中的像素点的数量关系信息为:B-3. Obtain the quantity relationship information of the pixel points in the gray sub-interval corresponding to the bit value. In this embodiment, the process of obtaining the quantity relationship information of pixels in the gray sub-interval corresponding to the bit value is specifically: when the bit value is 1, obtain two adjacent gray sub-intervals corresponding to the bit value. The ratio of the number of pixels contained in the gray level and the first comparison relationship with the predetermined embedding intensity; and, when the bit value is 0, obtain two adjacent gray sub-intervals corresponding to the bit value The second comparison relationship between the ratio of the number of pixels contained in the gray level and the predetermined embedding intensity. For example, the number relationship information of pixels in the gray-scale sub-interval corresponding to the bit value is:
Figure PCTCN2020126360-appb-000006
Figure PCTCN2020126360-appb-000006
其中,w(i)表示比特值,a和b分别表示一个所述灰度子区间中两个相邻灰度级所包含的像素点的数量,a表示灰度值较小的灰度级bin1所包含的像素点的数量,b表示的是灰度值较大的灰度级bin2所包含的像素点的数量,T表示预定的嵌入强度。Among them, w(i) represents the bit value, a and b respectively represent the number of pixels contained in two adjacent gray levels in the gray sub-interval, and a represents the gray level bin1 with a smaller gray value. The number of pixels included, b represents the number of pixels included in the gray level bin2 with a larger gray value, and T represents the predetermined embedding intensity.
B-4,根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所对应的像素点的数量进行调整,获得调整后的灰度直方图。B-4. According to the target bit sequence and the number relationship information of the pixel points in the gray sub-interval corresponding to the bit value, the pixels corresponding to at least two adjacent gray levels in the gray sub-interval Adjust the number of points to obtain the adjusted gray histogram.
在本实施例中,调整像素点的过程具体为:当所述目标比特序列的待嵌入的比特值 为1时,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合上述第一比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合上述第一比对关系,则从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;In this embodiment, the process of adjusting the pixel points is specifically: when the value of the bit to be embedded in the target bit sequence is 1, if the value of the bit to be embedded corresponds to two adjacent gray levels in the gray sub-interval The relationship between the ratio of the number of pixel points included in the level and the predetermined embedding intensity meets the above-mentioned first comparison relationship, the pixel points are not adjusted; if the two phases in the gray sub-interval corresponding to the bit value to be embedded The relationship between the ratio of the number of pixels contained in adjacent gray levels and the predetermined embedding intensity does not conform to the above-mentioned first comparison relationship, and the first comparison is selected from the pixels contained in the gray level with the larger gray value. A number of pixels are moved to a gray level with a smaller gray level;
当所述目标比特序列的待嵌入的比特值为0时,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所述第二比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第二比对关系,则从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中。When the value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is equal to the predetermined embedding value The relationship between the intensities conforms to the second comparison relationship, then the pixels are not adjusted; if the bit value to be embedded corresponds to the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval , The relationship between the predetermined embedding intensity and the predetermined embedding intensity does not meet the second comparison relationship, and the second number of pixels are selected from the pixels contained in the gray level with the smaller gray value and moved to the larger gray value In the gray scale.
例如,目标比特序列的待嵌入的比特值为1,如果a/b≥T,不需要调整像素点,如果a/b<T,从灰度级bin2所包含的像素点中选取I1个像素点移动到灰度级bin1中;所述目标比特序列的待嵌入的比特值为0,如果b/a≥T,不需要调整像素点,如果b/a<T,从灰度级bin1所包含的像素点中选取I0个像素点移动到灰度级bin2中。For example, if the value of the bit to be embedded in the target bit sequence is 1, if a/b≥T, there is no need to adjust the pixel points. If a/b<T, I1 pixel points are selected from the pixels contained in the gray level bin2 Move to the gray level bin1; the value of the bit to be embedded in the target bit sequence is 0, if b/a≥T, there is no need to adjust the pixel point, if b/a<T, from the gray level bin1 contained I0 pixel points are selected from the pixel points and moved to the gray level bin2.
其中,所述第一数量和所述第二数量,根据所述嵌入强度和所述灰度子区间中两个相邻灰度级所包含的像素点的数量计算获得,例如:Wherein, the first number and the second number are calculated according to the embedding intensity and the number of pixels contained in two adjacent gray levels in the gray sub-interval, for example:
Figure PCTCN2020126360-appb-000007
Figure PCTCN2020126360-appb-000007
在本实施例中,上述从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中,可以是指:采用随机方式从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;上述从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中,可以是指:采用随机方式从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中。例如,采用随机方式从灰度级bin2所包含的像素点中选取I1个像素点移动到灰度级bin1中,以及采用随机方式从灰度级bin1所包含的像素点中选取I0个像素点移动到灰度级bin2中。In this embodiment, the above-mentioned selection of the first number of pixels from the pixels contained in the gray level with a larger gray value to move to the gray level with a smaller gray level may refer to: adopting a random method Select the first number of pixels from the pixels contained in the gray level with the larger gray value to move to the gray level with the smaller gray level; Selecting the second number of pixels from the pixels to move to the gray level with a larger gray value can mean: randomly selecting the second number from the pixels contained in the gray level with a smaller gray value The pixel points of move to the gray level with larger gray value. For example, using a random method to select I1 pixels from the pixels contained in the gray level bin2 to move to the gray level bin1, and using a random method to select I0 pixels from the pixels contained in the gray level bin1 to move To the gray level bin2.
下图为a与b四种相对大小关系所对应的嵌入一个bit的具体调整的示意图,其中,I 1与I 0为需调整的像素点数量的最小值,(a)1<a/b<T;(b)a/b>T>1;(c)1<b/a<T;(d)b/a>T>1 The following figure is a schematic diagram of the specific adjustment of embedding a bit corresponding to the four relative sizes of a and b. Among them, I 1 and I 0 are the minimum number of pixels to be adjusted, (a)1<a/b<T;(b)a/b>T>1;(c)1<b/a<T;(d)b/a>T>1
Figure PCTCN2020126360-appb-000008
Figure PCTCN2020126360-appb-000008
所述从灰度级bin2所包含的像素点中选取I1个像素点移动到灰度级bin1中,或者,所述从灰度级bin1所包含的像素点中选取I0个像素点移动到灰度级bin2中,具体采用如下方式实现:Said selecting I1 pixel points from the pixel points included in gray level bin2 and moving to gray level bin1, or said selecting I0 pixel points from the pixel points included in gray level bin1 and moving to gray level In level bin2, it is implemented in the following way:
Figure PCTCN2020126360-appb-000009
其中,M是灰度级的宽度,f 1(i)是从bin1中选取的第i个像素,f 2(j)是从bin2中选取的第j个像素。
Figure PCTCN2020126360-appb-000009
Among them, M is the width of the gray level, f 1 (i) is the i-th pixel selected from bin1, and f 2 (j) is the j-th pixel selected from bin2.
需要说明的是,上述获得所述载体图像的低频信号部分的灰度直方图的过程还可以为如下内容:对所述载体图像的低频信号部分进行分块处理,获得分块图像,例如对载体图像的低频信号部分按照8*8进行分块;计算每个分块图像的灰度均值;根据每个分块图像的灰度均值,统计获得每个分块图像的灰度直方图,并且计算每个分块图像的均方差,分块图像的均方差可用于表示分块图像的平滑程度。所述根据所述目标导码序列对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,可以是指:对于需要调整像素点数量的灰度子区间,按照分块图像的均方差从大到小的顺序,选取预定数目的均方差较大的分块图像,根据上述目标导码序列,对均方差较大的分块图像的灰度直方图的形状进行调整,获得调整后的所述分块图像的灰度直方图。该方式可预先选择载体图像的非平滑区域进行修改,以此提高载体图像的质量。It should be noted that the above process of obtaining the gray-scale histogram of the low-frequency signal part of the carrier image may also be the following content: block the low-frequency signal part of the carrier image to obtain the block image, for example, the carrier image The low-frequency signal part of the image is divided into blocks according to 8*8; calculate the average gray value of each block image; according to the gray average value of each block image, statistically obtain the gray histogram of each block image, and calculate The mean square error of each block image, and the mean square error of the block image can be used to indicate the smoothness of the block image. The adjusting the shape of the gray-scale histogram according to the target code sequence to obtain the adjusted gray-scale histogram may refer to: for the gray-scale sub-intervals for which the number of pixels needs to be adjusted, according to the block image Select a predetermined number of block images with a larger mean square error, and adjust the shape of the grayscale histogram of the block image with a larger mean square error according to the above target code sequence to obtain The adjusted grayscale histogram of the segmented image. In this way, non-smooth areas of the carrier image can be selected in advance for modification, so as to improve the quality of the carrier image.
C,根据所述调整后的灰度直方图,对所述载体图像中像素点的灰度值进行调整,获得嵌入有所述目标比特序列的目标图像。C. Adjust the gray values of pixels in the carrier image according to the adjusted gray histogram to obtain a target image embedded with the target bit sequence.
当上述载体对象为视频帧序列时,将目标比特序列嵌入到载体对象中的过程可以包 括如下内容:When the aforementioned carrier object is a video frame sequence, the process of embedding the target bit sequence into the carrier object may include the following:
A1,获得用于表示所述目标比特序列中的比特值“0”的第一子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二子比特序列,所述第一子比特序列区别于所述第二子比特序列。A1. Obtain a first sub-bit sequence representing the bit value "0" in the target bit sequence, and obtain a second sub-bit sequence representing the bit value "1" in the target bit sequence, so The first sub-bit sequence is different from the second sub-bit sequence.
在本实施例中,上述第一子比特序列和第二子比特序列可按上述目标导码序列的方式进行设定,其目的在于,对于视频帧序列中用于嵌入该第一子比特序列或第二子比特序列的视频图像,在视频图像的检测环节,可通过目标导码序列的相关特性准确检测得到嵌入的第一子比特序列或第二子比特序列。例如,所述第一子比特序列可满足如下条件:在对所述第一子比特序列进行移位处理后,获得的移位后的比特序列与所述第一子比特序列之间的区分度大于预设区分度,即,按照第一子比特序列的排序方向对其进行正向移位或反向移位后,所获得的移位后的序列与该第一子比特序列之间的区分度大于预设区分度;所述第二子比特序列可满足如下条件:在对所述第二子比特序列进行移位处理后,获得的移位后的比特序列与所述第二子比特序列之间的区分度大于预设区分度,即,按照第二子比特序列的排序方向对其进行正向移位或反向移位后,所获得的移位后的序列与该第二子比特序列之间的区分度大于预设区分度。In this embodiment, the above-mentioned first sub-bit sequence and the second sub-bit sequence can be set in the manner of the above-mentioned target amble sequence, and the purpose is to embed the first sub-bit sequence or the second sub-bit sequence in the video frame sequence. In the video image of the second sub-bit sequence, in the detection link of the video image, the embedded first sub-bit sequence or the second sub-bit sequence can be accurately detected through the correlation characteristics of the target code sequence. For example, the first sub-bit sequence may satisfy the following condition: after the first sub-bit sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the first sub-bit sequence Greater than the preset degree of discrimination, that is, the difference between the obtained shifted sequence and the first sub-bit sequence after shifting it forward or backward according to the ordering direction of the first sub-bit sequence Degree is greater than the preset discrimination degree; the second sub-bit sequence may satisfy the following condition: after the second sub-bit sequence is shifted, the obtained shifted bit sequence is the same as the second sub-bit sequence The degree of discrimination between is greater than the preset degree of discrimination, that is, after the second sub-bit sequence is shifted forward or backward according to the ordering direction of the second sub-bit sequence, the obtained shifted sequence is compared with the second sub-bit sequence. The degree of discrimination between sequences is greater than the preset degree of discrimination.
在本实施例中,上述第一子比特序列和第二子比特序列还可按如下方式进行设定:In this embodiment, the above-mentioned first sub-bit sequence and second sub-bit sequence may also be set as follows:
所述第一子比特序列包括第一子导码序列和第一子水印信息,第一子导码序列可满足如下条件:在对所述第一子导码序列进行移位处理后,获得的移位后的比特序列与所述第一子导码序列之间的区分度大于预设区分度,即,按照第一子导码序列的排序方向对其进行正向移位或反向移位后,所获得的移位后的序列与该第一子导码序列之间的区分度大于预设区分度;所述第二子比特序列包括第二子导码序列和第二子水印信息,第二子导码序可满足如下条件:在对所述第二子导码序列进行移位处理后,获得的移位后的比特序列与所述第二子导码序列之间的区分度大于预设区分度,即,按照该第二子导码序列的排序方向对其进行正向移位或反向移位后,所获得的移位后的序列与该第二子导码序列之间的区分度大于预设区分度;其中,上述第一子水印信息区别于第二子水印信息。上述第一子导码序列与所述第二子导码序列可以为相同的比特序列,并且,上述第一子导码序列和上述第二子导码序列可以与上述目标导码序列为相同比特序列,例如,0:1100110010 1100110010;1:1100110010 0011001101。以该种方式设置第一子比特序列或第二子比特序列,在针对视频帧序列中的视频图像嵌入上述第一子比特序列或第二子比特序列时,其与上述载体图像中嵌入待嵌入水印信息和目标导码序列的方式相同, 其目的在于,对于视频帧序列中用于嵌入该第一子比特序列或第二子比特序列的单帧视频图像,可按照统一的导码序列对各载体对象(视频图像以及视频帧序列)中所嵌入的水印信息进行定位。The first sub-bit sequence includes a first sub-preamble sequence and first sub-watermark information, and the first sub-preamble sequence may satisfy the following conditions: after shifting the first sub-preamble sequence, the first sub-preamble sequence is obtained The degree of discrimination between the shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination, that is, the first sub-amble sequence is shifted forward or backward according to the ordering direction of the first sub-amble sequence Then, the degree of discrimination between the obtained shifted sequence and the first sub-amble sequence is greater than the preset degree of discrimination; the second sub-bit sequence includes a second sub-amble sequence and second sub-watermark information, The second sub-amble sequence may satisfy the following condition: after the second sub-amble sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the second sub-amble sequence is greater than The preset degree of discrimination, that is, after the second sub-amble sequence is shifted forward or backward according to the ordering direction of the second sub-amble sequence, the obtained shifted sequence is between the second sub-amble sequence The degree of discrimination is greater than the preset degree of discrimination; wherein, the above-mentioned first sub-watermark information is different from the second sub-watermark information. The first sub-preamble sequence and the second sub-preamble sequence may be the same bit sequence, and the first sub-preamble sequence and the second sub-preamble sequence may be the same bit as the target sequence. Sequence, for example, 0: 1100110010 1100110010; 1: 1100110010 0011001101. In this way, the first sub-bit sequence or the second sub-bit sequence is set. When the first sub-bit sequence or the second sub-bit sequence is embedded in the video image in the video frame sequence, it is embedded in the carrier image to be embedded. The watermark information is in the same manner as the target preamble sequence, and its purpose is that for a single frame of video image used to embed the first sub-bit sequence or the second sub-bit sequence in the video frame sequence, each can be adjusted according to a unified preamble sequence. The watermark information embedded in the carrier object (video image and video frame sequence) is located.
B1,获得所述视频帧序列中的目标视频图像,该目标视频图像指的是欲嵌入上述目标比特序列的视频图像。在本实施例中,按照所述视频帧序列的一帧视频图像中嵌入一个比特值的方式,根据所述目标比特序列所包含的比特值的数量,从所述视频帧序列中获得欲嵌入所述目标比特序列的目标视频图像。例如,目标比特序列为1100110010 1010110101,则该目标比特序列所包含的20个比特值需分别嵌入到视频帧序列的20帧视频图像中,该20帧视频图像为用于嵌入所述目标比特序列的目标视频图像。B1. Obtain a target video image in the video frame sequence, where the target video image refers to the video image to be embedded in the target bit sequence. In this embodiment, according to the manner of embedding a bit value in a frame of the video image of the video frame sequence, according to the number of bit values contained in the target bit sequence, the video frame sequence to be embedded is obtained from the video frame sequence. The target video image of the target bit sequence. For example, if the target bit sequence is 1100110010 1010110101, the 20 bit values contained in the target bit sequence need to be embedded in 20 frames of video images of the video frame sequence. The 20 frames of video images are used to embed the target bit sequence. Target video image.
C1,获得待嵌入所述目标视频图像的目标比特值。例如,当前待嵌入的目标视频图像为上述20帧目标视频图像中的第9帧图像,则待嵌入的目标比特值为1。C1: Obtain the target bit value of the target video image to be embedded. For example, if the current target video image to be embedded is the 9th frame of the above 20 target video images, the value of the target bit to be embedded is 1.
D1,将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中。例如,比特值“1”对应第二子比特序列,因此将该第二子比特序列嵌入到上述第9帧图像中。在本实施例中,该嵌入过程包括如下内容:获得所述目标视频图像的灰度直方图;根据所述用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列,对所述目标视频图像的灰度直方图的形状进行调整,获得调整后的灰度直方图;根据所述调整后的灰度直方图,对所述目标视频图像中像素点的灰度值进行调整,获得嵌入有所述第一子比特序列或所述第二子比特序列的目标视频图像。该嵌入过程的实施细节请参考上述在载体图像中嵌入目标比特序列的过程,在此不再赘述。D1, embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image. For example, the bit value "1" corresponds to the second sub-bit sequence, so the second sub-bit sequence is embedded in the 9th frame image. In this embodiment, the embedding process includes the following: obtaining a grayscale histogram of the target video image; according to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value Bit sequence, adjust the shape of the grayscale histogram of the target video image to obtain the adjusted grayscale histogram; according to the adjusted grayscale histogram, calculate the grayscale of the pixels in the target video image The degree value is adjusted to obtain a target video image embedded with the first sub-bit sequence or the second sub-bit sequence. For the implementation details of the embedding process, please refer to the above process of embedding the target bit sequence in the carrier image, which will not be repeated here.
在本实施例中,为了抵抗帧率变换攻击(例如视频帧序列从50帧变为25帧,因丢失视频图像而导致嵌入该视频帧序列的水印信息丢失),在将所述目标比特序列嵌入到所述视频帧序列的过程中,可在时间序列上重复多次嵌入,即,按照预定嵌入次数,将所述目标比特序列重复嵌入到所述视频帧序列中。例如,在将目标比特序列1100110010 1010110101嵌入视频帧序列中后,后续多次针对视频帧序列的每帧视频图像重复执行上述嵌入过程。In this embodiment, in order to resist frame rate conversion attacks (for example, the video frame sequence is changed from 50 frames to 25 frames, and the watermark information embedded in the video frame sequence is lost due to the loss of the video image), the target bit sequence is embedded In the process of the video frame sequence, embedding may be repeated multiple times in the time sequence, that is, the target bit sequence is repeatedly embedded into the video frame sequence according to a predetermined number of embedding times. For example, after embedding the target bit sequence 110110010-1010110101 in the video frame sequence, the above embedding process is repeated for each frame of the video image of the video frame sequence multiple times subsequently.
如下表所示,下表中的数值表示在水印信息的检测过程中,将输入的原始水印信息的反向水印序列与提取出的水印信息进行匹配后所获得的水印信息检测结果,本实施例提供的采用目标导码序列的水印信息嵌入方法与未采用目标导码序列的水印信息嵌入方法相比,前者所求取的水印信息的误检率明显低于后者。As shown in the following table, the values in the following table represent the watermark information detection result obtained after matching the input reverse watermark sequence of the original watermark information with the extracted watermark information in the watermark information detection process. This embodiment Compared with the provided watermark information embedding method using the target amble sequence, the watermark information embedding method obtained by the former is significantly lower than the latter.
Figure PCTCN2020126360-appb-000010
Figure PCTCN2020126360-appb-000010
因此,采用目标导码序列的水印信息嵌入方法,在水印信息的检测过程中的误检率较低,能够判断出输入的水印信息是否为嵌入载体对象中的原始水印信息。Therefore, the watermark information embedding method using the target pilot code sequence has a low false detection rate in the watermark information detection process, and it can be judged whether the input watermark information is the original watermark information embedded in the carrier object.
在本实施例中,上述目标导码序列可对应多个水印信息,即,在将多个水印信息嵌入同一个载体对象中或分别嵌入多个载体对象中时,可将同一个目标导码序列加入到上述多个水印信息的前端或后端,为上述多个水印信息分别进行定位。例如,同一类别的多个水印信息可对应一个目标导码序列,或者,根据水印信息的不同使用需求和适用场景(例如,水印信息所提供的不同的加密级别),为其匹配与该使用需求和适用场景相对应的目标导码序列。In this embodiment, the above-mentioned target preamble sequence can correspond to multiple watermark information, that is, when multiple watermark information is embedded in the same carrier object or embedded in multiple carrier objects, the same target preamble sequence can be combined It is added to the front end or the back end of the multiple watermark information to respectively locate the multiple watermark information. For example, multiple watermark information of the same category can correspond to a target code sequence, or, according to different use requirements and applicable scenarios of the watermark information (for example, the different encryption levels provided by the watermark information), match them with the use requirements The target preamble sequence corresponding to the applicable scenario.
在本实施例中,还可采用上述方式针对一个载体对象同时嵌入多个水印信息,该过程具体包括如下内容:获得载体对象,该载体对象可以为载体图像或视频帧序列;获得至少两个待嵌入水印信息,该至少两个待嵌入水印信息可以为不同类别的多个水印信息,也可以为相同类别的多个水印信息;为所述至少两个待嵌入水印信息添加不同的目标导码序列,获得至少两个目标嵌入序列,例如,针对不同类别的水印信息,可对其添加预定的与该类别的水印信息相对应的目标导码序列,其中,在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度;将所述至少两个目标嵌入序列嵌入到所述载体对象中。上述为至少两个待嵌入水印信息添加不同的目标导码序列的方式具体可以为:为所述至少两个待嵌入水印信息中的每个待嵌入水印信息分别添加预定的与该待嵌入水印信息相对应的目标导码序列。通过该方法,可在一个载体对象中嵌入多个包含定位信息(目标导码序列)的水印信息,对应的,在提取水印的过程中,可准确提取出多个水印信息,以此达到多重加密的效果。In this embodiment, the above method can also be used to simultaneously embed multiple watermark information for a carrier object. The process specifically includes the following content: obtaining a carrier object, which can be a carrier image or a sequence of video frames; obtaining at least two pending objects. Embedding watermark information, the at least two watermark information to be embedded may be multiple watermark information of different categories, or multiple watermark information of the same category; adding different target code sequences to the at least two watermark information to be embedded , To obtain at least two target embedding sequences, for example, for different types of watermark information, a predetermined target amble sequence corresponding to the type of watermark information can be added to them, wherein the target amble sequence is shifted After bit processing, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than the preset degree of discrimination; the at least two target embedding sequences are embedded in the carrier object. The foregoing manner of adding different target code sequences to the at least two watermark information to be embedded may specifically be: adding a predetermined and the watermark information to be embedded to each of the at least two watermark information to be embedded. The corresponding target preamble sequence. Through this method, multiple watermark information containing positioning information (target code sequence) can be embedded in a carrier object. Correspondingly, multiple watermark information can be accurately extracted in the process of extracting the watermark, so as to achieve multiple encryption Effect.
本实施例提供的水印信息嵌入方法,在载体对象中嵌入水印信息时,同时嵌入目标导码序列,该目标导码序列满足如下条件:在对该目标导码序列进行移位处理后,获得的移位后序列与该目标导码序列之间的区分度大于预设区分度。由于该目标导码序列在移位后与移位前的区分度较大,因此,在水印信息提取端提取水印信息时,可实现导码序列的准确匹配,可准确定位水印信息的嵌入区间,从而实现对水印信息进行精确定位。通过使用该方法,可提取出与嵌入的水印信息完全一致的水印信息,避免现有的因嵌入 的水印信息与提取出的水印信息未完全匹配而无法保证水印信息唯一性的问题。In the watermark information embedding method provided in this embodiment, when the watermark information is embedded in the carrier object, the target amble sequence is embedded at the same time, and the target amble sequence meets the following conditions: The degree of discrimination between the shifted sequence and the target preamble sequence is greater than the preset degree of discrimination. Since the target preamble sequence is more distinguishable after the shift and before the shift, when the watermark information is extracted at the watermark information extraction end, accurate matching of the preamble sequence can be achieved, and the embedding interval of the watermark information can be accurately located. So as to realize the accurate positioning of the watermark information. By using this method, the watermark information that is completely consistent with the embedded watermark information can be extracted, avoiding the existing problem that the uniqueness of the watermark information cannot be guaranteed because the embedded watermark information does not completely match the extracted watermark information.
与上述第一实施例提供的水印嵌入方法相对应,本申请第二实施例提供一种水印信息提取方法,以下结合图2进行说明。Corresponding to the watermark embedding method provided in the foregoing first embodiment, the second embodiment of the present application provides a watermark information extraction method, which is described below with reference to FIG. 2.
如图2所示,在步骤S201中,获得待检测对象。所述待检测对象可以为待检测图像或者待检测的视频帧序列。As shown in Fig. 2, in step S201, the object to be detected is obtained. The object to be detected may be an image to be detected or a sequence of video frames to be detected.
如图2所示,在步骤S202中,获得包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度。所述导码序列可设置于所述原始水印信息的前端或后端。As shown in FIG. 2, in step S202, a reference bit sequence containing a amble sequence and original watermark information is obtained, and the amble sequence satisfies the following condition: after shifting the amble sequence, the obtained shift is The degree of discrimination between the post-bit sequence and the preamble sequence is greater than the preset degree of discrimination. The amble sequence may be set at the front end or the back end of the original watermark information.
本步骤用于对待检测对象中嵌入的水印序列进行提取,具体可包括如下内容:获得所述待检测图像的灰度直方图;计算所述待检测图像的灰度均值;根据所述灰度均值,计算获得所述灰度直方图的目标灰度区间;根据预定的嵌入水印序列的比特数量,对所述目标灰度区间进行划分,获得与所述比特数量相对应的灰度子区间,每个所述灰度子区间包括至少两个相邻灰度级;获得比特值对应的提取策略;根据所述灰度子区间的至少两个相邻灰度级中像素点的数量以及所述比特值对应的提取策略,对所述待检测图像的水印序列进行提取,获得所述待检测图像中嵌入的水印序列。This step is used to extract the watermark sequence embedded in the object to be detected, and may specifically include the following content: obtaining the grayscale histogram of the image to be detected; calculating the average gray value of the image to be detected; according to the gray average value Calculate and obtain the target grayscale interval of the grayscale histogram; divide the target grayscale interval according to the predetermined number of bits embedded in the watermark sequence to obtain the grayscale subinterval corresponding to the number of bits, each Each of the gray-scale sub-intervals includes at least two adjacent gray-levels; the extraction strategy corresponding to the bit value is obtained; and the number of pixels in the at least two adjacent gray-levels of the gray-level sub-intervals and the bit The extraction strategy corresponding to the value extracts the watermark sequence of the image to be detected, and obtains the watermark sequence embedded in the image to be detected.
如图2所示,在步骤S203中,从所述待检测对象中提取出目标比特序列。As shown in FIG. 2, in step S203, a target bit sequence is extracted from the object to be detected.
在本实施例中,提取目标比特序列的方式与预定的原始水印信息和导码序列的设置方式相关,当导码序列设置于所述原始水印信息的前端时,提取目标比特序列时按照正向提取的方式进行提取,即,以所述目标比特序列的嵌入范围的起始位置作为提取所述目标比特序列的初始检测点,依次从所述待检测对象中提取出目标比特序列;当导码序列设置于所述原始水印信息的后端时,提取目标比特序列时按照反向提取的方式进行提取,即,以所述目标比特序列的嵌入范围的末尾位置作为提取所述目标比特序列的初始检测点,依次从所述待检测对象中提取出目标比特序列。In this embodiment, the method of extracting the target bit sequence is related to the predetermined original watermark information and the setting method of the amble sequence. When the amble sequence is set at the front end of the original watermark information, the target bit sequence is extracted according to the forward direction. Extraction is performed in the manner of extraction, that is, the start position of the embedding range of the target bit sequence is used as the initial detection point for extracting the target bit sequence, and the target bit sequence is sequentially extracted from the object to be detected; When the sequence is set at the back end of the original watermark information, the target bit sequence is extracted according to the reverse extraction method, that is, the end position of the embedding range of the target bit sequence is used as the initial point for extracting the target bit sequence. For detection points, the target bit sequence is sequentially extracted from the object to be detected.
在本实施例中,当待检测对象为待检测图像时,上述从所述待检测对象中提取出目标比特序列,具体包括如下内容:In this embodiment, when the object to be detected is an image to be detected, the foregoing extraction of the target bit sequence from the object to be detected specifically includes the following content:
首先,获得待检测图像的灰度直方图。First, obtain the grayscale histogram of the image to be detected.
其次,基于上述灰度直方图,从所述待检测对象中提取出目标比特序列。例如,计算所述待检测图像的灰度均值;根据所述灰度均值,计算所述灰度直方图的目标灰度区间;根据预定的嵌入到所述待检测图像中的水印序列的比特值的数量,对所述目标灰度 区间进行划分,获得与所述嵌入水印序列的比特值的数量相对应的灰度子区间,每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;获得预定的比特值提取数据;根据所述灰度子区间的至少两个相邻灰度级中像素点的数量以及所述比特值提取数据,对嵌入到所述待检测图像中的比特值分别进行提取,获得所述目标比特序列。该过程为本申请第一实施例中的在载体图像中嵌入水印信息的逆向过程,其实现方式与现有的水印信息提取过程相似,具体实施过程可参考现有的水印信息提取过程,在此不再赘述。Secondly, based on the above gray histogram, the target bit sequence is extracted from the object to be detected. For example, calculating the average gray value of the image to be detected; calculating the target grayscale interval of the grayscale histogram according to the average gray value; according to a predetermined bit value of the watermark sequence embedded in the image to be detected The target gray-scale interval is divided to obtain the gray-scale sub-intervals corresponding to the number of bit values of the embedded watermark sequence, each of the gray-scale sub-intervals includes at least two adjacent gray levels The gray level is used to represent the number of pixels with the same gray value; to obtain a predetermined bit value to extract data; according to the number of pixels in at least two adjacent gray levels in the gray sub-interval, and The bit value extracting data, respectively extracting the bit value embedded in the image to be detected, to obtain the target bit sequence. This process is the reverse process of embedding watermark information in the carrier image in the first embodiment of this application. Its implementation is similar to the existing watermark information extraction process. For the specific implementation process, please refer to the existing watermark information extraction process, here No longer.
当待检测对象为视频帧序列时,上述从所述待检测对象中提取出目标比特序列,具体包括如下内容:When the object to be detected is a video frame sequence, extracting the target bit sequence from the object to be detected above specifically includes the following content:
首先,获得用于表示所述目标比特序列中的比特值“0”的第一参考子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二参考子比特序列,所述第一参考子比特序列区别于所述第二参考子比特序列。此处的第一参考子比特序列和第二参考子比特序列的相关内容请参考上述第一实施例中的第一子比特序列和第二子比特序列,在此不再赘述。First, obtain a first reference sub-bit sequence used to represent the bit value "0" in the target bit sequence, and obtain a second reference sub-bit sequence used to represent the bit value "1" in the target bit sequence , The first reference sub-bit sequence is different from the second reference sub-bit sequence. For the relevant content of the first reference sub-bit sequence and the second reference sub-bit sequence here, please refer to the first sub-bit sequence and the second sub-bit sequence in the above-mentioned first embodiment, which will not be repeated here.
其次,从所述视频帧序列的视频图像中提取出多个目标子比特序列。嵌入有原始水印信息或导码序列的每一个视频图像均对应一个目标子比特序列,例如,针对所述视频帧序列的每一个视频帧分别提取水印信息,并利用最大选举法,对从所述待检测视频帧序列的每一个视频帧中提取的信息进行统计,最终获得与所述目标比特序列中的比特值的数量相一致的多个目标子比特序列。Secondly, multiple target sub-bit sequences are extracted from the video images of the video frame sequence. Each video image embedded with the original watermark information or amble sequence corresponds to a target sub-bit sequence. For example, for each video frame of the video frame sequence, the watermark information is extracted separately, and the maximum election method is used to determine the sub-bit sequence. The information extracted from each video frame of the video frame sequence to be detected is counted, and finally multiple target sub-bit sequences consistent with the number of bit values in the target bit sequence are obtained.
最后,将所述目标子比特序列分别与所述第一参考子比特序列和所述第二参考子比特序列进行比对,以确定所述视频帧序列的视频图像中所嵌入的比特值为“0”或“1”,并以此类推,直至提取出所述视频帧序列中嵌入的所有比特值,提取出的比特值组成目标比特序列。Finally, the target sub-bit sequence is compared with the first reference sub-bit sequence and the second reference sub-bit sequence to determine the value of the bit embedded in the video image of the video frame sequence. 0" or "1", and so on, until all the bit values embedded in the video frame sequence are extracted, and the extracted bit values constitute the target bit sequence.
需要说明的是,上述步骤S202与步骤S203的实施顺序不作限定,即,也可从所述待检测对象中提取出目标比特序列之后,再获得包含导码序列和原始水印信息的参考比特序列。It should be noted that the execution order of the above step S202 and step S203 is not limited, that is, after the target bit sequence is extracted from the object to be detected, the reference bit sequence including the amble sequence and the original watermark information can be obtained.
如图2所示,在步骤S204中,将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。例如,根据参考比特序列中导码序列设置于原始水印信息的前端或后端,采用正向匹配或反向匹配(与上述正向提取或反向提取一致)的方式将所述目标比特序列与所述参考比特序列进行匹 配。由于导码序列按其排序方向进行正向移位或反向移位后所获得的信息、与该导码序列之间的区分度大于预设区分度,因此,可实现参考比特序列与提取出的目标比特序列的精准匹配。As shown in FIG. 2, in step S204, the target bit sequence is matched with the reference bit sequence to determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected. For example, according to the amble sequence in the reference bit sequence set at the front or back end of the original watermark information, the target bit sequence is combined with the target bit sequence in a forward matching or reverse matching method (consistent with the above-mentioned forward extraction or reverse extraction). The reference bit sequence is matched. Since the information obtained after the amble sequence is shifted forward or reversely according to its sorting direction, the degree of discrimination from the amble sequence is greater than the preset degree of discrimination, therefore, the reference bit sequence and the extraction The exact match of the target bit sequence.
本实施例提供的水印信息提取方法,在提取水印信息时,可实现导码序列的准确匹配,可准确定位水印信息的嵌入区间,从而实现对水印信息进行精确定位。通过使用该方法,可提取出与嵌入的水印信息完全一致的水印信息,避免现有的因嵌入的水印信息与提取出的水印信息未完全匹配而无法保证水印信息唯一性的问题。The watermark information extraction method provided in this embodiment can achieve accurate matching of the preamble sequence when extracting the watermark information, and can accurately locate the embedding interval of the watermark information, thereby achieving accurate positioning of the watermark information. By using this method, the watermark information that is completely consistent with the embedded watermark information can be extracted, and the existing problem that the uniqueness of the watermark information cannot be guaranteed because the embedded watermark information and the extracted watermark information are not completely matched.
上述第一实施例提供了一种水印信息嵌入方法,与之相对应的,本申请第三实施例还提供了一种水印信息嵌入装置,由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关的技术特征的细节部分请参见上述提供的方法实施例的对应说明即可,下述对装置实施例的描述仅仅是示意性的。The above first embodiment provides a watermark information embedding method. Correspondingly, the third embodiment of this application also provides a watermark information embedding device. Since the device embodiment is basically similar to the method embodiment, the description is It is relatively simple. For details of related technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the device embodiment is only illustrative.
请参考图3理解该实施例,图3为本实施例提供的装置的单元框图,如图3所示,本实施例提供的装置包括:Please refer to FIG. 3 to understand this embodiment. FIG. 3 is a unit block diagram of the apparatus provided in this embodiment. As shown in FIG. 3, the apparatus provided in this embodiment includes:
载体对象获得单元301,用于获得载体对象;The carrier object obtaining unit 301 is used to obtain the carrier object;
待嵌入水印信息获得单元302,用于获得待嵌入水印信息;The to-be-embedded watermark information obtaining unit 302 is configured to obtain the to-be-embedded watermark information;
目标导码序列获得单元303,用于获得目标导码序列,所述目标导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;The target amble sequence obtaining unit 303 is configured to obtain a target amble sequence, which satisfies the following condition: after performing shift processing on the amble sequence, the obtained shifted sequence and the amble are The degree of discrimination between sequences is greater than the preset degree of discrimination;
信息嵌入单元304,用于将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中。The information embedding unit 304 is configured to embed the watermark information to be embedded and the target preamble sequence into the carrier object.
所述目标导码序列为二进制比特序列,所述将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中,包括:将所述目标导码序列加入到所述待嵌入水印信息的前端或后端,获得目标比特序列;将所述目标比特序列嵌入到所述载体对象中。The target preamble sequence is a binary bit sequence, and the embedding the watermark information to be embedded and the target preamble sequence into the carrier object includes: adding the target preamble sequence to the to be embedded The front end or the back end of the watermark information obtains a target bit sequence; and the target bit sequence is embedded in the carrier object.
所述载体对象包括载体图像,所述将所述目标比特序列嵌入到所述载体对象中,包括:获得所述载体图像的灰度直方图;根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图;根据所述调整后的灰度直方图,对所述载体图像中像素点的灰度值进行调整,获得嵌入有所述目标比特序列的目标图像。The carrier object includes a carrier image, and the embedding of the target bit sequence into the carrier object includes: obtaining a grayscale histogram of the carrier image; and calculating the grayscale histogram according to the target bit sequence The shape of the graph is adjusted to obtain an adjusted gray histogram; according to the adjusted gray histogram, the gray values of pixels in the carrier image are adjusted to obtain the target bit sequence embedded Target image.
所述根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,包括:获得所述灰度直方图的目标灰度区间;根据所述目标比特序列的比特数量,对所述目标灰度区间进行划分,获得与所述比特数量相对应的灰度子区间,其中, 每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;获得比特值对应的灰度子区间中的像素点的数量关系信息;根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所包含的像素点的数量进行调整,获得调整后的灰度直方图。The adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes: obtaining the target grayscale interval of the grayscale histogram; and according to the target bit sequence. The number of bits in the sequence is divided into the target gray-scale interval to obtain gray-scale sub-intervals corresponding to the number of bits, wherein each of the gray-scale sub-intervals includes at least two adjacent gray levels, so The gray level is used to indicate the number of pixels with the same gray value; obtain the number relationship information of the pixels in the gray sub-interval corresponding to the bit value; according to the target bit sequence and the gray corresponding to the bit value The number relationship information of the pixel points in the degree sub-interval is adjusted to the number of pixels contained in at least two adjacent gray levels of the gray-level sub-interval to obtain an adjusted gray-level histogram.
所述获得所述灰度直方图的目标灰度区间,包括:计算所述载体图像的灰度均值;基于所述灰度直方图的表示范围和所述目标比特序列的比特数量,根据所述灰度均值计算所述灰度直方图的目标灰度区间。The obtaining the target gray scale interval of the gray scale histogram includes: calculating the gray scale mean value of the carrier image; based on the representation range of the gray scale histogram and the number of bits of the target bit sequence, according to the The gray-level mean value calculates the target gray-level interval of the gray-level histogram.
所述获得比特值对应的灰度子区间中的像素点的数量关系信息,包括:当比特值为1时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第一比对关系;以及,当比特值为0时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第二比对关系;The obtaining the quantity relationship information of the pixels in the gray sub-interval corresponding to the bit value includes: when the bit value is 1, obtaining the information contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value The first comparison relationship between the ratio of the number of pixel points and the predetermined embedding intensity; and, when the bit value is 0, obtain the two adjacent gray levels contained in the gray sub-interval corresponding to the bit value The second comparison relationship between the ratio of the number of pixels and the predetermined embedding intensity;
所述根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所包含的像素点的数量进行调整,获得调整后的灰度直方图,包括:According to the target bit sequence and the number relationship information of the pixel points in the gray-scale sub-interval corresponding to the bit value, the determination of the pixel points contained in at least two adjacent gray-scale levels in the gray-scale sub-interval is Adjust the quantity to obtain the adjusted gray histogram, including:
所述目标比特序列的待嵌入的比特值为1,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所述第一比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第一比对关系,则从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;The value of the bit to be embedded in the target bit sequence is 1, if the ratio of the number of pixels contained in two adjacent gray levels in the gray subinterval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the first comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the first comparison relationship, the first number of pixels are selected from the pixels contained in the gray level with a larger gray value and moved to the gray with a smaller gray level. Degree
所述目标比特序列的待嵌入的比特值为0,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所述第二比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第二比对关系,则从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中;The value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the second comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the second comparison relationship, a second number of pixels are selected from the pixels contained in the gray level with a smaller gray value and moved to the gray with a larger gray value. Degree
其中,所述第一数量和所述第二数量,根据所述预定嵌入强度和所述灰度子区间中两个相邻灰度级所包含的像素点的数量计算获得。Wherein, the first number and the second number are calculated based on the predetermined embedding intensity and the number of pixels included in two adjacent gray levels in the gray sub-interval.
所述从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级 较小的灰度级中,包括:采用随机方式从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;The selecting the first number of pixel points from the pixel points included in the gray level with the larger gray value to move to the gray level with the smaller gray level includes: randomly selecting from the gray level with the larger gray value Select the first number of pixels from the pixels included in the gray level to move to a gray level with a smaller gray level;
所述从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中,包括:采用随机方式从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中。The selecting the second number of pixel points from the pixel points included in the gray level with the smaller gray value to move to the gray level with the larger gray value includes: adopting a random method from the smaller gray value The pixel points of the second number selected from the pixel points included in the gray level are moved to a gray level with a larger gray value.
在获得所述载体图像的灰度直方图之前,还包括:对所述载体图像进行高斯滤波处理,获得所述载体图像的低频信号部分;所述获得所述载体图像的灰度直方图,包括:获得所述载体图像的低频信号部分的灰度直方图。Before obtaining the grayscale histogram of the carrier image, the method further includes: performing Gaussian filtering processing on the carrier image to obtain the low-frequency signal part of the carrier image; and obtaining the grayscale histogram of the carrier image includes : Obtain a grayscale histogram of the low-frequency signal part of the carrier image.
所述获得所述载体图像的低频信号部分的灰度直方图,包括:对所述载体图像的低频信号部分进行分块处理,获得分块图像;计算所述分块图像的灰度均值;根据所述分块图像的灰度均值,统计获得所述分块图像的灰度直方图。The obtaining the grayscale histogram of the low-frequency signal portion of the carrier image includes: performing block processing on the low-frequency signal portion of the carrier image to obtain a block image; calculating the gray average value of the block image; The gray-level average value of the block image is statistically obtained to obtain the gray-level histogram of the block image.
还包括:计算获得所述分块图像的均方差;所述根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,包括:按照所述分块图像的均方差从大到小的顺序,选取预定数量的分块图像的灰度直方图;根据所述目标比特序列,对所述预定数量的分块图像的灰度直方图的形状进行调整,获得调整后的分块图像的灰度直方图。It also includes: calculating the mean square error of the block image; said adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram, including: according to the division Select the grayscale histograms of a predetermined number of block images in descending order of the mean square error of the block images; adjust the shape of the grayscale histograms of the predetermined number of block images according to the target bit sequence , To obtain the gray histogram of the adjusted block image.
所述载体对象包括视频帧序列,所述将所述目标比特序列嵌入到所述载体对象中,包括:获得用于表示所述目标比特序列中的比特值“0”的第一子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二子比特序列,所述第一子比特序列区别于所述第二子比特序列;获得所述视频帧序列中的目标视频图像,目标视频图像指的是欲嵌入所述目标比特序列的视频图像;获得待嵌入所述目标视频图像的目标比特值;将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中。The carrier object includes a video frame sequence, and embedding the target bit sequence into the carrier object includes: obtaining a first sub-bit sequence that is used to represent a bit value "0" in the target bit sequence, And obtaining a second sub-bit sequence for representing the bit value "1" in the target bit sequence, where the first sub-bit sequence is different from the second sub-bit sequence; and obtaining the target in the video frame sequence Video image, the target video image refers to the video image to be embedded in the target bit sequence; the target bit value of the target video image to be embedded is obtained; the first sub-bit sequence to be used to represent the target bit value Or the second sub-bit sequence is embedded in the target video image.
所述第一子比特序列满足如下条件:在对所述第一子比特序列进行移位处理后,获得的移位后的比特序列与所述第一子比特序列之间的区分度大于预设区分度;以及,所述第二子比特序列满足如下条件:在对所述第二子比特序列进行移位处理后,获得的移位后的比特序列与所述第二子比特序列之间的区分度大于预设区分度。The first sub-bit sequence satisfies the following condition: after the first sub-bit sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the first sub-bit sequence is greater than a preset Degree of discrimination; and, the second sub-bit sequence satisfies the following conditions: after the second sub-bit sequence is shifted, the obtained shifted bit sequence is between the second sub-bit sequence The degree of discrimination is greater than the preset degree of discrimination.
所述第一子比特序列包括第一子导码序列和第一子水印信息,所述第一子导码序列满足如下条件:在对所述第一子导码序列进行移位处理后,获得的移位后的比特序列与所述第一子导码序列之间的区分度大于预设区分度;以及,所述第二子比特序列包括第 二子导码序列和第二子水印信息,所述第二子导码序满足如下条件:在对所述第二子导码序列进行移位处理后,获得的移位后的比特序列与所述第二子导码序列之间的区分度大于预设区分度;其中,所述第一子水印信息区别于所述第二子水印信息。The first sub-bit sequence includes a first sub-preamble sequence and first sub-watermark information, and the first sub-preamble sequence satisfies the following condition: after performing shift processing on the first sub-preamble sequence, obtain The degree of discrimination between the shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination; and, the second sub-bit sequence includes a second sub-amble sequence and second sub-watermark information, The second sub-amble sequence satisfies the following condition: after the second sub-amble sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the second sub-amble sequence Greater than the preset discrimination degree; wherein, the first sub-watermark information is different from the second sub-watermark information.
所述第一子导码序列与所述第二子导码序列相同。The first sub-preamble sequence is the same as the second sub-preamble sequence.
所述第一子导码序列与所述目标导码序列为相同比特序列,以及所述第二子导码序列与所述目标导码序列为相同比特序列。The first sub-preamble sequence and the target preamble sequence are the same bit sequence, and the second sub-preamble sequence and the target preamble sequence are the same bit sequence.
所述获得所述视频帧序列中的目标视频图像,包括:按照所述视频帧序列的一帧视频图像中嵌入一个比特值的方式,根据所述目标比特序列所包含的比特值的数量,从所述视频帧序列中获得欲嵌入所述目标比特序列的目标视频图像。The obtaining the target video image in the video frame sequence includes: embedding a bit value in a frame of the video frame sequence of the video frame sequence, and according to the number of bit values contained in the target bit sequence, from Obtain a target video image to be embedded in the target bit sequence from the video frame sequence.
所述将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中,包括:获得所述目标视频图像的灰度直方图;根据所述用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列,对所述目标视频图像的灰度直方图的形状进行调整,获得调整后的灰度直方图;根据所述调整后的灰度直方图,对所述目标视频图像中像素点的灰度值进行调整,获得嵌入有所述第一子比特序列或所述第二子比特序列的目标视频图像。The embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image includes: obtaining a grayscale histogram of the target video image; According to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value, the shape of the grayscale histogram of the target video image is adjusted to obtain the adjusted grayscale Histogram; according to the adjusted gray histogram, adjust the gray value of the pixel in the target video image to obtain the target embedded with the first sub-bit sequence or the second sub-bit sequence Video image.
所述载体对象包括视频帧序列,所述将所述目标比特序列嵌入到所述载体对象中,包括:按照预定嵌入次数,将所述目标比特序列重复嵌入到所述视频帧序列中。The carrier object includes a video frame sequence, and the embedding of the target bit sequence into the carrier object includes: repeating the embedding of the target bit sequence into the video frame sequence according to a predetermined number of embedding times.
在上述的实施例中,提供了一种水印信息嵌入方法以及一种水印信息嵌入装置,此外,本申请第四实施例还提供一种电子设备,由于电子设备实施例基本相似于方法实施例,所以描述得比较简单,相关的技术特征的细节部分请参见上述提供的方法实施例的对应说明即可,下述对电子设备实施例的描述仅仅是示意性的。该电子设备实施例如下:In the above-mentioned embodiments, a watermark information embedding method and a watermark information embedding device are provided. In addition, the fourth embodiment of the present application also provides an electronic device. Since the electronic device embodiment is basically similar to the method embodiment, Therefore, the description is relatively simple. For details of related technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the electronic device embodiment is only illustrative. An example of the electronic device is as follows:
请参考图4理解本实施例,图4为本实施例提供的电子设备的示意图。Please refer to FIG. 4 to understand this embodiment. FIG. 4 is a schematic diagram of the electronic device provided in this embodiment.
如图4所示,所述电子设备包括:处理器401;存储器402;As shown in FIG. 4, the electronic device includes: a processor 401; a memory 402;
所述存储器402,用于存储水印信息嵌入程序,所述程序在被所述处理器读取执行时,执行如下操作:The memory 402 is configured to store a watermark information embedding program, and when the program is read and executed by the processor, the following operations are performed:
获得载体对象;Obtain the carrier object;
获得待嵌入水印信息;Obtain the watermark information to be embedded;
获得目标导码序列,所述目标导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;Obtain a target preamble sequence, the target preamble sequence satisfies the following condition: after the shift processing is performed on the preamble sequence, the degree of discrimination between the obtained shifted sequence and the preamble sequence is greater than the preset distinction degree;
将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中。Embedding the watermark information to be embedded and the target preamble sequence into the carrier object.
所述目标导码序列为二进制比特序列,所述将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中,包括:将所述目标导码序列加入到所述待嵌入水印信息的前端或后端,获得目标比特序列;将所述目标比特序列嵌入到所述载体对象中。The target preamble sequence is a binary bit sequence, and the embedding the watermark information to be embedded and the target preamble sequence into the carrier object includes: adding the target preamble sequence to the to be embedded The front end or the back end of the watermark information obtains a target bit sequence; and the target bit sequence is embedded in the carrier object.
所述载体对象包括载体图像,所述将所述目标比特序列嵌入到所述载体对象中,包括:获得所述载体图像的灰度直方图;根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图;根据所述调整后的灰度直方图,对所述载体图像中像素点的灰度值进行调整,获得嵌入有所述目标比特序列的目标图像。The carrier object includes a carrier image, and the embedding of the target bit sequence into the carrier object includes: obtaining a grayscale histogram of the carrier image; and calculating the grayscale histogram according to the target bit sequence The shape of the graph is adjusted to obtain an adjusted gray histogram; according to the adjusted gray histogram, the gray values of pixels in the carrier image are adjusted to obtain the target bit sequence embedded Target image.
所述根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,包括:获得所述灰度直方图的目标灰度区间;根据所述目标比特序列的比特数量,对所述目标灰度区间进行划分,获得与所述比特数量相对应的灰度子区间,其中,每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;获得比特值对应的灰度子区间中的像素点的数量关系信息;根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所包含的像素点的数量进行调整,获得调整后的灰度直方图。The adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes: obtaining the target grayscale interval of the grayscale histogram; and according to the target bit sequence. The number of bits in the sequence is divided into the target gray-scale interval to obtain gray-scale sub-intervals corresponding to the number of bits, wherein each of the gray-scale sub-intervals includes at least two adjacent gray levels, so The gray level is used to indicate the number of pixels with the same gray value; obtain the number relationship information of the pixels in the gray sub-interval corresponding to the bit value; according to the target bit sequence and the gray corresponding to the bit value The number relationship information of the pixel points in the degree sub-interval is adjusted to the number of pixels contained in at least two adjacent gray levels of the gray-level sub-interval to obtain an adjusted gray-level histogram.
所述获得所述灰度直方图的目标灰度区间,包括:计算所述载体图像的灰度均值;基于所述灰度直方图的表示范围和所述目标比特序列的比特数量,根据所述灰度均值计算所述灰度直方图的目标灰度区间。The obtaining the target gray scale interval of the gray scale histogram includes: calculating the gray scale mean value of the carrier image; based on the representation range of the gray scale histogram and the number of bits of the target bit sequence, according to the The gray-level mean value calculates the target gray-level interval of the gray-level histogram.
所述获得比特值对应的灰度子区间中的像素点的数量关系信息,包括:当比特值为1时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第一比对关系;以及,当比特值为0时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第二比对关系;The obtaining the quantity relationship information of the pixels in the gray sub-interval corresponding to the bit value includes: when the bit value is 1, obtaining the information contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value The first comparison relationship between the ratio of the number of pixel points and the predetermined embedding intensity; and, when the bit value is 0, obtain the two adjacent gray levels contained in the gray sub-interval corresponding to the bit value The second comparison relationship between the ratio of the number of pixels and the predetermined embedding intensity;
所述根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所包含的像素点的数量进行调整,获得调整后的灰度直方图,包括:According to the target bit sequence and the number relationship information of the pixel points in the gray-scale sub-interval corresponding to the bit value, the determination of the pixel points contained in at least two adjacent gray-scale levels in the gray-scale sub-interval is Adjust the quantity to obtain the adjusted gray histogram, including:
所述目标比特序列的待嵌入的比特值为1,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所述第一比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第一比对关系,则从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度 级较小的灰度级中;The value of the bit to be embedded in the target bit sequence is 1, if the ratio of the number of pixels contained in two adjacent gray levels in the gray subinterval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the first comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the first comparison relationship, the first number of pixels are selected from the pixels contained in the gray level with a larger gray value and moved to the gray with a smaller gray level. Degree
所述目标比特序列的待嵌入的比特值为0,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所述第二比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第二比对关系,则从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中;The value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the second comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the second comparison relationship, a second number of pixels are selected from the pixels contained in the gray level with a smaller gray value and moved to the gray with a larger gray value. Degree
其中,所述第一数量和所述第二数量,根据所述预定嵌入强度和所述灰度子区间中两个相邻灰度级所包含的像素点的数量计算获得。Wherein, the first number and the second number are calculated based on the predetermined embedding intensity and the number of pixels included in two adjacent gray levels in the gray sub-interval.
所述从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中,包括:采用随机方式从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;The selecting the first number of pixel points from the pixel points included in the gray level with the larger gray value to move to the gray level with the smaller gray level includes: randomly selecting from the gray level with the larger gray value Select the first number of pixels from the pixels included in the gray level to move to a gray level with a smaller gray level;
所述从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中,包括:采用随机方式从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中。The selecting the second number of pixel points from the pixel points included in the gray level with the smaller gray value to move to the gray level with the larger gray value includes: adopting a random method from the smaller gray value The pixel points of the second number selected from the pixel points included in the gray level are moved to a gray level with a larger gray value.
在获得所述载体图像的灰度直方图之前,还包括:对所述载体图像进行高斯滤波处理,获得所述载体图像的低频信号部分;所述获得所述载体图像的灰度直方图,包括:获得所述载体图像的低频信号部分的灰度直方图。Before obtaining the grayscale histogram of the carrier image, the method further includes: performing Gaussian filtering processing on the carrier image to obtain the low-frequency signal part of the carrier image; and obtaining the grayscale histogram of the carrier image includes : Obtain a grayscale histogram of the low-frequency signal part of the carrier image.
所述获得所述载体图像的低频信号部分的灰度直方图,包括:对所述载体图像的低频信号部分进行分块处理,获得分块图像;计算所述分块图像的灰度均值;根据所述分块图像的灰度均值,统计获得所述分块图像的灰度直方图。The obtaining the grayscale histogram of the low-frequency signal portion of the carrier image includes: performing block processing on the low-frequency signal portion of the carrier image to obtain a block image; calculating the gray average value of the block image; The gray-level average value of the block image is statistically obtained to obtain the gray-level histogram of the block image.
还包括:计算获得所述分块图像的均方差;所述根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,包括:按照所述分块图像的均方差从大到小的顺序,选取预定数量的分块图像的灰度直方图;根据所述目标比特序列,对所述预定数量的分块图像的灰度直方图的形状进行调整,获得调整后的分块图像的灰度直方图。It also includes: calculating the mean square error of the block image; said adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram, including: according to the division Select the grayscale histograms of a predetermined number of block images in descending order of the mean square error of the block images; adjust the shape of the grayscale histograms of the predetermined number of block images according to the target bit sequence , To obtain the gray histogram of the adjusted block image.
所述载体对象包括视频帧序列,所述将所述目标比特序列嵌入到所述载体对象中,包括:获得用于表示所述目标比特序列中的比特值“0”的第一子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二子比特序列,所述第一子比特序列区别于所述第二子比特序列;获得所述视频帧序列中的目标视频图像,目标视频图像指的是 欲嵌入所述目标比特序列的视频图像;获得待嵌入所述目标视频图像的目标比特值;将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中。The carrier object includes a video frame sequence, and embedding the target bit sequence into the carrier object includes: obtaining a first sub-bit sequence that is used to represent a bit value "0" in the target bit sequence, And obtaining a second sub-bit sequence for representing the bit value "1" in the target bit sequence, where the first sub-bit sequence is different from the second sub-bit sequence; and obtaining the target in the video frame sequence Video image, the target video image refers to the video image to be embedded in the target bit sequence; the target bit value of the target video image to be embedded is obtained; the first sub-bit sequence to be used to represent the target bit value Or the second sub-bit sequence is embedded in the target video image.
所述第一子比特序列满足如下条件:在对所述第一子比特序列进行移位处理后,获得的移位后的比特序列与所述第一子比特序列之间的区分度大于预设区分度;以及,所述第二子比特序列满足如下条件:在对所述第二子比特序列进行移位处理后,获得的移位后的比特序列与所述第二子比特序列之间的区分度大于预设区分度。The first sub-bit sequence satisfies the following condition: after the first sub-bit sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the first sub-bit sequence is greater than a preset Degree of discrimination; and, the second sub-bit sequence satisfies the following conditions: after the second sub-bit sequence is shifted, the obtained shifted bit sequence is between the second sub-bit sequence The degree of discrimination is greater than the preset degree of discrimination.
所述第一子比特序列包括第一子导码序列和第一子水印信息,所述第一子导码序列满足如下条件:在对所述第一子导码序列进行移位处理后,获得的移位后的比特序列与所述第一子导码序列之间的区分度大于预设区分度;以及,所述第二子比特序列包括第二子导码序列和第二子水印信息,所述第二子导码序满足如下条件:在对所述第二子导码序列进行移位处理后,获得的移位后的比特序列与所述第二子导码序列之间的区分度大于预设区分度;其中,所述第一子水印信息区别于所述第二子水印信息。The first sub-bit sequence includes a first sub-preamble sequence and first sub-watermark information, and the first sub-preamble sequence satisfies the following condition: after performing shift processing on the first sub-preamble sequence, obtain The degree of discrimination between the shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination; and, the second sub-bit sequence includes a second sub-amble sequence and second sub-watermark information, The second sub-amble sequence satisfies the following condition: after the second sub-amble sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the second sub-amble sequence Greater than the preset discrimination degree; wherein, the first sub-watermark information is different from the second sub-watermark information.
所述第一子导码序列与所述第二子导码序列相同。The first sub-preamble sequence is the same as the second sub-preamble sequence.
所述第一子导码序列与所述目标导码序列为相同比特序列,以及所述第二子导码序列与所述目标导码序列为相同比特序列。The first sub-preamble sequence and the target preamble sequence are the same bit sequence, and the second sub-preamble sequence and the target preamble sequence are the same bit sequence.
所述获得所述视频帧序列中的目标视频图像,包括:按照所述视频帧序列的一帧视频图像中嵌入一个比特值的方式,根据所述目标比特序列所包含的比特值的数量,从所述视频帧序列中获得欲嵌入所述目标比特序列的目标视频图像。The obtaining the target video image in the video frame sequence includes: embedding a bit value in a frame of the video frame sequence of the video frame sequence, and according to the number of bit values contained in the target bit sequence, from Obtain a target video image to be embedded in the target bit sequence from the video frame sequence.
所述将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中,包括:获得所述目标视频图像的灰度直方图;根据所述用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列,对所述目标视频图像的灰度直方图的形状进行调整,获得调整后的灰度直方图;根据所述调整后的灰度直方图,对所述目标视频图像中像素点的灰度值进行调整,获得嵌入有所述第一子比特序列或所述第二子比特序列的目标视频图像。The embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image includes: obtaining a grayscale histogram of the target video image; According to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value, the shape of the grayscale histogram of the target video image is adjusted to obtain the adjusted grayscale Histogram; according to the adjusted gray histogram, adjust the gray value of the pixel in the target video image to obtain the target embedded with the first sub-bit sequence or the second sub-bit sequence Video image.
所述载体对象包括视频帧序列,所述将所述目标比特序列嵌入到所述载体对象中,包括:按照预定嵌入次数,将所述目标比特序列重复嵌入到所述视频帧序列中。The carrier object includes a video frame sequence, and the embedding of the target bit sequence into the carrier object includes: repeating the embedding of the target bit sequence into the video frame sequence according to a predetermined number of embedding times.
上述第二实施例提供了一种水印信息提取方法,与之相对应的,本申请第五实施例还提供了一种水印信息提取装置,由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关的技术特征的细节部分请参见上述提供的方法实施例的对应说明即可, 下述对装置实施例的描述仅仅是示意性的。The above-mentioned second embodiment provides a watermark information extraction method. Correspondingly, the fifth embodiment of the present application also provides a watermark information extraction device. Since the device embodiment is basically similar to the method embodiment, the description is as follows: It is relatively simple. For details of related technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the device embodiment is only illustrative.
请参考图5理解该实施例,图5为本实施例提供的装置的单元框图,如图5所示,本实施例提供的装置包括:Please refer to FIG. 5 to understand this embodiment. FIG. 5 is a unit block diagram of the apparatus provided in this embodiment. As shown in FIG. 5, the apparatus provided in this embodiment includes:
待检测对象获得单元501,用于获得待检测对象;The object to be detected obtaining unit 501 is configured to obtain the object to be detected;
参考比特序列获得单元502,用于获得预设的包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;The reference bit sequence obtaining unit 502 is configured to obtain a preset reference bit sequence containing a amble sequence and original watermark information, where the amble sequence satisfies the following conditions: the amble sequence is obtained after shifting the amble sequence The degree of discrimination between the shifted sequence and the preamble sequence is greater than the preset degree of discrimination;
目标比特序列提取单元503,用于从所述待检测对象中提取出目标比特序列;The target bit sequence extraction unit 503 is configured to extract a target bit sequence from the object to be detected;
信息匹配单元504,用于将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。The information matching unit 504 is configured to match the target bit sequence with the reference bit sequence, and determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
所述导码序列设置于所述原始水印信息的前端,所述从所述待检测对象中提取出目标比特序列,包括:以所述目标比特序列的嵌入范围的起始位置作为提取所述目标比特序列的初始检测点,从待检测对象中提取出目标比特序列。The preamble sequence is set at the front end of the original watermark information, and the extraction of the target bit sequence from the object to be detected includes: taking the start position of the embedding range of the target bit sequence as the extraction target The initial detection point of the bit sequence extracts the target bit sequence from the object to be detected.
所述导码序列设置于所述原始水印信息的后端,所述从所述待检测对象中提取出目标比特序列,包括:以所述目标比特序列的嵌入范围的末尾位置作为提取所述目标比特序列的初始检测点,从待检测对象中提取出目标比特序列。The preamble sequence is set at the back end of the original watermark information, and the extracting the target bit sequence from the object to be detected includes: taking the end position of the embedding range of the target bit sequence as the extracting target The initial detection point of the bit sequence extracts the target bit sequence from the object to be detected.
所述待检测对象包括待检测图像,所述从所述待检测对象中提取出目标水印序列,包括:获得所述待检测图像的灰度直方图;基于所述灰度直方图,从所述待检测对象中提取出目标水印序列。The object to be detected includes an image to be detected, and extracting a target watermark sequence from the object to be detected includes: obtaining a grayscale histogram of the image to be detected; The target watermark sequence is extracted from the object to be detected.
所述待检测对象包括视频帧序列,所述从所述待检测对象中提取出目标水印序列,包括:获得用于表示所述目标比特序列中的比特值“0”的第一参考子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二参考子比特序列,所述第一参考子比特序列区别于所述第二参考子比特序列;从所述视频帧序列的视频图像中提取出多个目标子比特序列;将所述目标子比特序列分别与所述第一参考子比特序列和所述第二参考子比特序列进行比对,以确定所述视频帧序列的视频图像中所嵌入的比特值为“0”或“1”。The object to be detected includes a sequence of video frames, and extracting a target watermark sequence from the object to be detected includes: obtaining a first reference sub-bit sequence for representing a bit value "0" in the target bit sequence , And obtaining a second reference sub-bit sequence used to represent the bit value "1" in the target bit sequence, where the first reference sub-bit sequence is different from the second reference sub-bit sequence; from the video frame A plurality of target sub-bit sequences are extracted from the sequence of video images; the target sub-bit sequence is compared with the first reference sub-bit sequence and the second reference sub-bit sequence, respectively, to determine the video frame The value of the bit embedded in the video image of the sequence is "0" or "1".
所述基于所述灰度直方图,从所述待检测对象中提取出目标水印序列,包括:计算所述待检测图像的灰度均值;根据所述灰度均值,计算所述灰度直方图的目标灰度区间;根据预定的嵌入到所述待检测图像中的水印序列的比特值的数量,对所述目标灰度区间进行划分,获得与所述嵌入水印序列的比特值的数量相对应的灰度子区间,每个所述灰 度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;获得预定的比特值提取数据;根据所述灰度子区间的至少两个相邻灰度级中像素点的数量以及所述比特值提取数据,对嵌入到所述待检测图像中的比特值分别进行提取,获得所述目标比特序列。The extracting the target watermark sequence from the object to be detected based on the gray level histogram includes: calculating the gray level average value of the image to be detected; calculating the gray level histogram according to the gray level average value The target gray-scale interval; according to the predetermined number of bit values of the watermark sequence embedded in the image to be detected, the target gray-scale interval is divided to obtain a number corresponding to the number of bit values of the embedded watermark sequence Each of the gray-scale sub-intervals includes at least two adjacent gray-scale levels, and the gray-scale levels are used to indicate the number of pixels with the same gray-scale value; obtaining predetermined bit values to extract data According to the number of pixels in at least two adjacent gray levels of the gray sub-interval and the bit value extraction data, the bit values embedded in the image to be detected are extracted respectively to obtain the target Bit sequence.
在上述的实施例中,提供了一种水印信息提取方法以及一种水印信息提取装置,此外,本申请第六实施例还提供一种电子设备,由于电子设备实施例基本相似于方法实施例,所以描述得比较简单,相关的技术特征的细节部分请参见上述提供的方法实施例的对应说明即可,下述对电子设备实施例的描述仅仅是示意性的。该电子设备实施例如下:In the above-mentioned embodiments, a method for extracting watermark information and a device for extracting watermark information are provided. In addition, the sixth embodiment of the present application also provides an electronic device. Since the electronic device embodiment is basically similar to the method embodiment, Therefore, the description is relatively simple. For details of related technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the electronic device embodiment is only illustrative. An example of the electronic device is as follows:
请参考图6理解本实施例,图6为本实施例提供的电子设备的示意图。Please refer to FIG. 6 to understand this embodiment. FIG. 6 is a schematic diagram of the electronic device provided in this embodiment.
如图6所示,所述电子设备包括:处理器601;存储器602;As shown in FIG. 6, the electronic device includes: a processor 601; a memory 602;
所述存储器602,用于存储水印信息提取程序,所述程序在被所述处理器读取执行时,执行如下操作:The memory 602 is configured to store a watermark information extraction program, and when the program is read and executed by the processor, the following operations are performed:
获得待检测对象;Obtain the object to be detected;
获得包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;Obtain a reference bit sequence containing a amble sequence and original watermark information, where the amble sequence satisfies the following conditions: after the amble sequence is shifted, the obtained shifted sequence is between the sequence and the amble sequence The degree of discrimination is greater than the preset degree of discrimination;
从所述待检测对象中提取出目标比特序列;Extracting a target bit sequence from the object to be detected;
将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。The target bit sequence is matched with the reference bit sequence, and it is determined whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
所述导码序列设置于所述原始水印信息的前端,所述从所述待检测对象中提取出目标比特序列,包括:以所述目标比特序列的嵌入范围的起始位置作为提取所述目标比特序列的初始检测点,从待检测对象中提取出目标比特序列。The preamble sequence is set at the front end of the original watermark information, and the extraction of the target bit sequence from the object to be detected includes: taking the start position of the embedding range of the target bit sequence as the extraction target The initial detection point of the bit sequence extracts the target bit sequence from the object to be detected.
所述导码序列设置于所述原始水印信息的后端,所述从所述待检测对象中提取出目标比特序列,包括:以所述目标比特序列的嵌入范围的末尾位置作为提取所述目标比特序列的初始检测点,从待检测对象中提取出目标比特序列。The preamble sequence is set at the back end of the original watermark information, and the extracting the target bit sequence from the object to be detected includes: taking the end position of the embedding range of the target bit sequence as the extracting target The initial detection point of the bit sequence extracts the target bit sequence from the object to be detected.
所述待检测对象包括待检测图像,所述从所述待检测对象中提取出目标水印序列,包括:获得所述待检测图像的灰度直方图;基于所述灰度直方图,从所述待检测对象中提取出目标水印序列。The object to be detected includes an image to be detected, and extracting a target watermark sequence from the object to be detected includes: obtaining a grayscale histogram of the image to be detected; The target watermark sequence is extracted from the object to be detected.
所述待检测对象包括视频帧序列,所述从所述待检测对象中提取出目标水印序列,包括:获得用于表示所述目标比特序列中的比特值“0”的第一参考子比特序列,以及获 得用于表示所述目标比特序列中的比特值“1”的第二参考子比特序列,所述第一参考子比特序列区别于所述第二参考子比特序列;从所述视频帧序列的视频图像中提取出多个目标子比特序列;将所述目标子比特序列分别与所述第一参考子比特序列和所述第二参考子比特序列进行比对,以确定所述视频帧序列的视频图像中所嵌入的比特值为“0”或“1”。The object to be detected includes a sequence of video frames, and extracting a target watermark sequence from the object to be detected includes: obtaining a first reference sub-bit sequence for representing a bit value "0" in the target bit sequence , And obtaining a second reference sub-bit sequence used to represent the bit value "1" in the target bit sequence, where the first reference sub-bit sequence is different from the second reference sub-bit sequence; from the video frame A plurality of target sub-bit sequences are extracted from the sequence of video images; the target sub-bit sequence is compared with the first reference sub-bit sequence and the second reference sub-bit sequence, respectively, to determine the video frame The value of the bit embedded in the video image of the sequence is "0" or "1".
所述基于所述灰度直方图,从所述待检测对象中提取出目标水印序列,包括:计算所述待检测图像的灰度均值;根据所述灰度均值,计算所述灰度直方图的目标灰度区间;根据预定的嵌入到所述待检测图像中的水印序列的比特值的数量,对所述目标灰度区间进行划分,获得与所述嵌入水印序列的比特值的数量相对应的灰度子区间,每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;获得预定的比特值提取数据;根据所述灰度子区间的至少两个相邻灰度级中像素点的数量以及所述比特值提取数据,对嵌入到所述待检测图像中的比特值分别进行提取,获得所述目标比特序列。The extracting the target watermark sequence from the object to be detected based on the gray level histogram includes: calculating the gray level average value of the image to be detected; calculating the gray level histogram according to the gray level average value The target gray-scale interval; according to the predetermined number of bit values of the watermark sequence embedded in the image to be detected, the target gray-scale interval is divided to obtain a number corresponding to the number of bit values of the embedded watermark sequence Each of the gray-scale sub-intervals includes at least two adjacent gray-scale levels, and the gray-scale levels are used to indicate the number of pixels with the same gray-scale value; obtaining predetermined bit values to extract data According to the number of pixels in at least two adjacent gray levels of the gray sub-interval and the bit value extraction data, the bit values embedded in the image to be detected are extracted respectively to obtain the target Bit sequence.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent 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 computer readable media.
1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。1. Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, 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, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include non-transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可 用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。Although this application is disclosed as above in preferred embodiments, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, this application The scope of protection shall be subject to the scope defined by the claims of this application.

Claims (30)

  1. 一种水印信息嵌入方法,其特征在于,包括:A method for embedding watermark information, which is characterized in that it comprises:
    获得载体对象;Obtain the carrier object;
    获得待嵌入水印信息;Obtain the watermark information to be embedded;
    获得目标导码序列;Obtain the target preamble sequence;
    将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中;Embedding the watermark information to be embedded and the target preamble sequence into the carrier object;
    其中,所述目标导码序列满足如下条件:在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度。Wherein, the target preamble sequence satisfies the following condition: after performing shift processing on the target preamble sequence, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than the preset degree of discrimination.
  2. 根据权利要求1所述的方法,其特征在于,所述目标导码序列为二进制比特序列,所述将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中,包括:The method according to claim 1, wherein the target amble sequence is a binary bit sequence, and the embedding the watermark information to be embedded and the target amble sequence into the carrier object comprises:
    将所述目标导码序列加入到所述待嵌入水印信息的前端或后端,获得目标比特序列;Adding the target preamble sequence to the front end or the back end of the watermark information to be embedded to obtain a target bit sequence;
    将所述目标比特序列嵌入到所述载体对象中。The target bit sequence is embedded in the carrier object.
  3. 根据权利要求2所述的方法,其特征在于,所述载体对象包括载体图像,所述将所述目标比特序列嵌入到所述载体对象中,包括:The method according to claim 2, wherein the carrier object comprises a carrier image, and the embedding of the target bit sequence into the carrier object comprises:
    获得所述载体图像的灰度直方图;Obtaining a grayscale histogram of the carrier image;
    根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图;Adjusting the shape of the grayscale histogram according to the target bit sequence to obtain an adjusted grayscale histogram;
    根据所述调整后的灰度直方图,对所述载体图像中像素点的灰度值进行调整,获得嵌入有所述目标比特序列的目标图像。According to the adjusted gray histogram, the gray values of the pixels in the carrier image are adjusted to obtain the target image embedded with the target bit sequence.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,包括:The method according to claim 3, wherein the adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram comprises:
    获得所述灰度直方图的目标灰度区间;Obtaining the target gray-scale interval of the gray-scale histogram;
    根据所述目标比特序列的比特数量,对所述目标灰度区间进行划分,获得与所述比特数量相对应的灰度子区间,其中,每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;According to the number of bits in the target bit sequence, the target gray-scale interval is divided to obtain gray-scale sub-intervals corresponding to the number of bits, wherein each gray-scale sub-interval includes at least two adjacent gray-scale sub-intervals. Gray level, the gray level is used to indicate the number of pixels with the same gray value;
    获得比特值对应的灰度子区间中的像素点的数量关系信息;Obtain the number relationship information of the pixel points in the gray sub-interval corresponding to the bit value;
    根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所包含的像素点的数量进行调整,获得调整后的灰度直方图。According to the target bit sequence and the number of pixels in the gray sub-interval corresponding to the bit value, the number of pixels contained in at least two adjacent gray levels in the gray sub-interval is performed Adjust to obtain the adjusted gray histogram.
  5. 根据权利要求4所述的方法,其特征在于,所述获得所述灰度直方图的目标灰度区间,包括:The method according to claim 4, wherein the obtaining the target gray scale interval of the gray scale histogram comprises:
    计算所述载体图像的灰度均值;Calculating the average gray value of the carrier image;
    基于所述灰度直方图的表示范围和所述目标比特序列的比特数量,根据所述灰度均值计算所述灰度直方图的目标灰度区间。Based on the representation range of the grayscale histogram and the number of bits of the target bit sequence, the target grayscale interval of the grayscale histogram is calculated according to the grayscale mean value.
  6. 根据权利要求4所述的方法,其特征在于,所述获得比特值对应的灰度子区间中的像素点的数量关系信息,包括:The method according to claim 4, wherein the obtaining the quantity relationship information of pixels in the gray-scale sub-interval corresponding to the bit value comprises:
    当比特值为1时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第一比对关系;以及When the bit value is 1, obtaining the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value and the first comparison relationship with the predetermined embedding intensity; and
    当比特值为0时,获得该比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的第二比对关系;When the bit value is 0, obtain the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value and the second comparison relationship between the predetermined embedding intensity;
    所述根据所述目标比特序列和所述比特值对应的灰度子区间中的像素点的数量关系信息,对所述灰度子区间的至少两个相邻灰度级所包含的像素点的数量进行调整,获得调整后的灰度直方图,包括:According to the target bit sequence and the number relationship information of the pixel points in the gray-scale sub-interval corresponding to the bit value, the determination of the pixel points contained in at least two adjacent gray-scale levels in the gray-scale sub-interval is Adjust the quantity to obtain the adjusted gray histogram, including:
    所述目标比特序列的待嵌入的比特值为1,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所述第一比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第一比对关系,则从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;The value of the bit to be embedded in the target bit sequence is 1, if the ratio of the number of pixels contained in two adjacent gray levels in the gray subinterval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the first comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the first comparison relationship, the first number of pixels are selected from the pixels contained in the gray level with a larger gray value and moved to the gray with a smaller gray level. Degree
    所述目标比特序列的待嵌入的比特值为0,如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系符合所述第二比对关系,则不调整像素点;如果该待嵌入的比特值对应的灰度子区间中两个相邻灰度级所包含的像素点的数量的比值、与预定嵌入强度之间的关系不符合所述第二比对关系,则从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中;The value of the bit to be embedded in the target bit sequence is 0, if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded is less than the predetermined embedding intensity The relationship between the two is consistent with the second comparison relationship, then the pixels are not adjusted; if the ratio of the number of pixels contained in two adjacent gray levels in the gray sub-interval corresponding to the bit value to be embedded, and If the relationship between the predetermined embedding intensities does not conform to the second comparison relationship, a second number of pixels are selected from the pixels contained in the gray level with a smaller gray value and moved to the gray with a larger gray value. Degree
    其中,所述第一数量和所述第二数量,根据所述预定嵌入强度和所述灰度子区间中两个相邻灰度级所包含的像素点的数量计算获得。Wherein, the first number and the second number are calculated based on the predetermined embedding intensity and the number of pixels included in two adjacent gray levels in the gray sub-interval.
  7. 根据权利要求6所述的方法,其特征在于,所述从灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中,包括:采用随机方式从 灰度值较大的灰度级所包含的像素点中选取第一数量的像素点移动到灰度级较小的灰度级中;The method according to claim 6, wherein said selecting a first number of pixel points from the pixel points contained in a gray level with a larger gray value and moving to a gray level with a smaller gray level , Including: using a random method to select a first number of pixel points from the pixel points contained in a gray level with a larger gray value to move to a gray level with a smaller gray level;
    所述从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中,包括:采用随机方式从灰度值较小的灰度级所包含的像素点中选取第二数量的像素点移动到灰度值较大的灰度级中。The selecting the second number of pixel points from the pixel points included in the gray level with the smaller gray value to move to the gray level with the larger gray value includes: adopting a random method from the smaller gray value The pixel points of the second number selected from the pixel points included in the gray level are moved to a gray level with a larger gray value.
  8. 根据权利要求2所述的方法,其特征在于,在获得所述载体图像的灰度直方图之前,还包括:对所述载体图像进行高斯滤波处理,获得所述载体图像的低频信号部分;The method according to claim 2, wherein before obtaining the grayscale histogram of the carrier image, the method further comprises: performing Gaussian filtering processing on the carrier image to obtain the low-frequency signal part of the carrier image;
    所述获得所述载体图像的灰度直方图,包括:The obtaining the grayscale histogram of the carrier image includes:
    获得所述载体图像的低频信号部分的灰度直方图。A gray histogram of the low-frequency signal part of the carrier image is obtained.
  9. 根据权利要求8所述的方法,其特征在于,所述获得所述载体图像的低频信号部分的灰度直方图,包括:8. The method according to claim 8, wherein the obtaining a grayscale histogram of the low-frequency signal part of the carrier image comprises:
    对所述载体图像的低频信号部分进行分块处理,获得分块图像;Performing block processing on the low-frequency signal part of the carrier image to obtain a block image;
    计算所述分块图像的灰度均值;Calculating the average gray value of the segmented image;
    根据所述分块图像的灰度均值,统计获得所述分块图像的灰度直方图。According to the average gray value of the block image, the gray scale histogram of the block image is statistically obtained.
  10. 根据权利要求9所述的方法,其特征在于,还包括:计算获得所述分块图像的均方差;The method according to claim 9, further comprising: calculating the mean square error of the block image;
    所述根据所述目标比特序列,对所述灰度直方图的形状进行调整,获得调整后的灰度直方图,包括:The adjusting the shape of the grayscale histogram according to the target bit sequence to obtain the adjusted grayscale histogram includes:
    按照所述分块图像的均方差从大到小的顺序,选取预定数量的分块图像的灰度直方图;Selecting a predetermined number of grayscale histograms of the block images according to the order of the mean square error of the block images from large to small;
    根据所述目标比特序列,对所述预定数量的分块图像的灰度直方图的形状进行调整,获得调整后的分块图像的灰度直方图。According to the target bit sequence, the shape of the grayscale histogram of the predetermined number of block images is adjusted to obtain the adjusted grayscale histogram of the block image.
  11. 根据权利要求2所述的方法,其特征在于,所述载体对象包括视频帧序列,所述将所述目标比特序列嵌入到所述载体对象中,包括:The method according to claim 2, wherein the carrier object comprises a video frame sequence, and the embedding of the target bit sequence into the carrier object comprises:
    获得用于表示所述目标比特序列中的比特值“0”的第一子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二子比特序列,所述第一子比特序列区别于所述第二子比特序列;Obtain a first sub-bit sequence representing the bit value "0" in the target bit sequence, and obtain a second sub-bit sequence representing the bit value "1" in the target bit sequence, the first A sub-bit sequence is different from the second sub-bit sequence;
    获得所述视频帧序列中的目标视频图像,所述目标视频图像指的是欲嵌入所述目标比特序列的视频图像;Obtaining a target video image in the video frame sequence, where the target video image refers to a video image to be embedded in the target bit sequence;
    获得待嵌入所述目标视频图像的目标比特值;Obtaining the target bit value of the target video image to be embedded;
    将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中。Embedding the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value into the target video image.
  12. 根据权利要求11所述的方法,其特征在于,所述第一子比特序列满足如下条件:在对所述第一子比特序列进行移位处理后,获得的移位后的比特序列与所述第一子比特序列之间的区分度大于预设区分度;以及,所述第二子比特序列满足如下条件:在对所述第二子比特序列进行移位处理后,获得的移位后的比特序列与所述第二子比特序列之间的区分度大于预设区分度。The method according to claim 11, wherein the first sub-bit sequence satisfies the following condition: after the first sub-bit sequence is shifted, the obtained shifted bit sequence is the same as the The degree of discrimination between the first sub-bit sequence is greater than the preset degree of discrimination; and, the second sub-bit sequence satisfies the following condition: after shifting the second sub-bit sequence, the obtained shifted The degree of discrimination between the bit sequence and the second sub-bit sequence is greater than the preset degree of discrimination.
  13. 根据权利要求11所述的方法,其特征在于,所述第一子比特序列包括第一子导码序列和第一子水印信息,所述第一子导码序列满足如下条件:在对所述第一子导码序列进行移位处理后,获得的移位后的比特序列与所述第一子导码序列之间的区分度大于预设区分度;以及,所述第二子比特序列包括第二子导码序列和第二子水印信息,所述第二子导码序满足如下条件:在对所述第二子导码序列进行移位处理后,获得的移位后的比特序列与所述第二子导码序列之间的区分度大于预设区分度;其中,所述第一子水印信息区别于所述第二子水印信息。The method according to claim 11, wherein the first sub-bit sequence includes a first sub-amble sequence and first sub-watermark information, and the first sub-amble sequence satisfies the following conditions: After the first sub-amble sequence is shifted, the degree of discrimination between the obtained shifted bit sequence and the first sub-amble sequence is greater than the preset degree of discrimination; and, the second sub-bit sequence includes The second sub-preamble sequence and the second sub-watermark information, the second sub-preamble sequence satisfies the following condition: after the second sub-preamble sequence is shifted, the obtained shifted bit sequence and The degree of discrimination between the second sub-amble sequences is greater than the preset degree of discrimination; wherein, the first sub-watermark information is different from the second sub-watermark information.
  14. 根据权利要求13所述的方法,其特征在于,所述第一子导码序列与所述第二子导码序列相同。The method according to claim 13, wherein the first sub-preamble sequence is the same as the second sub-preamble sequence.
  15. 根据权利要求13所述的方法,其特征在于,所述第一子导码序列与所述目标导码序列为相同比特序列,以及所述第二子导码序列与所述目标导码序列为相同比特序列。The method according to claim 13, wherein the first sub-preamble sequence and the target preamble sequence are the same bit sequence, and the second sub-preamble sequence and the target preamble sequence are The same bit sequence.
  16. 根据权利要求11所述的方法,其特征在于,所述获得所述视频帧序列中的目标视频图像,包括:The method according to claim 11, wherein said obtaining the target video image in the sequence of video frames comprises:
    按照所述视频帧序列的一帧视频图像中嵌入一个比特值的方式,根据所述目标比特序列所包含的比特值的数量,从所述视频帧序列中获得欲嵌入所述目标比特序列的目标视频图像。According to the manner of embedding a bit value in one frame of video image of the video frame sequence, according to the number of bit values contained in the target bit sequence, obtain the target to be embedded in the target bit sequence from the video frame sequence Video image.
  17. 根据权利要求11-15中任一项所述的方法,其特征在于,所述将用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列嵌入到所述目标视频图像中,包括:The method according to any one of claims 11-15, wherein the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value is embedded in the The target video image includes:
    获得所述目标视频图像的灰度直方图;Obtaining a grayscale histogram of the target video image;
    根据所述用于表示所述目标比特值的所述第一子比特序列或所述第二子比特序列,对所述目标视频图像的灰度直方图的形状进行调整,获得调整后的灰度直方图;According to the first sub-bit sequence or the second sub-bit sequence used to represent the target bit value, the shape of the grayscale histogram of the target video image is adjusted to obtain the adjusted grayscale Histogram
    根据所述调整后的灰度直方图,对所述目标视频图像中像素点的灰度值进行调整,获得嵌入有所述第一子比特序列或所述第二子比特序列的目标视频图像。According to the adjusted gray histogram, the gray value of the pixel in the target video image is adjusted to obtain the target video image embedded with the first sub-bit sequence or the second sub-bit sequence.
  18. 根据权利要求2所述的方法,其特征在于,所述载体对象包括视频帧序列,所述将所述目标比特序列嵌入到所述载体对象中,包括:The method according to claim 2, wherein the carrier object comprises a video frame sequence, and the embedding of the target bit sequence into the carrier object comprises:
    按照预定嵌入次数,将所述目标比特序列重复嵌入到所述视频帧序列中。The target bit sequence is repeatedly embedded into the video frame sequence according to the predetermined number of embedding times.
  19. 一种水印信息提取方法,其特征在于,包括:A method for extracting watermark information, which is characterized in that it comprises:
    获得待检测对象;Obtain the object to be detected;
    获得包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;Obtain a reference bit sequence containing a amble sequence and original watermark information, where the amble sequence satisfies the following conditions: after the amble sequence is shifted, the obtained shifted sequence is between the sequence and the amble sequence The degree of discrimination is greater than the preset degree of discrimination;
    从所述待检测对象中提取出目标比特序列;Extracting a target bit sequence from the object to be detected;
    将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。The target bit sequence is matched with the reference bit sequence, and it is determined whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
  20. 根据权利要求19所述的方法,其特征在于,所述导码序列设置于所述原始水印信息的前端,所述从所述待检测对象中提取出目标比特序列,包括:The method according to claim 19, wherein the amble sequence is set at the front end of the original watermark information, and the extracting the target bit sequence from the object to be detected comprises:
    以所述目标比特序列的嵌入范围的起始位置作为提取所述目标比特序列的初始检测点,从所述待检测对象中提取出目标比特序列。The start position of the embedding range of the target bit sequence is used as the initial detection point for extracting the target bit sequence, and the target bit sequence is extracted from the object to be detected.
  21. 根据权利要求19所述的方法,其特征在于,所述导码序列设置于所述原始水印信息的后端,所述从所述待检测对象中提取出目标比特序列,包括:The method according to claim 19, wherein the amble sequence is set at the back end of the original watermark information, and the extracting the target bit sequence from the object to be detected comprises:
    以所述目标比特序列的嵌入范围的末尾位置作为提取所述目标比特序列的初始检测点,从所述待检测对象中提取出目标比特序列。The end position of the embedding range of the target bit sequence is used as the initial detection point for extracting the target bit sequence, and the target bit sequence is extracted from the object to be detected.
  22. 根据权利要求19-21中任一项所述的方法,其特征在于,所述待检测对象包括待检测图像,所述从所述待检测对象中提取出目标水印序列,包括:The method according to any one of claims 19-21, wherein the object to be detected includes an image to be detected, and extracting a target watermark sequence from the object to be detected comprises:
    获得所述待检测图像的灰度直方图;Obtaining a grayscale histogram of the image to be detected;
    基于所述灰度直方图,从所述待检测对象中提取出目标水印序列。Based on the grayscale histogram, a target watermark sequence is extracted from the object to be detected.
  23. 根据权利要求19-21中任一项所述的方法,其特征在于,所述待检测对象包括视频帧序列,所述从所述待检测对象中提取出目标水印序列,包括:The method according to any one of claims 19-21, wherein the object to be detected comprises a sequence of video frames, and said extracting a target watermark sequence from the object to be detected comprises:
    获得用于表示所述目标比特序列中的比特值“0”的第一参考子比特序列,以及获得用于表示所述目标比特序列中的比特值“1”的第二参考子比特序列,所述第一参考子比特序列区别于所述第二参考子比特序列;Obtain a first reference sub-bit sequence used to represent the bit value "0" in the target bit sequence, and obtain a second reference sub-bit sequence used to represent the bit value "1" in the target bit sequence, so The first reference sub-bit sequence is different from the second reference sub-bit sequence;
    从所述视频帧序列的视频图像中提取出多个目标子比特序列;Extracting multiple target sub-bit sequences from the video images of the video frame sequence;
    将所述目标子比特序列分别与所述第一参考子比特序列和所述第二参考子比特序列进行比对,以确定所述视频帧序列的视频图像中所嵌入的比特值为“0”或“1”。The target sub-bit sequence is respectively compared with the first reference sub-bit sequence and the second reference sub-bit sequence to determine that the value of the bit embedded in the video image of the video frame sequence is "0" Or "1".
  24. 根据权利要求22所述的方法,其特征在于,所述基于所述灰度直方图,从所述待检测对象中提取出目标水印序列,包括:The method according to claim 22, wherein said extracting a target watermark sequence from said object to be detected based on said gray histogram comprises:
    计算所述待检测图像的灰度均值;Calculating the average gray value of the image to be detected;
    根据所述灰度均值,计算所述灰度直方图的目标灰度区间;Calculating the target grayscale interval of the grayscale histogram according to the grayscale average;
    根据预定的嵌入到所述待检测图像中的水印序列的比特值的数量,对所述目标灰度区间进行划分,获得与所述嵌入水印序列的比特值的数量相对应的灰度子区间,每个所述灰度子区间包括至少两个相邻灰度级,所述灰度级用于表示具有相同灰度值的像素点的数量;According to the predetermined number of bit values of the watermark sequence embedded in the image to be detected, the target gray-scale interval is divided to obtain the gray-level sub-intervals corresponding to the number of bit values of the embedded watermark sequence, Each of the gray sub-intervals includes at least two adjacent gray levels, and the gray levels are used to indicate the number of pixels with the same gray value;
    获得预定的比特值提取数据;Obtain a predetermined bit value to extract data;
    根据所述灰度子区间的至少两个相邻灰度级中像素点的数量以及所述比特值提取数据,对嵌入到所述待检测图像中的比特值分别进行提取,获得所述目标比特序列。According to the number of pixels in at least two adjacent gray levels in the gray sub-interval and the bit value extraction data, the bit values embedded in the image to be detected are respectively extracted to obtain the target bit sequence.
  25. 一种水印信息嵌入装置,其特征在于,包括:A watermark information embedding device is characterized in that it comprises:
    载体对象获得单元,用于获得载体对象;The carrier object obtaining unit is used to obtain the carrier object;
    待嵌入水印信息获得单元,用于获得待嵌入水印信息;A unit for obtaining watermark information to be embedded, configured to obtain watermark information to be embedded;
    目标导码序列获得单元,用于获得目标导码序列,所述目标导码序列满足如下条件:在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度;The target amble sequence obtaining unit is configured to obtain a target amble sequence, and the target amble sequence satisfies the following condition: after the target amble sequence is shifted, the obtained shifted sequence is the same as the target amble sequence. The degree of discrimination between code sequences is greater than the preset degree of discrimination;
    信息嵌入单元,用于将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中。The information embedding unit is used to embed the watermark information to be embedded and the target preamble sequence into the carrier object.
  26. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    处理器;processor;
    存储器,用于存储水印信息嵌入程序,所述程序在被所述处理器读取执行时,执行如下操作:The memory is used to store a watermark information embedding program, and when the program is read and executed by the processor, the following operations are performed:
    获得载体对象;Obtain the carrier object;
    获得待嵌入水印信息;Obtain the watermark information to be embedded;
    获得目标导码序列,所述目标导码序列满足如下条件:在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度;Obtain a target preamble sequence, and the target preamble sequence meets the following condition: after the target preamble sequence is shifted, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than that of the target preamble sequence. Set the degree of distinction;
    将所述待嵌入水印信息和所述目标导码序列嵌入到所述载体对象中。Embedding the watermark information to be embedded and the target preamble sequence into the carrier object.
  27. 一种水印信息提取装置,其特征在于,包括:A watermark information extraction device, which is characterized in that it comprises:
    待检测对象获得单元,用于获得待检测对象;The object to be detected obtaining unit is used to obtain the object to be detected;
    参考比特序列获得单元,用于获得预设的包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;The reference bit sequence obtaining unit is configured to obtain a preset reference bit sequence containing a amble sequence and original watermark information, where the amble sequence satisfies the following condition: after shifting the amble sequence, the obtained shift The degree of discrimination between the post-bit sequence and the preamble sequence is greater than the preset degree of discrimination;
    目标比特序列提取单元,用于从所述待检测对象中提取出目标比特序列;A target bit sequence extraction unit, configured to extract a target bit sequence from the object to be detected;
    信息匹配单元,用于将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。The information matching unit is configured to match the target bit sequence with the reference bit sequence, and determine whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
  28. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    处理器;processor;
    存储器,用于存储水印信息提取程序,所述程序在被所述处理器读取执行时,执行如下操作:The memory is used to store a watermark information extraction program, and when the program is read and executed by the processor, the following operations are performed:
    获得待检测对象;Obtain the object to be detected;
    获得预设的包含导码序列和原始水印信息的参考比特序列,所述导码序列满足如下条件:在对所述导码序列进行移位处理后,获得的移位后序列与所述导码序列之间的区分度大于预设区分度;Obtain a preset reference bit sequence containing a amble sequence and original watermark information, where the amble sequence satisfies the following conditions: after shifting the amble sequence, the obtained shifted sequence and the amble are The degree of discrimination between sequences is greater than the preset degree of discrimination;
    从所述待检测对象中提取出目标比特序列;Extracting a target bit sequence from the object to be detected;
    将所述目标比特序列与所述参考比特序列进行匹配,确定所述目标比特序列是否为嵌入到所述待检测对象中的参考比特序列。The target bit sequence is matched with the reference bit sequence, and it is determined whether the target bit sequence is a reference bit sequence embedded in the object to be detected.
  29. 一种水印信息嵌入方法,其特征在于,包括:A method for embedding watermark information, which is characterized in that it comprises:
    获得载体对象;Obtain the carrier object;
    获得至少两个待嵌入水印信息;Obtain at least two watermark information to be embedded;
    为所述至少两个待嵌入水印信息添加不同的目标导码序列,获得至少两个目标嵌入序列;Adding different target preamble sequences to the at least two watermark information to be embedded to obtain at least two target embedding sequences;
    将所述至少两个目标嵌入序列嵌入到所述载体对象中;Embedding the at least two target embedding sequences into the carrier object;
    其中,所述目标导码序列满足如下条件:在对所述目标导码序列进行移位处理后,获得的移位后序列与所述目标导码序列之间的区分度大于预设区分度。Wherein, the target preamble sequence satisfies the following condition: after performing shift processing on the target preamble sequence, the degree of discrimination between the obtained shifted sequence and the target preamble sequence is greater than the preset degree of discrimination.
  30. 根据权利要求29所述的方法,其特征在于,所述为所述至少两个待嵌入水印信息添加不同的目标导码序列,包括:The method according to claim 29, wherein the adding different target preamble sequences to the at least two watermark information to be embedded comprises:
    为所述至少两个待嵌入水印信息中的每个待嵌入水印信息分别添加与该待嵌入水印信息相对应的目标导码序列。A target preamble sequence corresponding to the watermark information to be embedded is added to each watermark information to be embedded in the at least two watermark information to be embedded.
PCT/CN2020/126360 2019-11-11 2020-11-04 Watermark information embedding method and apparatus WO2021093648A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911093370.3A CN112788342B (en) 2019-11-11 2019-11-11 Watermark information embedding method and device
CN201911093370.3 2019-11-11

Publications (1)

Publication Number Publication Date
WO2021093648A1 true WO2021093648A1 (en) 2021-05-20

Family

ID=75749597

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/126360 WO2021093648A1 (en) 2019-11-11 2020-11-04 Watermark information embedding method and apparatus

Country Status (2)

Country Link
CN (1) CN112788342B (en)
WO (1) WO2021093648A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114913422A (en) * 2022-05-23 2022-08-16 桂林理工大学 Karst rocky mountain area soil and water loss field monitoring device
CN115834792A (en) * 2023-02-22 2023-03-21 湖南洛普洛科技有限公司 Video data processing method and system based on artificial intelligence
WO2023109705A1 (en) * 2021-12-15 2023-06-22 深圳先进技术研究院 Self-adaptive reversible data hiding method and system for color image
CN116703686A (en) * 2023-08-01 2023-09-05 腾讯科技(深圳)有限公司 Image processing method, device, equipment and storage medium
CN117061768A (en) * 2023-10-12 2023-11-14 腾讯科技(深圳)有限公司 Video watermark processing method, video watermark processing device, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114332092B (en) * 2022-03-16 2022-07-26 北京中科慧眼科技有限公司 Defect image detection method, system, intelligent terminal and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005615A (en) * 2006-01-18 2007-07-25 华中科技大学 Embedding and detecting method and system for image data watermark information
CN102122385A (en) * 2011-02-28 2011-07-13 北京工业大学 Digital watermark method capable of simultaneously resisting various attacks
CN102842309A (en) * 2008-03-14 2012-12-26 弗劳恩霍夫应用研究促进协会 Embedder for embedding watermark into information representation, detector for detecting watermark in information representation, method and computer program and information signal
US20130136296A1 (en) * 2011-11-29 2013-05-30 Fujitsu Limited Digital watermark embedding apparatus and method, and digital watermark detecting apparatus and method

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7020285B1 (en) * 1999-07-13 2006-03-28 Microsoft Corporation Stealthy audio watermarking
JP3431593B2 (en) * 2000-10-31 2003-07-28 株式会社東芝 Content generation device, digital watermark detection device, content generation method, digital watermark detection method, and recording medium
JP3943931B2 (en) * 2001-07-11 2007-07-11 キヤノン株式会社 Image processing method and apparatus, program and storage medium
JP4107851B2 (en) * 2002-02-13 2008-06-25 三洋電機株式会社 Digital watermark embedding method and encoding device and decoding device capable of using the method
DE10216261A1 (en) * 2002-04-12 2003-11-06 Fraunhofer Ges Forschung Method and device for embedding watermark information and method and device for extracting embedded watermark information
JP3960959B2 (en) * 2002-11-08 2007-08-15 三洋電機株式会社 Digital watermark embedding apparatus and method, and digital watermark extraction apparatus and method
US7577272B2 (en) * 2005-11-30 2009-08-18 Microsoft Corporation Digital fingerprinting using synchronization marks and watermarks
JP4863219B2 (en) * 2007-05-28 2012-01-25 三菱電機株式会社 Digital watermark detection apparatus, digital watermark detection method, digital watermark detection program, and digital watermark processing system
US8908905B2 (en) * 2009-10-29 2014-12-09 Lg Electronics Inc. Device and method for embedding watermarks in contents and for detecting embedded watermarks
JP5793865B2 (en) * 2010-12-28 2015-10-14 富士通株式会社 Digital watermark embedding device, digital watermark embedding computer program, digital watermark detection device, and digital watermark detection computer program
JP2017011503A (en) * 2015-06-22 2017-01-12 ソニー株式会社 Receiver, transmitter, and data processing method
WO2017061792A1 (en) * 2015-10-07 2017-04-13 엘지전자(주) Broadcast signal transmission/reception device and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005615A (en) * 2006-01-18 2007-07-25 华中科技大学 Embedding and detecting method and system for image data watermark information
CN102842309A (en) * 2008-03-14 2012-12-26 弗劳恩霍夫应用研究促进协会 Embedder for embedding watermark into information representation, detector for detecting watermark in information representation, method and computer program and information signal
CN102122385A (en) * 2011-02-28 2011-07-13 北京工业大学 Digital watermark method capable of simultaneously resisting various attacks
US20130136296A1 (en) * 2011-11-29 2013-05-30 Fujitsu Limited Digital watermark embedding apparatus and method, and digital watermark detecting apparatus and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NGUYEN H: "Introduction to Digital Communication", 31 December 2014, XI'AN JIAOTONG UNIVERSITY PRESS, CN, ISBN: 978-7-5605-6792-1, article NGUYEN H., TRANSLATED BY REN PINYI, SUN LI, GAO ZHENZHEN: "Passage; Introduction to Digital Communication", pages: 400, XP009528086 *
XIAO, WENJING ET AL.: "A New Design and Implementation of Digital Watermark Algorithm Based on Histogram", JOURNAL OF INFORMATION SECURITY RESEARCH, 30 November 2018 (2018-11-30), pages 1052 - 1058, XP055812755 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109705A1 (en) * 2021-12-15 2023-06-22 深圳先进技术研究院 Self-adaptive reversible data hiding method and system for color image
CN114913422A (en) * 2022-05-23 2022-08-16 桂林理工大学 Karst rocky mountain area soil and water loss field monitoring device
CN114913422B (en) * 2022-05-23 2024-03-15 桂林理工大学 Karst mountain area soil erosion and water loss field monitoring device
CN115834792A (en) * 2023-02-22 2023-03-21 湖南洛普洛科技有限公司 Video data processing method and system based on artificial intelligence
CN115834792B (en) * 2023-02-22 2023-05-12 湖南洛普洛科技有限公司 Video data processing method and system based on artificial intelligence
CN116703686A (en) * 2023-08-01 2023-09-05 腾讯科技(深圳)有限公司 Image processing method, device, equipment and storage medium
CN116703686B (en) * 2023-08-01 2023-12-22 腾讯科技(深圳)有限公司 Image processing method, device, equipment and storage medium
CN117061768A (en) * 2023-10-12 2023-11-14 腾讯科技(深圳)有限公司 Video watermark processing method, video watermark processing device, electronic equipment and storage medium
CN117061768B (en) * 2023-10-12 2024-01-30 腾讯科技(深圳)有限公司 Video watermark processing method, video watermark processing device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112788342A (en) 2021-05-11
CN112788342B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
WO2021093648A1 (en) Watermark information embedding method and apparatus
US9443277B2 (en) Method for embedding and extracting multi-scale space based watermark
Bahrami et al. A new robust video watermarking algorithm based on SURF features and block classification
US20070165851A1 (en) Watermark detection
US20080267520A1 (en) Method of image authentication and restoration
Lian et al. Content-based video copy detection–a survey
Zhao et al. Passive forensics for region duplication image forgery based on harris feature points and local binary patterns
CN116385250B (en) Track data double watermarking method based on robust watermarking and fragile watermarking
KR101803066B1 (en) Integrated identification system and method for illegal copy of book
Liu et al. Robust hybrid image watermarking scheme based on KAZE features and IWT-SVD
CN109461110B (en) Method and device for determining traceability information of picture
US11983789B1 (en) Generation method, detection method, generation device, and detection device of zero watermarking for trajectory data, and storage medium
Liu et al. Image authentication using QR code watermarking approach based on image segmentation
Saikia et al. Image authentication under geometric attacks via concentric square partition based image hashing
Soni et al. multiCMFD: fast and efficient system for multiple copy-move forgeries detection in image
Arya et al. A review on different digital watermarking techniques
Bertojo et al. A very fast copy-move forgery detection method for 4k ultra hd images
Huang et al. An Effective Watermark Embedding Algorithm for High JPEG Compression.
Voigt et al. High-capacity reversible watermarking for 2D vector data
Chen et al. Block Sampled Matching with Region Growing for Detecting Copy-Move Forgery Duplicated Regions.
Pleşca et al. Efficient and robust perceptual hashing using log-polar image representation
CN112488899A (en) Visual encryption color blind watermarking method based on repeated codes and Schur decomposition
Kaur et al. An efficient adaptive data hiding scheme for image steganography
Lv et al. Enhancing Feature Point‐Based Video Watermarking against Geometric Attacks with Template
Nandini Feature based image authentication using symmetric surround saliency mapping in image forensics

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20888045

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20888045

Country of ref document: EP

Kind code of ref document: A1