I have intensity image , how to find half energy width of image.

2 ビュー (過去 30 日間)
MOHD
MOHD 2016 年 1 月 12 日
コメント済み: Image Analyst 2016 年 1 月 12 日

回答 (1 件)

Image Analyst
Image Analyst 2016 年 1 月 12 日
編集済み: Image Analyst 2016 年 1 月 12 日
Assumning you have the row of the centroid (it looks like exactly half way in your image), just extract a row and find the max and half max and distance between them.
horizontalProfile = grayImage(row, :);
[maxGrayLevel, indexOfMax] = max(horizontalProfile)
halfWidth = indexOfMax - find(horizontalProfile == maxGrayLevel/2, 1, 'first');
If you don't know how to find the centroid, use regionprops(labeledImage, 'WeightedCentroid'). See my Image Segmentation Tutorial for a full demo: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
  2 件のコメント
MOHD
MOHD 2016 年 1 月 12 日
編集済み: MOHD 2016 年 1 月 12 日
How to find width of encircled energy at 80% of total energy? Here I am getting FWHM but I required width Encircled energy at 80%. Thank you very much in advance
Image Analyst
Image Analyst 2016 年 1 月 12 日
A lot depends on if it's circularly symmetric or not. If it is, just use cumsum() to get the cumulative energy and then find the 20% point from that:
cdf = cumsum(horizontalProfile(indexOfMax:end));
% Normalize
cdf = cdf / sum(cdf);
width80 = 2 * find(cdf <= 0.8, 1, 'first');
I think that should work but you'd have to check. There may have to be an adjustment because you want it in 2D rather than 1D. You may have to just create larger and larger circular masks with the FAQ until the sum inside the mask is 80%.

サインインしてコメントする。

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by