You are on page 1of 8

Faculty of Science & Engineering

Department of Engineering & Technology

Image Enhancement

By

Atiphan Tosuksri
MSc Computer Network Technology
ID: 10981493
Faculty of Science & Engineering
Department of Engineering & Technology

Aim

The aim of the assignment is to understand the concept of the image enhancement
stage We need to know the technique to improve the image or better input for the image
processing technique as in the assignment. In the first part of the assignment is the
segmentation using thresholding technique.

Before we threshold the image, we need to prepare the better image for input such as
histogram equalization to stretch the intensity value of the image before converting to
binary image. In the second part of the assignment is about frequency domain. We need to
transform the spatial image to frequency image using Fourier transform of the image before
using the filter.

Digital Image Processing


Faculty of Science & Engineering
Department of Engineering & Technology

Part 1 - Segmentation image using thresholding


In the first part of this assignment, I implemented OTSU’S METHOD to covert from gray-
level image to binary image. The purpose of the image segmentation is to subdivide an
image into non-overlapping regions for analyzing the image (Rafael C, 2004, p.379). Global
thresholding is one of the image segmentation technique.

Program Flowchart

Figure 1.0, Global thresholding process

Digital Image Processing


Faculty of Science & Engineering
Department of Engineering & Technology

Figure 1.0, Describes the process of thresholding using Otsu’s method. First read the
image from the image file. If the image file does not the correct type of image file, return to
read the image again. Begin Otsu’s method by using “graythresh()” function to chooses the
threshold to minimize the intraclass variance of the black and white pixels (Matlab, online,
Accessed 7th November 2010). Finally, use im2bw() function to convert the image from gray-
level image to binary image.

Program interface

Figure 1.1 Program interface

Figure 1.1 shows the program interface that the program can read the given image files:
flower.pgm, swan.pgm, and tools.pgm and show the histogram of each image.

Figure 1.2 flower.pgm Figure 1.3 Histogram of the image

Figure 1.2 shows the original image file name “flower.pgm” which is gray scale high
contrast image. To see the histogram of the image as in figure 1.3 using “imhist(image)”
function.

Digital Image Processing


Faculty of Science & Engineering
Department of Engineering & Technology

Figure 1.3 shows the histogram of the image which its intensity value between
[0 255]. In the figure states that the image is high contrast image because the intensity
values are widely spread.

Figure 1.4 Binary image Figure 1.5 Histogram of binary image

Figure 1.6 Intensity value

Figure 1.4 shows the binary image converted from original image in separate
foreground and background with intensity range *0 1+ by using “graythresh()” function to
automatically choose the intensity value which is estimate 0.56 as in figure 1.6.

Figure 1.7 swan.pgm Figure 1.8 Histogram of the image

Figure 1.7 shows the original image file name “swan.pgm” which is gray scale low
contrast image. In this case, I used the histogram equalization “histeq()” to improve the
average intensity and contrast of the image (Rafael C, 2004, p.82). Figure 1.8 shows the
histogram of the original image intensity value between *0 255+ by using “imhist()” function.

Digital Image Processing


Faculty of Science & Engineering
Department of Engineering & Technology

Figure 1.9 swan.pgm Figure 2.0 Histogram of binary image

Figure 2.1 Intensity Value

Figure 1.9 shows the binary image with intensity value estimate of 0.49 as in figure 2.1.

Figure 2.2 tools.pgm Figure 2.3 Histogram of the image

Figure 2.4 Binary Image Figure 2.5 Histogram of binary image

Digital Image Processing


Faculty of Science & Engineering
Department of Engineering & Technology

Figure 2.6 Intensity value

Figure 2.2 – 2.5 shows the process of converting the image from gray scale image to
binary image. This image (tools.pgm) is high contrast image which is compatible with the
global thresholding using Otsu’s method. The thresholding instruction is described in the
same as above. I noticed that the figure 2.3 shows the histogram of the original image with
the intensity of the image is in the middle between 0 to 255. In this case, the color of the
image is quite gray image and has obvious high contrast.

Digital Image Processing


Faculty of Science & Engineering
Department of Engineering & Technology

References

RAFAEL, C., et al., 2004, Digital Image Processing Using Matlab. Pearson Prentice-Hall

Publishers.

MATLAB [online] http://www.mathworks.com/help/toolbox/images/ [Accessed 7 November

2010]

Help [program] Matlab program version 2010

Digital Image Processing

You might also like