A method and product for generating and embedding a watermark image for copying
Through improved hybrid networking technology, combined with downsampling and networking processing in watermark image generation, the problem of difficult to conceal and efficient identification of watermark images is solved, and the hidden embedding and copying of watermark text is realized, reducing the computational complexity , and improves device compatibility and fusion effect.
Patent Information
- Application Number
- CN202411425721.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-14
AI Technical Summary
The watermark images generated by the prior art are difficult to take into account both the hidden embedding of watermarks, low-calculation generation and efficient identification.
Using improved hybrid networking technology, by obtaining watermark text information and geometric line intervals, downsampling, networking and scaling are performed to generate watermark images, and embed watermark text in the document background, using different networking The dot composition realizes hidden embedding and copying.
It realizes the hidden embedding and efficient recognition of watermark text, reduces the computational complexity, is suitable for printing and copying of different devices, and improves the fusion effect of watermark images and device compatibility.
Smart Images

Figure CN118940233B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital watermark technology, and more specifically, to a method and product for generating and embedding a watermark image that can be reproduced. Background Art
[0002] Traditional document watermarking technology is usually implemented by directly superimposing images or text on documents. These watermarks can be explicit (such as text or patterns with low transparency) or implicit (such as invisible watermarks that can only be seen under certain conditions). Explicit watermarks embed watermarks directly into documents, usually overlaying them on documents with low transparency. Explicit watermarks are easy to identify, but also easy to tamper with or remove. Invisible watermarks use methods such as deformation, frequency domain transformation, and noise superposition to embed watermark information into documents. Invisible watermarks are not easy to detect, which increases security, but the generation process of invisible watermarks often involves complex calculations, and watermark recognition also requires complex image processing, which increases computational overhead.
[0003] It can be seen that the watermark image generated by the existing technology is difficult to simultaneously take into account the hidden embedding of the watermark, low-computation generation and efficient recognition.
[0004] Therefore, the present application provides a method and product for generating and embedding a watermark image that is visible in a copy to solve the above-mentioned problems. Summary of the invention
[0005] The purpose of this application is to provide a method and product for generating and embedding a watermark image that is visible on a copy, so as to solve the problem that the watermark image generated by the prior art is difficult to simultaneously take into account the hidden embedding of the watermark, low-computation generation and efficient recognition. The above-mentioned problem is solved by improving the hybrid screening technology and applying it to the watermark image generation.
[0006] The present application first provides a method for generating a watermark image that is visible on a copy, comprising: obtaining a watermark pattern consisting of watermark text information, watermark position information and geometric line intervals; splicing the watermark pattern to obtain a first pattern image, and down-sampling the first pattern image to obtain a second pattern image; performing a first screening process on the first pattern image according to a first screening matrix to obtain a first screened image, determining the size of the second screening matrix according to the size of the down-sampling matrix and the size of the first screening matrix, and performing a second screening process on the second pattern image according to the second screening matrix to obtain a second screened image of the same size as the first screened image; scaling the first screened image and the second screened image according to the document watermark fineness requirement to obtain a background pattern, and scaling the first pattern image and the second pattern image. The image is scaled to obtain an original pattern with the same size as the background pattern, and the interference dots in the background pattern are removed according to the blank area of the original pattern; the two background patterns are repeatedly expanded according to the document watermark size requirements to obtain a first background image and a second background image, and a text mask and a text reverse mask are respectively extracted from the first background image and the second background image according to the watermark text information and the watermark position information; the watermark text area and the non-watermark text area are respectively extracted from the first background image and the second background image according to the text mask and the text reverse mask, and are spliced to obtain a watermark image; wherein, when the first screening process is FM screening process, the second screening process is AM screening process, and when the first screening process is AM screening process, the second screening process is FM screening process.
[0007] By adopting the above technical scheme, firstly, the watermark text is embedded in the lines of the watermark pattern through the improved hybrid screening technology. After the generated watermark image is adjusted in clarity and embedded in the document background, it will be difficult for the naked eye to recognize the watermark text due to interference from the pattern lines and the document text, thereby realizing the concealed embedding of the watermark text; secondly, the present application only involves matrix addition and multiplication, without complex calculations, and the calculation requirements are low; thirdly, in the watermark image generated by the improved hybrid screening technology, the watermark text area and the non-watermark text area are composed of different screening dots. Based on the difference in the processing of AM and FM dots by the copying equipment, the watermark text will be clearly displayed after the watermark image is copied, and can be recognized by the naked eye without the need for complex image processing.
[0008] In a possible implementation, the watermark pattern is formed by geometric lines of a lens pattern.
[0009] In a possible implementation, downsampling the first pattern image to obtain the second pattern image includes: dividing the first pattern image into a plurality of blocks according to a set sampling matrix; extracting sampled pixel values from each block; and generating the second pattern image based on the sampled pixel values of all blocks.
[0010] In a possible implementation manner, the size of the second screening matrix is determined according to the size of the down-sampling matrix and the size of the first screening matrix; comprising: the size of the down-sampling matrix is , the size of the first screening matrix is When , the size of the second screening matrix is ,in , , , All are positive numbers.
[0011] In a possible implementation, interfering dots in the background pattern are removed according to the blank area of the original pattern; including: extracting the blank area from the original pattern; mapping the blank area to the background pattern, using dots in the mapped area as interfering dots; and removing the interfering dots in the background pattern.
[0012] In a possible implementation, the first screening process is FM screening process, and the second screening process is AM screening process.
[0013] In one possible implementation, downsampling is performed using The sampling matrix of the first screening process adopts The distributed matrix of the second screening process adopts The point cluster matrix.
[0014] In a possible implementation, the text mask is extracted from the first background image, and the text reverse mask is extracted from the second background image.
[0015] The present application also provides a method for embedding a watermark image that is visible on a copy, comprising: acquiring a document; obtaining a watermark image based on the watermark image generation method that is visible on a copy as described above; adjusting the transparency of the watermark image and embedding it into the background of the document to obtain a watermark document embedded with the watermark image.
[0016] The present application also provides a computer program product, including a computer program, which implements the above-mentioned watermark image generation method or the above-mentioned watermark image embedding method when executed by a processor.
[0017] Compared with the prior art, the present application has the following beneficial effects: 1. Watermark embedding is concealed: conventional plain text watermarks are very obvious after being embedded in the document background, and too obvious watermarks will affect the reading of the original text of the document to a certain extent; in response to this problem, the watermark image of the present application is to embed the watermark text into a pattern composed of geometric lines, and the watermark image can be embedded in the document background after adjusting the transparency as a document background; the background design can be made more transparent than the traditional plain text watermark, and the watermark is more concealed and difficult to detect after spreading, and does not affect the reading of the original text of the document. 2. The watermark image has a good copying effect: if a single screen is used to generate a watermark image, the watermark text after copying is not obvious and there are regular lines that affect vision, making it difficult to identify the watermark text; in response to this problem, the present application adopts a mixed screen design, and preferably uses FM dots to generate the watermark text area, and AM dots to generate the non-watermark text area; the mixed screen design avoids the regular lines generated after the single screen image is copied, and the small FM dots are easily lost after copying, so the watermark text area after copying is brighter, visible to the naked eye, and easy to identify / extract. 3. Good watermark image fusion effect: This application generates watermark images based on hybrid screening, and there are difficulties in image fusion; to address this problem, this application designs the size of the second screening matrix by sampling the size of the matrix and the first screening matrix, so that the coverage of AM and FM screening dots converges and the fineness is different, and the size of the images after screening is the same, which can achieve seamless splicing of text areas and non-text areas, and improve the fusion effect of watermark images. 4. Good device compatibility: Traditional watermark algorithms are mostly adapted to specific printers and rely on devices. Different devices may have different processing methods for halftone images, resulting in different watermark image printing / copying effects; to address this problem, this application generates watermark images by hybrid screening to form dots of different sizes and frequencies, which are applicable to different devices. 5. Low difficulty in generating watermark images: High-quality halftone watermark generation and embedding methods usually involve complex calculations and low processing efficiency; to address this problem, the hybrid screening proposed in this application only requires matrix addition and multiplication, which reduces the difficulty of calculation and improves processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0019] Figure 1 This is a schematic diagram of AM screening processing;
[0020] Figure 2 Schematic diagram of AM screening processing dots;
[0021] Figure 3 This is a schematic diagram of FM screening processing;
[0022] Figure 4A flowchart of a method for generating a watermark image for copying provided in an embodiment of the present application;
[0023] Figure 5 An image processing flow chart of a watermark image generation method provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of hybrid screening provided in an embodiment of the present application;
[0025] Figure 7 The gmsh watermark pattern provided in the embodiment of the present application;
[0026] Figure 8 The diamond-shaped watermark pattern provided in the embodiment of the present application;
[0027] Fig. 9 The hexagonal watermark pattern provided in the embodiment of the present application;
[0028] Fig.10 The asymmetric watermark pattern provided in the embodiment of the present application;
[0029] Fig.11 A flowchart of a method for embedding a copy-appearing watermark image provided by an embodiment of the present application;
[0030] Fig.12 A schematic diagram of a low-transparency watermark image provided in an embodiment of the present application;
[0031] Fig.13 A schematic diagram of a watermark image with high transparency provided in an embodiment of the present application;
[0032] Fig.14 A schematic diagram of a watermark image with low transparency provided in an embodiment of the present application after being copied;
[0033] Fig.15 A schematic diagram of a watermark image with high transparency provided in an embodiment of the present application after being copied;
[0034] Fig.16 It is a schematic diagram of a watermark document obtained by other methods after being copied;
[0035] Fig.17 A schematic diagram of a watermark document generated for an embodiment of the present application;
[0036] Fig.18 A schematic diagram of a watermark document generated by an embodiment of the present application after being copied. DETAILED DESCRIPTION
[0037] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with examples and drawings. The illustrative implementation scheme of the present application and its description are only used to explain the present application and are not intended to limit the present application.
[0038] First, some of the terms and related technologies involved in this application are explained in conjunction with the accompanying drawings to facilitate understanding by those skilled in the art.
[0039] Halftone technology refers to quantizing continuous tone images into discrete halftone images. The visual effect of halftone images at a certain distance is consistent with that of continuous tone images. Its basic principle is to perform binary processing on continuous tone images. ;in is a continuous tone image, T is some halftone algorithm, The human eye has a low-pass filter characteristic, so when observing a halftone image When the pixel discontinuity is blurred, the continuous tone image is obtained. The same observation effect. Halftoning algorithms generally include a thresholding procedure, which can be expressed as follows:
[0040]
[0041] When the continuous tone image i Line j Gray value of the pixel in the column Greater than threshold When the halftone image is Line Gray value of the pixel in the column Set to 1 (white); when the continuous tone image Line Gray value of the pixel in the column Less than or equal to threshold When the halftone image is Line Gray value of the pixel in the column Set to 0 (black). Use these black and white points to represent each gray level.
[0042] Amplitude Modulation (AM) screening technology is a screening method that can be used in halftone technology. It simulates the grayscale level in the image by changing the size of the dots, keeping the spacing (frequency) of the dots unchanged. Usually based on the central element of the grid, the center distance between two adjacent dots remains unchanged, and the arrangement of the dots follows a certain rule, showing a periodic distribution in the entire image area. When adding a grid, the image plane is divided into many grids of the same size, each grid has a fixed number of pixels, and the size of the dots in the grid is used to simulate different grayscale levels. Figure 1 The figure shows the schematic diagram of AM screening processing. Figure 2 Schematic diagram of AM screening processing dots.
[0043] Frequency Modulation (FM) screening technology is a screening method that can be used in halftone technology. When the dot size remains unchanged, the grayscale level in the image is simulated by changing the frequency of the dots per unit area. When these dots are gathered together, the dark area of the image is formed, and when the dots are sparsely distributed, the bright area of the image is formed. In FM screening technology, the continuous tone image is first sampled and quantized to obtain the pixel value of the image, and then the pixel value of the image is compared with the threshold in the threshold matrix. When the pixel value is greater than the threshold, the pixel value in the generated halftone image is set to 1, otherwise it is set to 0. Figure 3 This is a schematic diagram of FM screening processing.
[0044] See also Figure 4 As shown, Figure 4A flow chart of a method for generating a watermark image that is visible on a copy provided in an embodiment of the present application. The watermark image generation method comprises: step S1, obtaining a watermark pattern consisting of watermark text information, watermark position information and geometric line intervals; step S2, splicing the watermark pattern to obtain a first pattern image, and downsampling the first pattern image to obtain a second pattern image; step S3, performing a first screening process on the first pattern image according to a first screening matrix to obtain a first screened image, determining the size of the second screening matrix according to the size of the downsampling matrix and the size of the first screening matrix, and performing a second screening process on the second pattern image according to the second screening matrix to obtain a second screened image of the same size as the first screened image; step S4, scaling the first screened image and the second screened image according to the document watermark fineness requirement to obtain a background pattern, scaling the first pattern image and the second pattern image Perform scaling processing to obtain an original pattern with the same size as the background pattern, and remove interference dots in the background pattern according to the blank area of the original pattern; step S5, repeatedly expand the two background patterns according to the document watermark size requirements to obtain a first background image and a second background image, and extract a text mask and a text reverse mask from the first background image and the second background image according to the watermark text information and the watermark position information; step S6, extract the watermark text area and the non-watermark text area from the first background image and the second background image according to the text mask and the text reverse mask, and splice them to obtain a watermark image; wherein, when the first screening process is FM screening process, the second screening process is AM screening process, and when the first screening process is AM screening process, the second screening process is FM screening process.
[0045] Specifically, Figure 5 As shown, Figure 5 : is an image processing flow chart of the watermark image generation method. Take the first screening process as FM screening process and the second screening process as AM screening process as an example: on the one hand, the first pattern image lena2 is subjected to FM screening process to obtain the first screened image, the first screened image is scaled according to the document watermark fineness requirement to obtain the background pattern, and at the same time, the first pattern image lena2 is scaled to obtain the original pattern with the same size as the background pattern, the interference dots in the background pattern are filtered out according to the original pattern, and the background pattern after the interference dots are filtered out is repeatedly expanded according to the document watermark size requirement to obtain the first background image G FM , according to the watermark text information and watermark position information, from the first background image G FMExtract the text mask mask1 (or text inverse mask mask2). On the other hand, perform AM screening on the second pattern image lena1 (lena1 is obtained by downsampling the first pattern image lena2) to obtain a second screened image, scale the second screened image according to the fineness requirement to obtain a background pattern, scale the second pattern image lena1 to obtain an original pattern with the same size as the background pattern, filter out interference dots in the background pattern according to the original pattern, and repeatedly expand the background pattern after filtering out interference dots according to the document watermark size requirement to obtain a second background image G. AM , according to the watermark text information and watermark position information, from the second background image G AM Extract the text anti-mask mask2 (or text mask mask1). Finally, according to the text mask mask1 and the text anti-mask mask2, extract the text anti-mask mask2 from the first background image G. FM and the second background image G AM The watermark text area and the non-watermark text area are extracted separately and spliced to obtain the watermark image.
[0046] The principle of this application is to use different screening processes in the watermark text area and the non-watermark text area based on the improved hybrid screening technology to generate a watermark image. There is no obvious visual difference between the AM dots and FM dots in the watermark image. After being embedded in the document background, both the document text and the watermark pattern will produce a certain visual interference effect, resulting in the human eye being unable to accurately identify the hidden watermark text, thereby achieving the concealed embedding of the watermark text; and the CCD (Charge Coupled Device, charge coupled device image sensor) copier can distinguish between different thicknesses of mesh lines and different sizes of dots, and the small FM dots in the watermark image after copying are not completely retained by the copying technology, and become brighter, so the hidden watermark text in the watermark image after copying is displayed. Figure 6 As shown, Figure 6 A schematic diagram of a hybrid screen provided in an embodiment of the present application, wherein the sunshade pattern (i.e. Figure 6 The dots in the area with dense dots in the pattern are frequency modulation dots, and the dots in the non-sunshading pattern are amplitude modulation dots. The watermark text 3 is embedded in the lines of the watermark pattern through the hybrid screening technology.
[0047] The improvements of the present application are that, firstly, the watermark text is embedded in the lines of the watermark pattern through the improved hybrid screening technology. After the generated watermark image is adjusted in clarity and embedded in the document background, it will be difficult for the naked eye to recognize the watermark text due to interference from the pattern lines and the document text, thereby realizing the concealed embedding of the watermark text; secondly, the present application only involves matrix addition and multiplication, without complex calculations, and has low calculation costs; thirdly, in the watermark image generated by the improved hybrid screening technology, the watermark text area and the non-watermark text area are composed of different screening dots. Based on the differences in the processing of AM and FM dots by the copying equipment, the watermark text will be clearly displayed after the watermark image is copied, and can be recognized by the naked eye without the need for complex image processing.
[0048] Step S1 is to obtain watermark text information, watermark position information and watermark patterns composed of geometric line intervals. Watermark patterns are geometrically spaced patterns generated according to a certain rule, and are mainly used as a base map for subsequent watermark text embedding. In a possible implementation, the watermark patterns in step S1 can be composed of geometric lines of a lens image.
[0049] Specifically, in addition to using the above-mentioned lens image to generate watermark patterns, you can also use Figure 7 The gmsh watermark pattern shown, such as Figure 8 The diamond watermark pattern shown, such as Fig. 9 The hexagonal watermark pattern shown and Fig.10 The asymmetric watermark pattern shown.
[0050] It should be noted that the present embodiment does not limit the specific style of the watermark pattern. The above merely exemplifies several styles of the watermark pattern to facilitate understanding by technicians.
[0051] Step S2 is to splice the watermark patterns to obtain a first pattern image, and downsample the first pattern image to obtain a second pattern image. In a possible implementation, in step S2, downsampling the first pattern image to obtain the second pattern image includes: dividing the first pattern image into a plurality of blocks according to a set sampling matrix; extracting sampled pixel values from each block; and generating the second pattern image based on the sampled pixel values of all blocks.
[0052] Specifically, the watermark pattern in step S2 is composed of only a few spaced geometric lines. In order to facilitate the subsequent repeated covering to form the document background, the watermark pattern is spliced into a relatively regular image, namely the first pattern image lena2. The splicing can be horizontal splicing, vertical splicing, diagonal splicing, etc. Then, some elements are extracted from the first pattern image lena2 to form the second pattern image lena1 through the set sampling matrix, for example, The sampling matrix for For the first pattern image lena2 of the pixel point, the first pattern image lena2 is transformed into The sampling matrix is divided into multiple blocks, and the pixel value at a specific position (such as the second row and the second column) of each block is selected as the sampling pixel value. The second pattern image lena1 is generated according to the sampling pixel values of all blocks. The size of the second pattern image lena1 is The pixel point contains 1 / 3 of the elements in the first pattern image lena2.
[0053] The purpose of this step is to generate a first pattern image lena2 and a second pattern image lena1 for subsequent mixed screening processing. The mixed screening processing can effectively avoid the problems existing in single screening, improve image quality, make the watermark more obvious after copying, and reduce the generation of regular patterns. In addition, by downsampling the first pattern image lena2 to generate the second pattern image lena1, it is ensured that the pattern shapes of the first pattern image lena2 and the second pattern image lena1 do not change and have different degrees of refinement, which is convenient for subsequent image fusion.
[0054] Step S3 is to perform a first screening process on the first pattern image according to the first screening matrix to obtain a first screening image, determine the size of the second screening matrix according to the size of the down-sampling matrix and the size of the first screening matrix, and perform a second screening process on the second pattern image according to the second screening matrix to obtain a second screening image with the same size as the first screening image. In a possible implementation, determining the size of the second screening matrix according to the size of the down-sampling matrix and the size of the first screening matrix includes: when the size of the down-sampling matrix is , the size of the first screening matrix is When , the size of the second screening matrix is ,in , , , All are positive numbers.
[0055] Specifically, if the size of the first screening matrix is And the down-sampling sampling matrix size is also When , the second screening matrix of 9×9 is selected according to the size of the sampling matrix and the first screening matrix. The first screen matrix performs the first screen processing on the first pattern image lena1 to obtain the first screen image, according to The second screen matrix performs a second screen processing on the second pattern image lena1 to obtain a second screened image. At this time, the first screened image and the second screened image have the same size.
[0056] The purpose of this step is to determine the size of the second screening matrix by the sampling matrix size and the first screening matrix size, so as to ensure that the sizes of the two screened images are consistent and the coverage of the screen dots is consistent, which is conducive to the fusion of the two screened images; and due to the downsampling process, the first screened image and the second screened image are consistent in size but different in degree of detail, which is conducive to the hidden embedding of watermark text and enhances the visibility of the watermark text after copying.
[0057] It should be noted that, unlike the traditional hybrid screening that aims to approach the fineness of electronic images, the present application improves the screening method so that different screens (i.e. AM and FM screening) have similar dot coverage and different fineness, which is conducive to the hidden embedding of watermark text and solves the problem of watermark image fusion.
[0058] Step S4 is to scale the first screened image and the second screened image according to the document watermark fineness requirement to obtain a background pattern, scale the first pattern image and the second pattern image to obtain an original pattern of the same size as the background pattern, and remove the interfering dots in the background pattern according to the blank area of the original pattern. In a possible implementation, the interfering dots in the background pattern are removed according to the blank area of the original pattern; including: extracting the blank area from the original pattern; mapping the blank area to the background pattern, using the dots in the mapped area as interfering dots; and removing the interfering dots in the background pattern.
[0059] Specifically, first, the sizes of the first screened image and the second screened image are adjusted according to the fineness requirements of the document background watermark. The higher the fineness requirements, the smaller the image size after scaling, until the first screened image and the second screened image are scaled to a suitable size as the background pattern out_process, and the first pattern image lena2 and the second pattern image lena1 before the screening process are also scaled to the same size as the background pattern as the original pattern origin_process. Then, in order to embed the watermark text more covertly, the watermark text is embedded only in the line part of the pattern, that is, only the screened dots of the geometric line part of the pattern are retained while deleting the dots generated in the blank area of the pattern, so the interference dots in the background pattern are removed according to the blank area of the original pattern.
[0060] The purpose of this step is to remove the screening noise generated by the blank area of the original pattern origin_process, to ensure that only the geometric line area in the original pattern origin_process is screened, to ensure the visibility of the watermark while reducing the interference of other screening noise points, making the watermark text more hidden.
[0061] Step S5 is to repeatedly expand the two background patterns according to the document watermark size requirements to obtain the first background image and the second background image, and extract the text mask and text reverse mask from the first background image and the second background image according to the watermark text information and the watermark position information.
[0062] Specifically, first, two background patterns are used to repeatedly expand according to the document watermark size requirements to obtain the first background image and the second background image. If the document watermark size requirement is the document page size, the background pattern is repeatedly covered to the document page size to obtain the first background image and the second background image; if the document shading watermark size requirement is the document body area, the page size after removing the page margins is calculated, and the background image is repeatedly covered to the page size to obtain the first background image and the second background image. Then, the text mask (or text reverse mask) is extracted from the first background image processed by the first screening, and the text reverse mask (or text mask) is extracted from the second background image processed by the second screening. The text mask refers to setting the pixel points of the watermark text area to 1 and the remaining areas to 0 according to the watermark text information and watermark position information; the text reverse mask is to set the remaining areas to 1 and the text area to 0.
[0063] The purpose of this step is to extract text masks and text reverse masks respectively from the first background image and the second background image obtained by the two screening processes. The overall patterns of the two background images are similar, but the constituent dots are FM dots and AM dots respectively. The text masks and text reverse masks are extracted respectively from the two background images, so as to generate a watermark text area according to one of the background images, and generate a non-watermark text area with the watermark text subtracted according to the other background image. The watermark text area and the non-watermark text area are combined to embed the watermark text into the pattern.
[0064] Step S6 is to extract the watermark text area and the non-watermark text area from the first background image and the second background image respectively according to the text mask and the text anti-mask, and then splice them to obtain a watermark image.
[0065] Specifically, the watermark text area can be extracted from the first background image according to the text mask, and the non-watermark text area can be extracted from the second background image according to the text reverse mask, or the non-watermark text area can be extracted from the first background image according to the text reverse mask, and the watermark text area can be extracted from the second background image according to the text mask. The watermark text area can be seamlessly spliced to the hollowed-out part of the non-watermark text area to obtain a watermark image. The watermark image can be directly embedded in the background of the document and become the background of the document. After the document is copied, the watermark text hidden in the background will be displayed.
[0066] In a possible implementation, the first screening process is FM screening process, and the second screening process is AM screening process;
[0067] Furthermore, downsampling is performed using The sampling matrix of the first screening process adopts The distributed matrix of the second screening process adopts Point cluster matrix of ;
[0068] Furthermore, a text mask is extracted from the first background image, and a text reverse mask is extracted from the second background image.
[0069] Specifically, the first pattern image lena2 is obtained by The distributed matrix is subjected to FM screening to obtain a first screened image; the first screened image is scaled according to the document watermark fineness requirement to obtain a background pattern, and the background pattern is repeatedly expanded according to the document watermark size requirement to obtain a first background image G FM , according to the watermark text information and watermark position information from the first background image G FM Extract the text mask mask1. The first pattern image lena2 is obtained by The second pattern image lena1 is obtained by downsampling the sampling matrix of AM screening is performed on the point cluster matrix to obtain a second screened image; the second screened image is scaled according to the document watermark fineness requirement to obtain a background pattern, and the background pattern is repeatedly expanded according to the document watermark size requirement to obtain a second background image G AM , according to the watermark text information and watermark position information from the second background image G AM Finally, the text mask mask1 is extracted from the first background image G FM Extract the watermark text area, and use the text inverse mask mask2 to extract the watermark text area from the second background image G AM The non-watermark text area is extracted, and the watermark text area and the non-watermark text area are spliced to obtain the watermark image.
[0070] The purpose of this step is to extract the watermark text area from the image after frequency modulation (FM) screening. The advantage of this step is that FM screening can show the light and dark levels of the image by changing the density of the dots, which can provide a smoother grayscale transition and is more suitable for the area that needs to be hidden in the image, that is, the watermark text area. The advantage of extracting the non-watermark text area from the image after amplitude modulation (AM) screening is that AM screening simulates grayscale by changing the size of the dots, which is more suitable for the area that needs to be emphasized or highlighted in the image, that is, the non-watermark text area. Through the above settings, the watermark text in the watermark image is more hidden, and the watermark text after the watermark image is copied is more obvious.
[0071] It is understandable that the method for generating a plaintext document shading watermark that is visible when copied provided by this application is mainly to improve the (AM / FM) hybrid screening technology, and apply the improved hybrid screening technology to the generation of watermark images. Its effects are: 1. Watermark embedding is concealed: conventional plaintext watermarks are very obvious after being embedded in the document background, and a watermark that is too obvious will affect the reading of the original text of the document to a certain extent; to address this problem, this application embeds the watermark text into a pattern composed of geometric lines to generate a watermark image, and the watermark image can be embedded in the document background after adjusting the transparency as a document shading; the shading design can be made more transparent than the traditional plaintext watermark, and the watermark is more concealed and difficult to detect after being spread out, and does not affect the reading of the original text of the document. 2. Good copying effect of watermark image: Conventional halftone watermark technology adopts single screening. After the generated watermark image is copied, the watermark text is not obvious and there are regular lines that affect vision, making it difficult to identify the watermark text; to address this problem, this application adopts a mixed screening design, and preferably uses FM dots to generate the watermark text area, and AM dots to generate the non-watermark text area; the mixed screening design avoids the regular lines generated after copying the single screen image, and the small FM dots are easily lost after copying, so the watermark text area after copying is brighter and visible to the naked eye, which is easy to identify / extract. 3. Good watermark image fusion effect: This application generates watermark images based on mixed screening, and there are difficulties in image fusion; to address this problem, this application designs the size of the second screening matrix through the size of the sampling matrix and the first screening matrix, so that the coverage of AM and FM screening dots is similar, the fineness is different, and the image size after screening is the same, which can achieve seamless splicing of text areas and non-text areas, and improve the fusion effect of watermark images. 4. Good device compatibility: Traditional watermark algorithms are mostly adapted for specific printers and are device-dependent. Different devices may process halftone images differently, resulting in different watermark image printing / copying effects. To address this issue, this application generates watermark images by forming dots of different sizes and frequencies through hybrid screening, which is applicable to different devices. 5. Low difficulty in generating watermark images: High-quality halftone watermark generation and embedding methods usually involve complex calculations and low processing efficiency. To address this issue, the hybrid screening proposed in this application only requires matrix addition and multiplication, which reduces the difficulty of calculation and improves processing efficiency.
[0072] See also Fig.11 As shown, Fig.11 A flowchart of a copy-visible watermark image embedding method provided in an embodiment of the present application. The watermark image embedding method comprises: obtaining a document; obtaining a watermark image based on the copy-visible watermark image generation method as described above; adjusting the transparency of the watermark image and embedding it into the background of the document to obtain a watermark document embedded with the watermark image.
[0073] Specifically, Fig.12A schematic diagram of a low-transparency watermark image provided in an embodiment of the present application, Fig.13 A schematic diagram of a watermark image with high transparency provided by an embodiment of the present application. The watermark image with adjusted transparency is embedded into the background of a document to obtain a watermark document. Fig.14 This is a schematic diagram of a watermark image with low transparency provided in an embodiment of the present application after being copied. Fig.15 This is a schematic diagram of a watermark image with high transparency after being copied provided in an embodiment of the present application.
[0074] See also Figure 16-18 As shown, the present application also provides a specific copying experiment, and performs a copying comparison experiment using a watermark document generated by an embodiment of the present application and a watermark document generated by other screening methods.
[0075] Fig.16 This is a schematic diagram of a watermark document obtained by other methods after being copied. It can be seen that the watermark text of the watermark image generated by other methods is not obvious after being copied and there are regular interference stripes, as shown in the circled area in the figure. Fig.17 A schematic diagram of a watermark document generated by an embodiment of the present application, Fig.18 This is a schematic diagram of a watermark document generated by an embodiment of the present application after being copied. It can be seen that after the watermark image generated by the present embodiment is copied, the watermark text is more obvious and has no interference stripes.
[0076] In an exemplary embodiment, a computer program product is also provided, including a computer program, which implements the above-mentioned watermark image generating method or the above-mentioned watermark image embedding method when executed by a processor.
[0077] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for generating a watermark image for copying, characterized in that: include: Obtain watermark text information, watermark position information and watermark pattern composed of geometric line intervals; splicing the watermark patterns to obtain a first pattern image, and downsampling the first pattern image to obtain a second pattern image; Performing a first screening process on the first pattern image according to the first screening matrix to obtain a first screened image, determining a size of a second screening matrix according to a size of a down-sampling matrix and a size of the first screening matrix, and performing a second screening process on the second pattern image according to the second screening matrix to obtain a second screened image having the same size as the first screened image; Scaling the first screened image and the second screened image to obtain a background pattern according to the document watermark fineness requirement, scaling the first pattern image and the second pattern image to obtain an original pattern with the same size as the background pattern, and removing interfering dots in the background pattern according to the blank area of the original pattern; Repeatingly expanding the two background patterns according to the document watermark size requirements to obtain a first background image and a second background image, respectively extracting a text mask and a text anti-mask from the first background image and the second background image according to the watermark text information and the watermark position information; Extracting the watermark text area and the non-watermark text area from the first background image and the second background image respectively according to the text mask and the text anti-mask, and splicing them to obtain a watermark image; Wherein, when the first screening process is FM screening process, the second screening process is AM screening process, and when the first screening process is AM screening process, the second screening process is FM screening process; Downsampling the first pattern image to obtain a second pattern image; comprising: dividing the first pattern image into a plurality of blocks according to a set sampling matrix; extracting a sampled pixel value from each block; generating a second pattern image based on the sampled pixel values of all blocks; The method removes interfering dots in the background pattern according to the blank area of the original pattern; comprising: extracting the blank area from the original pattern; mapping the blank area to the background pattern, using the dots in the mapped area as interfering dots; and removing the interfering dots in the background pattern.
2. A method for generating a watermark image for copying according to claim 1, characterized in that: The watermark pattern is formed by the geometric lines of a lens pattern.
3. A method for generating a watermark image for copying according to claim 1, characterized in that: Determining the size of the second screening matrix according to the size of the down-sampling matrix and the size of the first screening matrix; comprising: The size of the downsampling sampling matrix is , the size of the first screening matrix is When , the size of the second screening matrix is ,in , , , All are positive numbers.
4. A method for generating a watermark image for copying according to claim 1, characterized in that: The first screening process is FM screening process, and the second screening process is AM screening process.
5. A method for generating a watermark image for copying according to claim 4, characterized in that: The downsampling adopts The sampling matrix of the first screening process adopts The second screening process uses a distributed matrix. The point cluster matrix.
6. A method for generating a watermark image for copying according to claim 5, characterized in that: A text mask is extracted from the first background image, and a text reverse mask is extracted from the second background image.
7. A method for embedding a watermark image that is visible in a copy, characterized in that: include: Get the document; Obtaining a watermark image based on the method for generating a watermark image for copying as claimed in any one of claims 1 to 6; The transparency of the watermark image is adjusted and embedded into the background of the document to obtain a watermark document embedded with the watermark image.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the watermark image generating method described in any one of claims 1 to 6 or the watermark image embedding method described in claim 7 is implemented.
Citation Information
Patent Citations
Halftone copying fragile watermarking technical method based on moire effect
CN110163789A
Digital printing customized latent image image-text watermark information development method in copying
CN113761487A
Prepress workflow process employing frequency modulation (FM) screening techniques
US20050226498A1
Digital watermarking process
US20080019559A1
