Вы находитесь на странице: 1из 3

Global Journal of Advanced Engineering Technologies, Special Issue (CTCNSF-2014)

ISSN (Online): 2277-6370 & ISSN (Print): 2394-0921

OBJECT DETECTION AND TRACKING USING


IMAGE PROCESSING
Vijayalaxmi1, K.Anjali2,B.Srujana3, P.Rohith Kumar4
1 Associate
Professor, Department of ECE, Vignan Institute of Technology and Science, Hyderabad.
2
Students, 4th Year, Department of ECE, Vignan Institute of Technology and Science, Hyderabad.
3, 4
Student, 3rd Year, Department of ECE, Vignan Institute of Technology and Science, Hyderabad.

Abstract: The project mainly focuses on the basis to The Arduino board is also a good choice in with respect
implement the object detection and tracking based on to cost, performance and user friendly when it
its colour, which is a visual based project i.e., the input compared to other microcontrollers. The Arduino
to the project will be the video/image data which is integrated development environment (IDE) is free of
continuously captured with the help of a webcam which cost and the programming language is very simple and
is interfaced to the Raspberry Pi. It will detect the it comes with so many examples to learn.
object and it tracks that object by moving the camera in The rest of the paper is organized as Section 2 discusses
the direction of the detected object. The visual data project description; Section 3 gives the specifications,
captured by the webcam is processed in the Raspberry Section 4 deals with Block diagram, section 5 discusses
Pi and the object is detected based on the colour or software flow chart and last two sections discusses
shape and if the object is detected, the servo motor is results and conclusions.
rotated in such a way that wherever the object moves,
the camera will be pointing to that object. Here, the II. PROJECT DESCRIPTION
servos are controlled by the help of a Microcontroller The project mainly focuses on the basis to implement
board called Arduino board through its PWM pins. We the object detection and tracking based on its colour,
can control the angle of servo rotations by the arduino which is a visual based project i.e. the input to the
board i.e., by varying the pulse widths. project will be the video/image data which is
Keywords: Object, Raspberry PI, Colour. continuously captured with the help of a webcam which
is interfaced to the Raspberry Pi. It will detect the
I. INTRODUCTION object and it tracks that object by moving the camera in
The aim of this project is to present a method for object the direction of the detected object.
detection and tracking based on its colour. By using this First of all the Linux O.S is installed into the Raspberry
method, one can easily detect and track any object Pi board via Micro SD card and appropriate code is
which may be a ball or book or even an enemy written in Python language for the object detection
aircrafts missiles i.e., this method can be used even in using the Open CV libraries and is dumped in the
many security applications. board. The visual data captured by the webcam is
This model gives an overview of Raspberry Pi Arm-11 processed in the Raspberry Pi and the object is detected
based processor board. The main features of Raspberry based on the colour and once if the object is detected,
Pi are Broadcom BCM2835 Arm-11 processor (700 the servo motor is rotated in such a way that wherever
MHz), 512MB RAM, on board USB 2.0 ports. the object moves, the camera will be pointing to that
Providing a wide range of processors based on a object. We can control the angle of servo rotations by
common architecture that delivers high performance the arduino board through its PWM pins i.e., by varying
and cost efficiency.[1] the pulse widths.
To control the movement of servos, the controller is The main Hardware/Software used is
used. Since Arduino has more number of PWM pins Wheezy Raspbian
and it supports open source hardware, it is preferred to Raspberry Pi
use. Arduino has a 32-bit Atmel ARM processor. Servo motors
Image Processing
A) Overview
Open CV
The objective is to detect an object based on colour and
Python
the make use of open source hardware, hence
Raspberry Pi processor board is the best option for an Arduino
individual interested in low cost Arm processor. It has III. SPECIFICATIONS
many inbuilt features and many ports which makes the A) Project specifications
used to experience the power of using a processor. The The project is mainly divided into three parts:
board comes with USB ports to which Camera, Capturing images/video and sending them to
keyboard and mouse, Wi-Fi dongle can be connected Raspberry Pi.
which gives the feeling of working on a system.
www.gjaet.com Page | 113
Global Journal of Advanced Engineering Technologies, Special Issue (CTCNSF-2014)
ISSN (Online): 2277-6370 & ISSN (Print): 2394-0921

Processing the images/video and detecting the the arduino board through its PWM pins i.e., By
object using Raspberry Pi by writing varying the pulse widths.
appropriate code.
Enabling the servo motors through the V. SOFTWARE FLOW CHART
Arduino board according to the processed The software flow chart for object detection and
image data. tracking is shown in Figure 2. The steps involved in
B) Hardware requirements object detection are:
Raspberry Pi A) Capture Video: The camera which is connected to
Servo motors Raspberry PI USB captures the video which will be
Webcam converted to frames.
Arduino board B) Colour Conversion: The captured frame is RGB, to
identify the object the RGB image is converted into
Acrylic sheet DMI cable
HSV colour space. H stands for Hue, S stands for
Monitor
Saturation and V stands for Value.
C) Software requirements
Ubuntu 12.04
Python
Open CV Video capture
Geany
Xming
Putty RGB to HSV

IV. BLOCK DIAGRAM


The block diagram of complete object detection and Thresholdin
tracking is shown in Figure 1: g

Find contours
Image/vide Image Microcont
o capturing Processing roller
(Camera) (In Raspberry Pi (Arduino)
using Open CV)
If If
num<=300 num>=40
Object tracking 0
through the servo
camera Motor

Num=pos Num=po
Figure 1: Block Diagram s
The project mainly focuses on the basis to implement
the object detection and tracking based on its colour, n n
Is Is
which is a visual based project i,e the input to the
pos<num+ pos>=num
project will be the video/image data which is 20 -20
continuously captured with the help of a webcam which
is interfaced to the Raspberry Pi. It will detect the y
object and it tracks that object by moving the camera in y
the direction of the detected object. Move servo
Move servo
First of all the Linux os is installed into the Raspberry
Pi board via Micro SD card and appropriate code is End
written in Python language for the object detection Pos-=1
using the Open CV libraries and is dumped in the Pos+=1
board. The visual data captured by the webcam is
processed in the Raspberry Pi and the object is detected Figure 2: Flow Chart
based on the colour and once if the object is detected,
the servo motor is rotated in such a way that wherever C) Thresholding: After colour conversion, the image is
the object moves, the camera will be pointing to that converted into binary image by selecting a proper
object. We can control the angle of servo rotations by threshold value.

www.gjaet.com Page | 114


Global Journal of Advanced Engineering Technologies, Special Issue (CTCNSF-2014)
ISSN (Online): 2277-6370 & ISSN (Print): 2394-0921

D) Find Contours: Contours are similar to connected VII. CONCLUSION


component in MATLAB which is used to find the The objective is to build a model that can detect the
object. Contours give good results with black object of specified colour and that works on the basis of
background and white object. If the contours are <= visual data captured from a typical webcam which has a
300, than servo is tilted to right otherwise the servo is fair clarity. The algorithm is tested in the laboratory live
rotated to left. and the success rate is 100%. The algorithm works well
under all conditions and the time taken to detect and
VI. RESULTS track the object is <10ms. The future scope of this work
Below figure shows the snapshots of the Object is to develop a robotic arm which detects and tracks the
detection and tracked developed and tested in the real object based on colour and shape
environment.
REFERENCES
[1]. http://www.raspberrypi.org/quick-start-guide
[2]. http://docs.opencv.org/
[3]. http://www.python.org/
[4]. http://wiki. geany.org/ howtos / check_ python_
code
[5]. http://en.wikipedia.org/wiki/PuTTY
[6]. http://en.wikipedia.org/wiki/Xming
[7]. http://www. raspberrypi. org/ downloads
[8]. http://learn.adafruit.com/adafruits-raspberry-pi-
lesson-3-network-setup/setting-up-wifi-with-
occidentalis
Figure 3: Input images [9]. http://www.arduino.cc/
[10].http://www.raspberrypi.org/wpcontent/uploads/20
12/10/Raspberry-Pi-R2.0-Schematics-Issue2.2_027.pdf

AUTHORS PROFILE

Ms.Vijayalaxmi, received her B.E (E&CE) degree from


GNDEC, Visveswaraiah Technological University,
Belgaum, Karnataka, India in 2003. M.Tech (DE&CS)
from JNT University, Hyderabad, Andhra Pradesh,
India in 2008. She is pursuing her Doctorate from
Gitam Institute of Technology, Gitam University,
Vishakapatnam, Andhra Pradesh, India. Her area of
Figure 4: Processed image research is Digital Image Processing. She has published
2 Journal papers, 3 International Conference papers and
2 National Conference papers. She received Best Paper
award in August 2013 in IEEE International conference
organized by Saveetha University, Chennai, India. She
is the Life Member of ISTE and Member of IEEE.

K. Anjali Pursuing her 4th Year B.Tech (E&CE) degree


from JNTU, Hyderabad. She did her internship from
RCI. She is an active Member of IEEE and chair of
IEEE-WIE-AG of VITS student branch.

Srujana & Rohith Kumar Pursuing their 3rd Year


B.Tech (E&CE) degree from JNTU, Hyderabad. All are
Member of IEEE and participate actively in all
Technical and Non-technical events

Figure 5: Practical Model

www.gjaet.com Page | 115

Вам также может понравиться