Image Segmentation Based On Histogram Analysis and Soft Thresholding

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

International Journal of Computer Applications (0975 – 8887)

Volume 78 – No.5, September 2013

Image Segmentation based on Histogram Analysis


and Soft Thresholding

T. V. Sai Krishna A. Yesu Babu


Associate Professor, CSE Principal & Professor
QIS College of Engg& Tech Sir CRR College of Engg
Ongole, AP Eluru, AP

ABSTRACT 2. Data clustering based segmentation: These algorithms


Most researched area in the field of object oriented image employ that the homogeneous regions are connective in
processing procedure is efficient and effective image nature. The characteristic of data clustering is based on
segmentation. Segmentation is a process of partitioning a fact that each pixel of a cluster does not certainly
digital image into multiple regions (sets of pixels), according connective in its neighborhood.
to some homogeneity criterion. In this paper, we introduce a 3. Edge-based segmentation: These algorithms utilize the
spatial domain segmentation framework based on the concept of edge detection or similar frameworks as the
histogram analysis and soft threshold. The histogram analysis markers for segmentation. Some of the commonly used
uses discontinuity and similarity properties of image statistics edge detection methods are gradient operators and
in tandem with distribution of pixels to define the binary label Hilbert transforms.
for a homogenous region. The soft threshold used for 4. Hybrid based segmentation: These algorithms are
classification is determined based on the localized statistics of proposed based on using two or all three of above
the image in consideration for merging of the regions. mechanisms in a specific order based on the application
Simulation results and analysis would verify that the proposed requirement. Most of researchers are focusing or order
algorithm shows good performance in image segmentation and extent to which a mechanism needs to incorporated
without choosing the region of interest. so that it would time efficient and application effective.
It is a well known fact that the segmentation of nontrivial
General Terms images is one of the most difficult tasks in image processing.
Pattern Recognition, Image Segmentation, Medial Image The success or failure of computerized analysis procedures
Analysis, Security. depends on the accuracy of Segmentation process in
consideration [3]. For this reason, considerable care and time
Keywords is being spent to improve the probability and effectiveness of
Image segmentation, object recognition, object extraction, soft rugged segmentation algorithms. In this paper, we introduce a
threshold, medical image analysis time domain segmentation framework based on histogram
1. INTRODUCTION analysis and soft threshold. The proposed system used the two
basic properties of the image pixels i.e. discontinuity and
Automated image processing is a useful tool for quickly
similarity in tandem to define the segmentation process within
evaluating a great deal of data, but machines are not yet as
a localized region of digital media. In brief, the proposed
competent as people. Machine image processing has many
approach partitions the image based on abrupt changes in
military and civilian applications including target
intensity (i.e. background to foreground) based on the
identification from satellite imagery, terminal guidance of
histogram analysis. This process is combined with merging of
smart bombs, user authentication for security systems, tumor
similar regions based on a set of predefined criteria or soft
identification from CAT scans, and blood cell counts from
thresholding.
stained microscope slides. Unfortunately, machines do not
process images as accurately as humans [1]. Hence forth, the The following paper has been organized as follows. In this
need for an image processing algorithm that could classify or correspondence, Section 2 describes about various existing
cluster an image into several parts (regions) according to the segmentation techniques and the basic architecture of the
feature of image. threshold based segmentation. Section 3 presents the new
framework for classifying each image pixels into uniformity
Segmentation is the process of partitioning an image into non-
or non- uniformity pixels based on localized image statistics.
intersecting regions such that each region is homogeneous and
The proposed system and its algorithm are explained in
the union of no two adjacent regions is homogeneous. Several
section 4 with detail illustrations. Section 5 deals with the
segmentation algorithms are been proposed for various
experiments results and the analysis of the proposed
applications. We can classify the existing segmentation
segmentation algorithm. Section 6 concludes the paper.
algorithms into four classes based on the image features
employed by the algorithm they are as follows [2]: 2. BACKGROUND
1. Region-based segmentation: These algorithms expand In this section, we provide a brief background of various
each region pixel by pixel within in the 8-neighborhood existing segmentation techniques. The seeded region growing
based on quantized value. So that each region thus (SRG) algorithm is one of the simplest region-based
obtained have homogeneous pixels of similar values with segmentation methods. It performs a segmentation of an
reference to the quantized value. image with examine the neighboring pixels of a set of points,
known as seed points, and determine whether the pixels could

1
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.5, September 2013

be classified to the cluster of seed point or not [4]. distance regularization obtained by a potential function, which
Unfortunately, this method is a time consuming and initial is able to maintain a desired shape of the level set function,
seed point needs to be specified. particularly a signed distance profile near the zero level set.
The distance regularization effect eliminates the need for re-
Unlike most of supervised and region growing algorithms, initialization and thereby avoids its induced numerical errors.
fast scanning algorithm do not need seed point. In brief, the Further, this framework simpler and more efficient finite
concept of fast scanning algorithm [5] is to scan from the difference scheme can be used to implement the DRLSE
upper-left corner to lower-right corner of the whole image and formulation.
determine if we can merge the pixel into an existed clustering.
The merged criterion is based on our assigned threshold. If the Thus to address the limitation of the commonly used existing
difference between the pixel value and the average pixel value segmentation algorithms, we design an effective spatial
of the adjacent cluster is smaller than the threshold, then this domain segmentation framework based on the histogram
pixel can be merged into the cluster. analysis and soft threshold. The proposed system used the two
basic inherent image properties in tandem to define the
Lei Li et.al [6] proposed an improved method for color segmentation process. These classify the image pixels into
segmentation which uses the FSVM (fuzzy support vector discontinuity or similarity localized region of digital media
machines) algorithm in the HSI (hue-saturation-intensity) based on the histogram analysis. Then the small image regions
color space. Their system offers better effect and lower are combined based on homogenous of the image pixel
computational complexity on color image segmentation than distribution using soft thresholding.
most of existing methods. It was noticed that HSI color
system has a good capability of representing the colors of 3. REGION CLASSIFICATION
human perception. Unfortunately, the conversions of color In this section, we illustrate basic statistics utilized in design
space causes loss of valuable and time consuming process on of the proposed segmentation algorithm with respect to each
the whole. Wen bing Tao et.al [7] introduced a novel inherent image feature used. The goal of segmentation with
approach that provides effective and robust segmentation of reference to the authors is typically to locate certain objects of
color images. By incorporating the advantages of the mean interest which may be depicted in the image using a non
shift (MS) segmentation and the normalized cut (Ncut) manual process. Henceforth, segmentation could be viewed as
partitioning methods. In addition, they illustrate that the low a computer vision problem.
computational complexity makes their method feasible for It is statistical fact that the success of an image processing
real-time image segmentation processing. It also preprocesses algorithm increases with the prior knowledge about the image
an image by using the MS algorithm to form segmented in consideration.
regions that preserve the desirable discontinuity 3.1 Histogram Analysis
characteristics of the image. Further, this proposed method
A histogram of the image shows the relative frequency of
allows a low-dimensional image clustering with significant
occurrence for each pixel value in a given digital image (of
reduction of the complexity compared to conventional graph
range {0 – 255}). The histogram offers a detail and
partitioning methods that are directly applied to the image
convenient summary of the intensities in an image, but is
pixels. In addition, the image clustering using the segmented
unable to convey any information regarding spatial
regions reduces the sensitivity to noise and results in
relationships between pixels [1].
enhanced image segmentation performance.
A common histogram technique for determining a coarse
Cheng-Wan An et.al [8] proposed an adaptive segmentation
segmentation is scale-space filtering method. Since, instead
approach for color image in RGB space based on Rival
fixed initial seed value a better choice would be a histogram
Penalized Competitive Learning (RPCL). Initially, histograms
derived threshold seed values. Further, this method includes
of Red, Green, and Blue component colors are segmented by
some knowledge of the distribution of the image, and will
adaptive threshold segmentation algorithm for gray image.
result in less misclassification [11].A binary image matrix
Then some possible colors of original image are specified
map is created based on the histogram zero-crossings of all
through combining those components' segmented areas and
the scales that is considered image fingerprint. In addition, by
false colors not appearing in image are removed. Finally those
examining this fingerprint the colors present in the image can
possible colors are converged to the main actual colors of
be determined. The maximum value and minimum value of
original image by RPCL. Then original image is segmented
the histogram is found by taking the second derivative and
by those learned centers without specifying the number of
looking for the zero-crossings.
initial classes in advance. Ming-Xin Zhang et.al [9] proposed
conventional image segmentation based on rough-set theory.
The new distance matrix is defined by using the vector angle
and Euclidean distance. And then according to this new
distance matrix, the space binary matrixes of each color
component are calculated. Further, the color image
segmentation is implemented by selection of threshold values
and region merging through introducing a histogram based on
roughness. This proposed approach yields better segmentation
which is more intuitive to human vision compare with the
existing conventional image segmentation.
Chunming Li et.al [10] introduced a new variation level set a) b)
formulation in which the regularity of the level set function is
intrinsically maintained during the level set evolution. Level Fig 1: a) Original Lena image b) Histogram of the Lena
set is derived as the gradient flow that minimizes energy image with 1st and 2nd peak points marked along with zero
functional with a distance regularization term and an external cross-over region
energy that drives the motion at desired locations. The

2
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.5, September 2013

In this framework, first the original image is projected via the 3.3 Thresholding
most prominent peak of the histogram. The portion of the Thresholding is one of the oldest, simplest and most popular
color space is projected to determine the complete color techniques used in the image processing. Most of the
volume of that cluster. We repeat this procedure with the commonly used thresholding techniques literature is
remaining data, thus obtaining the complete color space labels concerned with classifying pixels into object or background
within the homogenous area. A detail perspective regarding classes could for instance appear from noise. The simplest
peak points and the zero cross-over regions of the histogram way of choosing the threshold value would be a fixed value,
of a digital image of ‘Lena’ are explained using the figure 1 based on predefined constraints.
3.2 Statistical Inference It is well known facts that threshold techniques make
In this framework, we incorporate few basic statistical decisions based on local pixel information and are effective
measures to compare the homogeneity of the selected regions when the intensity levels of the pixels fall squarely outside the
in consideration. In this section, we introduce some of the range of levels in consideration. Since the pixel information
common used statistical defined values that could be used in fall on non-squarely, even with adaptive threshold, it is still
comparison of the image regions. difficult to segment some regions with similar properties [12].
3.2.1 Image Mean We introduce the threshold minimizer for merging of two
The image mean can be defined as the average pixel value of homogenous regions under certain constraints that are defined
an image in consideration. In terms of grey scale image, the dynamically based on the size and statistics of the region in
image mean is equal to the average brightness or intensity of a consideration. We propose that if the absolute difference
digital image. Mathematically, image mean ‘α’ can be between the average intensities of two neighboring regions
presented as follows (within size constraints range) is smaller than the contrast
threshold Tc, then the two regions are merged.

3.4 Region Grouping


Where, ‘α’ is the image mean and ‘im’ is the digital image in The success of the segmentation approach is directly related
consideration of size ‘m*n’. Further, this statistical measure region classification or grouping of image pixels and features.
defines where two regions within certain constraints could be There are several approaches established for feature
merged or not. calculation that can be classified according to the way the
image pixels are grouped for feature calculation. Smeulders et
3.2.2 Image Variance al. [13] differentiate four types of grouping:
The image variance can be defined as the spread of the pixel 1. Strong segmentation denotes the segmentation of an
value of an image in consideration. In terms of grey scale image according to real world objects.
image, the image mean is equal to the average brightness or 2. Weak segmentation is the term used for data-driven
intensity of a digital image. Mathematically, image mean ‘α’ grouping of an image into homogeneous regions.
can be presented as follows 3. Sign spotting reveals whether objects of (almost)
fixed shape and a known semantic interpretation are
present in an image and where they are located.
4. Partitioning divides images into geometrical areas,
Where, ‘β’ is the image variance, ‘α’ is the image mean and regardless of the image data may have to improvise.
‘im’ is the digital image in consideration of size ‘m*n’. Saurabh Agrawal et al. [14] proposed a novel classification
Further, this statistical measure defines where a region is based on localized statistics for analyzing corrupted pixels to
homogenous within certain constraints or contains image non-corrupted pixels within an image. They have designed
pixels over a broader range. variation measure that is based on the localized statistical
calculations that are dependent on median based statistics.
1. Low variation pixels indicates the pixels are within
a homogeneous area
2. Medium variation pixels indicates the pixels are
close to the edge area in a given digital image
3. High variation pixels indicates the pixels are within
the edge area
We focus on classifying image pixels into discontinuity and
similarity regions based on localized image statistics.
3.5 Outliners
The outliners are predefined criteria that are employed for
selection of the threshold values. In addition, we have also
defined the outliners for merging of the homogeneous areas
and also size of the regions is also considered.
Fig 2: Shows the Homogenous area (image variance =
23.57) and Non-homogeneous area (image variance = 4. PROPOSED ALGORITHM
345.18) within the Lena image In this section, we introduce a novel segmentation algorithm
Standard deviation of the image/region is defined as the based on histogram analysis and soft thresholding concepts
square root of the image/region variance. Mathematically, the discussed in the earlier sections. The general structure of the
standard deviation can be expressed as segmentation process is presented in the Figure 3. The basic
components of the proposed segmentation framework are
presented as follows

3
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.5, September 2013

Inputs: - Input Image. The cover image may be of any image similar homogeneity value. Henceforth, we have soft
format using the 8-bit, power of two’s representation. The thresholding process that would merge the regions of similar
proposed algorithm may also be applied on 24-bit, each color homogeneity and size of the region is also incorporated as the
layer images treated as an individual 8-bit image. thresholding parameter.
Histogram Analysis. The histogram analysis of an image is Soft Threshold based System. Soft threshold based technique
considered as a probability distribution over the pixels values. is one of the commonly used image processing operation for
Further, it provides a means to determine the information digital filtering. The proposed system uses the soft
content of the image but it would not take spatial factors into thresholding to evaluate each binary label with reference to
consideration. A localized frame work should therefore be the input image and calculate the combined homogeneity of
able to determine automatically the skewness introduced by the region.
non-uniformity (heterogeneous edge and texture) regions
varying above the uniformity (homogeneous) regions. Further, It is noted that if the combine homogeneity of the two
the thresholds should be chosen based on the distance regions reduce the average image statistics of the combined
between the valleys to peaks of the histogram. region with respect to each region individually then the
regions are recommend for merging. If the merging is not
Binary Label Matrix. The binary label matrix is the key recommended as the region is small compared to predefined
feature of the proposed segmentation process as the efficiency criteria then also in certain conditions they are merged based
of the segmentation process depends on the how wide the on the neighborhood.
binary label matrix id defined. The aim is to retain as much
information as possible in the binarized image by choosing a Outputs: - Segmented Image.
split in which each of the two distributions is as uniform as The Segmentation process is a straightforward process where
possible. This method has the advantage of not having to all necessary parameters are dictated based on the histogram
estimate any parameters, but does not help us decide on the analysis or soft thresholding. Input image is segmented into
Multimodality of the histogram. various uniform and non-uniform regions without any loss or
Binary label matrix is defined where each label (1, 2... m) integrity with reference to the input with highest efficiency
are estimated based on the homogeneity of the region. There and low time complexity.
are various overlapping regions and distinct labels with

Fig 3: Block diagram of the proposed segmentation algorithm

5. COMPUER SIMULATION Figure 4 shows the segmentation results of a synthetic


Computer simulations were simulated using MATLAB airplane image with objects having weak edges. Figure 4(a)
software package. Analysis was done using 100 color images shows the input image to our model. The figure 4 (b) shows
of varying sizes, texture and contour. These images were the segmentation result that is obtained by our model.
taken using 2 digital cameras Nikon D100 and Canon EOS
Digital Rebel and modified in Photoshop to attain a smooth
histogram. In addition, for testing the effectiveness and
efficiency of the proposed system varying images with
different image features are employed.

4
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.5, September 2013

a) b)
Fig 4: Experiment for a synthetic airplane image (a) Input
Image. (b) Objects detected based on proposed
c)
segmentation algorithm
Fig 6: Experiment for a flower image a) Input Image. b)
Objects detected based on proposed segmentation
algorithm c) Object detection using SPF function (closed
contour) [15]
Figure 6 shows the segmentation results of a flower image
with objects having heterogeneous and texture edge regions.
Figure 6 a) shows the input image to our model. The figure 6
b) shows the segmentation results that is obtained by the
proposed model. In addition, figure 6 c) introduces the
segmented object based on SPF method [15]. It could be
viewed that the proposed segmentation is effective in
recognizing the objects in comparison with the existing
system.
a) b)
Fig 5: Experiment for a Coins image (a) Input Image. (b)
Objects detected based on proposed segmentation
algorithm
Figure 5 shows the segmentation results of a coins image with
objects having weak heterogeneous edge regions. Figure 5 a)
shows the input image to our model. The figure 5 b) shows
the segmentation results that is obtained by proposed model. It
could be viewed that the proposed segmentation is effective in
recognizing the objects in a weak heterogeneous edge regions.

5.1 Comparison Analysis


In comparison analysis, we compare the proposed a) b)
segmentation with existing SPF based supervised
segmentation algorithm proposed by savan oad et. al [15]. The
comparison results have proved that the proposed system
operates effectively in various kinds of image. Due to space
constraint we limit the comparison to three images of varying
uniformity and non-uniformity regions.

c)
Fig 7: Experiment for a galaxy image a) Input Image. b)
Objects detected based on proposed segmentation
algorithm c) Object detection using SPF function (closed
contour) [15]
Figure 7 shows the segmentation results of a galaxy image
with objects having heterogeneous and texture edge regions.
Figure 7 a) shows the input image to our model. The figure 7
b) shows the segmentation results that is obtained by the
proposed model. In addition, figure 7 c) introduces the
a) b) segmented object based on SPF method [15]. It could be
viewed that the proposed segmentation is effective in
recognizing the objects in comparison with the existing
system.

5
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.5, September 2013

Further, the proposed detected two separate constellations 7. REFERENCES


whereas existing method has detected them as single entity. [1] R. C. Gonzalez and R. E. Woods, Digital Image
The soft threshold mechanism employed in our system limited Processing, 3rd edition, Prentice Hall, New Jersey 2008.
the detection of each star or white dots as an entity.
[2] D. Comaniciu and P. Meer, “Mean shift: a robust
Figure 8 shows the segmentation results of a galaxy image approach toward feature space Analysis,” IEEE
with objects having heterogeneous and texture edge regions. Transactions on Pattern Analysis and Machine
Figure 8 a) shows the input image to our model. The figure 8 Intelligence, vol. 24, no. 5, pp. 603-619, May 2002
b) shows the segmentation results that is obtained by the
proposed model. In addition, figure 8 c) introduces the [3] N. R. Pal and S. K. Pal, "A review on image
segmented object based on SPF method [15]. It could be segmentation techniques," Pattern Recognition, vol. 26,
viewed that the proposed segmentation is effective in pp. 1277-1294, 1993.
recognizing the objects in comparison with the existing [4] R. Adams, and L. Bischof, “Seeded region growing,”
system. Further, the proposed detected similar to the existing IEEE Transactions on Pattern Analysis Machine
SPF based segmentation algorithm. Intelligence, vol. 16, no. 6, pp. 641-647, June, 1994.
[5] J. J. Ding, C. J. Kuo, and W. C. Hong, “An efficient
image segmentation technique by fast scanning and
adaptive merging,” CVGIP, Aug. 2009.
[6] Lei Li, Jin-Yan Li and Wen-Yan Ding, “A new method
for color image segmentation based on FSVM,” IEEE
proceedings of the Ninth International Conference on
Machine Learning and Cybernetics, Qingdao, pp. 664-
668, July 2010
[7] Wenbing Tao, Hai Jin, and Yimin Zhang, “Color image
segmentation based on mean shift and normalized cuts,”
IEEE Transactions on Systems, Man, and Cybernetics-
Part B: Cybernetics, Vol. 37, No. 5, Oct 2007
[8] Cheng-Wan An, Gui-Zhi Li, Guo-Sheng Yang, and Min
a) b)
Tan, “Color image adaptive segmentation based on rival
penalized competitive learning,” IEEE Proceedings of
the Third International Conference on Machine Learning
and Cybernetics, Shanghai, pp.2558-2662, Aug 2004
[9] Ming-Xin Zhang, Cai-Yun Zhao, Zhao-Wei Shang, Hua
Li and Jin-Long Zheng, “An algorithm based on rough-
set theory for color image segmentation,”IEEE
Proceedings of the International Conference on Wavelet
Analysis and Pattern Recognition, Qingdao, July 2010.
[10] Chunming Li, ChenyangXu, ChangfengGui and Martin
D. Fox, “Distance regularized level set evolution and its
application to image segmentation,”IEEE Transactions
c) on Image Processing, Vol. 19, No. 12, pp.3243-3253
Fig 8: Experiment for a Synthetic hand image a) Input
Image. b) Objects detected based on proposed [11] Carlotto, Mark J. “Histogram analysis using scale-space
segmentation algorithm c) Object detection using SPF approach,”IEEE Transactions on Pattern AnaP. 2007
function (closed contour) [15] Modeling and Simulation Design. AK Peters Ltd.

The simulation analysis show that the proposed algorithm is [12] XiaoJun Du, “Image segmentation and its applications
superior to the existing supervised segmentation algorithms based on Mumford-Shah model,” Ph.D Doctoral Thesis,
and in some cases on synthetic images it segments similar to Concordia University, Canada, April 2011
the existing algorithms. [13] A. W. W. Smeulders, M. Worring, S. Santini, A. Gupta,
and R. Jain, “Content based image retrieval in the end on
6. CONCLUSION the early years,” IEEE Transactions on Pattern Analysis
In this paper, we introduced a spatial domain segmentation
and Machine Intelligence 22(12), pp. 1349-1380, 2000
framework based on the histogram analysis and soft
thresholding process. The histogram analysis offered a better [14] A. Saurabh, Yadav J. S, and Ravindranath C. C, “A
means to classify the image into various binary labels based novel weighted median switching filter for denoising
on the image statistics of the region. The soft threshold used corrupted images” International Journal of Computer
for classification and merging of the regions based on the Applications, Vol. 64, No.21, pp:5-11, 2013.
localized statistics (i.e. uniformity and non-uniformity) of the
image in consideration. Simulation results and analysis proved [15] Savan Kumar Oad, Karuna Markam, and Aditya Kumar
that the proposed algorithm shows good performance in image Bhatt, “Active contours based object detection and
segmentation without choosing the region of interest. extraction using SPF parameter,” International Journal
of Computer Applications, Vol.64, No.8, pp.36-40, 2013

IJCATM : www.ijcaonline.org 6

You might also like