精选优质文档-倾情为你奉上clear all; close all; clc;M=256;%原图像长度N=64; %水印长度filename1,pathname=uigetfile(*.*,select the image); image1=imread(num2str(filename1);subplot(2,2,1);imshow(image1); title(原图); % orginal image for watermarkingimage1=double(image1);imagew=imread(shuiyin.bmp);imagew=im2bw(imagew,0.5);subplot(2,2,2);imshow(imagew);title(原水印); %original watermark%嵌入水印ca,ch,cv,cd = dwt2(image1,db1);cas,chs,cvs,cds = dwt2(ca,db1);for i=1:N