Hi guys, I would like to use Zone Minder to create a monitoring system that counts how many people reach an specific point in the camera, this point will be a door, and every time someone pass through this door I want to add to counter.
I've been studing Zone Minder and other open source solutions, and I've been thinking if using Zone Minder blobs and events I can achieve something like that.
Is that possible?
Counting people
Re: Counting people
yes it is possible. There is a user that did a counter for cars going by on a street. You need to create a zone for the door and then retrieve the count from the amount of events that the zone for the door creates.
this is the thread that contains the code for how one solution works.
viewtopic.php?f=36&t=26066
this is the thread that contains the code for how one solution works.
viewtopic.php?f=36&t=26066
-
- Posts: 2
- Joined: Wed Oct 18, 2017 11:12 am
Re: Counting people
Thanks rockedge, that was exactly what I was looking for.
Re: Counting people
I added the corrected line to the script for the count per day :
set $which_monitor to your monitor id.
set $which_monitor to your monitor id.
Code: Select all
<?php
$which_monitor = 2;
$link = mysqli_connect("localhost", "zmuser", "zmpass", "zm");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
if ($result = mysqli_query($link, "SELECT * FROM `Events` WHERE `MonitorId`=$which_monitor AND `StartTime` >= DATE_SUB(CURDATE(), INTERVAL 0 DAY)")) {
echo "Total # of Events :".mysqli_num_rows($result);
/* free result set */
mysqli_free_result($result);
}
?>