This is my master course, IOT mini project. Implemented a simple counting system with using python and opencv3. System implemented with Raspberry Pi 3.
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Counting With Python & OpenCV3
1. Kami Memimpin We Lead
EES510 IOT
O.S.V Counting Management System
Ooi Yu Wei
Soon Bin Yun
Vincent Kok Chin Keong
2. Kami Memimpin We Lead
Objectives
• To create a real-time count management
system that can be deployed in various fields
(eg: counting of human in shopping mall,
vehicle on busy roads, products in production
line)
• To publish the real-time data to MQTT broker
and subscriber via MQTT protocol and display
on dashboard
3. Kami Memimpin We Lead
Problem Statement
• Existing traffic monitoring is done by manual
interaction.
• No real-time traffic condition info publish to
commuter (i.e how heavy is the traffic) at
hotspot/cities traffic
• No existing framework (Open Standard) to
analyse the traffic situation 24/7
4. Kami Memimpin We Lead
Our Proposal
OpenCV
camera image
processing
Publisher
Main Centre
(Broker &
Database) Subscribers
Dashboard
for displaySmartphones /
Tablets
RPI
5. Kami Memimpin We Lead
Publisher
• Make use of the 5MP Raspberry Pi Camera module
• OpenCV Algorithm to detect movement of cars and
calculate the centroid
• Counter increments by 1 when cars ‘cross’ the counting
line
• Counter value is PUBLISH to the broker as topic
people/count
• Current date & time is also PUBLISH as topic date/now
6. Kami Memimpin We Lead
OpenCV Implementation
Count the
number
of cars
Centroid
Draw contour
Around moving
object
Counting Line
Current
date & time
Buzzer to notify ‘object
crossing’
the counting line
7. Kami Memimpin We Lead
Hardware
Linux Kernel
Libraries
Application Framework
Application CV App
OpenCV
8. Kami Memimpin We Lead
MQTT Python Implementation
import paho.mqtt.client as mqtt Import the MQTT Python library
Setup the broker and topic to publish
with the data
9. Kami Memimpin We Lead
Main Centre
Topic
people/count
Topic
date/now
Incoming
Real Time Data Broker Database
10. Kami Memimpin We Lead
Subscribers
• Can be any devices that is connected, for example,
smartphones/tablets/laptops
• Subscribed to topic people/counter and date/now
• Can use Android apps to subscribe to the topics – MQTT
Dashboard & MQTT Dash Broker Address
11. Kami Memimpin We Lead
Subscribers (cont…)
• A RPi 3 B is used to subscribe the MQTT data and create
a display dashboard using node-red installed on the
board.
Database Flow
UI Dashboard
Flow