I am trying to use the functions provided in the Matlab Wavelet Toolbox to create a multi-level discrete wavelet decomposition of an image, extracting the coefficients, manipulating them, and recomposing them back into the image.
I tried using a number of functions but none of them seem to do what I need. These are the steps to do this.
Use wavedec2 to decompose the image into [C,S].
[C,S] = wavedec2(X,N,Lo_D,Hi_D)
I then must use detcoef2 to extract the detail coefficients from [C,S]. [C,S] is the 'wavelet decomposition structure', it does not represent the actual coefficients such as cD, cH, cV.
[H,V,D] = detcoef2('all',C,S,N)
Manipulate the data
Reconstruct [C,S] ???? no function does this.
Use waverec2 to recompose the original image.
X = waverec2(C,S,Lo_R,Hi_R)
The problem is with step 4. There is no function that recreates the [C,S] and I can't call the function waverec2 because it needs the manipulated version of C and S.
Do I not need wavedec2 and waverec2? Perhaps should I just use detcoef2 and upcoef2?
Someone with some experience with DWT could solve this in a minute, I am fairly new to it.
Thanks