I am learning wavelet theory for image processing. To understand the theory, I write one Matlab program to decompose one black-white image. The program is as follows
Image = zeros(256, 256, 'uint8'); Image(101:200, 101:200) = 255; figure; imshow(Image); [cA1, cH1, cV1, cD1] = dwt2(Image, 'db1'); Image1 = [cA1, cH1; cV1, cD1]; figure; imshow(Image1, ); [cA1, cH1, cV1, cD1] = dwt2(Image, 'db2'); Image1 = [cA1, cH1; cV1, cD1]; figure; imshow(Image1, );
The first decomposition using the argument db1 produces zeros for all wavelet coefficients. The black-white image has the transition from 0 to 255 along horizontal and vertical directions and should have high-frequency component. Why are zero wavelet coefficients generated? If I change the argument from db1 to db2, the result will show horizontal and vertical lines in the subbands.
Edit: I decompose the image further and at level 3 edge-like structure can be seen on the subband. Wavelet is one kind of filter bank I read from one book. It means the frequency in the image can only be seen in the higher frequency band. From the below link, it told how to get frequency response of Daubechies filters.
I don't understand how is the frequency for images defined. From one book, it says that "Spatial frequencies are measures of the number of oscillations (cycles) from dark to light per unit of length of the image". How can I know the frequencies in the input image.