steven_kaka929
steven_kaka929
成长让人烦恼,该面对的终究要面对。
关注数: 43
粉丝数: 165
发帖数: 656
关注贴吧数: 121
决定退婚,女方不同意,该怎么办? 决定退婚,女方不同意,该怎么办?
笔记本硬盘出售 本人现有全新笔记本硬盘一个,1T大小,有质保。有兴趣的同学请和我联系。 电话:15095353368 非诚勿扰
Matlab三级小波域内提取水印出来什么都没有,求高手指点 以下是水印提取代码: clear all; % save start time start_time=cputime; % read in the watermarked object file_name='dwt_watermarked.bmp'; watermarked_image=double(imread(file_name)); % determine size of watermarked image Mw=size(watermarked_image,1); %Height Nw=size(watermarked_image,2); %Width % read in original watermark file_name='1(1).bmp'; orig_watermark=double(imread(file_name)); % determine size of original watermark Mo=size(orig_watermark,1); %Height No=size(orig_watermark,2); %Width % read in key for PN generator file_name='_key.bmp'; key=double(imread(file_name))./256; % reset MATLAB's PN generator to state "key" rand('state',16); % initalize message to all ones message_vector=ones(1,Mo*No); [cA1,cH1,cV1,cD1] = dwt2(watermarked_image,'haar'); % add pn sequences to H1 and V1 componants when message = 0 pn_sequence_h=round(2*(rand(Mw/2,Nw/2)-0.5)); pn_sequence_v=round(2*(rand(Mw/2,Nw/2)-0.5)); for (kk=1:length(message_vector)) correlation_h(kk)=corr2(cH1,pn_sequence_h); correlation_v(kk)=corr2(cV1,pn_sequence_v); correlation(kk)=(correlation_h(kk)+correlation_v(kk))/2; end for (kk=1:length(message_vector)) if (correlation(kk) > mean(correlation)) message_vector(kk)=0; end end % reshape the message vector and display recovered watermark. figure(2) message=reshape(message_vector,Mo,No); imshow(message,[]) title('Recovered Watermark') % display processing time elapsed_time=cputime-start_time; 运行结果出来什么都没有,不知道哪里不合适,嵌入过程没有问题。水印图像选取的是512*512的8位lena灰度图像,水印图像选取的是254*244的8位二值图像。_key图像选取的是196*210的8位灰度图像。_key.jpg水印嵌入水印后的图片 鉴于上传的需要,已将图片转为Jpg格式,要运行程序的话先另存为bmp格式吧。希望能得到大家的帮助,小弟不胜感激了。。。
1
下一页