- Open Access
- Total Downloads : 167
- Authors : K. Madhavi, Andra Pradesh
- Paper ID : IJERTV3IS030782
- Volume & Issue : Volume 03, Issue 03 (March 2014)
- Published (First Online): 19-03-2014
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Histogram Based MSR for Image Enhancement
K. Madhavi
Department of Electronics and Communication Engineering Jawaharlal Nehru Technological University
Hyderabad
AbstractA Histogram based multi scale retinex (HB_MSR) algorithm for the enhancement of darker images is proposed in this paper. The new technique consists only the addition of the convolution results of 3 different scales. It is observed that the new technique out performs the conventional MSR technique in terms of the quality of the enhanced images and computational speed.
Index TermsRetinex, Single scale retinex, Multi scale retinex, image enhancement.
SCHEMATIC DIAGRAM FOR RETINEX
S(x,y)=R(x,y)*L(x,y)
-
INTRODUCTION
Our aim is to enhance the quality of the recorded image as to how a human being would have perceived the scene. The property that we aim to achieve is colour constancy. This property cannot achieved by using standard image enhancement techniques. One of the enhancement techniques that tries to achieve colour constancy is retinex.
Incident light L
Reflect object R
observer
Human visual system(HVS) can perceive constant color under varying illumination conditions while digital images record information of both reflectance of objects and illumination of the object.
Recent work[1,2,3,4] advocates MSR as a method of image enhancement which provides colour constancy and dynamic range compression.
The main thrust of this paper is to modify the multi scale retinex (MSR) approach to image enhancement so that the processing is more justified by correcting colour balance and enhancing global and local contrast.
-
RETINEX THEORY
Retinex theory is introduced by Land to explain humans visual model, and establish illumination invariance model of which the color has nothing to do with. The basic objective of retinex model is carry out image reconstruction making the image after reconstruction the same as the observer saw the images at the scene.
Retinex basic principles are to be divided in to an brightness image and reflection image, then enhance images to achieve the purpose by reducing the impact of image brightness on reflection image according to land,s retinex model, an image can be defined as S(x,y) is shown in fig:
S(x,y) = R(x,y)*l(x,y).(1)
R express the brightness of the surrounding environment,
has nothing to do with the objects, and L is the reflectivity of objects, has nothing to do with the lighting, which includes details of the characteristics of objects.
The key of the retinex theory with image enhancement is calculated the brightness image from the original images effectually, but calculated brightness image from the original image is non problem in math, it can only be estimated through mathematical approximation to estimate image brightness.
In the process of development of retinex theory, according to the different methods of brightness estimates.
-
SINGLE SCALE RETINEX
Single scale retinex algorithm is the improvements and realized for center/surround retinex in 1997 by jobson. I(x,y) for the original image, L(x,y) for the brightness function, R(x,y) for the reflectance images, single scale retinex can be expressed as formula 2
log R(x,y) = log I(x,y)/log L(x,y)
= log I(x,y) log[F(x,y)*I(x,y).(2)
F(x,y) is the low pass convolution function, L(x,y) is the estimated brightness image from the original image.
At the same time, the human eye is more sensitive for the gray edge, such as high frequency information that, due to the convolution function in formula is a low pass function, so F(x,y) is estimated the brightness of the image, L(x,y) correspond to low-frequency part of the original images. Low frequency part L(x,y) of the image is removed from the original, which is single scale retinex, received original description of high frequency part, that corresponds to the edge
of the image. Therefore, color constancy and edge enhancement can be achieved, by the single scale retinex.
BLOCK DIAGRAM OF MSR
BLOCK DIAGRAM FOR SSR
i(x,y)
Image input
MSR
histogra
Gaussian
FFT filter
Averagin
IFFT
Log
log
output
–
+
m
truncati on
Gain/off
set
g for
MSR
output
normalis ation
20
log
*
F(x,y) SSR
16
However, the calculation of brightness image from the original image in mathamatics is a very complex issue. In a single scale retinex image enhancement algorithm, jobson demonstrated that the Gaussian deconvolution function can provide more to deal with the original image, and can better enhance the image, which is expressed as formula 3
F(x, y)=kexp(-(x^2+ y^2 )/c^2) ……………………(3)
where
C is the scale constant, if c is small, dynamic range compression &if c is high, color constancy is improved. Experiments show that, when scale constant between 80-100, that the gray scale dyanamic range compression and contrast enhancement can achieve a better balance. K is the constant matrix it can be expressed in formula 4:
F(x,y) dx dy =1 (4)
-
MULTI SCALE RETNEX
MSR is explained easily from single scale retinex. The output of MSR is simply the weighted sum of several SSRs with different scales.
N
Ri (x,y) = Wn { log Ii (x,y) – log[ F(x,y) * Ii (x,y)]}.(5)
n=1
where N = number of scales, Ri(x,y) = ith spectral component of the MSR output, Wn = weight associated with the nth scale.
The only difference between R(x,y) and Rn(x,y) is the surround function is given as
Fn(x,y) = Kexp[-(r^2/Cn^2)]..(6) where cn = Gaussian surround function
-
METHODS FOR AUTOMATIC IMAGE ENHANCEMENT
In this study we focused on correcting color balance and enhancing global and local contrast. It is possible to find manually working parameters for every image, automation would require solving complex parameterization problems and it is image independent to choose the upper and lower clipping points of the given image.
-
Variance Histogram method as control measure
In this method, a particular test image was taken and apply multi scale retinex to that image, after getting the output of multi scale retinex, plot the histogram to that image, find the variance from the histogram.
From the histogram clip the lower and upper portion by using the x times the variance where x can choose any value from 1 to 5. After this rescale the clipped region to 0 to 255.
But after testing with many images single x value will not give better results. So we came to conclusion that unique x value will not work for all images. So it is automated if variance is choosen as a control measure.
Stages for Variance Histogram
Method as Control Measure
-
Input image
-
Perform MSR to the input image
-
Plot the histogram for enhanced image
-
Find the variance from histogram
-
Choose the clipping points based on variance & Rescaling the clipped region(0 to 255)
-
Output image
30
Variance histogram method as
control measure
Frequency histogram method as
control measure
1000
500
0
1000
500
0
red
0 100 200
red
0 100 200
1000
500
0
1000
500
0
green
0 100 200
green
0 100 200
1000
500
<>0
1000
500
0
blue
0 100 200
blue
0 100 200
1000
500
0
1000
500
0
red
0 100 200
red
0 100 200
original image
1000
500
0
1000
500
0
green
0 100 200
green
0 100 200
MSR OUTPUT
1000
500
0
1000
500
0
blue
0 100 200
blue
0 100 200
MSRCR OUTPUT
original image
MSR OUTPUT
MSRCR OUTPUT
46
37
Variance histogram method as
Frequency histogram method as
control measure
control measure
300
200
100
red
300
200
100
green
400
200
blue
300
200
100
0
400
200
0
red
0 100 200
red
0 100 200
original image
300
200
100
0
400
200
0
green
0 100 200
green
0 100 200
MSR OUTPUT
400
200
0
600
400
200
0
blue
0 100 200
blue
0 100 200
MSRCR OUTPUT
0
100
100
400
300
200
0
0 100 200
red
0 100 200
original image
0
400
300
200
0
0 100 200
green
0 100 200
MSR OUTPUT
0
400
200
0
0 100 200
blue
0 100 200
MSRCR OUTPUT
42
33
-
-
Frequency Histogram method as control measure
In this method, a particular test image was taken and apply multi scale retinex to that image, after getting the output of multi scale retinex, plot the histogram to that image, the histogram of the enhanced image similar to the Gaussian and find 0 from the enhanced image make it as maximum value and clip the upper and lower portion of the histogram.After this rescale the clipped region to 0 to 255.
After testing across many images y = 0.05 was found to be an optimum value that can be used to many types of images. so by using this procedure image dependency will be removed and great advantage in real time applications.
. C Statistical analysis
STATISTICAL ANALYSIS for
1st image
ERRORS
VARIANCE AS A CONTROL MEASURE
FREQUENCY OF OCCURANCE OF PIXELS
MSE
-1.6977e+005
-1.0086e+006
PSNR
4.1679
11.9062
Entropy
7.0668e-004
1.1448
briteness_error
-26.3427
-34.3406
61
STATISTICAL ANALYSIS for 2nd
image
ERRORS VARIANCE AS A CONTROL MEASURE
FREQUENCY OF OCCURANCE OF PIXELS
Stages for frequency histogram
as control measure
-
Input image
-
Perform MSR to the input image
-
Plot the histogram for enhanced image
-
Find the frequency of occurance of pixels from histogram
-
Choose the clipping points based on frequency of pixels(0.005) & Rescaling the clipped region(0 to 255)
-
Output image
-
41
MSE -8.9507e+005 -3.5824e+006
PSNR 11.3878 17.4109
Entropy 7.0668e-004
briteness_error -13.6231
7.0668e-004
-82.2027
57
CONCLUSION
We have analyzed the fundamental steps of MSR and disentangled the various operations. So that their effects can be handled separately, which also makes it possible to add in true color constancy processing.
REFERENCES
-
D. Jobson, Z. Rahman, and G.A.Woodell, Spatial aspect of color and scientific implications of retinex image processing Proc. SPIE 4388, 117-128(2001).
-
Z. Rahman, D. Jobson, and G.A. Woodell, A method for digital image enhancement U.S. Patent No. 5,991,456(1996)
-
K. Barnaed and B. Funt, Investigations in to multi scale retinex, in color imaging: vision technology, pp:9-17, John Wiley and sons, new York(1999).
-
K. Barnaed and B. Funt, Analysis and improvement of multi scale retinex, Proc. IS&T 5th color imaging conf. color Sci. Syst. Appl., pp.221-226(1997).
-
Z. Rahman, D. Jobson, and G.A. Woodell, Retinex processing for automatic image enhancement, Proc. SPIe 4662, 390-401(2002).