Monday, March 14, 2011

Histogram Equalization ?

Lets say we want to brighten some dark values and darken some light values of an image. At the same time, we want to use the complete dynamic range (i.e. total greyscale). How can we do that?
Answer: do histogram equalization.
How?

  1. Make the cumulative histogram  
  2. Apply the following formula (taken from wiki)


h(v) =
 \mathrm{round}
 \left(
   \frac {cdf(v) - cdf_{min}} {(M \times N) - cdf_{min}}
   \times (L - 1)
 \right)

No comments:

Post a Comment

Please ask if anything is not clear enough..........