📄 me.asv
字号:
clear;close all;clc;
A=imread('hEaplpha001t009.bmp'));
figure,imshow(mat2gray(log(1+abs(fftshift(fft2(A))))));
[M,N]=size(A);
% phase=PH;
Grayholo=A;
%
% if PH==null;
% x=0
% else
% x=1;
% end
Binaryholo=double(zeros(4*M,4*N));
for m=1:M
for n=1:N
temp=uint8(Grayholo(m,n)/64);
%phaseoffset=(phase(m,n)+pi)/(pi/4);
%phaseoffset=uint16(phaseoffset);
cell=ones(temp,2);
%Binaryholo(((m-1)*4+1):((m-1)*4+temp+1),((n-1)*4+2):((n-1)*4+3))=cell;
Binaryholo((m*4-temp):m*4,((n-1)*4+2):((n-1)*4+3))=cell;
end
end
Binary=mat2gray(Binaryholo);
figure,imshow(Binary);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -