Two-Dimensional Wavelet Analysis Using the Command Line

1 view (last 30 days)
I have a RGB image and I wanna implement 2D wavelet on it without using wavelet toolbox and just using command line:
  • X = imread('hslc_L8.jpg');
  • [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);
  • sx = size(X);
  • A1 = idwt2(cA1,[],[],[],'bior3.7',sx);
  • H1 = idwt2([],cH1,[],[],'bior3.7',sx);
  • V1 = idwt2([],[],cV1,[],'bior3.7',sx);
  • D1 = idwt2([],[],[],cD1,'bior3.7',sx);
  • .....
  • subplot(2,5,2);image(wcodemat(A1,192));title('Approximation A1')
  • axis off
In the highlighted line this error pops up: Error using image TrueColor CData contains element out of range 0.0 <= value <= 1.0
What should I do????

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!