Git Product home page Git Product logo

pedestraintracking's Introduction

✨✨PedestrainTracking ✨✨

This is a C++ reimplementation and refinement of blacksteed232's PedestrianCounter with tracking in mind.

Requirements

  • Opencv

Improvements

  • Instead of counting how many people walking across a straight line, here we can specify arbitrary closed polygon region and count the number of people entering or exiting from it.

  • We eliminate the constraint that a person can only come inside or go outside of scene from either the top or the bottom edges, and allow entering and exiting from any location on the boudary.

  • When perfoming cv::Camshift, we provide two options, namely tracking by grey-scale value or tracking by hue value. It turns out that tracking by hue value is more stable than the other approach.

  • New data members momentOnTrack, which is the miliseconds offset from the beginning of the input video and records the exact moment a person appears on track, and trackings, which is of type std::vector<cv::Point2i>> and records trojectories of each individual, are added to class People. Right before deleting each People object, you can store their tracking info into whichever database you prefer.

  • We use double-linked list data structure to dynamically organize the list of People objects. Unlike removing objects directly in the middle of a Python list in PedestrianCounter, our approach is undoubtly more efficient.

Examples

We correctly identify the trojectories of 3 out of 4 persons ever across our pre-defined region.

Console Output

screenshot from 2018-01-25 19-01-13

As you can see, we identify 10 persons in total. The number on the right of each line is the bounding box area whenever a person leaves the scene.

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.