There are several types of thresholding method like
basic, two-band-tile, optimal and adaptive. In this project,
the basic thresholding is chosen to separate the object and
the background in the histogram by vertical line. The basic
thresholding is a good choice as mentioned in [11].
Threshold image g(x,y) can be defined as[10]:
For the equation above, the single threshold value (T) is
selected. Here the value of (T) is 0.9. Any values below or
equal to (T) will be classified as a black (0), and those
above (T) will be white (1). Fig. 4 illustrates the binary
image after converting from grey scale image using
threshold technique. The white color is the object detected
and the black color as a background.
Fig. 4. Binary image.
D. Image Enhancement
After converting images into binary, the image has to
remove the noise and trace the boundary of detected object.
This process is done in image enhancement module. Images,
taken by digital camera, will pick up the noise from variety
of sources. Thus, to remove the noise, a morphology
function is used. It removes the imperfection added during
segmentation. There are four basic morphological operation
namely dilation, erosion, opening and closing (binary
operation) [12]. Opening and closing are the basic
workhorses of morphological noise removal. Opening
removes small objects, and closing removes small holes.
The binary morphological operation is used in this project
because it is widely used in image processing operations
that process images based on shapes and as reported in[13],
it is also used in numerous applications like noise filtering,
boundary detection and region filling. Fig. 5 shows the
image after removing noise at the detected object (white
color).