ANALYSIS OF CONTRAST ENHANCEMENT EFFECTS ON HISTOGRAM
Sharma Ved,
Bachelor Of Engineering in Electronic and Telecommunication Engineering, Student, Thakur College of Engineering and Technology,Mumbai University, Mumbai, India, [email protected]
ABSTRACT
To transform the information from the sensor into an image, each colour of the scene is converted into a pixel value in the range: [0, 255]. Such a value is interpreted as the amount of photons hitting a pixel during the exposure time. This is denoted as the pixel intensity. It is visualized as a shade of gray denoted as gray-level value, ranging from black 0 to white 255. An image is a two-dimensional array of various intensity levels, which can be denoted by f(x, y), where, f value denotes intensity at a particular spatial coordinate (x, y). The intensity is a measure of the relative brightness of each point. Each point in the image denoted by the (x, y) coordinates is referred to as a pixel. As images obtained from camera are not sharp as per our requirements. Thus image Enhancement and processing techniques are used to improve the visual appearance of the overall image. Image processing is required to remove the unwanted noise and restore the original image while Image Enhancement is required to improve the contrast. Due to low contrast, we cannot clearly distinguish objects from the dark background. Hence both, Processing and Enhancement are equally vital to improve the credibility of the image. The best Enhancement technique is the Contrast Limited Adaptive Histogram Equalization and we will prove how it is better than Histogram Equalization and Adaptive Histogram Equalization by using Histogram Plot as a comparison factor. MATLAB software has been used to perform the analysis on image. The subsequent advantages and disadvantages of all the enhancement techniques have also been discussed along with their algorithm and analysis. The contrast equalization can be used for many purposes where the detection of target from background in image is important such as Defence, Medical and Astronomy.
Keywords: Contrast Enhancement; Histogram Plot; Histogram Equalization; Adaptive Histogram Equalization; Contrast Limited Adaptive Histogram Equalization.
For citation: Sharma V. Analysis of contrast enhancement effects on histogram. H&ES Research. 2017. Vol. 9. No. 1. Pp. 60-66.
1. Introduction and Methodology:
The aim of Contrast enhancement process is to adjust the local contrast in different regions of the image so that the details in dark or bright regions are brought out and revealed to the observer. Hence, we need to balance the contrast. Contrast enhancement is usually applied to input images to obtain a superior visual appearance of the image by transforming original pixel values using a transform function of the form.
G (x, y) = T [r (x, y)]
Where, g (x, y) and r(x, y) are the output and input pixel respectively, and T is the operator or which varies the enhancement of output image. Various Contrast enhancement techniques like Histogram Equalization (HE), Adaptive Histogram Equalization (AHE) and Contrast Limited Adaptive Histogram Equalization have been discussed in this paper.
There are three important methods to process an image. These are spatial-based domain, frequency-based domain and Global & Local methods.
1.1. Spatial based domain:
Spatial domain methods operate directly on these pixels. Image processing functions in the spatial domain may be expressed as:
g(x, y) = T f(x, y)]
where f(x, y) is the input image data, g(x, y) is the processed image data, and T is an operator on/ defined over some neighborhood of (x, y).
1.2. Frequency based domain:
The foundation of frequency domain techniques is the convolution theorem. The processed image, g(x, y), is formed by the convolution of an imagef x, y) and a linear, position-invariant operation h(x, y), that is
g(x y) = Kx y) * fa y)
By the convolution theorem, the following frequency domain relation holds
WWW.H-ES.RU PUBLICATIONS IN ENGLISH
G (u, v) = H (u, v) F (u, v)
Y- axis= Count
where G, H and F are the Fourier transforms of g, h and/ respectively. H(u, v) is called the transfer function of the process. In a typical image enhancement application,/*, is given and the goal, after computing F(u, v), is to select an H(u, v) so that the desired image g(x, y) exhibits some highlighted feature of/x, y), i. e.
g(x, y)= F-l [H (u, v) F (u, v)]
For instance, edges in/x, y) can be accentuated by using a function H(u, v) that emphasizes the high-frequency components of F(u, v).
X- axis= Intensity
Fig. 1. Basic Histogram plot
1.3. Global & Local Methods:
Image processing methods that involve using a single transformation function for the whole image are classified as global methods. The low pass/high pass filters and histogram transformation are examples of global enhancement methods. The main advantage of global methods is that they are computationally inexpensive and simple to implement. However, global methods may attenuate or miss local information while working on the overall characteristic of the image. The transformation function of a local processing method is dependent on the location and the neighbourhood of the pixel looked at,
g(x y) = T[x y Ax y)]
These methods are therefore "adaptive" to the local information within the image.
Adaptive histogram equalization is an example of such a local processing method and is effective in enhancing details in local areas of the image.
2. Histogram & Histogram Plot:
An image histogram is a plot of the distribution of intensities or gray levels in an image. The histogram of a digital image with gray levels in the range [0, L-l] can be represented by the discrete function.
P(rk) = nk/n
where rk is the kth gray level, nk is the number of pixels in the image with that gray level, n is the total number of pixels in the image, andk= 0, 1,2, ... L-l. The image histogram gives an estimate of the probability of occurrence of a gray level. Contrast is the difference between maximum and minimum pixel intensity. Histogram is basically a graph (Histogram plot) showing number of pixels in an image at each intensity value found in that image (fig. 1).
2.1. Contrast Enhancement:
Contrast Enhancement is a technique which is generally involved with manipulating the histogram plot so as to make the object in the image distinguishable from its background. The most widely used Contrast Enhancement techniques are Histogram Equalization, Adaptive Histogram Equalization and Contrast Limited Adaptive Histogram Equalization. These three techniques will be further analysed with their histogram plots.
2.2. Histogram Plot relative to Contrast Enhancement:
Increasing Contrast increases the intensity and decreases the count.
Fig. 2. Original Image and it's Histogram plot
Original Image Histogram equalization
Fig. 3. Original Image and Histogram Equalized Image
Increasing Brightness increases the count and decreases the intensity.
The Histogram of the sample Image is shown in fig. 2, which has intensity values from 47 to 255 and maximum count of 8000. The image does not has a good contrast, thus we need to apply Contrast Enhancement techniques to make its appearance better for various application.
Histogram Plot is the most effective tool in easily understanding the property variations imposed by filter and enhancement techniques on an Image.
Fig. 4. Histogram plot oforiginal Image and Histogram Equalized Image
3. Histogram Equalization (HE):
The histogram of an image (fig. 3) indicates the frequency of occurrence of particular gray levels over the complete range of gray levels for a particular image. It also represents the probability of such an occurrence. The probability of occurrence of all gray level pixels should be uniform. In histogram equalization, the goal is to obtain a uniform histogram distribution for the output image, so that an optimal overall contrast is perceived. The algorithm of the histogram equalization process is as follows:
Let the variable r represent the gray levels in the image to be enhanced or equalized.
The pixel values can be normalized to form continuous quantities in the interval [0, 1], with r = 0 representing black and r =1 representing white. For any r in the interval [0, 1], the transformation is of the form:
s = T(r),
it produces a gray level s for every level of r in the original image. It is assumed that the transformation function satisfies the conditions:
(a) T(r) is single-valued and monotonically increasing in the interval 0 < r < 1; which means it preserves the order from black to white in the gray scale
(b) 0 < T(r) < 1 for 0 < r < 1, which means it guarantees a mapping that is consistent with the allowed range of gray levels.
The inverse transformation from s back to r is then denoted
r = T-1 (s), 0 <s < 1
where, the assumption is that T - 1 (s) also satisfies conditions (a) and (b) with respect to the variable s.
The gray levels in an image may be viewed as random quantities in the interval [0, 1]. If they are continuous variables, both the original and transformed gray levels can be characterized by their probability density function pr(r) and ps(s) respectively, where the subscripts onp are used to indicate that pr andps are different functions. This is then followed by cal-
Original Image
After Adaptive Histogram Equalization
■ ' 'Diii-*"~" riT" > , ¿fr ^Sfc jt^SS* ^ m1 yr, ' 5J tfîTtW I ---
* p» - V
CON i
50 100 160 200 ÎS0
SO 100 1 DO 200 ¿50
Fig. 5. Original Image and Adaptive Histogram Equalized Image with their respective Histogram plots
culating the PDF (Probability Density Function) and CDF (Cumulative Density Function) of r as the transformation function produces an image with uniform density gray levels and with better contrast distribution (fig. 3, 4).
4. Adaptive Histogram Equalization (AHE):
Adaptive Histogram Equalization (AHE) algorithm is similar to Histogram Equalization procedure which modifies the data based on local image data. The main aim in AHE is to divide the entire image into multiple grids of different regions and then apply the normalised Histogram Equalization in each grid. The number and size of regions vary according to input image. The standard size is 8x8 pixels. Also a linear interpolation technique is used for a smooth interfacing between the adjacent region boundaries (fig. 5).
Advantage: AHE overcomes the limitations of HE and it improves the visual presentation of information present in the image.
Disadvantage: AHE is not able to separate between the actual information and noise in the regions and because of it the noise also gets amplified in region.
5. Contrast limited adaptive histogram equalization
(CLAHE):
The only disadvantage in AHE is the noise problem which can be scaled down by limiting contrast enhancement
in the homogenous areas and it is used in CLAHE technique. CLAHE allows only a specific number of pixels in each bin of each local histogram. The Histogram is accordingly clipped and then the pixels from the clipped area are redistributed equally over the entire range of original histogram so as to keep total count of histogram same. The clipping limit is the average of histogram contents. Clip limit is the contrast factor. Clip limit value selection should be appropriate as a very low value results in no contrast enhancement and is just reflection of the original image. While a very high value results in a image identical to AHE. The advantage of CLAHE is it's simple computational requirements and supreme results on images (fig. 6).
Below figure compares the CLAHE result to that obtained by the standard histogram equalization method. The CLAHE image has less amplified noise and avoids the brightness saturation in the standard histogram equalization. CLAHE does have its limitations. Since the method is aimed at optimizing contrast, there no direct one-to-one direct relationship between the gray values of the original image and the CLAHE processed result. Pixels of the same gray level in the original image may be mapped to different gray levels in the output image, because of the equalization process and bilinear interpolation. Consequently, CLAHE images are not suited for quantitative measurements.
Fig. 6. Histogram Equalized and Contrast Limited Adaptive Histogram Equalized Image with their respective Histogram plots
Analysis of enhancement results:
The comparison of Original Image, Histogram Equalized Image, Adaptive Histogram Equalized Image and Contrast Limited Adaptive Histogram Equalized Image prove that CLAHE Image has the best Contrast Enhancement. Also, CLAHE has a good balance of Count (Y- axis) vs Intensity(X-axis). As the image moves from original to HE to AHE then CLAHE, we can observe variations in both count and intensity. HE has good count values but it has far less intensity and distance between the adjacent intensities is more. While AHE has good intensity levels but it lacks in the count, its count is half of that of HE. Intensity values increase due to Contrast stretching property. A good Enhancement technique is the one in which there is proper count and intensity balance also it should be an overall smooth curve. All these characteristics are only obtained in Contrast Limited Adaptive Histogram Equalization. Thus CLAHE is the best technique to obtain balanced and enhanced Images.
The CLAHE algorithm is a digital contrast enhancement technique that emphasizes local details in the image while limiting noise amplification. This process is achieved with local histogram equalization and clipping, followed by bilinear interpolation. CLAHE contrast enhancement has been found to be visually significant and object detection is improved with the higher contrast in the images. Examining the frequency response of the enhanced image reveals increase in the higher spatial frequencies. As higher spatial frequencies correspond to edges in the image, the increase in power represents an enhancement of the edges and hence, an increase in visible image details. This indicates that the CLAHE enhanced images were more informative than the original images. Results indicated that the CLAHE process is effective in enhancing low contrast
images. However, the improvement is limited for images with initially good contrast (fig. 7).
Conclusion
Therefore from the analysis of enhancement result it is clear that the Contrast Limited Adaptive Histogram Equalization has better visual appearance and a good overall histogram balance as compared to other Histogram Equalization and Adaptive histogram equalization. Thus we can extend the use of Contrast Equalization for better detection of target or object from background to many fields such as Defence, Medical Imaging, Surveillance and remote sensing.
References
1. Gonzalez R. C., Woods R. E. Digital Image Processing. 3rd edition. Prentice-Hall, 2008, 954 p.
2. Vollmer M., Möllmann K.-P. Infrared Thermal Imaging: Fundamentals, Research and Applications. Weinheim, Wiley-VCH, 2010. 612 p.
3. Sonka M., Hlavac V, Boyle R. Image Processing, Analysis and Machine Vision. 3rd edition. Thomson, 2008, 866 p.
4. URL: https://in.mathworks.com/help/images/7request-edDomain= www.mathworks.com.
5. DivyaK.A., RoshnaK.I. A Survey on Various Image Enhancement Algorithms for Naturalness Preservation. International Journal of Computer Science and Information Technologies. 2015. Vol. 6. No. 3. Pp. 2043-2045.
6. Yang F., Wu J. An Improved Image Contrast Enhancement in Multiple-Peak Images Based on Histogram Equalization. Proceedings of a meeting IEEE International Conference on Computer Design and Applications (Qinhuangdao 25-27 June 2010). Institute of Electrical and Electronics Engineers, 2010. Vol. 1. Pp. 346-349.
Adaptive (-Histogram ELqual ¡.satio
0 50
ADAPTIVE HISTOGRAM EQUALIZED IMAGE
0 50
CONTRAST LIMITED ADAPTIVE HISTOGRAM EQUALIZED
15C ÎOO 25C
150 200 260
Fig. 7. Original Image, Histogram Equalized Image, Adaptive Histogram Equalized Image and Contrast Limited Adaptive Histogram Equalized Image with their respective Histogram plots
АНАЛИЗ ЭФФЕКТОВ ПОВЫШЕНИЯ КОНТРАСТНОСТИ ГИСТОГРАММЫ Шарма Вед,
Бакалавр технических наук, студент колледжа техники и технологии университета Мумбаи, Мумбаи, Индия, [email protected]
АННОТАЦИЯ
Чтобы преобразовать информацию от датчика в изображение, каждый цветовой компонент преобразован в значение пикселя в диапазоне: [0, 255]. Такое значение интерпретируется как количество фотонов, поражающие пиксель за время экспозиции. Это обозначается как пиксельная интенсивность. Это визуализируется как оттенок серого, обозначенного в виде серого уровня яркости, в пределах от черного 0 к белому 255. Изображение - двумерное множество различных уровней интенсивности, которые могут быть обозначены {(х, у), где, f значение обозначает интенсивность в особой пространственной координате (х, у). Интенсивность - мера относительной яркости каждого точки. Каждая точка по изображению, обозначенная координатами (х, у), называется пиксель.
Изображения, полученные с камеры, не достаточно четкие согласно нашим требованиям. Повышение качества изображения и техника обработки используются, чтобы улучшить визуальное появление полного изображения. Обработка изображения требуется для того, чтобы удалять нежелательный шум и восстанавливать исходное изображение, в то время как повышение качества изображения требуется, для того чтобы улучшать контраст. Из-за низкого контраста, мы не можем ясно отличить объекты от темного фона. Следовательно, оба метода, обработка и повышение качества одинаково жизненно важны, чтобы улучшить правдоподобность изображения. Лучшая техника повышения качества - контрастно-ограниченное адаптивное выравнивание гистограммы. Мы докажем, что оно лучше, чем выравнивание гистограмм и адаптивное выравнивание гистограммы при использовании графика гистограммы как фактора сравнения. Для анализа изображений использовалось программное обеспечение МДИДБ. Последующие преимущества и неудобства всех методов улучшения были также обсуждены наряду с их алгоритмом и анализом. Контрастное выравнивание может использоваться во многих целях, в которых требуется обнаружение цели по изображению, в таких как оборона, медицина и астрономия.
Ключевые слова: повышение контрастности; график гистограммы; выравнивание гистограммы; адаптивное выравнивание гистограммы; контрастно-ограниченное адаптивное выравнивание гистограммы.
Для цитирования: Шарма В. Анализ эффектов повышения контрастности гистограммы. Наукоемкие технологии в космических исследованиях Земли. 2017. Т. 9. № 1. С. 60-66.