📄 fratfd.m
字号:
function [r, m] = fratfd(f)
% FRATFD Folded Finite Radon Transform
%
% [r, m] = fratfd(f)
%
% Input:
% f: a N by N matrix where (2N-1) is a prime number.
%
% Output:
% r: a N by (N+1) matrix. One projection per each column.
% m: (optional), normalized mean of the input matrix.
% In this case, the mean is subtracted from each column of r.
%
% See also: FRAT
if ndims(f) ~= 2
error('Input must be a matrix of 2 dimensions');
end
n = size(f, 1);
p = 2 * n - 1;
if (size(f, 2) ~= n) | ~isprime(p)
error('Input must be a N by N matrix, where (2N-1) is a prime number')
end
% Construct the folded image
fd = fold2(f);
% Compute the FRAT of the folded image
if nargout < 2
r = frat(fd);
else
[r, m] = frat(fd);
end
% Extract the independent set of folded FRAT coefficients
r = r(1:n, 1:n+1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -