Professional Documents
Culture Documents
Pi19404
February 2, 2013
Contents
Contents
Contrast Limited Adaptive Histogram Equalization for Image Enhancement 3
0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 0.2 Histogram Equalization . . . . . . . . . . . . . . . . . . 0.3 Adaptive Histogram Equalization . . . . . . . . . . . 0.4 Control Limited Adaptive Histogram Equalization 0.5 Application 1 . . . . . . . . . . . . . . . . . . . . . . . . . 0.6 Application 2 . . . . . . . . . . . . . . . . . . . . . . . . 0.7 Application 2 . . . . . . . . . . . . . . . . . . . . . . . . 0.8 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
3 3 5 6 8 8 9 9 9
2 | 10
(b) Histogram
3 | 10
Contrast Limited Adaptive Histogram Equalization for Image Enhancement To produce a high contrast version of the image ,the task is to process the image such that histogram is more evenly distributed across all the pixel values,indicating the image contains a large variation of pixels indicating a high contrast image.It may lead to enhancing the unwanted noise and supressing desired information in image. These effects can be observed for images with very poor contrast such that histogram is very narrow,equalization will not transform the histogram to great extent by may lead in increasing the noise in the image The aim of histogram equalization tecnhiques is to apply some transformation of the image so that output image has increased contrast and histogram that is well distributed over the all range of pixels
(d) Histogram
(f) Histogram
However this method has many disadvantages and produces artificial images under certain scenarois. Below are samples images for which histogram equalization produces image that introduces artifacts or leads to less visually appealing images. The main reason for these effects may be attributed to the fact that image transformation is performed considering the global histogram of image and the same transformation many not necessarily be suitable in local context . The histogram equalization also tends to produce visible gradients when applied to low contrast
4 | 10
(h) Histogram
(j) Histogram
5 | 10
The transformation function accepts a pixel intensity values and outputs a transformed pixel intensity value. Consider the block with size (A; B ) and co-ordinates (i 1; j 1) ,(i; j 1) ,(i 1; j ) and (i; j ) and let value of pixel according to transformation function in these blocks be v1,v2,v3,v4. The bilinear interpolation can be expressed as for pixel block 4
v
(x; y )
in
= (A
)( )
x B y
v1
+ (A
)
y x
v2
+ (A
)
x y
v3
+x
v4
For the block that lie along the boundary of the image linear interpolation is used Consider the block (i; 0) and (i 1; 0) if pixel corridnaties are such that x < A=2 and y < B=2 then
v
= (A
)
x
v1
+x
v2
(0; j )
and
(0; j
1)
= (B
)
y
v1
+y
v2
The interpolation will reduce the boundary effects and provide smooth transition of pixel values between adjacent blocks of image.
6 | 10
The effect of clipping is to produce locally uniform histogram .The clipped level for all the blocks the transformation domain will be the same for all the blocks.The locally uniform histogram will give rise to locally good contrast image and the uniform clip level will give rise to a globally consistant image.
(b) Histogram
(c) Equalize
(d) Histogram
(e) normalized
(f) Histogram
(g) Local HE
(h) Histogram
(i) interpolated
(j) Histogram
(k) CLAHE
(l) Histogram
7 | 10
0.5 Application 1
An application of CLAHE is for underwater image processing.First the color cast in under water image are removed using color constancy algorithm,then CLAHE is applied on the illumination channel of the color image.
(b) CLAHE
0.6 Application 2
If in the above approach the color cast is not removed successfully ,applying the CLAHE algorithm to the illumination channel does not help much in improving the contrast of the image. Another approach we can take is to apply CLAHE to RGB channels on the image independently choosing the clip level for each channel independently based on the requirement. In some situations it may be required to apply CLAHE to only one of RGB channels and Global histogram equalization is applied to other channels.In the below examples it can be seen that such processing is useful for enhancement of underwater images.
8 | 10
(a) image
(b) CLAHE R
0.7 Code
Code is available in repository http://code.google.com/p/m19404/source/ browse/CLAHE/HistogramEqualization the implemetation is written in opencv using C++ wrappers and is same as OpenCv Code for Clahe and Code for Clahe with few minor modifications based on the above analysis.
9 | 10
Bibliography
Bibliography
[1] [2]
OpenCv Code for Clahe. url: https://github.com/joshdoe/opencv-clahe. Karel Zuiderveld. Code for Clahe. url: http://tog.acm.org/resources/
GraphicsGems/gemsiv/clahe.c.
Karel Zuiderveld. Graphics gems IV. In: ed. by Paul S. Heckbert. San Diego, CA, USA: Academic Press Professional, Inc., 1994. Chap. Contrast limited adaptive histogram equalization, pp. 474485.
[3]
acm.org/citation.cfm?id=180895.180940.
isbn:
0-12-336155-9.
url: http://dl.
10 | 10