element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Blog Cloud Based People Counter
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: madhugovindarajan
  • Date Created: 2 Nov 2017 2:30 PM Date Created
  • Views 626 views
  • Likes 0 likes
  • Comments 0 comments
Related
Recommended

Cloud Based People Counter

madhugovindarajan
madhugovindarajan
2 Nov 2017

Have you ever wanted to keep track of how many people pass by a location? Have you ever wanted to see what computer vision can do for you or maybe wanted to get involved with IOT? Well, this may be the project for you!

This project uses a USB webcam and MATLAB to develop a people tracking algorithm that uses the ThingSpeak IOT platform. Here is a quick link to the video for those who are visual learners - https://www.mathworks.com/videos/creating-a-cloud-based-people-counter-using-matlab-121312.html 

Overview:

When a person's face is in front of the webcam, the program does several things:

  • Draws a bounding box around the face
  • Captions the bounding box with the Face ID number
  • Tracks the person's face throughout the video frame with the captioned bounding box
Additionally, for every 5th face detected per session, we take a picture of the user and display it on the screen with a congratulatory message for five seconds.

https://www.hackster.io/DanDoherty/cloud-based-people-counter-880ed8#toc-how-does-it-work-1How Does It Work?

Note: You must be connected to the internet in order for the people counter to transmit/receive data from ThingSpeak.
  • How are the faces tracked?
The people counter uses functions from the Computer Vision System Toolbox to detect and track the human faces. The faces are tracked based off key facial structure points and this method helps the algorithm track faces even if the face rotates in the video. This people counter is able to track multiple faces by using 'MultiObjectTrackerKLT.m' which is based upon the Kanade-Lucas-Tomasi feature tracker.
  • How is the Face ID determined?

The unique face ID is determined by reading the data in the ThingSpeak channel. The latest channel entry contains the ID of the last face that was detected so essentially ThingSpeak serves as the secretary for the people counter. To make sure we don't use invalid data, the program checks to make sure the entry was logged in the current day. If it is not from the current day, the unique face ID will start at 1. Whenever a new face is detected, the algorithm writes new data to the ThingSpeak channel which updates the face ID number.

Documentation and Demonstration

To download the project files, go to the following link: https://www.mathworks.com/matlabcentral/fileexchange/58435-creating-a-cloud-based-people-counter-using-matlab

 

PS - This is a repost from a Hackster post by my colleagues Nick and Dan

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube