作业帮 > 综合 > 作业

Undefined function or method 'pdfbdec' for input arguments o

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/08/31 07:01:42
Undefined function or method 'pdfbdec' for input arguments of type 'double'.
contourlet变换经典代码中,总是对于这个函数报错y = pdfbdec(nim,pfilt,dfilt,nlevs);help文档里也米有相关定义说明,请问如何排除此问题.我是虾米,
pdfbdec()函数没有定义,无法调用?程序如下:
clear all;
clc;
%设定参数
pfilt = '9-7'; % choose LP decomposition filter
dfilt = 'pkva'; % choose DFB decomposition filter
nlevs = [0,0,4,4,5];
th = 3; % lead to 3*sigma threshold denoising
rho=3;
im = imread('lena512.bmp');
im = double(im)/256 ;
sig = std(im(:));
sigma = sig / rho;
% Contourlet 变换
y = pdfbdec(im,pfilt,dfilt,nlevs);
[c,s] = pdfb2vec(y);
nvar = pdfb_nest(size(im,1),size(im,2),pfilt,dfilt,nlevs); %nstd = pdfb_nest(nrows,ncols,pfilt,dfilt,nlevs)
cth = th * sigma * sqrt(nvar);
% 系数处理
c = c .* (abs(c) > cth);
% 重构
y = vec2pdfb(c,s);
cim = pdfbrec(y,pfilt,dfilt);
%显示图像
range = [0,1];
colormap(gray);
subplot(1,1,1),imagesc(cim(41:168,181:308),range); axis image off
colormap(gray);
set(gca,'FontSize',8);
title('Contourlets decomposition','FontSize',10)
你的contourlet工具包安装不正确 导致你调用其中函数的时候,matlab总出现此提示
最好是将此工具把拷到某一路径下,然后用path加载此路径