MATLAB Answers

0

How to perform wavelet decomposition HPF and LPF on image separately

Asked by Chandra Shekhar on 27 Feb 2013
I am having degraded image.here i need to separate high frequency information and low frequency information from the image by choosing different decomposition level from 1 to 8 and daubechies db8.
I have done like this but from this i can able to separate only low frequency information for 8 levels.
I=imread('img.jpg');
[Lo_D,Hi_D,Lo_R,Hi_R]=wfilters('db8');
[C,S]=wavedec2(I,8,Lo_D,Hi_D);
LF1=wrcoef2('a',C,S,'db8',1);
LF2=wrcoef2('a',C,S,'db8',2);
. .
LF8=wrcoef2('a',C,S,'db8',8);
imshow(uint8(LF1));
Does any one know how to extract high frequency information from the image or is any other method to do the same?
thank you

  1 Comment

Please find the image in below link..
In this initial image is degraded one. for this image i need to apply wavelet decomposition with db8 for 8 levels.
In this image LF1 to LF8 are low frequency information(LPF) in the image and HF1 to HF8 are high frequency information(HPF) in the image.
I am able to generate LF1 to LF8 by using above code, but i am unable to find HF1 to HF8 for the initial image.
Please any one know suggest me.

Sign in to comment.

1 Answer

Answer by Wayne King
on 28 Feb 2013

If you want to generate projections onto the wavelet subspaces similar to the one onto the approximation subspace you have above, then replace 'a' by appropriate detail space
X = wrcoef2('h',C,S,'wname',N); % for horizontal
X = wrcoef2('d',C,S,'wname',N); % for diagonal
and obviously 'v' for vertical.
The separable filtering operations are as follows:
The horizontal image is LH (lowpass rows and highpass columns). The vertical image is HL (highpass rows and lowpass columns) The diagonal image is HH (highpass rows then highpass columns)
Note that these projections are not the wavelet coefficients. The wavelet coefficients you can obtain with:
[H,V,D] = detcoef2('all',C,S,N);

  1 Comment

Thank you Wayne for your feedback.
Actually in given image black color text is considered as high frequency information while white background is low frequency information.
I tried with horizontal,vertical and diagonal method what you mentioned but i am not getting as similar as HF1 to HF8 images.
Please can you give me a code for generating HF1 to HF8.

Sign in to comment.