JINKA UNVERSITY
COLLEGE OF NATURAL AND COMPUTITIONAL SCIENCE
DEPARTMENT -----------------------COMPUTER SCIENCE
PROGRAM ------------------------------------WEEKEND
ENTER -------------------------------------------2012
ACADAMIC year ------------------- – 2016
Term ------------------------------------------------11th
COURSE –--------------------------------- computer vision and image processing
CODE------------------------------------------- 41 13
Title - G2. Image enhancement with special domain
Group ASSIGNMENT
NO FULL NAME IDno
1 KAYISLE KARSHNBO GUYAO EXJN/0025 /12
2 ANIDENET WUCHE EXJN/0004 /12
3 KAPINO KASSO EXJN/0023 /12
4 GIZACHEW GENDOLE EXJN/0019 /12
5 GAHANO GELO EXJN/0018 /12
6 WASIHUN - EXJN/ /12
JINKA
ETHIOPIA
Submission date 08/03/2016E.c
submitted to Alemayehu .
Table of content
Contents page
Table of content ............................................................................................................................... i
1. Introduction ................................................................................................................................. 1
2. Spatial domain image enhancement............................................................................................ 2
2.1. grayscale enhancement ............................................................................................................ 2
2.1.1. Linear grayscale enhancement .............................................................................................. 2
2.1.2. Piecewise linear gray enhancement ...................................................................................... 2
2.1.3. Nonlinear gray enhancement ................................................................................................ 2
2. histogram enhancement .............................................................................................................. 3
3. Color component extraction in color images .............................................................................. 3
4. Image histogram equalization processing ................................................................................... 5
Conclusion ...................................................................................................................................... 6
References ....................................................................................................................................... 7
i
1. Introduction
Introduction Image is an important way for people to obtain external information. With the
development of technology, a variety of cameras have come on the scene. The resolution and
exposure time of cameras have been improved greatly. However, in different working
environments, the images acquired by cameras always have various problems, which can not meet
people's requirements very well. Therefore, we need to process, analyze and transform the acquired
image[1]. General image processing technologies include image compression, image
enhancement, image reconstruction and so on. Image enhancement is a very important application
in image processing technology. It can improve the visual effect of the image, enhance the contrast
and brightness of the image, highlight some information in the image, and meet the requirements
of analysis
1
2. Spatial domain image enhancement
2.1. grayscale enhancement
Gray level transformation is an important technology of image enhancement in airspace method.
It can expand the display width of the image and enhance the contrast of the whole image, and
make the whole image clearer. Gray transformation improves every pixel of the image by point
operation, and analyses and adjusts the pixel value of the output point by the gray level of the input
pixel. Gray-level transformation does not change the spatial relationship of the image itself, but
uses some gray-level transformation method to adjust the pixel of the image[3]. It is an operation
of transforming from one pixel to another.
2.1.1. Linear grayscale enhancement
Linear gray enhancement is a kind of gray transformation enhancement. It transforms every pixel
of an image according to a certain gray transformation relationship. If the camera is under-exposed
or over-exposed, the gray level of the whole image will be limited to a very small gray level range.
At this time, the collected image will be blurred. It is possible to use a linear function to transform
each pixel in the image linearly, which can effectively improve the quality of the image[4].
If the gray scale range before an image transformation is [a, b], and you want the gray scale range
after the transformation to be expanded or compressed to [c, d], the gray scale linear transformation
function expression is: ( , ) [ ]( ( , ) ) d c h x y f x y a c b a − = − + − (1)
2.1.2. Piecewise linear gray enhancement
Piecewise linear gray enhancement does not transform all the pixels of the image equally, but
expands the gray level of the pixels needed and compresses the unnecessary pixels. If the gray
scale range of the input image is 0~M level, the gray scale range of the enhanced image is 0~N
level, and the interval [a, b], [c, d] are respectively a gray level interval of the source image and
the enhanced image.
Then the piecewise linear transformation function is: ( ) ( , ) 0 ( , ) ( , ) [ ][ ( , ) ] ( , ) [ ][ ( , ) ] < ( ,
)cfxyfxyaadchxyfxyacafxybbaNdfxybdbfxyMMb −=−+
− − − + − (2)
2.1.3. Nonlinear gray enhancement
When the nonlinearity function is used to map the image grayscale, the nonlinear grayscale
enhancement of the image can be realized[5]. Commonly used nonlinear gray enhancement
methods are logarithmic function nonlinear transformation and exponential function nonlinear
transformation. When doing a logarithmic nonlinear transformation on an image, the
transformation function is: ln[ ( , ) 1] ( , ) ln f x y h x y a b c + = + (3) When performing an
exponential function nonlinear transformation on an image, the transformation function is: [ ( , ) ]
( , ) 1 c f x y a h x y b − = − (4) By adjusting a, b, c, you can adjust the position and shape of the
curve. With this transformation, the low gray scale range of the input image can be expanded, and
the high gray scale range is compressed to make the image distribution uniform[6].
2
2. histogram enhancement
The histogram of the image is to analyze the gray scale range of image and understand the
distribution of the gray level. From the distribution of the gray level, we can see many features of
the image. Therefore, image enhancement can be achieved by changing the histogram
characteristics of the image, modifying the histogram of the image, improving the different gray
levels and enhancing the contrast of the image[7].
Histogram equalization and histogram specification are the two most commonly used methods.
Before performing histogram related operations, we must know what the histogram looks like, that
is, histogram statistics. Mathematically, the image histogram is actually a function of the statistical
properties of the gray values of the image and the gray value of the image. It counts the number or
probability of occurrence of each gray level in an image. Graphically speaking, it is a two-
dimensional map, with the abscissa indicating the gray level of each pixel; the ordinate indicates
the number of pixels or probability of the corresponding gray level[8].
3. Color component extraction in color images
Image captured by camera in MATLAB is an X×Y×3 array. Each data in the array is the color
information components corresponding to the color image in a specific spatial position. By
combining these three components, a color image can be obtained.
In matlab, read a color image, its data type is unit8, that is, 8-bit unsigned integer data. The image
stored in this way is called 8-bit image, which can save data space very well. The imread command
in MATLAB is to store the image into an 8-bit matrix. If the read image is a color image, it will
store the data into an 8-bit RGB matrix. For example, if the pixels of the color image read are
800×1248, then the matrix stored in MATLAB is 800×1248×3, and each channel value of the color
image is between 0 and 255. The images saved by MATLAB are all uint8 data types, but the
double type is used in matrix operation. This method can ensure the accuracy very well. In matrix
operation, uint8 type arrays can operate with each other, and the result is still uint8 type[9].
Figure
1. Grayscale and color component histograms extracted from the original color image In
Matlab, the histogram components of color information can be obtained by the following
procedure: R1=RGB(:,:,1); G2=RGB(:,:,2); B3=RGB(:,:,3);
3
Figure 2. Grayscale and color component histograms extracted from the image after
equalization The histogram obtained by equalizing the color components of the image is
shown in Fig. 5. From the histogram shown in the figure, it can be observed that the display
width of the image is significantly widened, and the gray value of the region is significantly
enhanced. The three images are synthesized using the cat command in Matlab. The
synthesized color image is shown in Figure 5. Compared with the original image (Fig. 3)
and linear change in pixel(Fig.4), the contrast of the image after equalization is improved,
and the brightness of the image is obviously enhanced.The histogram of the obtained color
components is shown in Fig. 1.
4
2. It can be seen from the figure that the dynamic range of the original image histogram is
limited to a small range. The degree of aggregation is high and the gray value of the area
is low. The contrast of the original image is not high and the brightness is low, some
important information in the image can't show up.
4. Image histogram equalization processing
Histogram of image is based on probability theory and gray level calculation. The image is
enhanced by modifying a specific histogram. Therefore, the quality of image enhancement
depends on the performance of the histogram we use
5
Conclusion
mage enhancement is an indispensable video processing method. Histogram equalization is the
most commonly used method of image enhancement. It can improve the quality of image very
well. This paper mainly discusses the principle of histogram equalization, and carries out image
enhancement experiments through MATLAB experiments. The results show that the histogram
equalization method has a good processing effect. It will increase the contrast of the image and
highlight the elements of the image.
6
References
[1] Gilboa G, Sochen N and Zeevi Y Y 2004 IEEE Transactions on Pattern Analysis & Machine
Intelligence 26 1020-1036.
[2] Chiang J Y and Chen Y C 2012 IEEE Transactions on Image Processing 21 1756-1769. [3]
Bai X, Zhou F and Xue B 2012 Optics & Laser Technology 44 328-336.
[4] Rivera A R, RB and Chae O 2012 IEEE Transactions on Image Processing A Publication of
the IEEE Signal Processing Society 21 3967.
[5] Verma O P, Kumar P and Hanmandlu M 2012 Applied Soft Computing 12 394-404. [6]
Ortiz S H C, Chiu T and Fox M D 2012 Biomedical Signal Processing & Control 7 419-428. [7]
Caicedo J C, Kapoor A and Kang S B 2014 International Journal of Computer Vision 108 148-
164. [8] Nilsson M, Sallberg B and Claesson I 2013 IEEE Transactions on Image Processing 22
644-656. [9] Larin K V, Ghosn M G and Bashkatov A N 2012 IEEE Journal of Selected Topics
in Quantum Electronics 18 1244-1259. [10] Gottschlich C 2012 IEEE Transactions on Image
Processing A Publication of the IEEE Signal Processing Society 21 2220