You are on page 1of 5

International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169

Volume: 5 Issue: 5 726 730


_______________________________________________________________________________________________
A Novel Method on Video Segmentation based Object Detection using
Background Subtraction Technique

M.Mary Shanthi Rani P.Chitra G.Shanthi


Dept. of Computer Science and Dept. of Computer Science and Dept. of Computer Science and
Applications Applications Applications
The Gandhigram Rural Institute The Gandhigram Rural Institute The Gandhigram Rural Institute
Deemed University, Gandhigram Deemed University, Gandhigram Deemed University, Gandhigram
Dindigul, Tamil Nadu, India Dindigul, Tamil Nadu, India Dindigul, Tamil Nadu, India
drmaryshanthi@gmail.com bchitra.tr @gmail.com Shanthishalu15@gmail.c

AbstractVideo segmentation is a process of dividing a movie into meaningful segments. It helps in the process of the detection
of moving objects within a scene which play a vital role in many application such as Surveillance, Safety, Traffic monitoring and
Object detection, etc., Especially, Background subtraction methods are widely used for moving object detection in videos. In this
paper, a new method has been proposed for object detection using background subtraction and thresholding based segmentation
algorithms.Experimental results proved that the proposed method achieved high accuracy rate than other existing techniques.

Keywords-Background Subtraction, Threshold based segmentation, Object detection, Video segmentation.


__________________________________________________*****_________________________________________________

I. INTRODUCTION A. Related Work


Object detection and segmentation of moving objects in This section presents an overview of existing background
video streams is an essential process for information extraction. subtraction techniques and also analysis the different
Surveillance system uses video cameras to monitor the approaches that provide relevant work for the sudden
activities of targets (human, vehicle, etc.) in a scene [1]. In illumination changes in background subtraction algorithms.
order to obtain an automatic motion segmentation algorithm Qiong Wuet al. (2008)described about a design which can
that can work with real images there are several issues that automatically digitize synchronized video sequences without
need to be solved, particularly important are: noise, missing the need for further temporal or geometric processing.There
data and lack of a priori knowledge. One of the main problems
are, however, two shortcomings with our hardware design.
is the presence of noise. For some applications, the noise level
First, our hardware can automatically recognize the
can become critical. There are three conventional approaches to
moving object detection: background subtraction, temporal foreground object only if it is within the effective distance of
differencing and optical flow [2]. the IR source, and this distance acts like a plane dividing
Background subtraction is one of the most popular methods foreground and background. Therefore, the user may need to
for novelty detection in video streams. Background Subtraction move the IR source around and find the best position by
generates a foreground mask for every frame. This step is observing whether the IR image yields a good foreground
simply performed by subtracting the background image from MASK. Second, if an object appears closer than the
the current frame. When the background view excluding the foreground it will also be captured [8].
foreground objects is available, it becomes obvious that the S. Maludrottu et al. (2009) proposed a corner-based
foreground objects can be obtained by comparing the background segmentation for real-time applications. The
background image with the current video frame [3]-[4]. algorithm successfully classifies corners extracted from a
Moreover, a background image can be elegantly used to video sequence as pertaining to background or foreground
determine the foreground objects by comparing the input frame after a joint application of Fuzzy ARTMAP neural networks
with the background image and marking the differences as and spatial clustering. The performances have been evaluated
foreground objects. This technique is commonly known as using different corner extraction algorithms and clustering
background subtraction or change detection [5]. techniques [9].
In segmentation process each image/frame is splitted into a Deepak Kumar Rout et.al. (2013) proposedthe inter-plane
set of non-overlapping uniform connected regions such that correlation between three consecutive R, G and B planes by
any two adjacent ones are not similar. It is a difficult task due using a correlation function. The correlation matrix obtained is
to the complexity and diversity of images and moving objects. then used to construct a segmented image which gives a rough
Influencing factors range from illuminating, contrast and estimate of the object. The segmentation of the correlation
frames. Most of these segmentation algorithms are based on plane is done by a threshold. This threshold selection is made
similarity, difference and particularly, can be divided into adaptive to the video sequence considered. This segmented
different categories: threshold, template matching, region plane along with the moving edge image is then taken into
growing, edge detection and clustering [6].

726
IJRITCC | May 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 5 726 730
_______________________________________________________________________________________________
consideration to improvise the correct classification of the from its intensity information, and has a good capability of
moving object in the video [10]. representing the colours of human perception. The foreground
Anaswara S Mohan et.al. (2014) described two methods for object is detected by taking the difference of current frame and
detection and segmentation of moving objects in videos. First background as given in equation (1),
method is for object detection using back ground subtraction () () > (1)
and second method for segmentation using two approaches i.e. where, f is an original frame , b is a background of an original
thresholding and edge detection.Simulation results frame and T is threshold value.
demonstrated that the proposed technique can successfully To update background image that is not fixed and estimated
extract moving objects from various sequences. Sometimes the background is just the previous frame. It evidently works only
boundaries of the extracted object are not accurate enough to in particular conditions of objects and the frame rate using
place them in different scenes, which require a nearly perfect very sensitive to the threshold,
boundary location[11]. () (, 1) > (2)
Zhou Wei et.al. (2015)presented a foreground-background The running average of the background image is calculated as
segmentation algorithm for video sequences dealt with slow follows,
lighting changes by slowly adapting the values of the +1 = + (1) (3)
Gaussians. It also dealt with multi-modal distributions caused is the learning rate 0.05.
by shadows, swaying branches, and other troublesome features The image is segmented into object and background pixels as
of the real world. By dynamically adjusting the parameters and describe above creating two sets,
the number of Gaussian components, the computation cost G1= {f(m,n) : f(m,n)> T}(object pixel) (4)
reduced greatly. Combining two-way matching method based
on frame difference thoughts with a series of image filtering G2= {f(m,n) : f(m,n)T} (background pixels) (5)
methods, the method can extract the moving objects exactly
which is superior to the traditional method [12]. Where, f(m,n) is the values of pixel l ocated to the
The rest of the paper is organized as follows: Section II column , row and T is threshold value.
describes about the proposed method. The performance of the The average of each set is computed as.
proposed method is demonstrated in Section III. Finally, the m1 = avg(G1) (6)
conclusion of the proposed method is presented in Section IV m2 = avg(G2) (7)
with future enhancement. A new threshold is created that is the average of m1 and m2
T = (m1 + m2)/2(8)
The image is segmented into object and background pixels
II. THE PROPOSED METHOD as describe above creating two sets, G1 is object pixel and G2
The proposed method aims at extracting the moving is background pixel. Average value to be compute the each set
objects in an input image from their and average values to be stored m1 and m2. New threshold
background. The method is based on using background value found out by calculation the average of m1 and m2.
subtraction algorithm for separating moving objects from their Apply the background mask and detect to the object. Finally,
background. The proposed method has three phases. In first the third phase is get the extract object from the original frames
phase the input video is read and it is converted into frames and all frames are segmented then stored to the all segmented
frames. Finally, all segmented frames convert into new
stored in a file. The second phase is segmentation which is a
segmented video file.
critical step in image analysis, pixel as a unit of observation to
working with objects (or parts of objects) in the image, A. The Proposed algorithm
composed of many pixels. If segmentation is done well then,
all other stages in image analysis are made simpler. There are The Summarization of the proposed method is given below.
two general approaches to segmentation, termed thresholding, Phase I
edge based methods and region-based methods.In Step1: Read an input video.
thresholding, pixels are allocated to categories according to the Step2: Convert the video file into frames.
range of values in which a pixel lies. Phase II
The boundaries between adjacent pixels in different Step3: Detect the foreground object by taking the difference
categories have been superimposed in white on the of current frame and background.
original image. Step4: Update the background image that is not fixed.
Finally, region-based segmentation algorithms Step5: Segment an image into object and background pixels
operate iteratively by grouping together pixels which using as given in equations (4&5).
are neighbours and have similar values and splitting Step6: Compute the average of each set of frames using as
groups of pixels which are dissimilar in value. given in equations (6&7).
Step7: Apply the threshold into the average of m1 and m2.
The moving object is determined by taking the difference Step8: Repeat step 4 and the new threshold is computed in
between the background image and the input image. step6 until the new threshold matches the previous solution.
Background subtraction finds moving objects information by Phase III
subtracting background model. For gray video stream, only Step9: Display and stored the segmented frames.
intensity (lightness) and for colour video stream, HSI (Hue- Step10: Convert the segmented frames into video.
Saturation-Intensity) colour space background model is used.
The HSI system separates colour information of an image
727
IJRITCC | May 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 5 726 730
_______________________________________________________________________________________________
B. Proposed flow diagram C. True Positive Rate:
Sensitivity or true positive rate or recall is the percentage of
FIND THE true positive pixels and its formula is,
INPUT CONVERT A FRAME
VIDEO VIDEO TO FRAME DIFFERENCE


TPR = = (13)
APPLY THRESHOLD +
VALUE
INPUT
D. True Negative Rate:
FRAME
APPLY TO
Specificity or False Positive rate or fallout is the percentage
BACKGROUND MASK of false positive pixels and its formula is,
COMAPAR No
E TO
PIXEL
DETECT THE OBJECT
TNR = = (14)
yes +

E. Dice Co-efficient :
SEGMENTE SEGMENTED
D VIDEO FRAME Dice co-efficient is a similarity measure mostly used to
processing performance of segmentation algorithms which has
a predefined ground truth information. It is calculated using
Fig1. Process of Proposed Method
the formula,
DICE =(2 ) + + (15)
The proposed video segmentation using background
subtraction method is shown in fig 1. Graphical representation F. Accuracy:
of this diagram contains ten blocks to perform the operations Accuracy is the percentage of correct data retrivel. It is
and get the input video, convert a video to frame, compare to calculated by dividing the number of pixel with true positive
pixel, find the frame difference, apply threshold value, apply plus true negative pixel over the total number of pixels in the
to background mask, detect the object , segmented frame and frames. The following equation displays the calculation of
segmented video. accuracy,
+
III. EXPERIMENTAL RESULTS AND DISCUSSIONS Accuracy= (16)
+
In this section, the experimental result of the performance G. Mean Absolute Error:
of the proposed method is evaluated using various evaluation
metrices such as, TP, TN, TPR, TNR, DICE, Accuracy, MAE The mean absolute error (MAE) is used to
and Jaccard distance is presented. Performance metrices of TP measure how close forecasts or predictions are to the eventual
is true positive, FP is false positive, TN is true negative and outcomes.
FN is false negative are using the following equations, 1
Mean Absolute Error = =1 (17)
A. True Positive and True Negative:

The true positives(TP) value is the number of the The mean absolute error is an average of the absolute errors
corners correctly assigned to the foreground, the true =
negatives(TN) value is the number of the corners correctly where, is the prediction and is the true value.
detected as background.
H. Jaccard co-efficient:

= (9) Jaccard Co-efficient is used to calculate the similarity between
+
the two set of images and it also measures the variation or
dissimilarity between two images. The Jaccard index, also
= (10) known as Intersection over Union and the Jaccard similarity
+
coefficient is a statistic used for comparing thesimilarity and
diversity of sample sets.This distance is a metric on the
B. False Positive and False Negative: collection of all finite sets.

The false positives(FP) and the false negatives(FN) metrics Jaccard coefficient = (18)

represent the number of corners incorrectly labelled as,

respectively, foreground and background. Jaccard_dist = 1- J(A ,B) = (19)


= (11) where A is the non zero pixel element in ground truth image
+
and B is the non zero pixel element is segmented image.

= (12) In proposed method, detected targets are accurate and the
+
recall is higher than other algorithms. Table1 demonstrates the
performance of the proposed method based on the standard
728
IJRITCC | May 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 5 726 730
_______________________________________________________________________________________________
segmentation metrices discussed above. Table1 demonstrates
the higher performance of the moving object detection and
segmentation using background subtraction for the Man.avi
video file which is gives higher values on Accuracy(0.9723),
DICE(2.5963), TNR(0.9476), TPR(0.9447), MAE(0.0313),
Jaccard_dist(-1.9028) and Funny.avi video file for lower
values on Accuracy(0.8933), DICE(2.0234), TNR(0.8242),
TPR(0.7867), MAE(1.9390), Jaccard_dist(1.6796). It could be
observed that the good result for Man.avi files when compared
to others.

TABLE I. PERFORMANCE ANALYSIS OF THE PROPOSED METHOD

Performance Input Videos


Metrics Funny.avi Man.avi Dog.avi
TP 0.7776 0.7227 0.8271

TN 0.9885 0.7703 0.9605

TPR 0.7867 0.9447 0.8611


Fig2. (A) Original Frames, (B) Segmented Frame using Object
TNR 0.8242 0.9476 0.8781
Detection and Background Subtraction
DICE 2.0234 2.5963 2.0823
IV. CONCLUSION
Accuracy 0.8933 0.9723 0.9306
This paper proposed an object detection and threshold based
MAE 1.9390 0.0313 0.3665
segmentation of moving objects in videos. Simulation results
Jaccard_Distance -1.6796 -1.9028 -1.6406 demonstrated that the proposed technique has successfully
extract the moving objects from various sequences. The
boundaries of the extracted object are not accurate enough to
TABLE II. COMPARATIVE ANALYSIS OF EXISTING METHODS AND place in different scenes, which require a nearly perfect
PROPOSED METHOD boundary location. The comparative analysis is based on the
Performance Metrics
DICE, Accuracy, MAE and Jaccard_dist values of the
Methods sequences and shows an adequate variation for the two
TNR TPR TP
methods and it is found that Background Subtraction method
Robust Foreground detection 0.81 0.73 0.77 is better when compared to the Thresholding technique.
A Moving Object detection 0.85 0.74 0.80 ACKNOWLEDGMENT
A Foreground-background 0.89 0.82 0.85 We would like express my gratitude to my supervisor
Segmentation
Scene Analysis for Object
Dr.M. Mary Shanthi Rani for her constant support to complete
0.9288 0.8538 0.9182 this paper successfully. Also, we need to acknowledge our
Detection
Proposed Method 0.9476 0.9447 0.7227 friends and family members for their mutual support and help.

From the observation in Table 2, the proposed method gives a REFERENCES


high Specificity (0.9476), Sensitivity (0.9447) with low True [1] Xiao Lijun, Moving Object Segmentation Based on Background
positive (0.7227). Despite Specificity, Sensitivity and true Subtraction and Fuzzy Inference, International Conference on
Mechatronic Science, Electric Engineering and Computer August, Jilin,
positive of other methods are equally high as shown in Table China, pp: 19-22, 2011.
2. The standard values for Sensitivity (1), Specificity (1) and [2] Rita Cucchiara, et al. Detecting Moving Objects, Ghosts and Shadows
True Positive (1) [13]. The proposed method achieves the in Video Streams Massimo Piccardi is with Department of Computer
Sensitivity value (0.94), Specificity value (0.94) and True Systems, Faculty of IT, University of Technology, Sydney - Broadway
Positive value (0.72). It gives a segmentation result in high NSW Australia, 2007.
quality of the images and videos, which is used to detect the [3] Mahmoud A. Mofaddel and Walaa M. Abd-Elhafiez, Fast and Accurate
Approaches for Image and Moving Object Segmentation, Department
extract Object from image and clearly the background of Mathemat ics and Computer Science, Faculty of Science, Sohag
subtraction. University, Sohag, Egypt.
Visual representation of the proposed method has been [4] Michael Teutsch and Wolfgang Kruger, Detection, Segmentation, and
tested using three different videos like Man.avi, funny.avi and Tracking of Moving Objects in UAV Videos, IEEE Ninth International
Conference on Advanced Video and Signal-Based Surveillance,2012.
Dog.avi. The proposed method has achieved by detecting
[5] Le Sun, Ming Dai and Xiaolu Chen, A Simple and Fast moving object
moving objects accurately in all video sequences and the segmentation Based on H.264 Compressed Domain Information
segmentation results are shown below fig (2). Compressed Domain Information, Fourth International Conference on
Computational and Information Sciences, 2012.

729
IJRITCC | May 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 5 726 730
_______________________________________________________________________________________________
[6] Manish Khare, et al. contourlet tra nsform based moving object of Mathematics and Computer Science, Faculty of Science, Sohag
segmentation Proceedings of IEEE Conference on Information and University, Sohag, Egypt.
Communication Technologies (ICT), 2013. [16] Zhang Xiang, Yang Jie, A novel algorithm to segment foreground from
[7] R. Hartley and A. Zisserman, Multiple-View Geometry in Computer a similarly colored background[J]. International Journal of Electronics
Vision. Cambridge University Press, 2004. and Communications,vol :63(11),pp: 831-840,2009.
[8] Qiong Wu, Pierre Boulanger and Walter F. Bischof, Robust Real-Time [17] Yang Tao, Li Jiang, Pan Quan, 2008, A multiple layer background
Bi-Layer Video Segmentation Using Infrared Video, Canadian model for foreground detection[J]. Jounal of Image and Graphics,
Conference on Computer and Robot Vision,pp:87-97, 2008. vol:13(7), pp: 1303-1308,2008.
[9] S. Maludrottu, C.S. Regazzoni,H.Sallam, I. Talkhan and A. Atiya, [18] Xiao Lijun, Moving Object Segmentation Based on Background
Corner-Based Background Segmentation Using Adaptive Resonance Subtraction and Fuzzy Inference, International Conference on
Theory, ICIP,pp:3201- 3204, 2009. Mechatronic Science, Electric Engineering and Computer, Jilin,
[10] Deepak Kumar Rout and Sharmistha Puhan, "Video Object Detection China,pp: 19-22,2011.
using Inter-frame Correlation Based Background Subtraction, IEEE [19] Rita Cucchiara, et al. Detecting Moving Objects, Ghosts and Shadows
Recent Advances in Intelligent Computational Systems in Video Streams Massimo Piccardi is with Department of Computer
(RAICS),pp:167-171, 2013. Systems, Faculty of IT, University of Technology, Sydney - Broadway
[11] Anaswara S Mohan and Resmi R, Video Image Processing for Moving NSW 2007 Australia.
ObjectDetection and Segmentation using Background Subtraction, First [20] Mahmoud A. Mofaddel and Walaa M. Abd-Elhafiez, Fast and Accurate
International Conference on Computational Systems and Approaches for Image and Moving Object Segmentation, Department
Communications (ICCSC),pp:288-292, 2014. of Mathemat ics and Computer Science, Faculty of Science, Sohag
[12] Zhou Wei , Peng Li and HuangYue, A Foreground-background University, Sohag, Egypt.
Segmentation Algorithm for Video Sequences, 14th International [21] Michael Teutsch and Wolfgang Kruger, Detection, Segmentation, and
Symposium on Distributed Computing and Applications for Business Tracking of Moving Objects in UAV Videos, IEEE Ninth International
Engineering and Science,pp: 340-343, 2015. Conference on Advanced Video and Signal-Based Surveillance,2012.
[13] Faiza Babakano Jada1, A. M Aibinu and A. J. Onumanyi, [22] Le Sun, Ming Dai and Xiaolu Chen, A Simple and Fast moving object
Performance Metrics for Image Segmentation Techniques: A Review, segmentation Based on H.264 Compressed Domain Information
See discussions, stats, and author profiles for this publication at: Compressed Domain Information, Fourth International Conference on
https://www.researchgate.net/publication/283088336, pp:344-348, 2015. C omputational and Information Sciences,2012.
[14] Arseneau, Cooperstock J, Real-time image segmentation for action [23] Lucia Maddalena and Alfredo Petrosino, A Self-Organizing Approach
recognition[C]Communications, Computers and Signal Processing, to Background Subtraction for Visual Surveillance Applications, IEEE
p:86-89,1999. Trans. on image processing, vol. 17, no. 7, pp.1168-1177, 2008.
[15] Mahmoud A. Mofaddel and Walaa M. Abd-Elhafiez, Fast and Accurate
Approaches for Image and Moving Object Segmentation, Department

730
IJRITCC | May 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________

You might also like