当前位置:网站首页>基于直方图修改的可逆数字水印方法
基于直方图修改的可逆数字水印方法
2022-07-28 05:23:00 【zzuls】
0.本人觉得图像的直方图,就是反映了图像的像素值的分布情况,就是告诉你这个图像像素值为0-255像素点有多少个。横坐标代表像素值,纵坐标表示图像中对应像素值像素的个数。ps:对于灰度图像像素值也可以说是灰度值。

(图像来源参考水印)
1.前期基础:需要找到直方图的零点(对应像素值为z)和峰值点(对应像素值为p)。这个零点你可以简单理解为直方图纵坐标为0的点,如果没有零点,就选最小值代替零点,同时还要记录0点对应的值。峰值点就是直方图像素点最多的点,之所以找峰值是因为秘密消息要嵌入到像素值为p的像素点中,可以使水印容量最大化。

嵌入水印步骤(假设存在):
(1)首先计算图像的直方图,并找到其中的零点,即图像中没有任何灰度值的像素点记为z;然后找到直方图像素点最多的灰度值的峰值点,记为p。为了方便叙述,不妨假设p<z。
ps:峰值点也可能在零点的右边,但实际嵌入水印的步骤类似
(2)由上到下、由左到右扫描图像中的各个像素点,各个像素点的灰度值用
表示,当
>z 或
<p时,像素点的值保持不变;否则,像素点的灰度值加1:
(3)图像中灰度值等于峰值点的像素点,为可嵌入秘密信息的点,将秘密信息转化为二进制流,用
表示。顺序嵌入信息得
。
ps:这个怎么理解呢,假如p=128,图像中有3个点的灰度值为128分别为p1,p2,p3。如果我要嵌入水印信息为101,那么我可以使p1 = p1+1=129、p2 = p2+0 = 128、p3 = p3+1 = 129;
(4)得到的由灰度值组成的图像就是嵌入秘密信息后的图像。同时p、z 以密钥的形式保存。
提取水印信息的步骤:
(1)读取密钥,得到p、z的值;
(2)逐行扫描图像,当
时,说明该点为隐藏信息点,提取信息0并保持该点灰度值不变;当时,该点也为隐藏信息点,提取信息1并使该像素点值减1。
ps:为什么
和时都是隐藏信息的点?因为原始图像中
的点都加一
,所以一定是嵌入秘密消息1才有的
(3) 当
或
时,像素点的值保持不变;当
时,像素点的灰度值减1。
(4)得到由灰度值组成的新图像,即提取秘密信息后的载体图像。
边栏推荐
- Automatic scheduled backup of remote MySQL scripts
- Deep learning - metaformer is actually what you need for vision
- What is the detail of the applet development process?
- Quick look-up table to MD5
- 将项目部署到GPU上,并且运行
- Small program development solves the anxiety of retail industry
- 5、 Video processing and GStreamer
- 强化学习——基础概念
- 一、AMD - OpenVINO环境配置
- 深度学习(一):走进机器学习与深度学习理论部分
猜你喜欢

tf.keras搭建神经网络功能扩展

搭建集群之后崩溃的解决办法

后门攻击与对抗样本攻击的比较研究

pytorch深度学习单卡训练和多卡训练

深度学习——Patches Are All You Need

How much does it cost to make a small program mall? What are the general expenses?

微信小程序开发制作注意这几个重点方面

self-attention学习笔记

Deep learning (self supervision: CPC V2) -- data efficient image recognition with contractual predictive coding

word2vec+回归模型实现分类任务
随机推荐
What should we pay attention to when making template application of wechat applet?
微信上的小程序店铺怎么做?
How much does small program development cost? Analysis of two development methods!
Self attention learning notes
《On Low-Resolution Face Recognition in the Wild:Comparisons and New Techniques》低分辨率人脸识别论文解读
Deep learning (II) into machine learning and deep learning programming
3: MySQL master-slave replication setup
深度学习(二)走进机器学习与深度学习编程部分
How to choose an applet development enterprise
matplotlib数据可视化
Deploy the project to GPU and run
Alpine, Debian replacement source
Marsnft: how do individuals distribute digital collections?
深度学习——Patches Are All You Need
强化学习——策略学习
Distributed cluster architecture scenario optimization solution: distributed scheduling problem
基于tensorflow搭建神经网络
Deep learning (incremental learning) -- iccv2021:ss-il: separated softmax for incremental learning
Deep learning - metaformer is actually what you need for vision
Byte Android post 4 rounds of interviews, received 50k*18 offers, and successfully broke the situation under the layoff