linyacool / blind-watermark

Watermark added to the frequency domain by Fourier transform
MIT License
487 stars 107 forks source link

a jpg pic can't see watermark #1

Closed idonkeyliu closed 5 years ago

idonkeyliu commented 7 years ago

after decode, Jpg can't see watermark. The pic is a vertical pic. ori

linyacool commented 7 years ago

Jpg format is lossy compression , you'd better use some lossless compression formats like bmp, png, gif.

idonkeyliu commented 7 years ago

OK, thank. I'll have a try.

pxpy commented 7 years ago

PS C:\Users\panxin\Desktop> python encode.py --image 3d.tif --watermark wm.png --result jm.tif libpng warning: iCCP: known incorrect sRGB profile Traceback (most recent call last): File "encode.py", line 54, in main() File "encode.py", line 30, in main encode(img, wm, res, alpha) File "encode.py", line 39, in encode x, y = range(height / 2), range(width) TypeError: 'float' object cannot be interpreted as an integer

linyacool commented 7 years ago

@pxpy Could you please show me your picture ? My email : xxbbb@vip.qq.com

Zola commented 6 years ago

I was verified that jpeg format supported.

something wrong when I add argument -- alpha

$python encode.py --image ori.jpg --watermark watermark.jpg --result res.jpg --alpha 5
Traceback (most recent call last):
  File "encode.py", line 55, in <module>
    main()
  File "encode.py", line 31, in main
    encode(img, wm, res, alpha)
  File "encode.py", line 50, in encode
    res_f = img_f + alpha * tmp
TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype('S32') dtype('S32') dtype('S32')
linyacool commented 6 years ago

@Zola Sorry for that, now I have fixed it.

yejunlei2008 commented 6 years ago

The Python3 version of the blind watermark can be used, but it has no effect. It is not the image range is wrong or the watermark cannot be loaded. I hope I can fix it, or I need to know which libraries need to be installed.