How to get diffraction pattern (fft2) from image of double slit(jpeg image)
显示 更早的评论
I would like to obtain the diffraction pattern from double slit. How can I set all blacks to 0 and all white to 1 so that the image fairly represents double slit? Thank you.
clear all; close all; clc;
x = imread('double_slit.jpg');
x = imrotate(x,-48.9);
figure(2)
imagesc(x)
x1 = rgb2gray(x);
x1 = im2double(x1);
X =ifftshift(ifft2(fftshift(x1)));
figure(1)
imagesc(log(abs((X)).^2))
% shading interp
colormap('jet')

采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Category Classification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!