基于自动亮度对比度增强功能的可逆数据隐藏(Matlab代码实现)

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现

💥1 概述

随着互联网的高速发展,社交网络服务越来越发达,人们通过社交网络服务分享图片、音频、视频等多媒体信息更加便捷,但同时也存在着一些隐患甚至是危害。例如图片等数字媒体内容在传输的过程中被恶意攻击者非法截取、窃听或篡改等,轻者造成了个人信息的泄露,重者引发严重的网络安全事故。为了满足人们对于安全性的需求,基于可逆数据隐藏的图像可逆视觉变换研究被提出。通过将图像视觉内容转换为任意参考图像的视觉内容,图像可逆视觉变换可以保护图像内容和隐私。此外,尽管相机技术不断完善,但在某些恶劣环境下所拍摄出来的照片视觉效果不佳,影响后续对照片的查看及处理。此类环境背景促进了研究学者们对基于可逆数据隐藏的图像可逆对比度增强算法的研究。图像可逆对比度增强可以增强图像不清晰部分的细节,并且增强图像在需要时可以被恢复回原始图像。本文将实现自动亮度对比度增强功能的可逆数据隐藏。

📚2 运行结果

 

 部分代码:

function main
%Image
image=double(imread('Kodak images/Original/kodim01_org.png'));

%Payload
rng(1) %Presets randomness to ensure the results are reproducible
payload_length=15000; %number of bits to be embedded
payload=randi([0,1],payload_length,1);

%% Embedding for maximum contrast
iteration_max=1000; % default maximum iteration_max is 1000, you can increase it as much as you want, but it may take longer time
max_contrast_bypass_mode=0; % 0 = embedes addtional synthetic bits after the specified payload has been embedded to maximize the contrast
[rdh_image, ~, ~, ~,embedding_capacity_left]=mbp(image,payload,iteration_max,max_contrast_bypass_mode);
if embedding_capacity_left < 0
    disp('Failed embedding, try increasing iteration_max') 
else
    disp(['Can embed ' num2str(embedding_capacity_left) ' bits more (estimated)'])
end

%% Recovery check for maximum contrast case
[payload_rec, re_image] = mbp_recovery(rdh_image);
if isequal(re_image,image)
    disp('Original image recovered')
else
    disp('Failed to recover the original image')
end

if isequal(payload_rec,payload)
    disp('Payload recovered')
else
    disp('Failed to recover the payload')
end


%% Embedding only the payload => does not maximize the contrast
iteration_max=1000; % default maximum iteration_max is 1000, you can increase it as much as you want, but it may take longer time
max_contrast_bypass_mode=1; %1=terminates after specified payload has been embedded, does not achieve maximum contrast
[rdh_image_non_max_contrast, ~, ~, ~,embedding_capacity_left_non_max_contrast]=mbp(image,payload,iteration_max,max_contrast_bypass_mode);

if embedding_capacity_left_non_max_contrast ~= -1
    disp('Failed embedding, try increasing iteration_max') 
else
    disp(['Successfully embedded ' num2str(payload_length) ' bits. Cannot determine how many more bits can be embedded since max_contrast_bypass_mode was 1. To determine maximum number of bits embeddable (estimated), run with max_contrast_bypass_mode =0'])
end


%% Recovery check for when only the specified payload has been embedded => does not maximize the contrast
[payload_rec_non_max_contrast, re_image_non_max_contrast] = mbp_recovery(rdh_image_non_max_contrast);
if isequal(re_image_non_max_contrast,image)
    disp('Original image recovered')
else
    disp('Failed to recover the original image')
end

if isequal(payload_rec_non_max_contrast,payload)
    disp('Payload recovered')
else
    disp('Failed to recover the payload')
end


%show the image
close all
figure(1)
imshow(uint8(image))
figure(2)
imshow(uint8(rdh_image))
figure(3)
imshow(uint8(rdh_image_non_max_contrast))
end

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]吴汉舟. 可逆数据隐藏及调色板图像隐写技术研究[D].西南交通大学,2017.

[2]王森林. 可逆数据隐藏技术研究[D].兰州大学,2012.

🌈4 Matlab代码实现

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值