CN114547563A - Image watermark embedding method and system capable of adaptively adjusting embedding strength - Google Patents

Image watermark embedding method and system capable of adaptively adjusting embedding strength Download PDF

Info

Publication number
CN114547563A
CN114547563A CN202210184518.XA CN202210184518A CN114547563A CN 114547563 A CN114547563 A CN 114547563A CN 202210184518 A CN202210184518 A CN 202210184518A CN 114547563 A CN114547563 A CN 114547563A
Authority
CN
China
Prior art keywords
watermark
modification
image
embedded
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210184518.XA
Other languages
Chinese (zh)
Inventor
田辉
刘其开
郭玉刚
张志翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei High Dimensional Data Technology Co ltd
Original Assignee
Hefei High Dimensional Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei High Dimensional Data Technology Co ltd filed Critical Hefei High Dimensional Data Technology Co ltd
Priority to CN202210184518.XA priority Critical patent/CN114547563A/en
Publication of CN114547563A publication Critical patent/CN114547563A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention particularly relates to a picture watermark embedding method capable of adaptively adjusting embedding strength, which comprises the following steps: s100, coding is carried out according to the random module R and the binaryzation information to be embedded to obtain a binaryzation watermark pattern; s200, horizontally and longitudinally tiling the watermark pattern to the width and height of the picture to be embedded to obtain a watermark matrix image; s300, modifying three-channel parameter values of each pixel point of the picture to be embedded according to the content of the watermark matrix image in the RGB color space, wherein the modification amplitude is in inverse proportion to the gray value of the pixel point. During superposition, the embedding of the watermark is conveniently realized by modifying the pixel values of RGB three channels, and during modification, the modification amplitude is in inverse proportion to the gray value, namely the modification amplitude is small under a light color background and large under a dark color background, so that the self-adaptive modification of the modification amplitude is realized, the invisible effect of the watermark is improved, and the watermark is not easy to perceive.

Description

可自适应调节嵌入强度的图片水印嵌入方法及系统Image watermark embedding method and system capable of adaptively adjusting embedding strength

技术领域technical field

本发明涉及水印嵌入技术领域,特别涉及一种可自适应调节嵌入强度的图片水印嵌入方法及系统。The invention relates to the technical field of watermark embedding, in particular to a picture watermark embedding method and system capable of adaptively adjusting the embedding strength.

背景技术Background technique

版权图片,是相对于盗版图片的概念。通常指经过图片的著作权持有人,或者是创作图片的作者或者机构,授权可以用于商业、出版、展览等用途的图像作品。图片在创作以后,图片所有者一般会在图片上添加水印以避免被盗用,目前常见的图片水印技术主要分为两种。Copyrighted images are a concept relative to pirated images. Usually refers to the copyright holder of the picture, or the author or organization that created the picture, and authorizes the image work that can be used for commercial, publishing, exhibition and other purposes. After the picture is created, the owner of the picture will generally add a watermark to the picture to avoid being stolen. At present, there are two common picture watermarking technologies.

第一种是可见水印,即在图片中添加可见的信息或图标,这种方法是相对比较简单且速度较快,缺点是视觉可见且容易被攻击擦除,客户观看图片的体验较差。第二种是隐形水印,市场主流的图片隐形水印算法主要是通过将图像从空间域转为频域,然后在频域中进行水印嵌入,之后再恢复到空间域,隐形水印具有不可见、不易察觉和不易擦除等诸多优点,明显优于可见水印。The first is the visible watermark, that is, adding visible information or icons to the picture. This method is relatively simple and fast. The disadvantage is that it is visually visible and easy to be attacked and erased, and the customer's experience of viewing the picture is poor. The second is invisible watermarking. The mainstream image invisible watermarking algorithm in the market mainly converts the image from the spatial domain to the frequency domain, then embeds the watermark in the frequency domain, and then restores it to the spatial domain. The invisible watermark is invisible and difficult to achieve. It has many advantages such as perceptibility and easy erasure, which is obviously better than visible watermark.

向图片添加隐形水印的方案有很多,我司于2021年6月29日提交的发明专利《水印生成、解码方法以及存储介质、电子设备》(申请号:2021107265874)中公开了一种向图像中添加水印的方法,这里通过随机模板R和版权信息生成水印图案,再将水印图案叠加在待嵌入的图像上。由于是通过轻微的修改通道值来实现水印嵌入的,叠加后的图像与原图相比而言,变化非常小,从而具有较好的隐形效果。但是由于上述修改都是固定的数值,在不同深浅的背景下,水印的可见性有差异,浅色背景被深色背景中的水印稍微明显一点,比如当图片中有大量留白的区域时,水印就会显得比较明显。There are many schemes for adding invisible watermarks to pictures. The invention patent "Watermark Generation and Decoding Method, Storage Medium and Electronic Equipment" (application number: 2021107265874) submitted by our company on June 29, 2021 discloses a method of adding invisible watermarks to images. The method of adding a watermark, here a watermark pattern is generated by random template R and copyright information, and then the watermark pattern is superimposed on the image to be embedded. Since the watermark is embedded by slightly modifying the channel value, the superimposed image has very little change compared with the original image, so it has a better invisible effect. However, since the above modifications are all fixed values, the visibility of the watermark is different under different shades of background. The light background is slightly more obvious than the watermark in the dark background. For example, when there are a lot of blank areas in the picture, The watermark will be more obvious.

发明内容SUMMARY OF THE INVENTION

本发明的首要目的在于提供一种可自适应调节嵌入强度的图片水印嵌入方法,保证浅色或深色背景下的水印可视效果一致。The primary purpose of the present invention is to provide a picture watermark embedding method that can adaptively adjust the embedding strength, so as to ensure the consistent visual effect of the watermark under light or dark backgrounds.

为实现以上目的,本发明采用的技术方案为:一种可自适应调节嵌入强度的图片水印嵌入方法,包括如下步骤:S100、根据随机模块R和二值化的待嵌入信息进行编码,得到二值化的水印图案;S200、将所述水印图案按横向与纵向平铺至待嵌入图片的宽高,得到水印矩阵图;S300、在RGB颜色空间中根据水印矩阵图的内容,对待嵌入图片每个像素点三通道参数值进行修改,修改幅度与像素点的灰度值成反比。In order to achieve the above purpose, the technical scheme adopted in the present invention is: a picture watermark embedding method that can adaptively adjust the embedding strength, comprising the following steps: S100, encoding according to the random module R and the binarized information to be embedded, and obtaining two Valued watermark pattern; S200, tile the watermark pattern horizontally and vertically to the width and height of the picture to be embedded, to obtain a watermark matrix diagram; S300, in the RGB color space, according to the content of the watermark matrix diagram, to be embedded in the picture each time The three-channel parameter value of each pixel is modified, and the modification magnitude is inversely proportional to the gray value of the pixel.

本发明的另一个目的在于提供一种可自适应调节嵌入强度的图片水印嵌入系统,保证浅色或深色背景下的水印可视效果一致。Another object of the present invention is to provide a picture watermark embedding system that can adaptively adjust the embedding strength, so as to ensure the consistent visual effect of the watermark under light or dark backgrounds.

为实现以上目的,本发明采用的技术方案为:一种可自适应调节嵌入强度的图片水印嵌入系统,包括水印图案生成模块,用于根据随机模块R和二值化的待嵌入信息进行编码得到二值化的水印图案;水印矩阵生成模块,用于根据水印图案生成与待嵌入图片尺寸相同的水印矩阵图;水印叠加模块,用于根据待嵌入图片中像素点的灰度值、水印矩阵图、预设的修改幅度对每个像素点三通道参数值进行修改得到嵌入水印的图片,其中的修改幅度与像素点的灰度值成反比。In order to achieve the above purpose, the technical scheme adopted in the present invention is: a picture watermark embedding system that can adaptively adjust the embedding strength, including a watermark pattern generation module, which is used for encoding according to the random module R and the binarized information to be embedded. The binarized watermark pattern; the watermark matrix generation module is used to generate a watermark matrix map with the same size as the image to be embedded according to the watermark pattern; the watermark overlay module is used to generate the watermark matrix map according to the gray value of the pixels in the image to be embedded and the watermark matrix map 2. Modifying the three-channel parameter value of each pixel with a preset modification range to obtain a watermark-embedded picture, where the modification range is inversely proportional to the gray value of the pixel.

与现有技术相比,本发明上述两个方案存在以下技术效果:根据随机模板R和待嵌入的信息生成水印图案,再根据水印图案生成水印矩阵图,可以方便的得到与待嵌入图片相同尺寸的水印图,在叠加的时候,通过修改RGB三通道的像素值来方便的实现水印的嵌入,并且在修改的时候,让修改幅度与灰度值成反比,即浅色背景下修改幅度小、深色背景下修改幅度大,这样就实现了修改幅度的自适应修改,提高了水印的隐形效果,不易被察觉。Compared with the prior art, the above two solutions of the present invention have the following technical effects: generating a watermark pattern according to the random template R and the information to be embedded, and then generating a watermark matrix diagram according to the watermark pattern, which can conveniently obtain the same size as the picture to be embedded. When the watermark image is superimposed, it is convenient to embed the watermark by modifying the pixel values of the RGB three channels, and when modifying, the modification amplitude is inversely proportional to the gray value, that is, the modification amplitude is small under the light background, Under the dark background, the modification range is large, which realizes the adaptive modification of the modification range, improves the invisible effect of the watermark, and is not easy to be detected.

附图说明Description of drawings

图1是本发明的流程图;Fig. 1 is the flow chart of the present invention;

图2是本发明中水印图案生成流程图;Fig. 2 is the watermark pattern generation flow chart in the present invention;

图3是本发明的系统框图。Figure 3 is a system block diagram of the present invention.

具体实施方式Detailed ways

下面结合图1至图3,对本发明做进一步详细叙述。The present invention will be described in further detail below with reference to FIGS. 1 to 3 .

参阅图1,本发明公开了一种可自适应调节嵌入强度的图片水印嵌入方法,包括如下步骤:S100、根据随机模块R和二值化的待嵌入信息进行编码,得到二值化的水印图案;S200、将所述水印图案按横向与纵向平铺至待嵌入图片的宽高,得到水印矩阵图;S300、在RGB颜色空间中根据水印矩阵图的内容,对待嵌入图片每个像素点三通道参数值进行修改,修改幅度与像素点的灰度值成反比。根据随机模板R和待嵌入的信息生成水印图案,再根据水印图案生成水印矩阵图,可以方便的得到与待嵌入图片相同尺寸的水印图,在叠加的时候,通过修改RGB三通道的像素值来方便的实现水印的嵌入,并且在修改的时候,让修改幅度与灰度值成反比,即浅色背景下修改幅度小、深色背景下修改幅度大,这样就实现了修改幅度的自适应修改,提高了水印的隐形效果,不易被察觉。Referring to FIG. 1 , the present invention discloses a picture watermark embedding method that can adaptively adjust the embedding strength, including the following steps: S100 , encoding according to the random module R and the binarized information to be embedded to obtain a binarized watermark pattern S200, the watermark pattern is tiled horizontally and vertically to the width and height of the picture to be embedded, to obtain a watermark matrix diagram; S300, in the RGB color space, according to the content of the watermark matrix diagram, each pixel point three channels of the embedded picture are treated The parameter value is modified, and the modification magnitude is inversely proportional to the gray value of the pixel. Generate a watermark pattern according to the random template R and the information to be embedded, and then generate a watermark matrix image according to the watermark pattern, which can easily obtain a watermark image of the same size as the image to be embedded. When superimposing, modify the pixel values of the RGB three channels to It is convenient to embed the watermark, and when modifying, let the modification range be inversely proportional to the gray value, that is, the modification range is small under the light background, and the modification range is large under the dark background, so that the adaptive modification of the modification range is realized. , which improves the invisible effect of the watermark and is not easy to be detected.

需要指出的是,这里述及的“修改幅度与像素点的灰度值成反比”,并不是对于任意两个像素点P1、P2,若P1的灰度值大于P2的灰度值,那么P1的修改幅度一定就小于P2的灰度值。这句话应当这样理解:灰度值较小时,修改幅度大;灰度值较大时,修改幅度小。It should be pointed out that the "modification amplitude is inversely proportional to the gray value of the pixel" mentioned here does not mean that for any two pixels P1 and P2, if the gray value of P1 is greater than the gray value of P2, then P1 The modification range must be smaller than the gray value of P2. This sentence should be understood as follows: when the gray value is small, the modification range is large; when the gray value is large, the modification range is small.

进一步地,所述的步骤S300中,修改幅度

Figure 100002_DEST_PATH_IMAGE001
,其中R、G、B和r、g、b分别代表修改前后的像素点三通道参数值,这里通过定义RGB三通道变化最大的那个值为修改幅度,这样就能更好的计算其余灰度值的关系;像素点的灰度值
Figure 382506DEST_PATH_IMAGE002
,修改前后像素点的灰度值变化小于设定阈值,这个阈值可以设置为0.1左右,这样可以保证修改前后,像素点的灰度值基本不变。Further, in the step S300, modify the amplitude
Figure 100002_DEST_PATH_IMAGE001
, where R, G, B and r, g, and b represent the three-channel parameter values of the pixels before and after the modification, respectively. Here, by defining the value with the largest change in the RGB three-channel value as the modification range, the rest of the gray levels can be better calculated. The relationship between the values; the gray value of the pixel point
Figure 382506DEST_PATH_IMAGE002
, the change of the gray value of the pixel before and after the modification is less than the set threshold, the threshold can be set to about 0.1, which can ensure that the gray value of the pixel is basically unchanged before and after the modification.

由于通道值为整数,并且我们在修改的时候,不会大幅度修改通道值,因此这里的修改幅度k可取值非常有限,为了确保修改幅度与灰度值成反比,所述的步骤S300中,设置有多个灰度值区间,各灰度区间内的像素点修改幅度一致,只要保证“灰度值较小时,修改幅度大;灰度值较大时,修改幅度小”这个关系即可。Since the channel value is an integer, and we will not greatly modify the channel value when modifying, the modification range k here can take a very limited value. In order to ensure that the modification range is inversely proportional to the gray value, in the step S300 , there are multiple gray value intervals, and the modification range of the pixels in each gray value interval is the same, as long as the relationship of "when the gray value is small, the modification range is large; when the gray value is large, the modification range is small". .

这里通过举例来详细说明修改幅度和灰度值的关系,具体地,所述的灰度区间有三个:当

Figure 100002_DEST_PATH_IMAGE003
时,修改幅度
Figure 27114DEST_PATH_IMAGE004
;当
Figure 100002_DEST_PATH_IMAGE005
时,修改幅度
Figure 217924DEST_PATH_IMAGE006
;当
Figure 100002_DEST_PATH_IMAGE007
时,修改幅度
Figure 724123DEST_PATH_IMAGE008
;其中
Figure 100002_DEST_PATH_IMAGE009
,也即当k2取4的时候,k3只能取2或3。这里的具体数值,只是一个较为优选的方案,实际可以选择其他的数值。Here, the relationship between the modification amplitude and the gray value is explained in detail by taking an example. Specifically, there are three gray intervals: when
Figure 100002_DEST_PATH_IMAGE003
, the modification range
Figure 27114DEST_PATH_IMAGE004
;when
Figure 100002_DEST_PATH_IMAGE005
, the modification range
Figure 217924DEST_PATH_IMAGE006
;when
Figure 100002_DEST_PATH_IMAGE007
, the modification range
Figure 724123DEST_PATH_IMAGE008
;in
Figure 100002_DEST_PATH_IMAGE009
, that is, when k 2 takes 4, k 3 can only take 2 or 3. The specific numerical value here is only a relatively preferred solution, and other numerical values can actually be selected.

进一步地,由于通道B对灰度值的贡献较小,为了保证灰度一致性,本发明中优选地,所述的步骤S300中,对像素点三通道参数值进行修改时,通道B的变化值即为修改幅度k,通道R和通道G的变化值等于0或1或-1用于保证修改前后像素点的灰度值变化小于设定阈值。这里选择通道B为主要修改通道,可以增加修改幅度k的取值范围,选择通道R或G为主要修改通道后,不利于保持灰度一致性。Further, since the contribution of channel B to the grayscale value is small, in order to ensure the consistency of grayscale, in the present invention, preferably, in the step S300, when the three-channel parameter value of the pixel point is modified, the change of channel B The value is the modification amplitude k, and the change value of channel R and channel G is equal to 0 or 1 or -1 to ensure that the change of the gray value of the pixel point before and after modification is less than the set threshold. Here, channel B is selected as the main modification channel, and the value range of the modification amplitude k can be increased. After selecting channel R or G as the main modification channel, it is not conducive to maintaining grayscale consistency.

更具体地,当

Figure 113516DEST_PATH_IMAGE003
时,像素点修改后的r、g、b三通道参数值分别等于R+1、G+1、B-8或分别等于R+1、G+1、B-7;当
Figure 929025DEST_PATH_IMAGE005
时,像素点修改后的r、g、b三通道参数值分别等于R、G+1、B-5;当
Figure 75973DEST_PATH_IMAGE007
时,像素点修改后的r、g、b三通道参数值分别等于R+1、G、B-3或分别等于R-1、G+1、B-3。该具体实施方式,是修改效果非常好的优选方案。修改的时候,对于待嵌入图片的任一像素点,先判断水印矩阵图对应像素点的参数是0还是1,如果是1,再结合该像素点的灰度值和这里的判断步骤进行RGB三通道参数值的修改。如果是0,可以不修改,也可以反向修改,第一个修改方式R+1、G+1、B-8的反向修改即R-1、G-1、B+8,具体的修改情况这里不做详述,我们只需要有修改,体现出不同,就能进行水印的嵌入。More specifically, when
Figure 113516DEST_PATH_IMAGE003
When the pixel point is modified, the three channel parameter values of r, g and b are respectively equal to R+1, G+1, B-8 or respectively equal to R+1, G+1, B-7; when
Figure 929025DEST_PATH_IMAGE005
, the modified r, g, b three channel parameter values of the pixel point are equal to R, G+1, B-5 respectively; when
Figure 75973DEST_PATH_IMAGE007
, the modified r, g, b three channel parameter values of the pixel point are respectively equal to R+1, G, B-3 or respectively equal to R-1, G+1, B-3. This specific embodiment is a preferred solution with very good modification effect. When modifying, for any pixel to be embedded in the picture, first determine whether the parameter of the corresponding pixel of the watermark matrix is 0 or 1, if it is 1, then combine the gray value of the pixel and the judgment steps here to perform RGB three. Modification of channel parameter values. If it is 0, you can not modify it, or you can modify it in the reverse direction. The first modification method is the reverse modification of R+1, G+1, and B-8, that is, R-1, G-1, and B+8. The specific modification The situation is not described in detail here, we only need to modify it to reflect the difference, and then we can embed the watermark.

参阅图2,在我司申请的发明专利《水印生成、解码方法以及存储介质、电子设备》(申请号:2021107265874)中,在进行水印解码的时候,需要用到随机模板R,这就需要嵌入方和提取方能够进行通信传输随机模板R,使用过程中非常的不方便且不安全。本发明中优选地,所述的步骤S100中,随机模板R为预设尺寸的二值化图像;待嵌入的信息包含N比特信息的二进制数,其中,N为整数;按如下步骤对随机模板R进行编码:S101、在N比特的二进制数首位添加1,然后将该N+1比特的二进制数转换成二维矩阵;S102、按从左到右、从上到下的顺序依次判断二维矩阵中的元素值,若该元素为第一行、第一列,则用随机模板R的图像表示该元素,若该元素值与上一个元素值相同,则用随机模板R的图像表示该元素,若该元素值与上一个元素值相异,则用随机模板R的反向图像表示该元素。按此种方式进行编码,无需使用随机模板R也能进行解码,因为这里是通过差异化来体现二进制信息的,按上述步骤进行编码,提高了解码的便利性以及安全性。Referring to Figure 2, in the invention patent "Watermark Generation and Decoding Method and Storage Medium, Electronic Equipment" (application number: 2021107265874) applied by our company, when decoding the watermark, a random template R needs to be used, which requires embedding The party and the extractor can communicate and transmit the random template R, which is very inconvenient and insecure in the use process. Preferably in the present invention, in the step S100, the random template R is a binarized image of a preset size; the information to be embedded includes a binary number of N-bit information, where N is an integer; Encoding with R: S101, add 1 to the first position of the N-bit binary number, and then convert the N+1-bit binary number into a two-dimensional matrix; S102, judge the two-dimensional matrix sequentially from left to right and top to bottom The element value in the matrix. If the element is the first row and the first column, the image of the random template R is used to represent the element. If the element value is the same as the previous element value, the image of the random template R is used to represent the element. , if the element value is different from the previous element value, the reverse image of the random template R is used to represent the element. By encoding in this way, decoding can be performed without using random template R, because binary information is represented by differentiation here, and encoding according to the above steps improves the convenience and security of decoding.

参阅图3,一种可自适应调节嵌入强度的图片水印嵌入系统,包括水印图案生成模块,用于根据随机模块R和二值化的待嵌入信息进行编码得到二值化的水印图案;水印矩阵生成模块,用于根据水印图案生成与待嵌入图片尺寸相同的水印矩阵图;水印叠加模块,用于根据待嵌入图片中像素点的灰度值、水印矩阵图、预设的修改幅度对每个像素点三通道参数值进行修改得到嵌入水印的图片,其中的修改幅度与像素点的灰度值成反比。根据随机模板R和待嵌入的信息生成水印图案,再根据水印图案生成水印矩阵图,可以方便的得到与待嵌入图片相同尺寸的水印图,在叠加的时候,通过修改RGB三通道的像素值来方便的实现水印的嵌入,并且在修改的时候,让修改幅度与灰度值成反比,即浅色背景下修改幅度小、深色背景下修改幅度大,这样就实现了修改幅度的自适应修改,提高了水印的隐形效果,不易被察觉。Referring to Figure 3, a picture watermark embedding system that can adaptively adjust the embedding strength, including a watermark pattern generation module, for encoding according to the random module R and the binarized information to be embedded to obtain a binarized watermark pattern; watermark matrix; The generation module is used to generate a watermark matrix map with the same size as the picture to be embedded according to the watermark pattern; the watermark overlay module is used for each pixel according to the gray value of the pixel to be embedded, the watermark matrix map, and the preset modification range. The three-channel parameter value of the pixel point is modified to obtain the image embedded with the watermark, and the modification magnitude is inversely proportional to the gray value of the pixel point. Generate a watermark pattern according to the random template R and the information to be embedded, and then generate a watermark matrix image according to the watermark pattern, which can easily obtain a watermark image of the same size as the image to be embedded. When superimposing, modify the pixel values of the RGB three channels to It is convenient to embed the watermark, and when modifying, let the modification range be inversely proportional to the gray value, that is, the modification range is small under the light background, and the modification range is large under the dark background, so that the adaptive modification of the modification range is realized. , which improves the invisible effect of the watermark and is not easy to be detected.

本发明还公开了一种计算机可读存储介质和一种电子设备,其中,一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现前述任一项可自适应调节嵌入强度的图片水印嵌入方法。一种电子设备,包括存储器、处理器及存储在存储器上的计算机程序,所述处理器执行所述计算机程序时,实现前述任一项可自适应调节嵌入强度的图片水印嵌入方法。The present invention also discloses a computer-readable storage medium and an electronic device, wherein a computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, implements any of the foregoing An image watermark embedding method that can adaptively adjust the embedding strength. An electronic device includes a memory, a processor, and a computer program stored on the memory. When the processor executes the computer program, any one of the foregoing image watermark embedding methods capable of adaptively adjusting the embedding strength is implemented.

Claims (10)

1.一种可自适应调节嵌入强度的图片水印嵌入方法,其特征在于:包括如下步骤:1. a picture watermark embedding method capable of adaptively adjusting embedding strength, is characterized in that: comprise the steps: S100、根据随机模块R和二值化的待嵌入信息进行编码,得到二值化的水印图案;S100, encoding according to the random module R and the binarized information to be embedded to obtain a binarized watermark pattern; S200、将所述水印图案按横向与纵向平铺至待嵌入图片的宽高,得到水印矩阵图;S200, tiling the watermark pattern horizontally and vertically to the width and height of the picture to be embedded, to obtain a watermark matrix diagram; S300、在RGB颜色空间中根据水印矩阵图的内容,对待嵌入图片每个像素点三通道参数值进行修改,修改幅度与像素点的灰度值成反比。S300, in the RGB color space, according to the content of the watermark matrix image, modify the three-channel parameter value of each pixel point of the image to be embedded, and the modification magnitude is inversely proportional to the gray value of the pixel point. 2.如权利要求1所述的可自适应调节嵌入强度的图片水印嵌入方法,其特征在于:所述的步骤S300中,修改幅度
Figure DEST_PATH_IMAGE001
,其中R、G、B和r、g、b分别代表修改前后的像素点三通道参数值;像素点的灰度值
Figure 985999DEST_PATH_IMAGE002
,修改前后像素点的灰度值变化小于设定阈值。
2. The image watermark embedding method capable of adaptively adjusting embedding strength as claimed in claim 1, wherein: in the step S300, the modification amplitude
Figure DEST_PATH_IMAGE001
, where R, G, B, and r, g, and b represent the three-channel parameter values of the pixel before and after the modification; the gray value of the pixel
Figure 985999DEST_PATH_IMAGE002
, the change of gray value of pixels before and after modification is less than the set threshold.
3.如权利要求2所述的可自适应调节嵌入强度的图片水印嵌入方法,其特征在于:所述的步骤S300中,设置有多个灰度值区间,各灰度区间内的像素点修改幅度一致。3. The image watermark embedding method of claim 2, wherein in the step S300, a plurality of gray value intervals are provided, and the pixel points in each gray interval are modified The magnitude is the same. 4.如权利要求2所述的可自适应调节嵌入强度的图片水印嵌入方法,其特征在于:所述的灰度区间有三个:4. The picture watermark embedding method that can adaptively adjust the embedding intensity as claimed in claim 2, it is characterized in that: described gray scale interval has three:
Figure DEST_PATH_IMAGE003
时,修改幅度
Figure 264534DEST_PATH_IMAGE004
when
Figure DEST_PATH_IMAGE003
, the modification range
Figure 264534DEST_PATH_IMAGE004
;
Figure DEST_PATH_IMAGE005
时,修改幅度
Figure 163351DEST_PATH_IMAGE006
when
Figure DEST_PATH_IMAGE005
, the modification range
Figure 163351DEST_PATH_IMAGE006
;
Figure DEST_PATH_IMAGE007
时,修改幅度
Figure 46993DEST_PATH_IMAGE008
when
Figure DEST_PATH_IMAGE007
, the modification range
Figure 46993DEST_PATH_IMAGE008
;
其中
Figure DEST_PATH_IMAGE009
in
Figure DEST_PATH_IMAGE009
.
5.如权利要求2所述的可自适应调节嵌入强度的图片水印嵌入方法,其特征在于:所述的步骤S300中,对像素点三通道参数值进行修改时,通道B的变化值即为修改幅度k,通道R和通道G的变化值等于0或1或-1用于保证修改前后像素点的灰度值变化小于设定阈值。5. The image watermark embedding method of claim 2, wherein in the step S300, when the three-channel parameter value of the pixel is modified, the change value of the channel B is The modification amplitude k, the change value of channel R and channel G is equal to 0 or 1 or -1 to ensure that the change of the gray value of the pixel point before and after the modification is less than the set threshold. 6.如权利要求4所述的可自适应调节嵌入强度的图片水印嵌入方法,其特征在于:6. The picture watermark embedding method of adaptively adjusting embedding strength as claimed in claim 4, is characterized in that:
Figure 520700DEST_PATH_IMAGE003
时,像素点修改后的r、g、b三通道参数值分别等于R+1、G+1、B-8或分别等于R+1、G+1、B-7;
when
Figure 520700DEST_PATH_IMAGE003
When the pixel point is modified, the three-channel parameter values of r, g, and b are respectively equal to R+1, G+1, B-8 or respectively equal to R+1, G+1, B-7;
Figure 755372DEST_PATH_IMAGE005
时,像素点修改后的r、g、b三通道参数值分别等于R、G+1、B-5;
when
Figure 755372DEST_PATH_IMAGE005
When the pixel point is modified, the three channel parameter values of r, g and b are respectively equal to R, G+1, B-5;
Figure 910410DEST_PATH_IMAGE007
时,像素点修改后的r、g、b三通道参数值分别等于R+1、G、B-3或分别等于R-1、G+1、B-3。
when
Figure 910410DEST_PATH_IMAGE007
, the modified r, g, b three channel parameter values of the pixel point are respectively equal to R+1, G, B-3 or respectively equal to R-1, G+1, B-3.
7.如权利要求1所述的可自适应调节嵌入强度的图片水印嵌入方法,其特征在于:所述的步骤S100中,随机模板R为预设尺寸的二值化图像;待嵌入的信息包含N比特信息的二进制数,其中,N为整数;按如下步骤对随机模板R进行编码:7. The image watermark embedding method of claim 1, wherein in the step S100, the random template R is a binarized image of a preset size; the information to be embedded comprises A binary number of N-bit information, where N is an integer; the random template R is encoded as follows: S101、在N比特的二进制数首位添加1,然后将该N+1比特的二进制数转换成二维矩阵;S101, adding 1 to the first position of the N-bit binary number, and then converting the N+1-bit binary number into a two-dimensional matrix; S102、按从左到右、从上到下的顺序依次判断二维矩阵中的元素值,若该元素为第一行、第一列,则用随机模板R的图像表示该元素,若该元素值与上一个元素值相同,则用随机模板R的图像表示该元素,若该元素值与上一个元素值相异,则用随机模板R的反向图像表示该元素。S102. Determine the element values in the two-dimensional matrix in the order from left to right and top to bottom. If the element is the first row and the first column, the image of the random template R is used to represent the element. If the value is the same as the previous element value, the image of the random template R is used to represent the element. If the element value is different from the previous element value, the reverse image of the random template R is used to represent the element. 8.一种可自适应调节嵌入强度的图片水印嵌入系统,其特征在于:包括8. A picture watermark embedding system capable of adaptively adjusting embedding strength, characterized in that: comprising: 水印图案生成模块,用于根据随机模块R和二值化的待嵌入信息进行编码得到二值化的水印图案;The watermark pattern generation module is used for encoding according to the random module R and the binarized information to be embedded to obtain a binarized watermark pattern; 水印矩阵生成模块,用于根据水印图案生成与待嵌入图片尺寸相同的水印矩阵图;The watermark matrix generation module is used to generate a watermark matrix diagram with the same size as the image to be embedded according to the watermark pattern; 水印叠加模块,用于根据待嵌入图片中像素点的灰度值、水印矩阵图、预设的修改幅度对每个像素点三通道参数值进行修改得到嵌入水印的图片,其中的修改幅度与像素点的灰度值成反比。The watermark superposition module is used to modify the three-channel parameter value of each pixel point according to the gray value of the pixel points in the image to be embedded, the watermark matrix map, and the preset modification range to obtain the image embedded with the watermark, where the modification range is the same as the pixel value. The gray value of the point is inversely proportional. 9.一种计算机可读存储介质,其特征在于:其上存储有计算机程序,所述计算机程序被处理器执行时,实现如权利要求1-7中任一项所述的可自适应调节嵌入强度的图片水印嵌入方法。9. A computer-readable storage medium, characterized in that: a computer program is stored thereon, and when the computer program is executed by a processor, the adaptively adjustable embedding according to any one of claims 1-7 is realized. Intensity image watermark embedding method. 10.一种电子设备,其特征在于:包括存储器、处理器及存储在存储器上的计算机程序,所述处理器执行所述计算机程序时,实现如权利要求1-7中任一项所述的可自适应调节嵌入强度的图片水印嵌入方法。10. An electronic device, characterized in that it comprises a memory, a processor and a computer program stored on the memory, and when the processor executes the computer program, the computer program according to any one of claims 1-7 is realized. An image watermark embedding method that can adaptively adjust the embedding strength.
CN202210184518.XA 2022-02-28 2022-02-28 Image watermark embedding method and system capable of adaptively adjusting embedding strength Pending CN114547563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210184518.XA CN114547563A (en) 2022-02-28 2022-02-28 Image watermark embedding method and system capable of adaptively adjusting embedding strength

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210184518.XA CN114547563A (en) 2022-02-28 2022-02-28 Image watermark embedding method and system capable of adaptively adjusting embedding strength

Publications (1)

Publication Number Publication Date
CN114547563A true CN114547563A (en) 2022-05-27

Family

ID=81680038

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210184518.XA Pending CN114547563A (en) 2022-02-28 2022-02-28 Image watermark embedding method and system capable of adaptively adjusting embedding strength

Country Status (1)

Country Link
CN (1) CN114547563A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116150716A (en) * 2023-04-24 2023-05-23 中国科学技术大学 Database watermark embedding method, extraction method, storage medium and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688843A (en) * 2017-05-17 2018-02-13 上海冠众光学科技有限公司 A kind of method for generating holograms and device with watermarked information
KR20180127261A (en) * 2018-07-05 2018-11-28 주식회사 하루컴퍼니 Method for embedding and extraction of watermarking data
US20190066254A1 (en) * 2016-01-27 2019-02-28 Rakuten, Inc. Image processing device, image processing method, and program
CN109767375A (en) * 2018-12-06 2019-05-17 北京北信源信息安全技术有限公司 Method and system for image watermark embedding and tracing
CN112488902A (en) * 2020-12-21 2021-03-12 重庆紫光华山智安科技有限公司 Optimization method, system, medium and terminal for self-adaptive hidden watermark
CN113392381A (en) * 2021-06-29 2021-09-14 合肥高维数据技术有限公司 Watermark generation method, watermark decoding method, storage medium, and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190066254A1 (en) * 2016-01-27 2019-02-28 Rakuten, Inc. Image processing device, image processing method, and program
CN107688843A (en) * 2017-05-17 2018-02-13 上海冠众光学科技有限公司 A kind of method for generating holograms and device with watermarked information
KR20180127261A (en) * 2018-07-05 2018-11-28 주식회사 하루컴퍼니 Method for embedding and extraction of watermarking data
CN109767375A (en) * 2018-12-06 2019-05-17 北京北信源信息安全技术有限公司 Method and system for image watermark embedding and tracing
CN112488902A (en) * 2020-12-21 2021-03-12 重庆紫光华山智安科技有限公司 Optimization method, system, medium and terminal for self-adaptive hidden watermark
CN113392381A (en) * 2021-06-29 2021-09-14 合肥高维数据技术有限公司 Watermark generation method, watermark decoding method, storage medium, and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116150716A (en) * 2023-04-24 2023-05-23 中国科学技术大学 Database watermark embedding method, extraction method, storage medium and electronic device

Similar Documents

Publication Publication Date Title
Wu et al. A steganographic method for images by pixel-value differencing
Wang et al. Blind image data hiding based on self reference
US7894626B2 (en) System and method for the generation of multiple angle correlation-based digital watermarks
Hwang A digital image copyright protection scheme based on visual cryptography
Huang et al. A hybrid SVD-DCT watermarking method based on LPSNR
Lee et al. High capacity image steganographic model
Pereira et al. Optimal transform domain watermark embedding via linear programming
Ni et al. Secure semi-blind watermarking based on iteration mapping and image features
Arya et al. A secure non-blind block based digital image watermarking technique using DWT and DCT
CN103366336A (en) Image watermarking method based on human eye contrast ratio sensitivity visual characteristics
Naini Digital watermarking using Matlab
Lee et al. A new LSB based digital watermarking scheme with random mapping function
CN105160619B (en) A kind of image watermark detection method
CN101916427A (en) A Method of Image Watermarking Based on Spatial Domain
CN114549273A (en) Self-adaptive robust watermark embedding method and system based on deep neural network
Shoaib et al. Authenticating using secret key in digital video watermarking using 3-level DWT
CN114547563A (en) Image watermark embedding method and system capable of adaptively adjusting embedding strength
CN113393363B (en) Watermark embedding and extracting method, storage medium and electronic device
JP3881810B2 (en) Digital watermark with adjustable watermark mark visibility
Cheng et al. Digital watermarking based on frequency random position insertion
CN113179407A (en) Video watermark embedding and extracting method and system based on interframe DCT coefficient correlation
CN110322387A (en) A kind of reversible visual watermark method being adapted to picture material
Ganesan et al. Multiple binary images watermarking in spatial and frequency domains
Al-Otum et al. Color image watermarking based on self-embedded color permissibility with preserved high image quality and enhanced robustness
Patra et al. A new approach to invisible water marking of color images using alpha blending

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination