?? cghwatermark.m
字號:
clear;close all;clc;
Master=double(imread('lenna.bmp'));
Watermark=double(imread('E.bmp'));
phase=phaseSL(Master,Watermark);
imwrite(mat2gray(phase),'phase.bmp'); %save phase picture
% testphase=phase+pi.*rand(256);
Holo=Hologen(Master,phase,0.01,0.09); %第一參數為宿主,第二為相位函數,第三參考光空間頻率,第四嵌入權重
%Holo=fftshift(Holo);
%DAPM=halftone(Master,phase);
%imwrite(DAPM,'dpm.bmp');
imwrite(mat2gray(Holo),'hEaplpha001t009.bmp');
%imshow(mat2gray(Holo));
figure;imshow(mat2gray(log(1+abs(fftshift(fft2(Holo))))));
%Bholo=AMhalftone(Holo);
Bholo=AMhalftone1(Holo);
figure;imshow(Bholo);
imwrite(Bholo,'BhEaplpha001t009.bmp');
%Bholo(501:1700,501:1700)=zeros(1200);
% figure(1)
% imshow(mat2gray(Bholo));
% figure(2)
% imwrite(mat2gray(log(1+abs(fftshift(fft2(Bholo))))),'mark.bmp')
% imshow(mat2gray(log(1+abs(fftshift(fft2(Bholo))))));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -