フィルターのクリア

How to plot radial profile of a diffraction pattern?

6 ビュー (過去 30 日間)
MD DIDARUL ALAM
MD DIDARUL ALAM 2018 年 1 月 16 日
回答済み: Sergey Loginov 2021 年 11 月 5 日
My goal is to radially average a diffraction pattern (please see the attached image) obtained from femtosecond laser and then convert it to pixel vs intensity graph.

回答 (3 件)

Sergey Loginov
Sergey Loginov 2021 年 11 月 5 日
Better use accumarray based profiling! it is much much faster:
https://www.mathworks.com/matlabcentral/fileexchange/101480-very-fast-radial-profile

KSSV
KSSV 2018 年 1 月 16 日
YOu got the image in hand.
1. Use imread to get the pixles of the image i.e to read the image.
2. USe imfindcircles to find the circles on the image.
3. Once you have circle in hand, you can get the pixel values lying inside the circle, to get the average.

Hugo Trentesaux
Hugo Trentesaux 2019 年 2 月 7 日
Or you can program a function like this to do the averaging :
function profile = radialAverage(IMG, cx, cy, w)
% computes the radial average of the image IMG around the cx,cy point
% w is the vector of radii starting from zero
[a,b] = size(IMG);
[X, Y] = meshgrid( (1:a)-cx, (1:b)-cy);
R = sqrt(X.^2 + Y.^2);
profile = [];
for i = w % radius of the circle
mask = (i-1<R & R<i+1); % smooth 1 px around the radius
values = (1-abs(R(mask)-i)) .* double(IMG(mask)); % smooth based on distance to ring
% values = IMG(mask); % without smooth
profile(end+1) = mean( values(:) );
end
end

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by