• 大小: 28KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-22
  • 语言: Matlab
  • 标签: 脆弱水印  

资源简介

脆弱水印算法,基于matlab的代码实现

资源截图

代码片段和文件信息

%%%%%%%%%%%
%file_name=‘shuiy.jpg‘;
%message=double(imread(file_name));
%mm=size(message1);
%nm=size(message2);
%%%%%%%%%%%
file_name=‘dwt_watermarked.bmp‘;
watermarked_image=double(imread(file_name));
% watermarked_image(80:101177:184)=255;
% watermarked_image(84:10585:93)=255;
% watermarked_image(14:23105:151)=255;
% watermarked_image(105:134241:248)=255;
% imshow(uint8(watermarked_image));
mw=size(watermarked_image1);
nw=size(watermarked_image2);
[ca1ch1cv1cd1]=dwt2(watermarked_image‘haar‘);
file_name=‘eee.bmp‘;
cover_object=double(imread(file_name));
[ca2ch2cv2cd2]=dwt2(cover_object‘haar‘);
watermarkr=ca1-ca2;

watermark=ones(mm);
for i=1:mm
    for j=1:nm
        if(watermarkr(ij)~=0)
        watermark(ij)=0;
        end
    end
end
watermark=uint8(watermark);
figure
imshow(watermark[]);
title(‘recovered watermark‘)

orig_watermark=imread(‘shuiy3.bmp‘);
sim=corr2(orig_watermarkwatermark)
imwrite(watermark‘watermark_r.jpg‘‘jpg‘);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     目录          0  2008-12-29 23:41  DWT域脆弱水印

     文件       1005  2008-11-30 22:35  DWT域脆弱水印\dwtshuiyintiqu.m

     文件        969  2008-12-24 17:14  DWT域脆弱水印\dwtshuiyinzhizuo.m

    ..A.SH.     39936  2008-12-29 23:41  DWT域脆弱水印\Thumbs.db

----------- ---------  ---------- -----  ----

                42128                    5


评论

共有 条评论

相关资源