We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用项目中自带的二维码图片给这个图片打上水印
再次给上面打上水印的图片再次打上自己的二维码图片水印
成功解出了我的水印, 并且设置不同的密码依然可以覆盖
测试代码:
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import cv2 from blind_watermark import WaterMark import os os.chdir(os.path.dirname(__file__)) bwm = WaterMark(password_wm=123, password_img=123) # 读取原图 bwm.read_img(filename='pic/ori_img.jpeg') # 读取水印 bwm.read_wm('pic/watermark.png') # 打上盲水印 bwm.embed('output/embedded.png') wm_shape = cv2.imread('pic/watermark.png', flags=cv2.IMREAD_GRAYSCALE).shape # 再次打水印 bwm = WaterMark(password_wm=1, password_img=1) # 读取原图 bwm.read_img(filename='output/embedded.png') # 读取水印 bwm.read_wm('pic/watermark2.png') # 打上盲水印 bwm.embed('output/embedded2.png') wm_shape = cv2.imread('pic/watermark2.png', flags=cv2.IMREAD_GRAYSCALE).shape # %% 解水印 bwm1 = WaterMark(password_wm=1, password_img=1) # 注意需要设定水印的长宽wm_shape print(wm_shape) bwm1.extract('output/embedded2.png', wm_shape=wm_shape, out_wm_name='output/wm_extracted.png', mode='img') bwm1 = WaterMark(password_wm=123, password_img=123) # 注意需要设定水印的长宽wm_shape print(wm_shape) bwm1.extract('output/embedded2.png', wm_shape=wm_shape, out_wm_name='output/wm_extracted2.png', mode='img')
The text was updated successfully, but these errors were encountered:
当图片打上图片水印后再次打上文字水印, 图片水印将无法解出
Sorry, something went wrong.
我猜测应该是再次打上水印的时候破坏了频域特征。频域隐写无法抵御滤波攻击,这种攻击方式可以改变信号的频域特征以及同步性。这个水印的利用了频域特征,当再次打水印的时候又在原来的特征上再次做了变更,从另一方面考虑,其实就等同于实施了一次频域攻击。
No branches or pull requests
使用项目中自带的二维码图片给这个图片打上水印
再次给上面打上水印的图片再次打上自己的二维码图片水印
成功解出了我的水印, 并且设置不同的密码依然可以覆盖
测试代码:
The text was updated successfully, but these errors were encountered: