Git Product home page Git Product logo

optical-flow-tracking----opencv's Introduction

Optical-Flow-Tracking----Python+OpenCV

This is a small program demonstrating object tracking in a video stream. Lucas Kanade optical flow algorithm is used to find the pixels from one frame to another.

@Usage: Run the program by typing the following command in the command line: $ python tracking6.py

The program will connect to the webcam on the PC and start streaming a video. Keep the object to be tracked in the centre of the video demarcated by the small rectangle. Press the 'a' button on the keyboard to start tracking the object.

To change the webcam to be used, open the tracking6.py python script and change the line cv2.VideoCapture(#no.). Replace #no with the webcam id. The webcam id can be found out by running the following script in the command line -> $ ls /dev/video*

Press the esc key during program runtime to quit the program.

@other important things: The tracker will try to re-initialise tracking once the number of tracked points fall below a threshold value. This threshold value can be set by the user by changing it in line 92. Also the program will keep on pruning out tracked points that lie far away from the centre of the object. The threshold distance between the centroid and a point to be removed is by default 90pixels. But the user can change it by editing line 83.

Note: As I am a first time user of Git and Github this repository will be very barebones. But as I learn more i will keep updating it with screenshots and other things. Also any changes to the algorithm will be updated here.

optical-flow-tracking----opencv's People

Contributors

akshaychawla avatar akshatpandya avatar shubhika03 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.