pdfbtrainimagethmt.m
来自「matlab官方网站中的用于图像融合技术的contourlet变换源代码」· M 代码 · 共 37 行
M
37 行
% pdfbtrainimagethmt.m% written by: Duncan Po% Date: August 24, 2002% Using the EM algorithm, train models for the specified image% Usage: [model, stateprob] = pdfbtrainimagethmt(imname, imformat, initmodel, mD)% Inputs: imname - name of the image file% imformat - format of the image file (e.g. 'gif')% initmodel - optional. Give an intial model to speed up the training% process. Input '' if not providing initial model.% mD - convergence value% Output: model - the model generated% stateprob - state probabilitiesfunction [model, stateprob] = pdfbtrainimagethmt(imname, imformat, initmodel, mD)pyrfilter = '9-7';dirfilter = 'pkva';levndir = [2 2 3 3];ns = 2;zeromean = 'yes';coef = contourlet(pyrfilter, dirfilter, levndir, imname, imformat);for dir = 1:2.^levndir(1) [tree, scaling] = contourlet2tree(coef, dir); if isempty(initmodel) [tempmodel, tempstateprob] = pdfbtrainthmt(tree, levndir, mD, ns,zeromean); else [tempmodel, tempstateprob] = pdfbtrainthmt(tree, levndir, mD,... initmodel{dir}); end; model{dir} = tempmodel; stateprob{dir} = tempstateprob;end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?