Skip to content

shangfabao/BlindWatermark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlindWatermark

在图片上加隐藏的水印

  • 原理
    • Encode:
      原图 --- 变换 ---> 变换域 + 水印 --- 逆变换 ---> 带水印图
    • Decode:
      带水印图 --- 变换 ---> 变换域

Usage

Usage: java -jar BlindWatermark.jar <commands>
    commands:
        encode <option> <original image> <watermark> <embedded image>
        decode <option> <original image> <embedded image>
    encode options:
        -c discrete cosine transform
        -f discrete fourier transform (Deprecated)
        -i image watermark
        -t text  watermark
    decode options:
        -c discrete cosine transform
        -f discrete fourier transform (Deprecated)
    example:
        encode -ct input.png watermark output.png
        decode -c  input.png output.png

Build

gradle build

Demo

原图:

image

加文字水印:
java -jar BlindWatermark.jar encode -ct gakki-src.png 测试test gakki-dct-text-ec.jpg

image

文字水印解码:
java -jar BlindWatermark.jar decode -c gakki-dct-text-ec.jpg gakki-dct-text-dc.jpg

image

加图片水印:
java -jar BlindWatermark.jar encode -ci gakki-src.png watermark.png gakki-dct-img-ec.jpg

image

图片水印解码:
java -jar BlindWatermark.jar decode -c gakki-dct-img-ec.jpg gakki-dct-img-dc.jpg

image

License

Apache-2.0

About

Java 盲水印

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%