Some interesting insights towards the Histogram Equalization Question in Image Processing Exam:
The question was: Does histogram equalization lead to an increase or decrease in entropy of the image?
1) If first order entropy(acc toThiruvikraman Kandhadai sir) or zero order entropy (acc to wikipedia) is taken into consideration, two cases arise:
1)a) If you consider round off errors in the practical case(the most relevant case out of the three) then the entropy of the image decreases after Histogram equalization.
1)b) If you do not consider round off errors, the entropy of the image remains constant before and after Histogram Equalization.
2) If you consider higher orders of entropy in addition to zero/first order entropy then the entropy of an image increases after histogram equalization.
Why does this happen?
Case b) When we plot a histogram of pixel values, we get columns having number of pixels in image with that particular gray-scale value. Let us call these columns bins. Consider an 8 bit coded image = 256 levels of gray.(not the amount of memory in image) Suppose we have N number of partially filled bins, then we have 256-N number of empty bins. Since histogram equalization is a one-to-one mapping, the number of partially filled bins is not allowed to change and so it remains at N. Now the formula for first/zero order entropy is
H = cumsum( P(aj)log(P(aj)))
P(aj) for that particular gray value does change, but the same P(aj) value is taken up by another gray value. Since its a one to one mapping, and we obviously cannot split the partially filled bins the probability list of grayscale values remains the same.
Since P(aj) effectively does not change then Entropy does not change.
b) If you consider round off errors then there might be a case where the round off error causes the histogram equalization function to change from one to one mapping. One of the higher probability bins might lose a pixel to have another lower probability partially filled bin to take up that lost pixel. In this case the probability decreases effectively because of the log(P(aj)) term which penalizes higher probability terms more than lower probability term.
3) Higher order entropy terms will cause the overall Entropy term to increase. However, you have to consider inter-pixel redundancy and this makes calculations a bit more complicated.
After some clarifications with Sir, I've found that he's going to give marks according to the assumptions taken and relevant explanation.
Have fun!!
The question was: Does histogram equalization lead to an increase or decrease in entropy of the image?
1) If first order entropy(acc toThiruvikraman Kandhadai sir) or zero order entropy (acc to wikipedia) is taken into consideration, two cases arise:
1)a) If you consider round off errors in the practical case(the most relevant case out of the three) then the entropy of the image decreases after Histogram equalization.
1)b) If you do not consider round off errors, the entropy of the image remains constant before and after Histogram Equalization.
2) If you consider higher orders of entropy in addition to zero/first order entropy then the entropy of an image increases after histogram equalization.
Why does this happen?
Case b) When we plot a histogram of pixel values, we get columns having number of pixels in image with that particular gray-scale value. Let us call these columns bins. Consider an 8 bit coded image = 256 levels of gray.(not the amount of memory in image) Suppose we have N number of partially filled bins, then we have 256-N number of empty bins. Since histogram equalization is a one-to-one mapping, the number of partially filled bins is not allowed to change and so it remains at N. Now the formula for first/zero order entropy is
H = cumsum( P(aj)log(P(aj)))
P(aj) for that particular gray value does change, but the same P(aj) value is taken up by another gray value. Since its a one to one mapping, and we obviously cannot split the partially filled bins the probability list of grayscale values remains the same.
Since P(aj) effectively does not change then Entropy does not change.
b) If you consider round off errors then there might be a case where the round off error causes the histogram equalization function to change from one to one mapping. One of the higher probability bins might lose a pixel to have another lower probability partially filled bin to take up that lost pixel. In this case the probability decreases effectively because of the log(P(aj)) term which penalizes higher probability terms more than lower probability term.
3) Higher order entropy terms will cause the overall Entropy term to increase. However, you have to consider inter-pixel redundancy and this makes calculations a bit more complicated.
After some clarifications with Sir, I've found that he's going to give marks according to the assumptions taken and relevant explanation.
Have fun!!