Wavelet+Toolbox+4.3


小波工具箱,在matlab中使用。提示,在matlab左下角有个很小的start按钮,点开,toolbox-》more——》wavelet
资源截图
代码片段和文件信息
function  [HC_CellHC_StrAll_CellMean_Len] = built_huffcode(COUNT)
%BUILT_HUFFCODE Huffman coding.
%    [HC_CELLHC_STRALL_CELLMEAN_LEN] = BUILT_HUFFCODE(COUNT)
%
%    COUNT is an array such that COUNT(I) gives the count for 
%    the Ith symbol to be coded.
%
%    HC_CELL is a cell array such that HC_CELL{I} is a
%    binary string which represants the code of the Ith symbol
%    to be coded.
%
%    HC_STR is a string which contains all the Huffman codes.
%    The binary strings are separated by the symbol ‘2‘.
%
%    ALL_CELL is a cell array such that:
%      ALL_CELL{K1} contains a symbol number.
%      ALL_CELL{K2} contains the corresponding binary string code.
%      ALL_CELL{K3} contains the corresponding count.
%
%    MEAN_LEN gives the mean value of length of the binary
%    strings code. 
%
%    Examples:
%      COUNT = round(100*rand(115))
%      [HC_CellHC_StrAll_CellMean_Len] = built_huffcode(COUNT)
%
%      COUNT = round(abs(25*randn(130)))
%      [HC_CellHC_StrAll_CellMean_Len] = built_huffcode(COUNT)

%   M. Misiti Y. Misiti G. Oppenheim J.M. Poggi 23-Jul-2001.
%   Last Revision: 05-Apr-2008.
%   Copyright 1995-2008 The MathWorks Inc.
%   $Revision: 1.1.6.1 $  $Date: 2008/05/12 21:38:40 $ 

nb_SYMB = length(COUNT);
B = [ (1:nb_SYMB)‘ COUNT(:)];
B(COUNT==0:) = [];
NB_True_CODE = size(B1);
All_Cell = num2cell(B);
while size(All_Cell1)>1
    [dumidx] = sort(cat(1All_Cell{:2})); %#ok
    All_Cell = All_Cell(idx:);
    All_Cell{21} = {All_Cell{11}  All_Cell{21}};
    All_Cell{22} = All_Cell{12} + All_Cell{22};
    All_Cell(1:) = [];
end
All_Cell{12} = ‘‘;
IH = 1;
while IH    if iscell(All_Cell{IH1})
        C = All_Cell{IH2};
        All_Cell(end+1:) = {All_Cell{IH1}{1}  [C‘1‘]}; %#ok
        All_Cell(end+1:) = {All_Cell{IH1}{2}  [C‘0‘]}; %#ok
        All_Cell(IH:) = [];
    else
        IH = IH+1;
    end
end
[dumidx] = sortrows(cat(1All_Cell{:1})1); %#ok
All_Cell_SORTED_C1 = All_Cell(idx:);
%---------------------------------------------
% Code sorted by length
% All_Cell_SORTED_C2 = sortrows(All_Cell2);
%---------------------------------------------
I = cat(1All_Cell_SORTED_C1{:1});
HC_Cell = cell(nb_SYMB1);
HC_Cell(I) = All_Cell_SORTED_C1(:2);
HC_Str = HC_Cell;
for k = 1:length(HC_Str)  HC_Str{k} = [HC_Str{k}  ‘2‘]; end
HC_Str = cat(2HC_Str{:});

if nargout>2
    idx = cat(2All_Cell{:1});
    B =  num2cell(COUNT(idx))‘;
    All_Cell(:3) = B;
    if nargout>3
        N = 0;
        S = 0;
        for k = 1:size(All_Cell1)
            N = N + All_Cell{k3};
            S = S + length(All_Cell{k2})*All_Cell{k3};
        end
        Mean_Len = S/N;
    end
end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-03-10 19:04  wavelet
     目录           0  2009-03-10 19:04  waveletcompression
     文件        2724  2008-05-12 17:38  waveletcompressionuilt_huffcode.m
     文件        7174  2008-05-12 17:38  waveletcompressionwc_algo.m
     文件         486  2008-05-12 17:38  waveletcompressiondef_tmpfile.m
     文件         540  2008-05-12 17:38  waveletcompressionexp_compRat_aswdr_BW.mat
     文件         569  2008-05-12 17:38  waveletcompressionexp_compRat_aswdr_COL.mat
     文件         524  2008-05-12 17:38  waveletcompressionexp_compRat_ezw_BW.mat
     文件         568  2008-05-12 17:38  waveletcompressionexp_compRat_ezw_COL.mat
     文件        6371  2008-05-12 17:38  waveletcompressionexp_compRat_gbl_f.mat
     文件        8355  2008-05-12 17:38  waveletcompressionexp_compRat_gbl_h.mat
     文件        6501  2008-05-12 17:38  waveletcompressionexp_compRat_lvl.mat
     文件       31421  2008-05-12 17:38  waveletcompressionexp_compRat_lvl_BIS.mat
     文件         523  2008-05-12 17:38  waveletcompressionexp_compRat_spiht_3d_BW.mat
     文件         548  2008-05-12 17:38  waveletcompressionexp_compRat_spiht_3d_COL.mat
     文件         520  2008-05-12 17:38  waveletcompressionexp_compRat_spiht_BW.mat
     文件         567  2008-05-12 17:38  waveletcompressionexp_compRat_spiht_COL.mat
     文件         534  2008-05-12 17:39  waveletcompressionexp_compRat_stw_BW.mat
     文件         572  2008-05-12 17:39  waveletcompressionexp_compRat_stw_COL.mat
     文件         534  2008-05-12 17:39  waveletcompressionexp_compRat_wdr_BW.mat
     文件         583  2008-05-12 17:39  waveletcompressionexp_compRat_wdr_COL.mat
     文件        4847  2008-05-12 17:39  waveletcompressiongetcompresspar.m
     文件         650  2008-05-12 17:39  waveletcompressiongetsizes.m
     目录           0  2009-03-10 19:04  waveletcompressionja
     文件        4589  2008-06-11 15:53  waveletcompressionjaxlate
     文件        3226  2008-05-12 17:39  waveletcompressionmodify_wtcfile.m
     文件         586  2008-05-12 17:39  waveletcompressionpsnr_mse_maxerr.m
     文件        2838  2008-05-12 17:39  waveletcompressionsignificant_map.m
     文件        1758  2008-05-12 17:39  waveletcompression est_step_by_step.m
     文件       52151  2008-05-12 17:39  waveletcompressionwc2dtool.fig
     文件       89979  2008-08-15 11:47  waveletcompressionwc2dtool.m
............此处省略1445个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)