查看: 3423|回复: 4

求助!急!

  [复制链接]
发表于 2009-9-24 15:07:08 | 显示全部楼层 |阅读模式


计算全息图的制作及再现
代码:
close all;clear all;clc;

o=imread('cat.bmp');
o=rgb2gray(o);
o=double(o);
figure;
imshow(o,[]);title('原始图像');
odot=sqrt(o).*exp(i*2*pi*(rand(size(o))-0.5));

circle=50;
for m=1:circle
    o1=fftshift(fft2(fftshift(odot)));
    o2=fftshift(ifft2(fftshift(exp(i*angle(o1)))));
    odot=sqrt(o).*exp(i*angle(o2));
end
   
P=angle(o1);
P=mat2gray(P);
imwrite(P,'yulu.bmp');
output=abs(o2).^2;
imwrite(output,'kittyk.bmp');
figure;
imshow(output,[]);title('全息图像');

在Matlab里运行显示的两幅图像都正常,但是运行后储存的全息图像'kittyk.bmp'是全黑的,各位高手能不能帮忙分析一下问题出在哪?感激不尽



发表于 2010-11-19 10:00:08 | 显示全部楼层






发表于 2010-11-19 10:00:10 | 显示全部楼层






发表于 2010-11-19 10:00:12 | 显示全部楼层






发表于 2010-11-19 10:00:13 | 显示全部楼层






您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:admin@discuz.vip

Powered by Discuz! X5.0 Licensed © 2001-2026 Discuz! Team.|鄂ICP备17021725号-1

在本版发帖
关注公众号
QQ客服返回顶部