Code Monkey home page Code Monkey logo

blindwatermark's Introduction

BlindWatermark

Build Status

在图片上加隐藏的水印

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

Usage

Usage: java -jar BlindWatermark.jar <commands> [args...]
    commands:
        encode <option> <input> <watermark> <output>
        decode <option> <input> <output>
    encode options:
        -c discrete cosine transform
        -f discrete fourier transform
        -i image watermark
        -t text  watermark
    decode options:
        -c discrete cosine transform
        -f discrete fourier transform
    example:
        encode -ft input.png watermark output.png
        decode -fi input.png output.png

Build

gradle build

Demo

原图:

image

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

image

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

image

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

image

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

image

加文字水印(DFT):
java -jar BlindWatermark.jar encode -ft gakki-src.png 测试test gakki-dft-text-ec.png

image

文字水印解码(DFT):
java -jar BlindWatermark.jar decode -f gakki-dft-text-ec.png gakki-dft-text-dc.png

image

加图片水印(DFT):
java -jar BlindWatermark.jar encode -fi gakki-src.png watermark.png gakki-dft-img-ec.png

image

图片水印解码(DFT):
java -jar BlindWatermark.jar decode -f gakki-dft-img-ec.png gakki-dft-img-dc.png

image

Notice

DFT 输出图片格式必须要是 PNG

Reference

License

Apache-2.0

blindwatermark's People

Contributors

ww23 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.