Search code examples
haar-waveletdwtwavelet-transform

Input to the Haar Wavelet Transform is not power of 2


If the input data is not even, what should I do? And what if the input data is not power of 2? Should I just ignore the rest of the numbers?


Solution

  • There is no such restriction on the signal length. Use some signal extension to handle the samples beyond signal borders. A symmetric extension is a popular choice, as it guarantees the invertibility of the transform without adding any unnecessary coefficients. Such treatment is even easier if you use a lifting scheme (although this does not matter in the case of the Haar wavelet). The same inherently applies to the powers of the two.