0

I have a function which will calculate haar transformation for an image. Now i am passing the pixel values of the image directly to the haar function for computation. Iam not getting the original image back in LL sub band. Please help me whats wrong. I am very sure the harr transform computation is correct. But I am not sure what values to pass. Please help

Manasvi Karanam
  • 27
  • 3
  • 10

1 Answers1

1

if you use RGB image , so you need to split it to 3 channels and get the Haar for each channel(red, green , blue).

if the image is Gray one , so use it's pixel direct in Haar Function

Alya'a Gamal
  • 5,624
  • 19
  • 34
  • I am using a grayscale image only. And i passed the values directly. But still i am not able to reproduce the original image – Manasvi Karanam Mar 11 '13 at 16:14
  • When i am getting haar for each color channel (i.e; red, blue and green) there is a possibility that it might go into out of range because of averaging. So it is giving me 'Out of color range error'. What should i do to avoid this – Manasvi Karanam Mar 11 '13 at 17:09
  • i think that you implemented this function , so i don't know exactly what you do , if you have time you can try this code (it' java) http://www.tomgibara.com/computer-vision/haar-wavelet and the source code :http://www.tomgibara.com/computer-vision/HaarFilter.java , if you read the code it will help you , and if you can post your code here you will get the help :) – Alya'a Gamal Mar 11 '13 at 19:19
  • I have used the same code.. but i am not normalizing the values. i dint understand what to give for fractional bits – Manasvi Karanam Mar 12 '13 at 03:31