AN EXTENSIVE SURVEY OF IMAGE
SEGMENTATION TECHNIQUES
Sarvesh Karandikar1,Aditi Singh2,
D. Malathi3,J.D. Dorathi Jayaseeli4
1
B.Tech Student, Department of Computer Science and Engineering, SRM University
2
B.TechStudent, Department of Computer Science and Engineering, SRM University
3
Professor, Department of Computer Science and Engineering, SRM University
4
AssistantProfessor, Department of Computer Science and Engineering, SRM University
ABSTRACT
The paper describes in detail the techniques used for edge detection in images as well as evolutionary
algorithms which can be applied for Multi-level thresholding. In the first section it describes the core idea of
edge detection followed by the first derivative operators being used currently for edge detection like:
Roberts,Sobel,Prewitt,Robinson and Kirsch. The next section continues with explanation regarding the second
derivative operators like: Laplacian, of Gaussian, Difference of Gaussians and Marr-Hildreth Algorithm.
Further,it is followed by techniques used to detect edges using region based method known as Multi-Level
Thresholding which is being applied using either the Otsu or the Kapur method. Evolutionary Algorithms
namely Particle Swarm optimisation, Firefly Optimisation Algorithm and Elephant Herding Algorithm are
explained in context with Kapur's method for Multi-Level Thresholding. Finally, experimental results regarding
one common image and application of the first and second derivative edge detection techniques is observed in
relation with calculation of Mean Square Error (MSE), Root Mean Square Error (RMSE) and Peak Signal to
Noise Ratio (PSNR) of the original image to the detected image.
Keywords:Edge Detection, First Derivative, Kapur, Multi-level Thresholding, Second derivative
I. INTRODUCTION
Image segmentation is a process which partitions input image into set of multiple segments such as a set of
pixels so that the resulting image is easier to analyze [1]. It is usually used to locate boundaries, edges or regions
having same characteristics. It is a process by which pixels having same properties such as texture, color, and
intensity belong to one region. Different regions have different characteristics. Image segmentation algorithms
can be categorized into two different approaches: discontinuity and similarity. Discontinuity based approach
partition’s the image based on abrupt changes in intensity. This method includes point, line or Edge detection.
Similarity based approach partition’s an image based on regions that are similar according to some predefined
criteria. This approach includes Thresholding, Regiongrowing, Region splitting and merging. In our paper we
have studied in depth about edge detection methods, and different operators used in it and optimization
techniques to find optimal solutions for Multi-Level Thresholding problem.
643 | P a g e
II. EDGE DETECTION
Edge detection aims at identifying points of discontinuities in digital images or points where intensity changes
abruptly. The points at which the brightness changes sharply are organized into a set of curved line segment
termed edges. Edge is defined as a boundary between two homogeneous regions with distinct grey level
properties. This process detects the outline of an object and boundaries between objects [2]. We are keen to
detect edges because most of the information pertaining to an image is enclosed within the edges. Edge
detection helps in simplifying the analysis of the given image and reduces amount of data to be processed. It
also helps in preserving useful information such as object boundaries of the image. So to process an image first
we detect images by using appropriate filters and then by enhancing those areas of images containing edges we
increase its sharpness and make it clearer. Edge detection technique has various applications such as biometrics,
face detection, satellite image segmentation etc. It is useful in research field because it helps in analyzing images
more efficiently [3]. Its techniques are classified into two types: first derivative technique and second derivative
technique.
III. FIRST DERIVATIVE OPERATORS
First order derivative operators work on detecting the start and the end of an edge based on varying intensities of
pixels present in the grayscale image. If there is drastic change in intensity between two pixels the operators
mark the given pixel as an edge. First derivative operators tend to produce thicker edges.They are based on the
value being obtained from the 2D gradient after application of the algorithm. The gradient is calculated at a
specific point x,y and is generally obtained with a vector associated at the particular point.The most commonly
used discontinuity based edge detection techniques are reviewed in this section. Those techniques are Roberts
edge detection, Sobel Edge Detection, Prewitt edge detection, Kirsch edge detection, Robinson edge
detection.[4]
A. Roberts Edge Detection
Roberts edge detection method performs the operation of calculation of gradient on the image in the X and the Y
direction of the image associated. In this method the regions with high frequency are the ones which generally
constitute that of an edge in the image. The input as well as the output is a grayscale image which is pretty
common. In the output image the pixel values generally constitute the gradient value at that given point. [4]
X gradient
Y gradient
B. Prewitt Edge Detection
This is a mask which is used to detect horizontal as well as vertical type of edges. In this mask operator being
used we have two masks available at our disposal. One is the mask which is used for horizontal direction
oriented edges and the other is for the vertically embedded edges in the image.[4]
X gradient
644 | P a g e
Y gradient
C. Sobel Edge Detection
This operator is almost same as the prewitt operator in many characteristics as it is also classified as the
derivative mask. It also is used for Vertical and Horizontal edge detection but is different than prewitt operator
in the sense that it does not have any fixed coefficients of the mask. The mask can be changed according to our
needs and greater negative values being imparted into the mask will lead to better enhancement of the edge as
compared to the prewitt operator image.[5]
X gradient
Y gradient
D.Robinson Edge Detection
This operator is a collection of masks by rotating a given mask in 8 different directions of the compass namely
East West North South North-East North-West South-East And South-West keeping the column /row vector of
the mask zero. This implies that the edge being detected is emphasized when the detection process gets over
with. As presented in the above two operators the edge detection of Robinson Compass would help carry out
edge detection task pertaining to direction of edges more efficiently.
North
North west
West
South west
South
644 | P a g e
South east
East
North east
E.Kirsch Edge Detection
This operator again resembles to the same characteristics as the Robinson compass mask operator but the only
overall difference is the value of the coefficients present in the mask are not constant and can be changed
according to our need. This freedom of applying masks of our own values of weights lets us determine the edge
more efficiently and predominantly than Robinson operator. [6]
North
North west
West
South west
South
South east
East
North east
644 | P a g e
IV. SECOND DERIVATIVE OPERATORS
These operators work on the sole principle of zero crossing, where they detect edges based on the fact that at the
place in an image where the sign changes from negative to positive, the edge lies on the pixel containing the
value zero.
Figure1: Depicts the use of second derivative operators for edge detection
A. Laplacian Edge Detector
In this technique we use a predetermined mask as in the case of other presented first derivative operators. This
mask is convoluted over the complete image and the pixels containing the second derivative output as zero are
marked. This technique is extremely useful when the image being analysed is void of any noise as the Laplacian
edge detector is extremely sensitive to noise. [7][8]
B. Laplacian Of Gaussian Detector
As stated earlier the use of Laplacian operator is sensitive to images containing noise and to remove this
inadequacy we use the LoG (Laplacian of Gaussian) method. In this technique at first a smooth filter similar to
that of a Gaussian filter is applied so as to remove the effectively present noise in the image followed by
convolution from the Laplacian Operator. Another way to implement this function is to pre-calculate the kernel
by convoluting the Laplacian of Gaussian filters that need to applied on an image. [9]
C. Difference Of Gaussian Detector
This is a feature enhancement algorithm which removes the overall high frequency information from the image
and tries to detect the edges by conforming to an output which is resulted from the difference of two
images.These images are obtained by applying Gaussian filters of different intensities on them and then
subtracting the two images to obtain the image with relevant information. In this case the edges. This method
works similarly as that of band pass filter as the relevant information present between the frequencies associated
with two frequencies of the Gaussian filters applied is only available
644 | P a g e
D. Marr-Hildreth Algorithm
This algorithm works dependently on the working of LoG or DoG .In the LoG it operates by simply convolving
the image with the Laplacian of the Gaussian function and in the case of DoG it works by calculating and
finding out fast approximations presented by the output from the DoG. This algorithm has two major
drawbacks. First is its ability to detect and present False edges ; false edges are areas in an image containing no
distinct edges but still being qualified as edges by the algorithm. Second is the localization error which is
extremely high in case of curved edges [11]
V. MULTI-LEVEL THRESHOLDING AND OPTIMIZATION TECHNIQUES
Multi-Level Thresholding can be defined as separating the grey scale image into different thresholds depending
on the characteristics of the image. The determination of the threshold vector is performed by applying
optimization algorithms to derive the optimal solution. The main objective of the optimization algorithms is to
improve the performance of the function used to find the threshold. We choose multi-level thresholding
technique for image segmentation as it works best with complex images which contains various aspects to be
analyzed where bi-level thresholding fails to work efficiently. There are many multi-level thresholding
techniques available for image segmentation but we are going to focus on the entropy criterion method because
it can be optimized using various optimization techniques efficiently. (Kapur Method) [10]
Kapur Method for Multilevel Thresholding:
This method was initially developed by Kapur; a method useful for bi-level thresholding which was described as
follows:
We take the image to contain a maximum of L grayscale values or grey levels where f(m,n) represents the grey
level of the image at the position (m,n) in a MxN image. The value of f(m,n) is always present between the
range [0,L-1].
Now, let hirepresent the sum of all pixels containing grey scale values corresponding to i. We can determine the
joint Probability mass function as follows:
pi=hi/N
(1)
then our main objective will be to maximise the fitness function given by
F(t)= H0 + H1 where H0 and H1 are given by:
(2)
(3)
(4)
(5)
645 | P a g e
This method for bi-level can be more generalised to contain N level of threshold as follows:
(6)
F([t1,t2,....,tm])= H0+H1+H2+.......+Hm;
whereHm is given by : (where m extends from 0 to m)
(7)
(8)
Next we apply optimization algorithms onto the Multi-level Thresholding Kapur algorithm to find and optimize
the Threshold Vector. The algorithms being discussed here are: Particle Swarm Optimization algorithm, FireFly based Optimization Algorithm, Elephant Herding Algorithm
A. Particle Swarm Optimization
The particle swarm optimization algorithm is derived from the observation of social behavior of the bird flock.
It was developed by Kennedy and Eberhart in 1995. In PSO the potential solutions which in our case would be
the values of the Threshold vector move around the problem space in search of a solution.[10]
Each particle in the problem space moves around to find optimum solution based on 3 essential features:
1) Based on its own experience.
2) Based on experience of nearby particles
3) Global best position acquired by particles in swarm.
The main function carried out by the optimisation algorithm is to carry out the computation of the velocity of the
particle and the next position of the particle in the problem space. Let i denote a particular particle present in the
swarm, then:
(9)
(10)
whereXit+1
denotes the next postition depending on current position
Vit+1denotes
1)
Xit
and
Vit+1
new velocity depending upon three factors:
w*Vit
where W is the weight factor
2) c1 * r1 *(pbi - xi) where c1 is self confidance factor , r1 is random variable of range [0,1] and pb i is the
personal best of i.
3) c2*r2*(gbi-xi) where c2 is the confidance vector of swarm , r2 is another random variable in range [0,1]
and gbi is the global best of the swarm.
Now the algorithm for optimum solution of Kapur Multi-level Thresholding based on PSO is as follows:
Step1: initialize randomly the max and min limits of threshold values and set the iteration of t to zero. t
represents the given threshold value.
646 | P a g e
Step2: Evaluate values of the particles using the fitness function for Kapur method and then compare the
personal best of each particle to its current fitness and set pb i to the better performance
Step3: Change the velocity vector for each according the PSO formula and move each particle to its new
position.
Step4: Go to Step2 and repeat until it gets an optimum solution. [10]
B.Firefly Optimisation Algorithm
In the paper [11] Firefly algorithm was developed by Xin-she Yang at Cambridge University in 2008. In this
algorithm we follow three basic rules: (1) All fireflies are unisex so they are attracted to each other regardless of
their sex; (2) attractiveness is directly proportional to brightness, thus if their exist two fireflies having different
brightness values the one with lower brightness will get attracted to the one with higher brightness; (3) If all the
fireflies have same brightness than the firefly will move randomly. Here we select a monotonically decreasing
function of the distance ri, j = d(xj, xi ) for the jth firefly,
Here we apply an exponential function as follows:
(11)
(12)
Where the B0 is the attractiveness at ri, j = 0 and gammais the light absorption coefficient at the source. The
movement of a firefly i attracted to another firefly j where j is more attractive is given by:
(13)
(14)
If there is no brighter firefly and all the fireflies have same level of brightness than the movement of any firefly
will be random and firefly xi, will move randomly according to the following equation:
(15)
(16)
whererand1=U(0,1) rand2 = U(0,1) are random numbers obtained from the uniform distribution; The brightness
of a firefly is determined by using MEFT (maximum entropy firefly thresholding) algorithm. Firefly algorithm
is used to optimise the fitness function of kapur.
C.Elephant Herding Algorithm
[12] Elephant herding optimization algorithm was proposed by Wang et. al. in 2016. This algorithm has
simplified elephant herding behavior into three simple rules: Elephant population is composed of clans where
each clan is headed by some matriarch or male member of the clan. There are some fixed numbers of elephants
in each generation who leave their family and live far away from their clan. Elephant population is divided into
k clans. Each clan is led y a matriarch ci. Each and every member i of can j move according to the leader
according to the equation:
647 | P a g e
(17)
wherexnew, ci, j represents new position of elephant j in clan i. Here old position is given by xci,jand the best
solution or the matriarch of the clan is given by xbest,ci. ci, α ∈[0, 1] is a scale factor which determines the
influence of the matriarch and r ∈[0, 1] is a random number which helps in improving diversity of the
population. Position of the matriarch also the best elephant in the clan is updated using the following function.
(18)
where
controls the influence of xcenter,iwhich is given as
(19)
Male elephants that separate from the group are used to show exploration. In each generation and in each clan
mci elephants with the worst fitness values are moved according to the following equation:
(20)
wherexminand xmax represent lower and upper bound of search space and rand is a random number generated
from uniform distribution.
VI. PERFORMANCE EVALUATION CRITERIA FOR IMAGES
The performance evaluation of edge detection algorithms is done here by detection of true edges, error ratio, and
noise level here, the paper compares first derivative operators, second derivative operators and other
evolutionary algorithms with mean square error, peak signal to noise ratio and root mean square error.
A. MEAN SQUARE ERROR
The MSE is the cumulative squared error between the compressed and the original image. It specifies the
average difference between the original image and the edge detected image [4]. The higher value of MSE means
greater difference between the detected image and the original image. Generally value of MSE is low when
performing image analysis but, when performing edge detection value of MSE should be high because it ensures
detection of weaker edges too.
(21)
where I(x,y) is the original image, I'(x,y) is the approximated version and M,N are the dimensions of the
images
B. PEAK SIGNAL TO NOISE RATIO
Peak signal to noise ratio often known as PSNR is used to measure the peak error. It calculates ratio between
maximum power of signal that is possible and power of the noise that corrupts the given image [4]. A higher
value of PSNR shows that the image formed is of higher quality. But, like edge detection in some cases PSNR
should be lesser to get appropriate results. It is calculated as:
PSNR = 10* log10 (R2 /MSE)
R is the maximum possible variation in the input image. R is 255 if it has a data type which is 8 bit
unsignedinteger.
648 | P a g e
VII. EXPERIMENTAL RESULTS
The experiment is done to compare first derivative operators and second derivative operators. The test is based
on performance of operators with respect to MSE,PSNR and RMSE. The picture taken for the experiment has
resolution of 512 x 512.
Table 1 shows grey scale images and their corresponding edge detected outputs. Table 2 shows MSE, RMSE
and PSNR values of different first derivative and second derivative operators and graph 1 ,graph 2 and graph 3
represents the MSE,RMSE and PSNR values in terms of bar graph respectively.
Figure2: Original Image
Figure3: Sobel detected image
649 | P a g e
Figure4: Roberts detected image
Figure 5 Robinson detected image
Figure 6: Prewitt detected image
650 | P a g e
Figure 7 Kirsch detected image
Figure 8: Laplacian deteced image
Figure 9: Laplacian of gaussian detected image
651 | P a g e
Figure 10: Difference of Gaussian detected image
MSE
RMSE
PSNR
Sobel
1.77E+04
132.9322
5.6582
Prewitt
1.77e+04
132.9325
5.6582
Roberts
1.77e+04
132.9328
5.6582
Robinson
1.96e+04
139.9409
5.2119
Kirsch
1.98e+04
140.575
5.1726
Laplacian
1.87e+04
136.7023
5.4153
LoG
1.77e+04
132.9328
5.6711
DoG
1.76e+04
132.7351
5.6582
Table1: Represents the MSE,RMSE and PSNR values for first and second derivative operators
Grap
LoG
plotte
Kirsch
s
6
5.5
5
4.5
Rober…
value
145
140
135
130
125
Sobel
1.60E+04
LoG
MSE
Kirsch
1.80E+04
Roberts
h1:
Sobel
2.00E+04
d
corresponding to the method
Graph2:RMSE values plotted corresponding to the method
Graph3: PSNR values plotted corresponding to the method.
652 | P a g e
VIII. CONCLUSION
Various edge detectors have been studied and compared on the basis of various factors such as RMSE, PSNR,
and MSE. The main aim of this paper is to present most efficient image segmentation algorithm which can
detect edges with minimum errors and which can handle several noises more effectively. On the basis of MSE
Kirsch Compass edge detection is efficient because higher value of MSE ensures detection of weaker edges.
According to PSNR Kirsch is effective because lower value of PSNR provides appropriate results. In
conclusion, the ideal image segmentation method is the one which can detect edges without eliminating
important details. Various factors are involved for selection of a particular algorithm for an input image and
based on such factors only one can decide the suitable algorithm to be used.
REFERENCES
[1].
Y.Ramadevi, T.Sridevi, B.Poornima, B.Kalyani "Segmentation and Object Recognition Using Edge
Detection Techniques" in International Journal of Computer Science & Information Technology
(IJCSIT), Vol 2, No 6, December 2010
[2].
Tzu-Heng Henry Lee"Edge Detection Analysis" in Graduate Institute of Communication Engineering,
National Taiwan University, Taipei, Taiwan, ROC
[3].
Mr. Salem Saleh Al-amri1, Dr. N.V. Kalyankar2 and Dr.Khamitkar S.D" Image Segmentation by using
edge detection" in (IJCSE) International Journal on Computer Science and Engineering, Vol. 02, No. 03,
2010
[4].
Simranjit Singh Rakesh Singh "Comparison of Various Edge detection techniques" in 2nd International
Conference on Computing for Sustainable Global Development (INDIACom) 2015
[5].
Guowei Yang, FengchangXu "Research and analysis of Image edge detection algorithm based on the
MATLAB” inSciVerseScienceDirectProcedia Engineering 15 (2011) 1313-1318.
[6].
Sivakamasundari. J, Kavitha. G, Natarajan. V and Ramakrishnan "Proposal of a Content Based Retinal
Image Retrieval System Using Kirsch Template Based Edge Detection" in 3rd International Conference
On Informatics, Electronics & Vision 2014
[7].
S.A. Coleman, B.W. Scotney, M.G. Herron "An Empirical Performance Evaluation Technique for
Discrete Second Derivative Edge Detectors" in Proceedings of the 12th International Conference on
Image Analysis and Processing (ICIAP’03)
[8].
Cheng Xiansheng "An Edge Detection new algorithm based on Laplacian Operator" in IEEE library 2011
[9].
AshishAnand, Dr.Sanjaya Shankar Tripathy, Dr. R. Sukesh Kumar "An Improved Edge Detection Using
Morphological Laplacian of Gaussian Operator" in 2nd International Conference on Signal Processing
and Integrated Networks (SPIN) 2015
[10]. Molka DHIEB, Mondher FRIKHA "A Multilevel Thresholding Algorithm for Image Segmentation
Based on Particle Swarm Optimization" in IEEE library 2016
653 | P a g e
[11]. AkashSharma,SmritiSehgal "Image Segmentation Using Firefly Algorithm" in International Conference
on Information Technology (InCITe) - The Next Generation IT Summit 2016.
[12]. Eva Tuba , AdisAlihodzic and Milan Tuba "Multi-Level Thresholding using Elephant Herding
Optimisation Algorithm" in 2017 14th International Conference on Engineering of Modern Electric
Systems (EMES)
654 | P a g e