做了一个小波变换的一层图像分解,加载的是RGB图,把它转成索引图像再处理,但是在小波重构显示高低频分量的时候,显示的图像与用小波工具箱得出的结果差距很大,自己想是在显示中出来问题,显示的时候只想得到在uint8和double之间改,但是还是不对,求高手赐教,附上程序:I=imread('neurons.jpg');
 [X,map]=rgb2ind(I,255);
figure,imshow(X,map);
[ca1,ch1,cv1,cd1]=dwt2(X,'bior3.7');
a1=upcoef2('a',ca1,'bior3.7',1);
h1=upcoef2('h',ch1,'bior3.7',1);
v1=upcoef2('v',cv1,'bior3.7',1);
d1=upcoef2('d',cd1,'bior3.7',1);
Xsy=idwt2( ca1, ch1, cv1 ,cd1,'bior3.7');
figure,imshow(uint8(Xsy),map);
 figure,subplot(2,2,1),imshow(uint8(round(wcodemat(a1,255)-1)),map);
  subplot(2,2,2),imshow(uint8(round(wcodemat(h1,255)-1)),map);
  subplot(2,2,3),imshow(uint8(round(wcodemat(v1,255)-1)),map);
  subplot(2,2,4),imshow(uint8(round(wcodemat(d1,255)-1)),map);