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

📄 afrit.m

📁 脊波工具和相关实验以及有关实验数据
💻 M
字号:
function [r, s, m, ind] = afrit(x, wname, tent, pent)
% AFRIT  Adaptive Finite Ridgelet Transform
%	[r, s, m, ind] = afrit(x, wname, [tent, pent])
%
% Input:
%	x:	image matrix of size N by N where (2N-1) is a prime number
%	wname:  wavelet name
%	tent, pent:	[optional] type and parameter for entropy
%
% Output:
%	r:	ridgelet coefficients in a matrix, one column 
%		for each direction (there is N+1 directions)
%	s:	structure of wavelet coefficients
%	m:	normalized mean value of the folded image
%	ind:	list of projections in which DWT is replaced by DCT
%
% Note:
%	This adaptively select the best transform for each projections
%
% See also:	FRATF, FRITO

% Folded Finite Radon transform
[ra, m] = frat(x);

% Columnwise DCT (DCT of the FRAT projections)
rc = dct(ra);
% Remove DC components
rc(1, :) = [];

% Pure FRIT(o)
[r, s, m] = frito(x, wname);

%%% Adaptive transform selection
% Compute entropies of projections for each method
if ~exist('tent', 'var')
    tent = 'norm';
end

if ~exist('pent', 'var')
    pent = 1;
end

ei = col_entropy(r, tent, pent);
ec = col_entropy(rc, tent, pent);

% Replace DWT by DCT in the projections that DCT has smaller entropy
ind = find(ei > ec);
r(:, ind) = rc(:, ind);

⌨️ 快捷键说明

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