|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
这是计算图像投影的函数。。哪位高手帮忙给加个注释,小弟感激不尽啊。。
function [P,r] = radon(I,theta,n);
iptchecknargin(1, 3, nargin, mfilename)
iptcheckinput(I,{'numeric','logical'},{'nonsparse'},mfilename,'I',1);
if (nargin < 2)
theta = 0:179;
else
ptcheckinput(theta,{'double'},{'nonsparse'},mfilename,'THETA',2);
end
[P,r] = radonc(double(I),theta);
if (nargin == 3) && (size(P,1) ~= n)
% Grandfathered syntax
% Resize along the column direction using linear interpolation.
new_r = linspace(min(r), max(r), n)';
P = interp1(r(:), P, new_r(:), '*linear');
P = P * length(r) / length(new_r); % keeps scaling roughly the same
r = new_r;
end |
|