1 Star 0 Fork 0

matthewgao/RS-analysis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bitlsbhide.m 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
matthewgao 提交于 2014-08-13 14:37 +08:00 . Signed-off-by: matthewgao matthewgao@gmail.com
%function ste_cover=bitlsbhide(input,len_total,output)
%function ---embed random bit stream
%input ---input file
%len_total ---embed bit length
%output ---output file
%Author:Gaoshen
%E-mail:matthewgao@gmail.com
%Date:2012.3.9
%Modern Information Technology Lab
%East China University of Science and Technology
function ste_cover=bitlsbhide(input,len_total,output)
cover=imread(input);
if len_total==0
ste_cover=cover(:,:,1);
ste_cover=uint8(ste_cover);
imwrite(ste_cover,output,'bmp');
else
ste_cover=cover(:,:,1);%%%%%%%%%%%%
ste_cover=double(ste_cover);
msg=bitrand(len_total);
[m,n]=size(ste_cover);
if len_total>m*n
error('ͼ');
end
p=1;
for f2=1:n
for f1=1:m
ste_cover(f1,f2)=ste_cover(f1,f2)-mod(ste_cover(f1,f2),2)+msg(p,1);
if p==len_total
break;
end
p=p+1;
end
if p==len_total
break;
end
end
ste_cover=uint8(ste_cover);
imwrite(ste_cover,output,'bmp');
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Matlab
1
https://gitee.com/matthewgao/RS-analysis.git
git@gitee.com:matthewgao/RS-analysis.git
matthewgao
RS-analysis
RS-analysis
master

搜索帮助