Skip to content

Tracking Multiple objects in OpenCV-Python using CSRT trackers.

Notifications You must be signed in to change notification settings

Pranjalmishra30/MultiObjectTracking-openCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Multiple Object tracking in openCV

Prerequisites

  • A lot of modules used in the code are part of openCV's contrib package (link here)
  • Follow the steps for installation here
    • Make sure to first uninstall cv2 pip uninstall cv2
    • Then install contrib package pip install opencv-contrib-python
  • Note: The contrib package has both main & contrib modules

Executing the code

  1. Make sure that you have the video(.mp4) and python file in the same directory.
  2. Run the code with the command python3 object_tracking.py
  3. Then press s to select a ROI (region of image) using your mouse.
  4. Press Space or enter to confirm your selection.
  5. The video will keep on playing and your selected object will be tracked throughout.
  6. Repeat steps 3 and 4 to select & track multiple objects
    Note: You can cancel your selection by pressing c

Demo


Note: You can try the same code with the other video files in the Data folder

Refrences

Image

About

Tracking Multiple objects in OpenCV-Python using CSRT trackers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages