In mathematics, the Haar wavelet is a sequence of rescaled "square-shaped" functions which together form a wavelet family or basis. Wavelet analysis is similar to Fourier analysis in that it allows a target function over an interval to be represented in terms of an orthonormal basis. The Haar sequence is now recognised as the first known wavelet basis and extensively used as a teaching example. Reference: https://en.wikipedia.org/wiki/Haar_wavelet
Steps to run the code:
- Open MATLAB and select the path where haar.m is stored.
- Pass two arguments 'image_name' and 'threshold' to the function haar.m
- Click on run and new image will be displayed and will be written to the current folder.
** For an image of size 1.42MB, time taken is: 3232.991766 seconds. compressed size: 192KB