DSPRelated.com
Forums

Correct way to implement Discrete and Stationary Wavelet Transform?

Started by Ayesha Ameer August 10, 2014
Can someone please confirm if this is indeed the correct way to compute DWT:

load image
load Haar wavelet

for i = 1: Level
  periodize edges of image
  convolve image with Low pass Haar wavelet filter and store result in G
  convolve image with Low pass Haar wavelet filter and store result in H

  convolve G with low pass Haar to calculate approximation co-eff
  convolve G with high pass Haar to calculate horizontal co-eff

  convolve H with low pass Haar to calculate vertical co-eff
  convolve H with high pass Haar to calculate diagonal co-eff

  i = i + 1
  downsample approximation by 2 
end

In case of SWT, instead of down-sampling the approximation, Haar filter co-efficients are up-sampled twice at each level and the same process is repeated. Am I correct here?