标题:问下一下问题出在哪里,求高手们指点下啊。关于contourlet变换
只看楼主
尽在天涯
Rank: 1
等 级:新手上路
帖 子:18
专家分:1
注 册:2012-11-17
结帖率:50%
 问题点数:0 回复次数:1 
问下一下问题出在哪里,求高手们指点下啊。关于contourlet变换
clear all;
clc;
%设定参数
pfilt = '9-7';            % choose LP decomposition filter
dfilt = 'pkva';           % choose DFB decomposition filter
nlevs = [0, 0, 4, 4, 5];    % Number of levels for DFB at each pyramidal level
                            % nlevs: vector of numbers of directional filter bank decomposition levels
                            %  at each pyramidal level (from coarse to fine scale).                           
th = 3;                     % lead to 3*sigma threshold denoising
rho=3;
% 加载图像
im = imread('1.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)

运行之后的结果是
Error using  -
Matrix dimensions must agree.

Error in lpdec (line 26)
d = x - sefilter2(xlo, g, g, 'per', adjust * [1, 1]);
Error in pdfbdec (line 44)
        [xlo, xhi] = lpdec(x, h, g);

Error in contourlet (line 19)
y = pdfbdec(im, pfilt, dfilt, nlevs);
 

问题到底出在哪里呢
搜索更多相关主题的帖子: numbers filter levels sigma 
2014-03-16 17:25
鸥翔鱼游
Rank: 5Rank: 5
等 级:职业侠客
帖 子:182
专家分:323
注 册:2014-4-19
得分:0 
我也是新手  交流交流
2014-04-25 14:17



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-428605-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.230477 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved