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
Asked
Active
Viewed 2,528 times
0
-
Which library are you using? Or is it your code? – Mikhail Mar 09 '13 at 10:10
-
What library/code are you using? I can't see the Java part in your question yet – emecas Mar 09 '13 at 10:11
-
@Noofiz Its my own code.. I want to know what values to pass in for applying haar transform – Manasvi Karanam Mar 09 '13 at 10:23
-
@emecas Sorry for adding the java tag.. the prob is not with java.. – Manasvi Karanam Mar 09 '13 at 10:24
1 Answers
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