ezwcode.m

来自「嵌入式零树小波变换编码 EZW 的MATLAB 程序」· M 代码 · 共 22 行

M
22
字号
function [CodeList,LenSubCL,QuantiFlagList,LenSubQFL]=ezwcode(Mat,threshold,codedim)
global row col
scanlist=morton(Mat);
flaglist(1:row,1:col)='Z';
imptvalue=[];
imptflag=[];
% ----- Intializing EZW coding output variables -----%
CodeList=[];
LenSubCL=[];
QuantiFlagList=[];
LenSubQFL=[];
% ----- Coding loop -----%
for d=1:codedim    
    [imptvalue,imptflag,scancode,scanflag,flaglist]=mainscan(Mat,scanlist,flaglist,imptvalue,imptflag,threshold(d));
    [quantilist,quantiflag,recvalue,quantifierMat]=assistscan(imptvalue,d,threshold(1));
    % Produce code dataflow
    CodeList=[CodeList,scancode];
    LenSubCL=[LenSubCL,length(scancode)];
    QuantiFlagList=[QuantiFlagList,quantiflag'];
    LenSubQFL=[LenSubQFL,length(quantiflag)];
end

⌨️ 快捷键说明

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