Giter Club home page Giter Club logo

blind-watermark's Introduction

blind-watermark

This was written in Python2.7
Python3 Version

Usage

python encode.py --image <image file> --watermark <watermark file> --result <result file>

python decode.py --original <original image file> --image <image file> --result <result file>

Use --alpha to change the alpha (default 5.0).

Example

encode:

original image
image

watermark
image

python encode.py --image ori.png --watermark watermark.png --result res.png

result
image

decode:

python decode.py --original ori.png --image res.png --result extract.png

watermark
image

blind-watermark's People

Contributors

linyacool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blind-watermark's Issues

python3分支中,无法处理超大图

encode后输出图片正常(无法确定是否成功添加盲水印)
decode后输出水印异常(水印图片全黑)
图片是6000*4000,缩小至600*400后没有问题。
没测试master分支

the code does not running

Traceback (most recent call last):
File "C:/Users", line 54, in
main()

File "C:/Users", line 22, in main
img = options.img
AttributeError: 'Namespace' object has no attribute 'img'

Code cannot run

This program will throw the following error

File "encode.py", line 39, in encode
    x, y = range( height / 2 ), range(width)
TypeError: 'float' object cannot be interpreted as an integer

Then I Modify this line to

x, y = range( height / 2 ), range(width)

however, it throws a new error as follow:

File "C:\ProgramData\Anaconda3\lib\random.py", line 278, in shuffle
    x[i], x[j] = x[j], x[i]
TypeError: 'range' object does not support item assignment

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.