📄 radial_sum.asv
字号:
function s=radial_sum(photo_matrix,r,theta)
weishu=size(photo_matrix);
N=weishu(1);
if 0<=theta&theta<=45
theta0=theta;flag=1;
elseif 45<=theta&theta<=90
theta0=90-theta;flag=2;
elseif 90<=theta&theta<=135
theta0=theta-90;flag=3;
elseif 135<=theta&theta<=180
theta0=180-theta;flag=4;
else
flag=0;
end;
cover=radial_cover(N,-r,theta0);
switch flag
case 0
error('the theta is out of range!');
case 1
cover_matrix=radial_cover(N,r,theta0);
case 2
cover_matrix=cover';
case 3
cover=radial_cover(N,r,theta0);
cover_matrix=flipud(cover');
case 4
cover=radial_cover(N,r,theta0);
cover_matrix=fliplr(cover);
end;
covered=photo_matrix.*cover_matrix;
X_sum=sum(covered,1);
s=sum(X_sum);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -