⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 radial_sum.m

📁 图像重建中投影建模算法对二维图像进行投影值计算的程序
💻 M
字号:
function s=radial_sum(photo_matrix,r,theta)
    weishu=size(photo_matrix);
    if theta>=360
        theta=theta-360;
    end;
    if theta<0
        theta=360+theta;
    end;
    if theta>180&theta<360
        theta=theta-180;r=-r;
    end;
    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;
        
        switch flag
            case 0 
                error('the theta is out of range!');
            case 1
               cover_matrix=radial_cover(N,r,theta0);
            case 2
                cover=radial_cover(N,-r,theta0);
                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;
   s=sum(photo_matrix(cover_matrix>0));
      
       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -