0% found this document useful (0 votes)
150 views

113 115 Object Detection and Tracking Using Image Processing

This document describes a project to detect and track objects using a Raspberry Pi single-board computer and image processing techniques. A webcam is used to capture video which is processed on the Raspberry Pi using OpenCV to identify objects based on color. When an object is detected, a servo motor connected to an Arduino microcontroller orients the camera to track the object's movement. The system was able to detect and track objects in real-time with less than 10ms latency.

Uploaded by

Rezaa Nishikawa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views

113 115 Object Detection and Tracking Using Image Processing

This document describes a project to detect and track objects using a Raspberry Pi single-board computer and image processing techniques. A webcam is used to capture video which is processed on the Raspberry Pi using OpenCV to identify objects based on color. When an object is detected, a servo motor connected to an Arduino microcontroller orients the camera to track the object's movement. The system was able to detect and track objects in real-time with less than 10ms latency.

Uploaded by

Rezaa Nishikawa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Global Journal of Advanced Engineering Technologies,

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

Special Issue (CTCNSF-2014)

OBJECT DETECTION AND TRACKING USING


IMAGE PROCESSING
Vijayalaxmi1, K.Anjali2,B.Srujana3, P.Rohith Kumar4
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.
1 Associate

Abstract: The project mainly focuses on the basis to


implement the object detection and tracking based on
its colour, which is a visual based project i.e., the input
to the project will be the video/image data which is
continuously captured with the help of a webcam which
is interfaced to the Raspberry Pi. It will detect the
object and it tracks that object by moving the camera in
the direction of the detected object. The visual data
captured by the webcam is processed in the Raspberry
Pi and the object is detected based on the colour or
shape and if the object is detected, the servo motor is
rotated in such a way that wherever the object moves,
the camera will be pointing to that object. Here, the
servos are controlled by the help of a Microcontroller
board called Arduino board through its PWM pins. We
can control the angle of servo rotations by the arduino
board i.e., by varying the pulse widths.
Keywords: Object, Raspberry PI, Colour.
I. INTRODUCTION
The aim of this project is to present a method for object
detection and tracking based on its colour. By using this
method, one can easily detect and track any object
which may be a ball or book or even an enemy
aircrafts missiles i.e., this method can be used even in
many security applications.
This model gives an overview of Raspberry Pi Arm-11
based processor board. The main features of Raspberry
Pi are Broadcom BCM2835 Arm-11 processor (700
MHz), 512MB RAM, on board USB 2.0 ports.
Providing a wide range of processors based on a
common architecture that delivers high performance
and cost efficiency.[1]
To control the movement of servos, the controller is
used. Since Arduino has more number of PWM pins
and it supports open source hardware, it is preferred to
use. Arduino has a 32-bit Atmel ARM processor.
A) Overview
The objective is to detect an object based on colour and
the make use of open source hardware, hence
Raspberry Pi processor board is the best option for an
individual interested in low cost Arm processor. It has
many inbuilt features and many ports which makes the
used to experience the power of using a processor. The
board comes with USB ports to which Camera,
keyboard and mouse, Wi-Fi dongle can be connected
which gives the feeling of working on a system.
www.gjaet.com

The Arduino board is also a good choice in with respect


to cost, performance and user friendly when it
compared to other microcontrollers. The Arduino
integrated development environment (IDE) is free of
cost and the programming language is very simple and
it comes with so many examples to learn.
The rest of the paper is organized as Section 2 discusses
project description; Section 3 gives the specifications,
Section 4 deals with Block diagram, section 5 discusses
software flow chart and last two sections discusses
results and conclusions.
II. PROJECT DESCRIPTION
The project mainly focuses on the basis to implement
the object detection and tracking based on its colour,
which is a visual based project i.e. the input to the
project will be the video/image data which is
continuously captured with the help of a webcam which
is interfaced to the Raspberry Pi. It will detect the
object and it tracks that object by moving the camera in
the direction of the detected object.
First of all the Linux O.S is installed into the Raspberry
Pi board via Micro SD card and appropriate code is
written in Python language for the object detection
using the Open CV libraries and is dumped in the
board. The visual data captured by the webcam is
processed in the Raspberry Pi and the object is detected
based on the colour and once if the object is detected,
the servo motor is rotated in such a way that wherever
the object moves, the camera will be pointing to that
object. We can control the angle of servo rotations by
the arduino board through its PWM pins i.e., by varying
the pulse widths.
The main Hardware/Software used is
Wheezy Raspbian
Raspberry Pi
Servo motors
Image Processing
Open CV
Python
Arduino
III. SPECIFICATIONS
A) Project specifications
The project is mainly divided into three parts:
Capturing images/video and sending them to
Raspberry Pi.
Page | 113

Global Journal of Advanced Engineering Technologies,


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

Processing the images/video and detecting the


object using Raspberry Pi by writing
appropriate code.
Enabling the servo motors through the
Arduino board according to the processed
image data.
B) Hardware requirements
Raspberry Pi
Servo motors
Webcam
Arduino board
Acrylic sheet DMI cable
Monitor
C) Software requirements
Ubuntu 12.04
Python
Open CV
Geany
Xming
Putty

Special Issue (CTCNSF-2014)


the arduino board through its PWM pins i.e., By
varying the pulse widths.
V. SOFTWARE FLOW CHART
The software flow chart for object detection and
tracking is shown in Figure 2. The steps involved in
object detection are:
A) Capture Video: The camera which is connected to
Raspberry PI USB captures the video which will be
converted to frames.
B) Colour Conversion: The captured frame is RGB, to
identify the object the RGB image is converted into
HSV colour space. H stands for Hue, S stands for
Saturation and V stands for Value.

Video capture
RGB to HSV

IV. BLOCK DIAGRAM


The block diagram of complete object detection and
tracking is shown in Figure 1:
Image/vide
o capturing
(Camera)

Image
Processing
(In Raspberry Pi
using Open CV)

Object tracking
through the
camera

Find contours

Microcont
roller
(Arduino)
If
num<=300

If
num>=40
0

Num=pos

Num=po
s

servo
Motor

Figure 1: Block Diagram


The project mainly focuses on the basis to implement
the object detection and tracking based on its colour,
which is a visual based project i,e the input to the
project will be the video/image data which is
continuously captured with the help of a webcam which
is interfaced to the Raspberry Pi. It will detect the
object and it tracks that object by moving the camera in
the direction of the detected object.
First of all the Linux os is installed into the Raspberry
Pi board via Micro SD card and appropriate code is
written in Python language for the object detection
using the Open CV libraries and is dumped in the
board. The visual data captured by the webcam is
processed in the Raspberry Pi and the object is detected
based on the colour and once if the object is detected,
the servo motor is rotated in such a way that wherever
the object moves, the camera will be pointing to that
object. We can control the angle of servo rotations by
www.gjaet.com

Thresholdin
g

Is
pos<num+
20

Is
pos>=num
-20

y
Move servo

Move servo
End
Pos+=1

Pos-=1

Figure 2: Flow Chart


C) Thresholding: After colour conversion, the image is
converted into binary image by selecting a proper
threshold value.
Page | 114

Global Journal of Advanced Engineering Technologies,


ISSN (Online): 2277-6370 & ISSN (Print): 2394-0921
D) Find Contours: Contours are similar to connected
component in MATLAB which is used to find the
object. Contours give good results with black
background and white object. If the contours are <=
300, than servo is tilted to right otherwise the servo is
rotated to left.
VI. RESULTS
Below figure shows the snapshots of the Object
detection and tracked developed and tested in the real
environment.

Figure 3: Input images

Special Issue (CTCNSF-2014)


VII. CONCLUSION
The objective is to build a model that can detect the
object of specified colour and that works on the basis of
visual data captured from a typical webcam which has a
fair clarity. The algorithm is tested in the laboratory live
and the success rate is 100%. The algorithm works well
under all conditions and the time taken to detect and
track the object is <10ms. The future scope of this work
is to develop a robotic arm which detects and tracks the
object based on colour and shape
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-pilesson-3-network-setup/setting-up-wifi-withoccidentalis
[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

Figure 4: Processed image

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
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

You might also like