top of page
Search

OBJECT TRACKER USING OPENCV

  • Writer: Amar Haiqal Che Hussin
    Amar Haiqal Che Hussin
  • Sep 27, 2021
  • 1 min read

Overview


OpenCV or known as Open Source Computer Vision Library and maybe one of the most popular open source computer vision librariies. This library contains computer vision and machine learning algorithm which can be applied for facial and object identification. Despite OpenCV is written natively in C++, it can be used in Python, which what I'm going to do



ree
This video is taken using my Webcam


Execution


The first step in developing the Object Tracker is ofcourse, I need to install the OpenCV library in my IDE before importing it. Then in the IDE, I need to assign camera to the video capture object. In my device, the External Camera is assigned as value 0 while 1 is for the built-in webcam


Next, I need to inititate the tracker type. in OpenCV libraries, there are multiple types of Tracker you can choose from which are CRST and MOSSE. For this project, I go for MOSSE.The code itself includes:

  • Function to track the object when the object is selected

  • Loop and Conditional Statement to draw the box at the object it tracks and display "Object Lost" if it fails to track

  • Exit the program if button 'q' is pressed

All of it in less than 70 lines of code..sort of


Demonstration



 
 
 

Comments


Post: Blog2_Post
  • Facebook
  • LinkedIn

©2021 by Amar Haiqal

bottom of page