Skip to content

A new color image Reversible Data Hiding format that can keep the original gray level unchanged using Python.

Notifications You must be signed in to change notification settings

liuyuqingNKCS/Reversible-Data-Hiding-With-Invariant-Grayscale

Repository files navigation

Reversible Data Hiding in Color Image With Grayscale Invariance

An implement based Python 3.6+ about RDH in Color Image With Grayscale Invariance by Dongdong Hou , Weiming Zhang , Kejiang Chen, Sian-Jheng Lin, and Nenghai Yu

Basic Introduction

  • 首先安装所依赖的库python3 install -r requirements.txt
  • 其次执行python3 start.py对图像进行加密解密
  • 下面是执行时控制台样例输出
[[231 133 116]
  [230 142 111]
  [232 135 111]
  ...
  [226 110  93]
  [221  99  86]
  [212  97  83]]]
=> Finish reading image!
=> Finish calculating predication error!
=> Message: 314159265659314159265659
=> Finish embeding msg with the critical value ofbeing 2
=> Finish embeding parameters:
        rhoT: 2, lastEc: 1, La: 193, N: 193, tagsCode: 0000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
=> Finish reading embeded image and calculating predication error!
=> Ensure the grayscale invariant: True
=> Finish extractig parameters:
        rhoT: 2, lastEc: 1, La: 193, N: 193, tagsCode: 0000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
=> Finish extracting received msg: 314159265659314159265659
=> The msg is equal to received msg: True
  • 程序会生成并保存灰度对比图Grayscale.png Grayscale
  • 下面是程序加密前后的图片对比,可以看到人眼是很难看出来变化

Implement Details

  • Size: 嵌入区域的高宽(左上角算起),默认为None即嵌入整张图片
  • fig: 图片地址或名称,默认为'lena.png'
  • Dt: 论文中的参数Dt,默认为20
  • rhoT: 论文中的参数rhoT
  • msg: 嵌入的消息字符串,如'314159265659314159265659'

Others

Motivation: This is the final project of class Information Security Foundation

Stars Wanted: If it can run on your machine, please star this project!

About

A new color image Reversible Data Hiding format that can keep the original gray level unchanged using Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published