radial_sum.asv
来自「图像重建中投影建模算法对二维图像进行投影值计算的程序」· ASV 代码 · 共 35 行
ASV
35 行
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 + =
减小字号Ctrl + -
显示快捷键?