一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【图像隐写】基于matlab高斯模型JPEG图像隐写【含Matlab源码 367期】

获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。

备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);

二、部分源代码

% This example demonstrates how to use the MG embedding function
clc
clear all
close all% Read the input cover image
Cover = double(imread ('1.pgm'));% Set the payload to 0.4 bpp
Payload = 0.4;% MG embedding
tStart = tic;
[Stego, pChange, ChangeRate] = MG( Cover, Payload );
tEnd = toc(tStart);
fprintf('MG embedding is done in: %f (sec)\n',tEnd);%%
figure;
imshow (Cover,[]);
title ('Cover image');function [Stego, pChange, ChangeRate] = MG ( Cover, Payload )
% -------------------------------------------------------------------------
% Multivariate Gaussian Embedding    |   September 2015    |   version 1.0
% -------------------------------------------------------------------------
% INPUT:
%  - Cover - Path to the cover image or the cover image itself.
%  - Payload - Embedding payload in bits per pixel (bpp).
% OUTPUT:
%  - Stego - Resulting image with embedded payload
%  - pChange - Embedding change probabilities.
%  - ChangeRate - Average number of changed pixels
% -------------------------------------------------------------------------
% Copyright (c) 2015 DDE Lab, Binghamton University, NY.
% All Rights Reserved.
% -------------------------------------------------------------------------
% Permission to use, copy, modify, and distribute this software for
% educational, research and non-profit purposes, without fee, and without a
% written agreement is hereby granted, provided that this copyright notice
% appears in all copies. The program is supplied "as is," without any
% accompanying services from DDE Lab. DDE Lab does not warrant the
% operation of the program will be uninterrupted or error-free. The
% end-user understands that the program was developed for research purposes
% and is advised not to rely exclusively on the program for any reason. In
% no event shall Binghamton University or DDE Lab be liable to any party
% for direct, indirect, special, incidental, or consequential damages,
% including lost profits, arising out of the use of this software. DDE Lab
% disclaims any warranties, and has no obligations to provide maintenance,
% support, updates, enhancements or modifications.
% -------------------------------------------------------------------------
% Contact: vsedigh1@binghamton.edu | fridrich@binghamton.edu
%          September 2015
%          http://dde.binghamton.edu/download/
% -------------------------------------------------------------------------
% References:
% [1] - J. Fridrich and J. Kodovsky. Multivariate Gaussian model for
% designing additive distortion for steganography. Proc. IEEE, ICASSP,
% Vancouver, Canada, May 26-31, 2013.
% -------------------------------------------------------------------------% Read and convert the input cover image into double format
if ischar( Cover )Cover = double( imread(Cover) );
elseCover = double( Cover );
end% Compute Variance and do the flooring for numerical stability
Variance = VarianceEstimation(Cover);
Variance(Variance< 1) = 1;% Compute Fisher information and smooth it
FisherInformation = 1./Variance.^2;% Compute embedding change probabilities and execute embedding
FI = FisherInformation(:)';% Ternary embedding change probabilities
beta = TernaryProbs(FI,Payload);% Simulate embedding
Stego = Cover;
beta = 2 * beta;
r = rand(1,numel(Cover));
ModifPM1 = (r < beta);                % Cover elements to be modified by +-1
r = rand(1,numel(Cover));
Stego(ModifPM1) = Cover(ModifPM1) + 2*(round(r(ModifPM1))) - 1; % Modifying X by +-1
Stego(Stego>255) = 253;                    % Taking care of boundary cases
Stego(Stego<0)   = 2;
ChangeRate = sum(ModifPM1(:))/numel(Cover); % Computing the change rate
pChange = reshape(beta/2,size(Cover));end

三、运行结果



四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 蔡利梅.MATLAB图像处理——理论、算法与实例分析[M].清华大学出版社,2020.
[2]杨丹,赵海滨,龙哲.MATLAB图像处理实例详解[M].清华大学出版社,2013.
[3]周品.MATLAB图像处理与图形用户界面设计[M].清华大学出版社,2013.
[4]刘成龙.精通MATLAB图像处理[M].清华大学出版社,2015.

【图像隐写】基于matlab高斯模型JPEG图像隐写【含Matlab源码 367期】相关推荐

  1. 【Matlab语音隐写】DCT+DWT音频数字水印嵌入提取【含GUI源码 836期】

    一.代码运行视频(哔哩哔哩) [Matlab语音隐写]DCT+DWT音频数字水印嵌入提取[含GUI源码 836期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1 ...

  2. 【Matlab语音处理】声音信号频谱分析仪【含GUI源码 325期】

    一.代码运行视频(哔哩哔哩) [Matlab语音处理]声音信号频谱分析仪[含GUI源码 325期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1]韩纪庆,张磊, ...

  3. 【Matlab图像检索】综合特征图像检索【含GUI源码 395期】

    一.代码运行视频(哔哩哔哩) [Matlab图像检索]综合特征图像检索[含GUI源码 395期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1] 蔡利梅.MAT ...

  4. 【Matlab肌电信号】肌电信号处理【含GUI源码 966期】

    一.代码运行视频(哔哩哔哩) [Matlab肌电信号]肌电信号处理[含GUI源码 966期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1] 包子阳,余继周,杨 ...

  5. 【Matlab条形码识别】二维条形码识别【含GUI源码 607期】

    一.代码运行视频(哔哩哔哩) [Matlab条形码识别]二维条形码识别[含GUI源码 607期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1] 蔡利梅.MAT ...

  6. 【Matlab语音隐写】DWT音频数字水印【含GUI源码 712期】

    一.代码运行视频(哔哩哔哩) [Matlab语音隐写]DWT音频数字水印[含GUI源码 712期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1]韩纪庆,张磊, ...

  7. 【Matlab图像融合】小波变换遥感图像融合【含GUI源码 744期】

    一.代码运行视频(哔哩哔哩) [Matlab图像融合]小波变换遥感图像融合[含GUI源码 744期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1] 包子阳,余 ...

  8. 【Matlab图像加密】正交拉丁方置乱算法图像加解密【含GUI源码 182期】

    一.代码运行视频(哔哩哔哩) [Matlab图像加密]正交拉丁方置乱算法图像加解密[含GUI源码 182期] 二.matlab版本及参考文献 一.代码运行视频(哔哩哔哩) [Matlab图像处理]自动 ...

  9. 【Matlab车牌识别】停车计费系统【含GUI源码 735期】

    一.代码运行视频(哔哩哔哩) [Matlab车牌识别]停车计费系统[含GUI源码 735期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1] 蔡利梅.MATLA ...

  10. 【Matlab生物电信号】生物电信号仿真【含GUI源码 684期】

    一.代码运行视频(哔哩哔哩) [Matlab生物电信号]生物电信号仿真[含GUI源码 684期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1]董兵,超于毅,李 ...

最新文章

  1. 第三十一篇:SOUI布局之相对于特定兄弟窗口
  2. java asm 中文文档_Java ASM3学习(3)
  3. 洛谷T44252 线索_分治线段树_思维题
  4. iOS Abort问题系统性解决方案
  5. 小程序绘制之CanvasContext
  6. java两个对象属性比较
  7. 第三百三十七节,web爬虫讲解2—PhantomJS虚拟浏览器+selenium模块操作PhantomJS
  8. 安装Pygame的方法
  9. 数据库查询优化-添加索引
  10. 用g++编译cpp文件
  11. java标签用setbounds_setBounds的用法
  12. android parcel分析,Android中Parcel用法详解
  13. 中小银行数字普惠金融发展的思考和建议
  14. 计算机发展简史的ppt教程,计算机发展简史PPT.ppt
  15. Win10在桌面上怎么添加此电脑、网络图标、回收站等图标?
  16. Caffeine使用篇 - Cleanup
  17. 基于Springboot外卖系统09:员工信息编辑+员工信息保存
  18. Windows7 MSDN原版ISO镜像
  19. ios开发笔记之 消费统计表
  20. Origin复制页面到word中出现:错误,嵌入对象无效

热门文章

  1. 结对编程之设计电梯控制程序
  2. Prism初研究之使用Prism 5.0开发模块化应用
  3. Jconsole使用实例解说
  4. JavaScript自学笔记 第5次
  5. CentOS-6.3安装配置Tomcat-7
  6. hdu 1907John博弈
  7. Ubuntu 修改hosts
  8. 在存储过程中动态创建临时表
  9. c# 系列 - 基本知识
  10. 深度学习:正则化方法