Giter VIP home page Giter VIP logo

Comments (5)

guofei9987 avatar guofei9987 commented on June 29, 2024

需要知道水印的长度才能提取,这也算一种变相的加密了

from blind_watermark.

gbcdef avatar gbcdef commented on June 29, 2024

需要知道水印的长度才能提取,这也算一种变相的加密了

研究了一下计算wm_bit的地方,因为用的是utf-8变长的编码,所以这里是不是基本等同于需要文字水印的原文才能提取原文了?感觉好像开始套娃了-.-

        elif mode == 'str':
            byte = bin(int(wm_content.encode('utf-8').hex(), base=16))[2:]
            self.wm_bit = (np.array(list(byte)) == '1')

from blind_watermark.

guofei9987 avatar guofei9987 commented on June 29, 2024

需要知道水印的长度才能提取,这也算一种变相的加密了

研究了一下计算wm_bit的地方,因为用的是utf-8变长的编码,所以这里是不是基本等同于需要文字水印的原文才能提取原文了?感觉好像开始套娃了-.-

        elif mode == 'str':
            byte = bin(int(wm_content.encode('utf-8').hex(), base=16))[2:]
            self.wm_bit = (np.array(list(byte)) == '1')

提供了嵌入二进制的方法 mode='bit',可以自定义编码到二进制

from blind_watermark.

gbcdef avatar gbcdef commented on June 29, 2024

需要知道水印的长度才能提取,这也算一种变相的加密了

研究了一下计算wm_bit的地方,因为用的是utf-8变长的编码,所以这里是不是基本等同于需要文字水印的原文才能提取原文了?感觉好像开始套娃了-.-

        elif mode == 'str':
            byte = bin(int(wm_content.encode('utf-8').hex(), base=16))[2:]
            self.wm_bit = (np.array(list(byte)) == '1')

提供了嵌入二进制的方法 mode='bit',可以自定义编码到二进制

套娃的问题我想通了,可以在生成文字水印的时候把长度算出来存下,password_wm+password_img+wm_bit_length作为密码。可以不用提供原文了。

from blind_watermark.

richard-qian avatar richard-qian commented on June 29, 2024

需要知道水印的长度才能提取,这也算一种变相的加密了

你好,我目前碰到了需要在水印字符串中加入当前时间戳或是自增编号的场景,这样就会导致每次的bits长度都不同。如果要提取那就还需要维护一张img和bit_length的对应表格。想请问下是否有方法可以解决这个问题呢?

from blind_watermark.

Related Issues (20)

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.