# Image downsampling with Haar DWT?

How can the resolution of an image in matlab be reduced by using 2D haar wavelet by downsampling-decimation? Is there any predefined code or tool within wavemenu? thanks in advance

• Hello and welcome to DSP.Stackexchange! It looks like you have a question on how to use a very specific piece of software called wavemenu. Chances anyone around here has heard it before or would be familiar with it are not that high. If your question is about that software specifically, it's probably best to contact its authors. If you can make it more general, your question might be a good fit for StackOverflow if it's about how to implement things or even here (but then you'd need to provide more details about what you want to do like an example or so). – Florian Jul 11 '19 at 13:50

The process the authors use with the Haar wavelet seems to be simply computing the low-pass/low-pass approximation of the image. Each $$2\times 2$$ block of pixels is simply replaced by their average. It boils down to low-pass filtering with a $$2\times 2$$ moving average kernel, and downsampling by 2 on rows and columns. One cannot go to $$640 \times 480$$ to $$32\times 32$$ without cropping some borders, as you can see on the man's left shoulder. Matlab functions for that purpose are dwt2 and wavedec2.