curvelet下载的curvelet工具包,有以下三个文件:fdct_usfft_matlab、fdct_wrapping_matlab、mecv三个文件夹添加到matlab路径中即可。
curvelet matlab示例代码理解:
1. fdct_wrapping
function C = fdct_wrapping(x, is_real, finest, nbscales, nbangles_coarse) % fdct_wrapping.m - Fast Discrete Curvelet Transform via wedge wrapping - Version 1.0 % % Inputs % x M-by-N matrix 输入为MxN的矩阵 % % Optional Inputs % is_real Type of the transform 转化的类型 % 0: complex-valued curvelets 复数值的曲波变化 % 1: real-valued curvelets 实数值的曲波变化 % [default set to 0] 默认设置为0 % finest Chooses one of two possibilities for the coefficients at the % finest level: 选择一种表示方式计算最优级的系数 % 1: curvelets 曲波变化 % 2: wavelets 小波变化 % [default set to 2] 默认设置为2 % nbscales number of scales including the coarsest wavelet level % 包含最粗小波级在内的伸缩数 % [default set to ceil(log2(min(M,N)) - 3)] % nbangles_coarse % number of angles at the 2nd coarsest level, minimum 8, % 第二粗糙级的角度数,最小为8 % must be a multiple of 4. [default set to 16] % 必须为4的倍数,默认为16 % Outputs % C Cell array of curvelet coefficients. % C{j}{l}(k1,k2) is the coefficient at % - scale j: integer, from finest to coarsest scale, % 从最佳尺度到最粗尺度 % - angle l: integer, starts at the top-left corner and % increases clockwise, % 从左上角开始顺时针增长 % - position k1,k2: both integers, size varies with j % and l. % If is_real is 1, there are two types of curvelets, % 'cosine' and 'sine'. For a given scale j, the 'cosine' % coefficients are stored in the first two quadrants (low % values of l), the 'sine' coefficients in the last two % quadrants (high values of l). % % See also ifdct_wrapping.m, fdct_wrapping_param.m % % By Laurent Demanet, 2004<