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

📄 ifrito.m

📁 脊波工具和相关实验以及有关实验数据
💻 M
字号:
function a = ifrito(r, l, m, wname)
% IFRITO	Inverse orthogonal finite ridgelet transform
%	a = ifrito(r, l, m, wname)
%
% Input:
%       r:      ridgelet coefficients in a (P-1) by (P+1) matrix,
%		one column for each direction
%	l:	structure of the wavelet decomposition that is
%		needed for reconstruction
%	m:	normalized mean value of the image
%	wname:	wavelet name
%
% Output:
%	a:	reconstructed image
%
% See also:	FRITO

p = size(r, 2) - 1;
if (size(r, 1) ~= (p - 1)) | ~isprime(p)
    error('Ridgelet coefficients must be in a (P-1) by (P+1) matrix.');
end

% Back to Radon domain by inverting the wavelet transform.
% By definition, Radon coefficients should have zero mean
% at each direction

ra = zeros(p, p + 1);

if isdyadic(p - 1)
    % Number of wavelet decomposition levels
    n = log2(p - 1);

    % Recorrect the wavelet approx. cofficients
    r(1, :) = sqrt(p) * r(1, :) / p;

    % Make sure using the periodic extension mode
    st = dwtmode('status', 'nodisp');
    if ~strcmp(st, 'per')
	dwtmode('per');
    end    
        
    % Inverse the wavelet transform
    ra(1:end-1, :) = waverecc(r, l, wname);
    
    % Compute the last Radon coefficients
    ra(end, :) = -sqrt(p-1) * r(1, :);
    
else
    error('Have not support this size of image yet!');
end

% Inverse the finite Radon transform with the mean corrected
a = ifrat(ra, 0);

% Add back the DC component
a = a + m / (size(r, 2) - 1);


%----------------------------------------------------------------------------%
% Internal Function(s)
%----------------------------------------------------------------------------%
function id = isdyadic(n)
% True for dyadic (power of two) number

l = log2(n);

if (l == round(l)) & (l > 0)
    id = 1;
else
    id = 0;
end

⌨️ 快捷键说明

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