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

📄 ifratfd.m

📁 脊波工具和相关实验以及有关实验数据
💻 M
字号:
function f = ifratfd(r, m)
% IFRATFD  Inverse Finite Radon Transform
%
%       f = ifratfd(r, m)
%
% Input:
%       r:      a N by (N+1) matrix.  One projection per each column.
%       m:      (optional) normalized mean of the input matrix.
%
% Output:
%       f:      reconstructed matrix of size N by N.
%
% Note:		Require (2N-1) is a prime number.
%
% See also:     FRATFD

if ndims(r) ~= 2
    error('Input must be a matrix of 2 dimensions');
end

n = size(r, 1);
p = 2 * n - 1;

if (size(r, 2) ~= (n+1)) | ~isprime(p)
    error('Input must be a N by (N+1) matrix where (2N-1) is a prime number')
end

% Construct the folded FRAT coefficients
% Use ALMOST the same function that construct folded image!
I = [1:n, n:-1:2];
J = [1:n+1, n:-1:2];

rd = r(I, :);
rd = rd(:, J);

% Compute the IFRAT of the folded image
if nargin < 2
    f = ifrat(rd);
else
    f = ifrat(rd, m);
end

% Extract the original image from the folded image
f = f(1:n, 1:n);

⌨️ 快捷键说明

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