SlideShare a Scribd company logo
2
Most read
3
Most read
6
Most read
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Object Tracking Using Python
In this project using python and OPENCV module we are detecting objects
from videos and webcam. This application consists of two modules such as
‘Browse System Videos’ and ‘Start Webcam Video Tracking’.
Browse System Videos: Using this module application allow user to upload any
video from his system and application will connect to that video and start
playing it, while playing if application detect any object then it will mark that
object with bounding boxes, while playing video if user wants to stop tracking
then he need to press ‘q’ key from keyboard to stop video playing.
Start Webcam Video Tracking: Using this module application connect itself
with inbuilt system webcam and start video streaming, while streaming if
application detect any object then it will surround that object with bounding
boxes, while playing press ‘q’ to stop web cam streaming.
To implement this project we are using object tracking algorithms from
OPENCV python API.
What is Object Tracking?
Simply put, locating an object in successive frames of a video is called tracking.
The definition sounds straight forward but in computer vision and machine
learning, tracking is a very broad term that encompasses conceptually similar
but technically different ideas. Forexample, all the following different but
related ideas are generally studied under Object Tracking.
Opencv will use following algorithms to track objectin videos
Dense Optical flow: These algorithms help estimate the motion vector of every
pixel in a video frame.
Sparseoptical flow: These algorithms, like the Kanade-Lucas-Tomashi (KLT)
feature tracker, track the location of a few feature points in an image.
Kalman Filtering: A very popular signal processing algorithm used to predict
the location of a moving object based on prior motion information. One of the
early applications of this algorithm was missile guidance! Also as mentioned
here, “the on-board computer that guided the descent of the Apollo 11 lunar
module to the moon had a Kalman filter”.
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Meanshift and Camshift: These are algorithms for locating the maxima of a
density function. They are also used for tracking.
Single object trackers: In this class of trackers, the first frame is marked using a
rectangle to indicate the location of the object we want to track. The object is
then tracked in subsequentframes using the tracking algorithm. In most real life
applications, these trackers are used in conjunction with an object detector.
Multiple object track finding algorithms: In cases when we have a fast object
detector, it makes sense to detect multiple objects in each frame and then run a
track finding algorithm that identifies which rectangle in one frame corresponds
to a rectangle in the next frame.
Tracking vs Detection
If you have ever played with OpenCV face detection, you know that it works in
real time and you can easily detect the face in every frame. So, why do you need
tracking in the first place? Let’s explore the different reasons you may want to
track objects in a video and not just do repeated detections.
Tracking is faster than Detection: Usually tracking algorithms are faster than
detection algorithms. The reason is simple. When you are tracking an object that
was detected in the previous frame, you know a lot about the appearance of the
object. You also know the location in the previous frame and the direction and
speed of its motion. So in the next frame, you can use all this information to
predict the location of the object in the next frame and do a small search around
the expected location of the object to accurately locate the object. A good
tracking algorithm will use all information it has about the object up to that
point while a detection algorithm always starts from scratch. Therefore, while
designing an efficient system usually an object detection is run on every nth
frame while the tracking algorithm is employed in the n-1 frames in between.
Why don’t we simply detect the object in the first frame and track
subsequently? It is true that tracking benefits from the extra information it has,
but you can also lose track of an object when they go behind an obstacle for an
extended period of time or if they move so fast that the tracking algorithm
cannot catch up. It is also common for tracking algorithms to accumulate errors
and the bounding box tracking the object slowly drifts away from the object it is
tracking. To fix these problems with tracking algorithms, a detection algorithm
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
is run every so often. Detection algorithms are trained on a large number of
examples of the object. They, therefore, have more knowledge about the general
class of the object. On the other hand, tracking algorithms know more about the
specific instance of the class they are tracking.
Tracking can help when detection fails: If you are running a face detector on a
video and the person’s face get’s occluded by an object, the face detector will
most likely fail. A good tracking algorithm, on the other hand, will handle some
level of occlusion.
Screen shots
Double click on ‘run.bat’ file to get below screen
Now click on ‘Browse System Videos’ button to upload videos from system
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen I am uploading one video, after upload will get below screen
In above video we can see application start tracking objects from video and
mark them with bounding boxes. Similarly we can upload any video and track
objects from video
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen now click on another button called ‘Start Webcam Video
Tracking’ to connect application to web cam and start streaming. After
connecting to webcam will get below screen
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen we can see objects is getting tracked from webcam also. In
above screen it track computer mouse from web cam video

More Related Content

PPTX
Real-World Case Study: For Connecting CompactRIO's to Microsoft Azure IoT
PPTX
1 location tracking of android device based on sms
PPTX
An Intelligence Security System for Women
PPTX
Android Application on Location sharing and message sender
PDF
Datavideo SE-700 4 input Digital Video Switcher
PPTX
Rise of augmented reality : current and future applications
PPTX
Brain chips ppt
PDF
Breast Cancer Detection using Convolution Neural Network
Real-World Case Study: For Connecting CompactRIO's to Microsoft Azure IoT
1 location tracking of android device based on sms
An Intelligence Security System for Women
Android Application on Location sharing and message sender
Datavideo SE-700 4 input Digital Video Switcher
Rise of augmented reality : current and future applications
Brain chips ppt
Breast Cancer Detection using Convolution Neural Network

What's hot (17)

PPTX
Autodesk maya presentation
PPTX
Sixth Sense (The Future of Technology)
PPTX
Pegasus scandal
PPTX
Metaverse Patents for Innovation Insights
DOCX
Motion capture technology
PDF
Cybersecurity technology adoption survey
PPTX
Sixth sense-final-ppt
DOCX
Virtual Reality
PPTX
What Comes After VPN?
DOCX
Advantages and disadvantages of machine learning language
PPTX
METAVERSE SEMINAR PRESENTATION.pptx
PPTX
palm vein technology
PPTX
Deep learning
PPTX
Deep fake
PPTX
Deep fake
PDF
CUbRIK tutorial at ICWE 2013: part 1 Introduction to Human Computation
Autodesk maya presentation
Sixth Sense (The Future of Technology)
Pegasus scandal
Metaverse Patents for Innovation Insights
Motion capture technology
Cybersecurity technology adoption survey
Sixth sense-final-ppt
Virtual Reality
What Comes After VPN?
Advantages and disadvantages of machine learning language
METAVERSE SEMINAR PRESENTATION.pptx
palm vein technology
Deep learning
Deep fake
Deep fake
CUbRIK tutorial at ICWE 2013: part 1 Introduction to Human Computation
Ad

Similar to Object tracking using python (20)

PPTX
Motion Analysis in Image Processing using ML
PDF
C0365025029
PDF
Visual Object Tracking: review
PDF
Detection and Tracking of Moving Object: A Survey
PDF
Detection and Tracking of Objects: A Detailed Study
PPTX
Object tracking
DOCX
Obj report
PDF
O180305103105
PPTX
Object tracking
PDF
Object tracking final
PDF
Object tracking presentation
PDF
Ijarcet vol-2-issue-4-1298-1303
PDF
Digital Video Information Extraction And Object Tracking Neves Ajr
PDF
Digital Video Information Extraction And Object Tracking Neves Ajr
PDF
A Survey on Approaches for Object Tracking
PDF
Q180305116119
PDF
Overview Of Video Object Tracking System
PDF
Video surveillance Moving object detection& tracking Chapter 1
PDF
Real time object tracking and learning using template matching
PDF
Vehicle Tracking Using Kalman Filter and Features
Motion Analysis in Image Processing using ML
C0365025029
Visual Object Tracking: review
Detection and Tracking of Moving Object: A Survey
Detection and Tracking of Objects: A Detailed Study
Object tracking
Obj report
O180305103105
Object tracking
Object tracking final
Object tracking presentation
Ijarcet vol-2-issue-4-1298-1303
Digital Video Information Extraction And Object Tracking Neves Ajr
Digital Video Information Extraction And Object Tracking Neves Ajr
A Survey on Approaches for Object Tracking
Q180305116119
Overview Of Video Object Tracking System
Video surveillance Moving object detection& tracking Chapter 1
Real time object tracking and learning using template matching
Vehicle Tracking Using Kalman Filter and Features
Ad

More from Venkat Projects (20)

DOCX
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
DOCX
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
DOCX
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
DOCX
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
DOCX
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
DOCX
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
DOCX
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
DOCX
WATERMARKING IMAGES
DOCX
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
DOCX
Application and evaluation of a K-Medoidsbased shape clustering method for an...
DOCX
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
DOCX
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
DOCX
2022 PYTHON MAJOR PROJECTS LIST.docx
DOCX
2022 PYTHON PROJECTS LIST.docx
DOCX
2021 PYTHON PROJECTS LIST.docx
DOCX
2021 python projects list
DOCX
10.sentiment analysis of customer product reviews using machine learni
DOCX
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
DOCX
6.iris recognition using machine learning technique
DOCX
5.local community detection algorithm based on minimal cluster
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
WATERMARKING IMAGES
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
Application and evaluation of a K-Medoidsbased shape clustering method for an...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
2022 PYTHON MAJOR PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx
2021 python projects list
10.sentiment analysis of customer product reviews using machine learni
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
6.iris recognition using machine learning technique
5.local community detection algorithm based on minimal cluster

Recently uploaded (20)

PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
RMMM.pdf make it easy to upload and study
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
Cell Types and Its function , kingdom of life
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Final Presentation General Medicine 03-08-2024.pptx
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Paper A Mock Exam 9_ Attempt review.pdf.
Final Presentation General Medicine 03-08-2024.pptx
A powerpoint presentation on the Revised K-10 Science Shaping Paper
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
A systematic review of self-coping strategies used by university students to ...
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Unit 4 Skeletal System.ppt.pptxopresentatiom
RMMM.pdf make it easy to upload and study
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Cell Types and Its function , kingdom of life
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
What if we spent less time fighting change, and more time building what’s rig...
Final Presentation General Medicine 03-08-2024.pptx

Object tracking using python

  • 1. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Object Tracking Using Python In this project using python and OPENCV module we are detecting objects from videos and webcam. This application consists of two modules such as ‘Browse System Videos’ and ‘Start Webcam Video Tracking’. Browse System Videos: Using this module application allow user to upload any video from his system and application will connect to that video and start playing it, while playing if application detect any object then it will mark that object with bounding boxes, while playing video if user wants to stop tracking then he need to press ‘q’ key from keyboard to stop video playing. Start Webcam Video Tracking: Using this module application connect itself with inbuilt system webcam and start video streaming, while streaming if application detect any object then it will surround that object with bounding boxes, while playing press ‘q’ to stop web cam streaming. To implement this project we are using object tracking algorithms from OPENCV python API. What is Object Tracking? Simply put, locating an object in successive frames of a video is called tracking. The definition sounds straight forward but in computer vision and machine learning, tracking is a very broad term that encompasses conceptually similar but technically different ideas. Forexample, all the following different but related ideas are generally studied under Object Tracking. Opencv will use following algorithms to track objectin videos Dense Optical flow: These algorithms help estimate the motion vector of every pixel in a video frame. Sparseoptical flow: These algorithms, like the Kanade-Lucas-Tomashi (KLT) feature tracker, track the location of a few feature points in an image. Kalman Filtering: A very popular signal processing algorithm used to predict the location of a moving object based on prior motion information. One of the early applications of this algorithm was missile guidance! Also as mentioned here, “the on-board computer that guided the descent of the Apollo 11 lunar module to the moon had a Kalman filter”.
  • 2. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Meanshift and Camshift: These are algorithms for locating the maxima of a density function. They are also used for tracking. Single object trackers: In this class of trackers, the first frame is marked using a rectangle to indicate the location of the object we want to track. The object is then tracked in subsequentframes using the tracking algorithm. In most real life applications, these trackers are used in conjunction with an object detector. Multiple object track finding algorithms: In cases when we have a fast object detector, it makes sense to detect multiple objects in each frame and then run a track finding algorithm that identifies which rectangle in one frame corresponds to a rectangle in the next frame. Tracking vs Detection If you have ever played with OpenCV face detection, you know that it works in real time and you can easily detect the face in every frame. So, why do you need tracking in the first place? Let’s explore the different reasons you may want to track objects in a video and not just do repeated detections. Tracking is faster than Detection: Usually tracking algorithms are faster than detection algorithms. The reason is simple. When you are tracking an object that was detected in the previous frame, you know a lot about the appearance of the object. You also know the location in the previous frame and the direction and speed of its motion. So in the next frame, you can use all this information to predict the location of the object in the next frame and do a small search around the expected location of the object to accurately locate the object. A good tracking algorithm will use all information it has about the object up to that point while a detection algorithm always starts from scratch. Therefore, while designing an efficient system usually an object detection is run on every nth frame while the tracking algorithm is employed in the n-1 frames in between. Why don’t we simply detect the object in the first frame and track subsequently? It is true that tracking benefits from the extra information it has, but you can also lose track of an object when they go behind an obstacle for an extended period of time or if they move so fast that the tracking algorithm cannot catch up. It is also common for tracking algorithms to accumulate errors and the bounding box tracking the object slowly drifts away from the object it is tracking. To fix these problems with tracking algorithms, a detection algorithm
  • 3. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com is run every so often. Detection algorithms are trained on a large number of examples of the object. They, therefore, have more knowledge about the general class of the object. On the other hand, tracking algorithms know more about the specific instance of the class they are tracking. Tracking can help when detection fails: If you are running a face detector on a video and the person’s face get’s occluded by an object, the face detector will most likely fail. A good tracking algorithm, on the other hand, will handle some level of occlusion. Screen shots Double click on ‘run.bat’ file to get below screen Now click on ‘Browse System Videos’ button to upload videos from system
  • 4. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above screen I am uploading one video, after upload will get below screen In above video we can see application start tracking objects from video and mark them with bounding boxes. Similarly we can upload any video and track objects from video
  • 5. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above screen now click on another button called ‘Start Webcam Video Tracking’ to connect application to web cam and start streaming. After connecting to webcam will get below screen
  • 6. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above screen we can see objects is getting tracked from webcam also. In above screen it track computer mouse from web cam video