SlideShare a Scribd company logo
Mayur Salve et al Int. Journal of Engineering Research and Application
ISSN : 2248-9622, Vol. 3, Issue 5, Sep-Oct 2013, pp.1829-1832

www.ijera.com

RESEARCH ARTICLE

OPEN ACCESS

Fpga Based Moving Object Detection Algorithm Implementation
for Traffic Surveillance
Mayur Salve, Mahesh Rajput, Sanket Shingate
(Department of Electronics, Mumbai University, India

ABSTRACT
The main objective of this paper is detection of vehicles by background subtraction technique and the automatic
surveillance of traffic based on the number of vehicles. The algorithm takes into consideration three main
techniques namely Background Subtraction, Edge Detection and Shadow Detection. Background Subtraction
block is sub-divided into Selective and Non-selective parts to improve the sensitivity and give accurate
background. Edge detection helps to detect the exact boundaries of moving vehicles. This is followed by the
shadow detection block that removes the falsely detected pixels that are generated due to shadow of the vehicle.
By analyzing the output of the blocks discussed above, the final mask is generated. The mask along with the
input frame is processed to give the final output frame where the detected object is highlighted. Furthermore,
parameters such as number of blobs per frame (vehicles) and the area of blobs can be used for traffic
surveillance. The algorithm of object detection is implemented on FPGA using VHDL. Spartan-6 Development
Board is used for implementation of the same.
Keywords – FPGA, Image Processing, SPARTAN6, Traffic surveillance, VHDL.

I.

INTRODUCTION

Various type of traffic surveillance systems
are often used for controlling traffic and detecting
unusual situations, such as traffic congestion or
accidents. This paper describes an approach which
detects moving and recently stopped vehicles using
the novel technique of background subtraction [1]
[2]. The algorithm is programmed, simulated and
tested in VHDL and then implemented on the FPGA
SPARTAN6 Board. The result of the algorithm is a
binary mask image of blobs representing the detected
objects. The background is updated slowly with
Selective and Non-selective algorithm. The use of
two updating blocks improves the sensitivity of the
algorithm. Also shadow detection block maintains
consistency of the algorithm by eliminating the error
introduced by shadow of an object.
1.1. About FPGA
Field Programmable Gate Arrays (FPGAs)
represent reconfigurable computing technology,
which is in some ways ideally suited for video
processing. Reconfigurable computers are processors
which can be programmed with a design, and then
reprogrammed (or reconfigured) with virtually
limitless designs as the designers need change. All of
the logic in an FPGA can be rewired, or reconfigured,
with a different design as often as the designer likes.
This type of architecture allows a large variety of
logic designs dependent on the processors resources),
which can be interchanged for a new design as soon
as the device can be reprogrammed. Engineers use a
hardware language such as VHDL, which allows for
a design methodology similar to software design.
www.ijera.com

This software view of hardware design allows for a
lower overall support cost and design abstraction.
1.2. About VHDL
VHDL is an acronym for Very High Speed
Integrated Circuit Hardware Description Language. It
is a hardware description language that can be used to
model a digital system at many levels of abstraction,
ranging from the algorithmic level to the gate level.
The VHDL language has constructs that enable you
to express the concurrent or sequential behaviour of a
digital system. It also allows you to model the system
as an interconnection of components. Test waveforms
can also be generated using the same constructs.
1.3. Algorithm
Each pixel is modified independently using
the statistical procedure of Gaussian distribution [3]
and the pixels of the moving object is detected using
the inequality mentioned below:
Where µt and σt are mean and standard deviation
matrices of Gaussian distribution for image pixel
intensities and constant k typically has a value
between 2 and 3.The updating background image is
calculated as shown by the following equations:
(2)

(3)
Where It-1 and µt-1 is the intensity of previous image
frame and previous frame and α is learning ratio.
1829 | P a g e
Mayur Salve et al Int. Journal of Engineering Research and Application
ISSN : 2248-9622, Vol. 3, Issue 5, Sep-Oct 2013, pp.1829-1832
II.

www.ijera.com

NON-SELECTIVE BLOCK

The task of detecting the moving and
recently stopped vehicles is done by the non-selective
block. The equation for non-selective background
updating [2] [4] is given by:

Where It (x y) is the brightness of a pixel situated at
coordinates (x,y) of input monochrome image at the
time t; µN, t (x,y) the brightness of a pixel situated at
coordinates (x,y) of background image, updated nonselectively; δN1 = 2-5 = 0.03125 is a small constant
evaluated experimentally. It is assumed that the
brightness of the input image is in the range: It(x,y)
<0,255>.
The updating of
from (1) for non which is
selective model [2] is given by (5):

where
is experimentally evaluated to be
0.00390625 (i.e. 2-8). The values of µN,t and
are used to calculate the pixel values of mN
from equation (1).

(7)
where mVTS,t (x, y) = mV,t (x, y) ˅ mET,t (x, y)
mES,t
(x, y) ; S,t (x, y) – the brightness of a pixel at
coordinates (x, y) of background image updated
using selectivity; mV (x, y) – the element of the
detected vehicle mask image of value equal to 0 or 1,
where 1 denotes the detected moving objects. The
values of constants S1 and S2 were established
experimentally: S1 = 0.25, S2 = 0.03125 for It
x,
y)
. From (1), the image frame ms comes
out as shown below:

Figure 3: Showing ms(x,y)

IV.

Binary Mask Combination Block

The output from both selective and nonselective block is combined into a single binary
mask. A simple AND operation is not enough to
detect all the pixels. Hence a special combination of
AND and OR operations [5] are used to improve the
detection as shown (8):

Figure 2: Showing It (x,y) and mN (x,y)
respectively.

III.

Selective Block

This block is similar to the non-selective
block, but it depends on the final mask output [4] as
shown by (6):

Figure 4: Showing mB(x,y)

V.

(6)

www.ijera.com

Temporal and Spatial Edge Detection

During a dark scene, True Positive pixels [2]
may not be detected and a major portion or the car
may be neglected. So to improve the segmentation
quality, the TP pixels need to be increased. This is
done by using two type of edge detection: Temporal
and Spatial Edge Detection blocks.
1830 | P a g e
Mayur Salve et al Int. Journal of Engineering Research and Application
ISSN : 2248-9622, Vol. 3, Issue 5, Sep-Oct 2013, pp.1829-1832
In temporal edge detection block, the edges are
detected by taking the difference of the current and
previous frame:
In spatial edge detection, the difference of current
image and background is taken as below:

VII.

www.ijera.com

Final Processing

The masks obtained by implementing
the previous algorithms are combined into a
single mask M_Temp1:

Temporal and spatial edge image mask mET and mES
respectively is given by the following equation:
where dil() and ero() denote 2x2 morphological
dilation and erosion operation [2] respectively.
The mask thus obtained usually contains False
negative and False positive pixels. Hence to improve
the shape of the blobs, the inbuilt opening block is
added to obtain the final frame of mask mV.
where θET and θES are constant threshold values.

Figure 7: Showing mV.

VIII.

Figure 5: Showing mET and mES respectively.

VI.

Shadow Detection

Shadows get detected and may be
misunderstood by the system to be an object itself.
Hence to remove any such discrepancies, the Shadow
detection technique is used. By comparing the
decrease in brightness [5] [6] [7], shadows are
detected by the following equation:
where α and β are constant coefficients: α=0.55,
β=0.95, both evaluated experimentally.

CONCLUSION

In this paper, the combined algorithm for
extracting moving objects from a stored video stream
is proposed. The processing steps were carefully
selected and adopted to provide simple and
straightforward realization in specialized hardware,
such as FPGA. A few novel ideas to enhance the
algorithm are also developed, increasing the
robustness and maintaining its simplicity for
hardware implementation. The proposed method of
background calculation, using running mode is very
fast and requires only basic operations. The novel
combination of masks from selective and nonselective background improves the detection quality.
Shadow Detection in various light conditions
improves the sensitivity. The application of Final
Processing significantly improves the final blob
mask. The test and simulation result proves the
usability of the presented idea for recognizing the
moving vehicles at low power consumption-the
system properly found almost all of the moving
vehicles during different climatic conditions.
IX.
ACKNOWLEDGEMENTS
We are thankful to Ms. Divya Shah (Asst.
Professor Electronics Dept.) for sharing their
profound knowledge in the field of VLSI. We also
want to thank college staff and family members for
their constant support.

REFERENCES
Figure 6: Showing mSH.

www.ijera.com

Journal Papers:
[1]. Sen-Ching S. Cheung and Chandrika
Kamath, “Robust Background Subtraction
With Foreground Validation For Urban
1831 | P a g e
Mayur Salve et al Int. Journal of Engineering Research and Application
ISSN : 2248-9622, Vol. 3, Issue 5, Sep-Oct 2013, pp.1829-1832

[2].

[3].

[4].

[5].

[6].

[7].

www.ijera.com

Traffic Video” in Proc. SPIE Video
Communication and Image Processing,
2004,pp.881-892.
Marek Wójcikowski, Robert Zaglewski,
“FPGA-Based Real-Time Implementation of
Detection Algorithm for Automatic Traffic
Surveillance Sensor Network”.
A. Franois, G. Medioni, "Adaptive Color
Background Modeling for Real-Time
Segmentation of Video Streams", in Proc. of
Int. Conf. Imaging Science, Systems and
Technology, Las Vegas, NV, 1999, pp. 227232.
F. Porikli, Y. Ivanov, T. Haga, "Robust
abandoned object detection using dual
foregrounds", EURASIP J. Adv. Signal
Process,Jan.2008.
D. Duque, H. Santos, P. Cortez, "Moving
Object Detection Unaffected by Cast
Shadows,Highlights and Ghosts", in Proc.
IEEE Int. Conf. Image Processing, 2005, pp.
413-416.
R. Cucchiara, C. Granna. M. Piccardi, A.
Prati, S. Sirotti, "Improving Shadow
Suppression in Moving Object Detection
with HSV Color Information", in Proc. IEEE
Intell. Transp. Syst. Conf., Oakland, CA,
2001, pp. 334-339.
R. Cucchiara, C. Granna. M.Piccardi, A.
Prati, "Detecting Moving Objects, Ghosts
and Shadows in Video Streams", IEEE
Trans. Pattern Anal. Machine Intell., vol.
25, no. 10, pp. 1337-1342, Oct. 2003.

www.ijera.com

1832 | P a g e

More Related Content

PDF
11.digital image processing for camera application in mobile devices using ar...
Alexander Decker
 
PDF
Low complexity features for jpeg steganalysis using undecimated dct
Pvrtechnologies Nellore
 
PDF
E0333021025
theijes
 
PDF
Kk3517971799
IJERA Editor
 
PDF
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
PDF
3 d mrf based video tracking in the compressed domain
eSAT Publishing House
 
PDF
3 d mrf based video tracking in the compressed domain
eSAT Journals
 
PDF
A new block cipher for image encryption based on multi chaotic systems
TELKOMNIKA JOURNAL
 
11.digital image processing for camera application in mobile devices using ar...
Alexander Decker
 
Low complexity features for jpeg steganalysis using undecimated dct
Pvrtechnologies Nellore
 
E0333021025
theijes
 
Kk3517971799
IJERA Editor
 
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
3 d mrf based video tracking in the compressed domain
eSAT Publishing House
 
3 d mrf based video tracking in the compressed domain
eSAT Journals
 
A new block cipher for image encryption based on multi chaotic systems
TELKOMNIKA JOURNAL
 

What's hot (20)

PDF
IRJET- Traffic Sign Classification and Detection using Deep Learning
IRJET Journal
 
PDF
SAR Image Classification by Multilayer Back Propagation Neural Network
IJMTST Journal
 
PDF
Paper id 252014130
IJRAT
 
PDF
Hand Written Digit Classification
ijtsrd
 
PDF
A Comparative study of K-SVD and WSQ Algorithms in Fingerprint Compression Te...
IRJET Journal
 
PDF
IRJET- Handwritten Decimal Image Compression using Deep Stacked Autoencoder
IRJET Journal
 
PDF
IRJET - Hand Gesture Recognition to Perform System Operations
IRJET Journal
 
PDF
Medial axis transformation based skeletonzation of image patterns using image...
International Journal of Science and Research (IJSR)
 
PPT
Presentation Object Recognition And Tracking Project
Prathamesh Joshi
 
PDF
I0343065072
ijceronline
 
PDF
Background differencing algorithm for moving object detection using system ge...
eSAT Publishing House
 
PDF
Kernel based similarity estimation and real time tracking of moving
IAEME Publication
 
PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
PDF
GTSRB Traffic Sign recognition using machine learning
Rupali Aher
 
PDF
MULTIPLE HUMAN TRACKING USING RETINANET FEATURES, SIAMESE NEURAL NETWORK, AND...
IAEME Publication
 
PDF
Foreground algorithms for detection and extraction of an object in multimedia...
IJECEIAES
 
PDF
G1802053147
IOSR Journals
 
PDF
H1802054851
IOSR Journals
 
PDF
High Performance Traffic Sign Detection
Craig Ferguson
 
PDF
Image Segmentation Using Two Weighted Variable Fuzzy K Means
Editor IJCATR
 
IRJET- Traffic Sign Classification and Detection using Deep Learning
IRJET Journal
 
SAR Image Classification by Multilayer Back Propagation Neural Network
IJMTST Journal
 
Paper id 252014130
IJRAT
 
Hand Written Digit Classification
ijtsrd
 
A Comparative study of K-SVD and WSQ Algorithms in Fingerprint Compression Te...
IRJET Journal
 
IRJET- Handwritten Decimal Image Compression using Deep Stacked Autoencoder
IRJET Journal
 
IRJET - Hand Gesture Recognition to Perform System Operations
IRJET Journal
 
Medial axis transformation based skeletonzation of image patterns using image...
International Journal of Science and Research (IJSR)
 
Presentation Object Recognition And Tracking Project
Prathamesh Joshi
 
I0343065072
ijceronline
 
Background differencing algorithm for moving object detection using system ge...
eSAT Publishing House
 
Kernel based similarity estimation and real time tracking of moving
IAEME Publication
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
GTSRB Traffic Sign recognition using machine learning
Rupali Aher
 
MULTIPLE HUMAN TRACKING USING RETINANET FEATURES, SIAMESE NEURAL NETWORK, AND...
IAEME Publication
 
Foreground algorithms for detection and extraction of an object in multimedia...
IJECEIAES
 
G1802053147
IOSR Journals
 
H1802054851
IOSR Journals
 
High Performance Traffic Sign Detection
Craig Ferguson
 
Image Segmentation Using Two Weighted Variable Fuzzy K Means
Editor IJCATR
 
Ad

Viewers also liked (18)

PDF
La3518941898
IJERA Editor
 
PDF
Ks3518401849
IJERA Editor
 
PDF
Lg3519251930
IJERA Editor
 
PPTX
Test
Alon Layosh
 
DOC
Apollo 11 release FINAL
Sarah Robinson
 
PDF
Los maestros si perdimos con el paro y fecode lo desaprovecho
Manzano Educación
 
PDF
August 2012 - Why investment is still tied up
FGV Brazil
 
DOCX
iman kepada qada dan qadar
pendidikanagamaislam
 
PPTX
Maquetaabstractasobreburgos 140523231753-phpapp02
Ingrid Calderon
 
PDF
Sayed_Omar's C.V
Sayed Omar
 
POT
Cdb2004c002l
thienthu1988
 
DOCX
Division director performance appraisal
sophiakara32
 
PPTX
G3 b5-pe1
José Arteaga Guzmán
 
PPT
Software Colaborativo
Sebastian_pj
 
PPTX
आम आदमी
ibansal99
 
ODT
Prirodni lekoviti napici
IrenaMikaric
 
DOCX
Familia italiano
Klever Bautista
 
PPT
Under undersökning av vad folk minns från sin historieundervisning
ljpechsv
 
La3518941898
IJERA Editor
 
Ks3518401849
IJERA Editor
 
Lg3519251930
IJERA Editor
 
Apollo 11 release FINAL
Sarah Robinson
 
Los maestros si perdimos con el paro y fecode lo desaprovecho
Manzano Educación
 
August 2012 - Why investment is still tied up
FGV Brazil
 
iman kepada qada dan qadar
pendidikanagamaislam
 
Maquetaabstractasobreburgos 140523231753-phpapp02
Ingrid Calderon
 
Sayed_Omar's C.V
Sayed Omar
 
Cdb2004c002l
thienthu1988
 
Division director performance appraisal
sophiakara32
 
Software Colaborativo
Sebastian_pj
 
आम आदमी
ibansal99
 
Prirodni lekoviti napici
IrenaMikaric
 
Familia italiano
Klever Bautista
 
Under undersökning av vad folk minns från sin historieundervisning
ljpechsv
 
Ad

Similar to Kq3518291832 (20)

PDF
A real-time system for vehicle detection with shadow removal and vehicle clas...
International Journal of Power Electronics and Drive Systems
 
PDF
Ls3520052009
IJERA Editor
 
PDF
Background Subtraction Algorithm for Moving Object Detection Using Denoising ...
International Journal of Science and Research (IJSR)
 
PDF
IRJET- A Survey of Approaches for Vehicle Traffic Analysis
IRJET Journal
 
PDF
IRJET- A Survey of Approaches for Vehicle Traffic Analysis
IRJET Journal
 
PDF
Gi3511181122
IJERA Editor
 
PDF
Vehicle counting without background modeling
Lihguong Jang
 
PDF
Big_data_oriented_novel_background_subtraction_algorithm_for_urban_surveillan...
AneeshD5
 
PDF
IRJET- Reckoning the Vehicle using MATLAB
IRJET Journal
 
PDF
A Real-Time System for Monitoring of Cyclists and Pedestrians.pdf
adityya201
 
PDF
00463517b1e90c1e63000000
Ivonne Liu
 
PDF
G04743943
IOSR-JEN
 
PDF
K0445660
IJERA Editor
 
PDF
Vehicle Tracking Using Kalman Filter and Features
sipij
 
PDF
Automated traffic sign board
ijcsa
 
PDF
Vehicle detection and tracking techniques a concise review
sipij
 
PDF
The International Journal of Engineering and Science (The IJES)
theijes
 
PDF
Neural Network based Vehicle Classification for Intelligent Traffic Control
ijseajournal
 
PDF
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
Ahmed Gad
 
A real-time system for vehicle detection with shadow removal and vehicle clas...
International Journal of Power Electronics and Drive Systems
 
Ls3520052009
IJERA Editor
 
Background Subtraction Algorithm for Moving Object Detection Using Denoising ...
International Journal of Science and Research (IJSR)
 
IRJET- A Survey of Approaches for Vehicle Traffic Analysis
IRJET Journal
 
IRJET- A Survey of Approaches for Vehicle Traffic Analysis
IRJET Journal
 
Gi3511181122
IJERA Editor
 
Vehicle counting without background modeling
Lihguong Jang
 
Big_data_oriented_novel_background_subtraction_algorithm_for_urban_surveillan...
AneeshD5
 
IRJET- Reckoning the Vehicle using MATLAB
IRJET Journal
 
A Real-Time System for Monitoring of Cyclists and Pedestrians.pdf
adityya201
 
00463517b1e90c1e63000000
Ivonne Liu
 
G04743943
IOSR-JEN
 
K0445660
IJERA Editor
 
Vehicle Tracking Using Kalman Filter and Features
sipij
 
Automated traffic sign board
ijcsa
 
Vehicle detection and tracking techniques a concise review
sipij
 
The International Journal of Engineering and Science (The IJES)
theijes
 
Neural Network based Vehicle Classification for Intelligent Traffic Control
ijseajournal
 
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
Ahmed Gad
 

Recently uploaded (20)

PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
This slide provides an overview Technology
mineshkharadi333
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
PPT
L2 Rules of Netiquette in Empowerment technology
Archibal2
 
PDF
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
This slide provides an overview Technology
mineshkharadi333
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Doc9.....................................
SofiaCollazos
 
Software Development Methodologies in 2025
KodekX
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
L2 Rules of Netiquette in Empowerment technology
Archibal2
 
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 

Kq3518291832

  • 1. Mayur Salve et al Int. Journal of Engineering Research and Application ISSN : 2248-9622, Vol. 3, Issue 5, Sep-Oct 2013, pp.1829-1832 www.ijera.com RESEARCH ARTICLE OPEN ACCESS Fpga Based Moving Object Detection Algorithm Implementation for Traffic Surveillance Mayur Salve, Mahesh Rajput, Sanket Shingate (Department of Electronics, Mumbai University, India ABSTRACT The main objective of this paper is detection of vehicles by background subtraction technique and the automatic surveillance of traffic based on the number of vehicles. The algorithm takes into consideration three main techniques namely Background Subtraction, Edge Detection and Shadow Detection. Background Subtraction block is sub-divided into Selective and Non-selective parts to improve the sensitivity and give accurate background. Edge detection helps to detect the exact boundaries of moving vehicles. This is followed by the shadow detection block that removes the falsely detected pixels that are generated due to shadow of the vehicle. By analyzing the output of the blocks discussed above, the final mask is generated. The mask along with the input frame is processed to give the final output frame where the detected object is highlighted. Furthermore, parameters such as number of blobs per frame (vehicles) and the area of blobs can be used for traffic surveillance. The algorithm of object detection is implemented on FPGA using VHDL. Spartan-6 Development Board is used for implementation of the same. Keywords – FPGA, Image Processing, SPARTAN6, Traffic surveillance, VHDL. I. INTRODUCTION Various type of traffic surveillance systems are often used for controlling traffic and detecting unusual situations, such as traffic congestion or accidents. This paper describes an approach which detects moving and recently stopped vehicles using the novel technique of background subtraction [1] [2]. The algorithm is programmed, simulated and tested in VHDL and then implemented on the FPGA SPARTAN6 Board. The result of the algorithm is a binary mask image of blobs representing the detected objects. The background is updated slowly with Selective and Non-selective algorithm. The use of two updating blocks improves the sensitivity of the algorithm. Also shadow detection block maintains consistency of the algorithm by eliminating the error introduced by shadow of an object. 1.1. About FPGA Field Programmable Gate Arrays (FPGAs) represent reconfigurable computing technology, which is in some ways ideally suited for video processing. Reconfigurable computers are processors which can be programmed with a design, and then reprogrammed (or reconfigured) with virtually limitless designs as the designers need change. All of the logic in an FPGA can be rewired, or reconfigured, with a different design as often as the designer likes. This type of architecture allows a large variety of logic designs dependent on the processors resources), which can be interchanged for a new design as soon as the device can be reprogrammed. Engineers use a hardware language such as VHDL, which allows for a design methodology similar to software design. www.ijera.com This software view of hardware design allows for a lower overall support cost and design abstraction. 1.2. About VHDL VHDL is an acronym for Very High Speed Integrated Circuit Hardware Description Language. It is a hardware description language that can be used to model a digital system at many levels of abstraction, ranging from the algorithmic level to the gate level. The VHDL language has constructs that enable you to express the concurrent or sequential behaviour of a digital system. It also allows you to model the system as an interconnection of components. Test waveforms can also be generated using the same constructs. 1.3. Algorithm Each pixel is modified independently using the statistical procedure of Gaussian distribution [3] and the pixels of the moving object is detected using the inequality mentioned below: Where µt and σt are mean and standard deviation matrices of Gaussian distribution for image pixel intensities and constant k typically has a value between 2 and 3.The updating background image is calculated as shown by the following equations: (2) (3) Where It-1 and µt-1 is the intensity of previous image frame and previous frame and α is learning ratio. 1829 | P a g e
  • 2. Mayur Salve et al Int. Journal of Engineering Research and Application ISSN : 2248-9622, Vol. 3, Issue 5, Sep-Oct 2013, pp.1829-1832 II. www.ijera.com NON-SELECTIVE BLOCK The task of detecting the moving and recently stopped vehicles is done by the non-selective block. The equation for non-selective background updating [2] [4] is given by: Where It (x y) is the brightness of a pixel situated at coordinates (x,y) of input monochrome image at the time t; µN, t (x,y) the brightness of a pixel situated at coordinates (x,y) of background image, updated nonselectively; δN1 = 2-5 = 0.03125 is a small constant evaluated experimentally. It is assumed that the brightness of the input image is in the range: It(x,y) <0,255>. The updating of from (1) for non which is selective model [2] is given by (5): where is experimentally evaluated to be 0.00390625 (i.e. 2-8). The values of µN,t and are used to calculate the pixel values of mN from equation (1). (7) where mVTS,t (x, y) = mV,t (x, y) ˅ mET,t (x, y) mES,t (x, y) ; S,t (x, y) – the brightness of a pixel at coordinates (x, y) of background image updated using selectivity; mV (x, y) – the element of the detected vehicle mask image of value equal to 0 or 1, where 1 denotes the detected moving objects. The values of constants S1 and S2 were established experimentally: S1 = 0.25, S2 = 0.03125 for It x, y) . From (1), the image frame ms comes out as shown below: Figure 3: Showing ms(x,y) IV. Binary Mask Combination Block The output from both selective and nonselective block is combined into a single binary mask. A simple AND operation is not enough to detect all the pixels. Hence a special combination of AND and OR operations [5] are used to improve the detection as shown (8): Figure 2: Showing It (x,y) and mN (x,y) respectively. III. Selective Block This block is similar to the non-selective block, but it depends on the final mask output [4] as shown by (6): Figure 4: Showing mB(x,y) V. (6) www.ijera.com Temporal and Spatial Edge Detection During a dark scene, True Positive pixels [2] may not be detected and a major portion or the car may be neglected. So to improve the segmentation quality, the TP pixels need to be increased. This is done by using two type of edge detection: Temporal and Spatial Edge Detection blocks. 1830 | P a g e
  • 3. Mayur Salve et al Int. Journal of Engineering Research and Application ISSN : 2248-9622, Vol. 3, Issue 5, Sep-Oct 2013, pp.1829-1832 In temporal edge detection block, the edges are detected by taking the difference of the current and previous frame: In spatial edge detection, the difference of current image and background is taken as below: VII. www.ijera.com Final Processing The masks obtained by implementing the previous algorithms are combined into a single mask M_Temp1: Temporal and spatial edge image mask mET and mES respectively is given by the following equation: where dil() and ero() denote 2x2 morphological dilation and erosion operation [2] respectively. The mask thus obtained usually contains False negative and False positive pixels. Hence to improve the shape of the blobs, the inbuilt opening block is added to obtain the final frame of mask mV. where θET and θES are constant threshold values. Figure 7: Showing mV. VIII. Figure 5: Showing mET and mES respectively. VI. Shadow Detection Shadows get detected and may be misunderstood by the system to be an object itself. Hence to remove any such discrepancies, the Shadow detection technique is used. By comparing the decrease in brightness [5] [6] [7], shadows are detected by the following equation: where α and β are constant coefficients: α=0.55, β=0.95, both evaluated experimentally. CONCLUSION In this paper, the combined algorithm for extracting moving objects from a stored video stream is proposed. The processing steps were carefully selected and adopted to provide simple and straightforward realization in specialized hardware, such as FPGA. A few novel ideas to enhance the algorithm are also developed, increasing the robustness and maintaining its simplicity for hardware implementation. The proposed method of background calculation, using running mode is very fast and requires only basic operations. The novel combination of masks from selective and nonselective background improves the detection quality. Shadow Detection in various light conditions improves the sensitivity. The application of Final Processing significantly improves the final blob mask. The test and simulation result proves the usability of the presented idea for recognizing the moving vehicles at low power consumption-the system properly found almost all of the moving vehicles during different climatic conditions. IX. ACKNOWLEDGEMENTS We are thankful to Ms. Divya Shah (Asst. Professor Electronics Dept.) for sharing their profound knowledge in the field of VLSI. We also want to thank college staff and family members for their constant support. REFERENCES Figure 6: Showing mSH. www.ijera.com Journal Papers: [1]. Sen-Ching S. Cheung and Chandrika Kamath, “Robust Background Subtraction With Foreground Validation For Urban 1831 | P a g e
  • 4. Mayur Salve et al Int. Journal of Engineering Research and Application ISSN : 2248-9622, Vol. 3, Issue 5, Sep-Oct 2013, pp.1829-1832 [2]. [3]. [4]. [5]. [6]. [7]. www.ijera.com Traffic Video” in Proc. SPIE Video Communication and Image Processing, 2004,pp.881-892. Marek Wójcikowski, Robert Zaglewski, “FPGA-Based Real-Time Implementation of Detection Algorithm for Automatic Traffic Surveillance Sensor Network”. A. Franois, G. Medioni, "Adaptive Color Background Modeling for Real-Time Segmentation of Video Streams", in Proc. of Int. Conf. Imaging Science, Systems and Technology, Las Vegas, NV, 1999, pp. 227232. F. Porikli, Y. Ivanov, T. Haga, "Robust abandoned object detection using dual foregrounds", EURASIP J. Adv. Signal Process,Jan.2008. D. Duque, H. Santos, P. Cortez, "Moving Object Detection Unaffected by Cast Shadows,Highlights and Ghosts", in Proc. IEEE Int. Conf. Image Processing, 2005, pp. 413-416. R. Cucchiara, C. Granna. M. Piccardi, A. Prati, S. Sirotti, "Improving Shadow Suppression in Moving Object Detection with HSV Color Information", in Proc. IEEE Intell. Transp. Syst. Conf., Oakland, CA, 2001, pp. 334-339. R. Cucchiara, C. Granna. M.Piccardi, A. Prati, "Detecting Moving Objects, Ghosts and Shadows in Video Streams", IEEE Trans. Pattern Anal. Machine Intell., vol. 25, no. 10, pp. 1337-1342, Oct. 2003. www.ijera.com 1832 | P a g e