A method for printing and scanning resistant watermarking of binary engineering drawings

Through the method of eigenvalue matrix block DCT transformation and image scrambling, the problem that engineering drawings are easy to be scanned and copied in paper form is solved, effective copyright protection and leakage traceability of binary engineering drawings are achieved, and the watermark is enhanced. Robustness and capacity for imperceptible protection of complex images.

CN114820265BInactive Publication Date: 2024-08-23HUNAN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210221741.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-07
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Engineering drawings in paper form are easily scanned and copied, leading to data leakage. The existing anti-printing and scanning watermark algorithm has obvious distortion of binary images, making it difficult to effectively protect copyright and trace the source of leaks.

Method used

An anti-printing scan watermarking algorithm based on eigenvalue matrix block DCT transformation and image scrambling is adopted. By calculating the flippable coefficient of each pixel of the image, scrambling the image and performing DCT transformation, the DCT coefficient is modified to embed the watermark and is extracted Coefficients are corrected during the process to enhance robustness and capacity.

Benefits of technology

It achieves effective copyright protection and leak traceability of binary engineering drawings, enhances the robustness and capacity of watermarks, can resist printing, scanning, copying and noise attacks, and is imperceptible in complex images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114820265B
    Figure CN114820265B
Patent Text Reader

Abstract

The present invention discloses a binary engineering drawing anti-printing and scanning watermark algorithm, including watermark embedding and watermark extraction methods. The watermark embedding includes scrambling the image and the calculated flippable coefficient matrix, taking the difference in the number of black pixels in adjacent blocks as the eigenvalue, and performing block DCT transformation; modifying the DCT coefficient according to the characteristic that the sign change rate of the DCT coefficient before and after printing and scanning is lower than 0.5, and then performing inverse DCT transformation to calculate the number of black pixels in the final block. The watermark extraction method includes correcting the printed scanned image; calculating the eigenvalue matrix of the corrected scanned image and performing block DCT transformation; counting the number of positive and negative DCT coefficients to extract the watermark. The present invention realizes watermark embedding with low distortion, and can provide an effective technical means for image data leakage caused by printing and scanning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of digital watermarking, in particular to a binary engineering drawing anti-printing and scanning watermarking method. Background Art

[0002] With the rapid development of the Internet and communication technology, traditional paper materials are gradually stored, transmitted and shared in digital form. However, in some necessary occasions, confidential documents such as engineering drawings, contracts, bills, etc. still need to be printed into paper materials, which are easily scanned or copied again for illegal dissemination, thus causing security issues such as data leakage. Therefore, it is necessary to design an effective anti-printing and scanning watermark technology to protect the copyright of paper materials and conduct effective leakage tracing.

[0003] During the printing and scanning process, the image changes from paper to digital form and undergoes digital / analog and analog / digital conversion, which introduces distortions such as pixel offset, rotation, and scaling. Therefore, the anti-printing and scanning watermark algorithm has higher requirements for robustness. Existing research can be divided into color image anti-printing and scanning algorithms, grayscale anti-printing and scanning algorithms, and binary image anti-printing and scanning algorithms according to different carrier types. Since general engineering drawings are in binary form, the texture is simple and unevenly distributed, so the distortion caused by watermark embedding is more obvious than grayscale and color images.

[0004] Aiming at the copyright protection and leakage tracing of engineering drawings, this paper proposes an anti-printing and scanning watermarking algorithm based on eigenvalue matrix block DCT transformation and image scrambling. In this algorithm, the flip coefficient of each pixel in the image is calculated, the image and the flip coefficient are scrambled, the number of black pixels in each block of the scrambled image is calculated, the difference in the number of adjacent pixels is used as the eigenvalue for DCT transformation, the DCT coefficient is modified according to the watermark information, and the watermark is embedded by flipping the pixels. Compared with similar algorithms, this algorithm has better robustness and imperceptibility. Summary of the invention

[0005] Aiming at the problem that two-dimensional CAD engineering drawings are illegally obtained by scanning in paper form during use, a binary engineering drawing anti-printing scanning watermark method is proposed, which can realize leakage tracing.

[0006] In order to solve the above technical problems, the present invention provides a binary engineering drawing anti-printing and scanning watermark method, comprising the following steps:

[0007] The eigenvalue calculation part includes the following steps:

[0008] Calculate the size of the eigenvalue matrix according to the length of the watermark information and the image size;

[0009] According to the image, eigenvalue matrix and the size of block DCT transform, the size of each block image is calculated, the number of black pixel blocks in each block is counted and the difference of the number of black pixel blocks in adjacent blocks is used as the eigenvalue, so as to obtain the complete eigenvalue matrix E;

[0010] The watermark embedding part includes the following steps:

[0011] Perform M*M block DCT transformation on the eigenvalue matrix, and modify the positive and negative properties of the DCT coefficients according to the invariants before and after the printing and scanning process;

[0012] Perform an inverse transformation on the modified DCT coefficient matrix, calculate the final number of black pixel blocks in each block by the number of black pixel blocks in the adjacent blocks corresponding to the new eigenvalue, and flip the pixel blocks;

[0013] Re-perform block DCT transformation on the new eigenvalue matrix and record its offset value;

[0014] Perform inverse scrambling according to the scrambling key, merge the intermediate watermark carrier image with the external part, and obtain the final watermarked image;

[0015] The watermark extraction part includes the following steps:

[0016] For the corrected scrambled image, calculate the eigenvalue matrix E' of the scanned image;

[0017] Performing a block DCT transformation of M*M size on the eigenvalue matrix, and correcting the DCT coefficients according to the block DCT coefficients and the offset values;

[0018] Count the number of positive and negative values ​​in the block DCT coefficients to extract watermark information;

[0019] It can be seen from the technical solution provided by the above invention that this method embeds the watermark by taking the number of adjacent black pixel blocks as the characteristic value and performing coefficient correction during the extraction process, thereby enhancing the robustness and capacity of the watermark method and being able to effectively trace the leakage caused by printing and scanning. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is the flow chart of the watermark embedding and watermark extraction method

[0021] Figure 2 The original carrier without watermark embedded

[0022] Figure 3 This is the watermark embedding effect diagram DETAILED DESCRIPTION

[0023] The present invention will be further described below in conjunction with the accompanying drawings.

[0024] A binary engineering image anti-printing and scanning watermark method includes the steps of embedding a watermark into the binary image and extracting watermark information, as follows:

[0025] Embed watermarks into binary engineering images:

[0026] Assume that the embedded watermark information is a pseudo-random sequence of 0s and 1s of length L, denoted by w = {w i |w i ∈{0,1}},i=1,2,3,…,L;

[0027] Determine the border position of the original image, and cut out the middle part of the image according to the border as the image to be embedded;

[0028] Calculate the flip coefficient of each pixel of the image to be embedded with the watermark, and obtain the flip coefficient matrix;

[0029] Perform scrambling operation on the original image and the corresponding flippable coefficient matrix according to the image scrambling key;

[0030] Calculate the size of the eigenvalue matrix according to the size of the image and the length of the watermark information to be embedded;

[0031] According to the image, eigenvalue matrix and the size of block DCT transform, the size of each block image is calculated, the number of black pixels in each block is counted and the difference between the numbers of adjacent blocks is used as the eigenvalue, so as to obtain the complete eigenvalue matrix E;

[0032] According to the positive and negative change rate of the block DCT coefficients before and after the printing and scanning process is less than 50%, the watermark is embedded. The watermark information to be embedded is w i , the modified coefficient is recorded as C i according to Modify the DCT coefficients of the corresponding blocks, where d is the maximum value of the average values ​​of the DCT coefficients of each block. If the information to be embedded is 0, the DCT coefficients of the corresponding blocks are set to negative numbers. If the information to be embedded is 1, the DCT coefficients of the corresponding blocks are set to positive numbers until all watermark information is embedded.

[0033] The modified block DCT coefficients are inversely transformed to obtain a new eigenvalue matrix. The final number of black pixels in each block is calculated by the number of black pixels in the adjacent blocks corresponding to the new eigenvalues. If the number of pixels is negative, it is set to 0. If the number of pixels is greater than the block size, it is set to the image block size.

[0034] The number of pixel blocks with 0 pixel values ​​in each block after modification is subtracted from the number of pixel blocks with 0 pixel values ​​in each block in the original image to obtain the corresponding incremental matrix. If the value is less than 0, it means that the black pixels in the corresponding block are reduced, and the black pixels need to be flipped for watermark embedding. Conversely, if the value is greater than 0, the black pixels in the corresponding block increase, and the white pixels need to be flipped for watermark embedding.

[0035] Since the DCT coefficients are floating point numbers, the eigenvalues ​​are all positive numbers, and the number of pixel flips in some blocks is insufficient, the eigenvalue matrix obtained by inverse transformation has an offset from the DCT coefficients obtained by DCT transformation and the value set for embedding the watermark. The average value of the offset is recorded as O. i ;

[0036] The modified image is inversely scrambled according to the image scrambling key to obtain an intermediate watermark carrier image;

[0037] The watermark carrier image and the cut-out outer frame portion of the original image are merged to obtain a final watermark carrier image.

[0038] The steps for extracting the scanned engineering image are as follows:

[0039] Determine the border of the watermarked image to be extracted, and cut out the middle part as the watermark extraction image;

[0040] Scramble the image using the image scrambling key;

[0041] According to the size of the image, eigenvalue matrix and block DCT transform, the size of each block image is calculated, the number of black pixels in each block is counted and the difference between the numbers of adjacent blocks is used as the eigenvalue matrix, so as to obtain the complete eigenvalue matrix E';

[0042] Perform M*M block DCT transformation on the eigenvalue matrix E';

[0043] Let the DCT coefficient corresponding to the i-th block be C i ',according to Subtract the corresponding block DCT coefficient from the average offset value to reduce the error caused by the watermark embedding process;

[0044] The number of DCT coefficients of each block greater than 0 is recorded as CN i ', according to the formula Extract the watermark information w of the corresponding block i ';

[0045] Repeat the above steps until the watermark information extraction is completed;

[0046] The present invention is mainly applied to binary engineering images. Experiments have shown that the method has a large watermark capacity, can resist printing and scanning attacks, and has a certain robustness against copying attacks, noise addition attacks and common defacement attacks, and has excellent imperceptibility in more complex binary images.

[0047] The above is only an implementation case of the present invention. Any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. A method for embedding and extracting watermarks in binary engineering drawings that resist printing and scanning, characterized in that: The steps include: 1) Calculate the size of the eigenvalue matrix based on the length of the watermark information and the image size; 2) According to the image, the eigenvalue matrix and the size of the block DCT transform, the size of each block image is calculated, the number of black pixel blocks in each block is counted and the difference in the number of black pixel blocks in adjacent blocks is used as the eigenvalue, so as to obtain the complete eigenvalue matrix E; 3) Performing a block DCT transformation of M*M size on the eigenvalue matrix, and modifying the positive and negative properties of the DCT coefficients according to the invariants before and after the printing and scanning process; 4) Perform an inverse transformation on the modified DCT coefficient matrix, calculate the final number of black pixel blocks in each block by the number of black pixel blocks in the adjacent blocks corresponding to the new eigenvalue, and flip the pixel blocks; 5) Re-perform block DCT transformation on the new eigenvalue matrix and record its offset value; 6) Perform inverse scrambling according to the scrambling key, merge the intermediate watermark carrier image with the external part, and obtain the final watermark image; 7) For the corrected scrambled image, calculate the eigenvalue matrix E' of the scanned image; 8) Performing a block DCT transformation of M*M size on the eigenvalue matrix, and correcting the DCT coefficients according to the block DCT coefficients and the offset values; 9) The number of statistical block DCT coefficients greater than 0 is recorded as CN i ',according to Extract watermark information.

2. The method for embedding a binary engineering drawing anti-printing and scanning watermark according to claim 1 is characterized in that: The step 3) includes: selecting a block DCT transform size of 4, modifying the coefficients Where d is the maximum value of the average value of DCT coefficients of each block, C i is the modified DCT coefficient, wherein the step 3) is the watermark embedding stage step.

3. The method for embedding a binary engineering drawing anti-printing and scanning watermark according to claim 1, characterized in that: The step 4) includes: when the number of black pixel blocks in the block is a negative number, setting it to 0; when the number of black pixel blocks is greater than the block size, setting it to the block size; subtracting the modified number of black pixel blocks in each block from the number of black pixel blocks in the original image to obtain an incremental matrix; if the value is less than 0, flip the black pixel block, otherwise, flip the white pixel block.

4. The method for extracting watermarks from binary engineering drawings resistant to printing and scanning according to claim 1, characterized in that: The step 8) comprises: The corresponding block DCT coefficient is subtracted from the average offset value to reduce the error caused by the watermark embedding process, wherein step 8) is a step in the watermark extraction stage.

Citation Information

Patent Citations

  • A method and a device for generating a digital watermark image based on graphic codes

    AU2020104204A4

  • Method for preventing color image blind watermarking from being printed and scanned based on DCT coefficient statistical property

    CN103559676A

  • Seal embedded information processing method, digital watermark extraction method and seal processing system

    CN111784554A

  • Anti-screen shooting watermarking method for CAD engineering drawing

    CN112561767A