I'm trying to write forward wavelet transformation using D4 wavelet. Input data is color .bmp image with 24bit/pixel. Wavelet coefficients that I took:
h0 = 0.48296
h1 = 0.83652
h2 = 0.22414
h3 = -0.12941
g0 = -0.12941
g1 = -0.22414
g2 = 0.83652
g3 = -0.48296
The problem is, that during transformation I get values bigger than 255 or smaller than 0. What should I do in order to stay in [0,255] range?
Thanks.