1 Star 0 Fork 0

matthewgao / RS-analysis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lsbhide.m 667 Bytes
一键复制 编辑 原始数据 按行查看 历史
matthewgao 提交于 2019-04-28 21:42 . update
function [ste_cover,len_total]=lsbhide(input,file,output)
cover=imread(input);
ste_cover=cover;%%%%%%%%%%%%
ste_cover=double(ste_cover);
ste_cover=ste_cover(:,:,1);
f_id=fopen(file,'r');
[msg,len_total]=fread(f_id,'ubit1');
[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');
subplot(121);imshow(cover);title('ԭʼ');
subplot(122);imshow(output);title('Òþ²Ø');
Matlab
1
https://gitee.com/matthewgao/RS-analysis.git
git@gitee.com:matthewgao/RS-analysis.git
matthewgao
RS-analysis
RS-analysis
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891