calculate HPBW of given picture?

18 ビュー (過去 30 日間)
M. Khishe
M. Khishe 2012 年 9 月 21 日
this code calculate HPBW of produce image with matlab( peaks order)
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
workspace; % Make sure the workspace panel is showing.
fontSize = 20;
% Create sample data.
H = peaks(90);
H = 11*mat2gray(H) - 13;
% Display it.
subplot(2, 2, 1);
surf(H);
xlabel('Azimuth [deg]', 'FontSize', fontSize);
ylabel('Elevation [deg]', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]); % Maximize figure.
set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')
% Threshold the image
binaryImage = H > -3;
% Display it.
subplot(2, 2, 2);
imshow(binaryImage);
axis on;
xlabel('Azimuth [deg]', 'FontSize', fontSize);
ylabel('Elevation [deg]', 'FontSize', fontSize);
measurements = regionprops(binaryImage, 'BoundingBox');
bb = [measurements.BoundingBox]
x1 = bb(1);
x2 = x1 + bb(3);
y1 = bb(2);
y2 = y1 + bb(4);
% Plot box over image.
hold on;
plot([x1 x2 x2 x1 x1], [y1 y1 y2 y2 y1], 'r-', 'LineWidth', 2);
message = sprintf('The Azimuth Width at -3 dB = %.1f\nThe Elevation Width at -3 dB = %.1f', ...
bb(3), bb(4));
msgbox(message);
how can i run it for my image that linked below?
  3 件のコメント
M. Khishe
M. Khishe 2012 年 9 月 22 日
no half power beam width
Image Analyst
Image Analyst 2012 年 9 月 23 日
And are you now done with this? Because you didn't answer his other question way down at the bottom where he commented on your Answer. Walter and I are basically saying the same thing. You must have data to work with, not some pretty visualization.

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

回答 (2 件)

Image Analyst
Image Analyst 2012 年 9 月 21 日
You can't run it on that picture. You'd need the underlying data that was rendered in that visualization.
  3 件のコメント
Walter Roberson
Walter Roberson 2012 年 9 月 21 日
Calculate it on your "H" instead.
Image Analyst
Image Analyst 2012 年 9 月 21 日
編集済み: Image Analyst 2012 年 9 月 21 日
I have no idea but I know you need it to work on your actual data than some pretty picture of your actual data that was rendered all fancy in some kind of 3D-like chart or perspective picture.

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


M. Khishe
M. Khishe 2012 年 9 月 22 日
can you write matlab code that calculate this
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 9 月 22 日
Are you starting only from an image, or do you have the data that was used to construct the image?

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

Community Treasure Hunt

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

Start Hunting!

Translated by