If we have,
[row_num, col_num] = size(img);
What does the following code do?
function length_vec = compute_angular_length(row_num, col_num, amplitude_ang)% function that calculates the maximum size in a diagonal image with
% inclination from 0 to 180° for each amp_ang degrees.
%
% length_vec = compute_angular_length (row_num, col_num, amplitude_ang)
%% calculate the value of the angle for which I have the main diagonal
alpha_rad = atan2( row_num, col_num );alpha = rad2deg(alpha_rad); n_ang = floor(180/amplitude_ang); length_vec = zeros(1, n_ang);for i=1:n_ang ang = (i-1)*amplitude_ang; if (ang <= alpha || ang >= 180 - alpha ) length_vec(1,i)= abs(col_num / cos( deg2rad(ang))); else length_vec(1,i)= abs(row_num / cos( deg2rad(90 - ang))); end; end;
What does it mean by angular length?
Best Answer