⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hologen.m

📁 关于半色调编码计算全息图的信息隐藏Matlab程序的说明: 算法实现主程序为CGHwatermark; 位相恢复函数为phaseSL; 用计算全息记录已知振幅和位相的复波前函数为Hol
💻 M
字号:
% This program use the phase function generated by 'phasecaculation' then generate CGH with proper pram then try to reconstruct the
% original image
% amplitude is the host image
% phase is the phase function generated by phase retrieval
% alpha is the spatial frequency of the reference wave
% beta is the watermark weight used in watermark embedding 


function [hologram]=Hologen(amplitude,phase,alph,beta)

 ph=phase; 
                                                                                
[M,N]=size(amplitude);                                                                              
A=double(zeros(M,N));




alpha=alph;                                                                             


for m=1:1:M
    for n=1:1:N
    A(m,n)=beta*cos(2*pi*n*alpha-ph(m,n))+(1-beta);                 %test   n -
    end
end

B=amplitude;
C=A.*B;

hologram=C;
% imshow(mat2gray(C));
% imwrite(mat2gray(C),'hologram.bmp');
% 
% 
% 
% 
% 
%  WMa=fftshift(fft2(C));
% %WMa=(fft2(C));
% WMi=abs(WMa);
%  figure(2)
% imshow(mat2gray(log(1+WMi)));
% 
% 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -