Crowd congestion sensor

I'm a student and im really new to arduino. For my project im required to create a camera (pixy2) that can detect crowd congestion and sends a signal to the people that is within range of the camera. The people will have wristbands that will buzzed upon receiving signal from the camera. As of now im still not sure if this is too ambitious for my level and if its doable. I'm humbly asking for guidance on making this possible thank you and have a nice day.

1 Like

Welcome to the forum

This sounds like an ambitious project for a beginner

What is your experience of hardware and software ?

it's both very ambitious and possibly hard with a simple arduino.

ive only completed simple project using arduino to detect heights and movement using ultrasonic sensor. All the coding was already written and ive only need to tweak a little bit without changing major parts of the software. So when it comes to experience i must say that i've never created anything that isn't already there.

would it be possible for the camera to send a notification to a phone instead? or is it still ambitious?

What the camera sees (image recognition for pattern detection is resource hungry and not straightforward esp. if there is a dense crowd moving) and what a sensor could detect from a RF signal from a wristbands are two very different things. finding the wristbands that are closest to the camera is not trivial

depending on how the camera is placed you could run a face detection algorithm and knowing the geometry of the camera and size of the "rectangles" representing the heads kind of infer if the person is near or far from the camera and try to guess where people really stand (the camera gives you a 2D view of a 3D scene - two heads very close together could but just 2 people aligned in the focal axis of the camera).

for example here the camera sees the same thing and in the first image people are far apart whereas they are very close together in the second image

if the camera is on the ceiling and looking down may be it might be easier to infer the geometry but you still need to detect "people".

that's the first challenge. what you do then with the information is the next thing to worry about :slight_smile:

Well, distinct objects really.

It seems to me the image processing needs to determine spacing between objects which are in fact, people.

sure - and possibly moving in between 2 frames

You could try to detect the wristbands somehow. I don't know if that's cheating. :slight_smile: By the way, that part of the project seems like a problem in itself...

Are you really "required" to do this, or could you choose a simpler project? It seems unsuited for a beginner.

Does Pixy have an infrared mode?

If you mean thermosensitive, no. And you still have to count objects. I like the idea though, it would be helpful in distinguishing humans. A radiator, lightbulb or computer is still going to show up as a heat blob, though.

well im bringing this up to my supervisor tomorrow to discuss more. After some research and looking at other projects as reference I might lose the camera and will opt for just the wristband itself until i get a clearer understanding of how the camera and detection works. We have 1 year to complete this project so for the half month its only extensive research and studies and finding out whats your limit. The next half is spent actually doing the thing.

Something like this?

OPTIONAL:
To reduce the library compiled size and limit its memory usage, you
can specify which shields you want to include in your sketch by
defining CUSTOM_SETTINGS and the shields respective INCLUDE_ define. 

*/

#define CUSTOM_SETTINGS
#define INCLUDE_PROXIMITY_SENSOR_SHIELD
#define INCLUDE_CAMERA_SHIELD
#define INCLUDE_SMS_SHIELD

/* Include 1Sheeld library. */
#include <OneSheeld.h>

void setup()
{
  /* Start communication. */
  OneSheeld.begin();
  /* Call a specific function when the proximity value change. */
  ProximitySensor.setOnValueChange(&OnValueChange);
}

void loop()
{
  /* Do nothing. */
}

void OnValueChange(byte value)
{
  /* Always check if the proximity sensor value doesn't equal to zero cm. */
  if (ProximitySensor.getValue() == 0)
  {
    /* Set the flash of the Camera. */
    Camera.setFlash(ON);
    /* Take a photo. */
    Camera.rearCapture();
    /* Send the SMS. */
    SMS.send("1234567890","Something or Someone passed near the place!");
  }
}

This is a copy paste of the Example--Advanced--Proximity sketch from the 1Sheeld library. You would need the appropriate hardware of course, namely two smartphones, an Uno/Mega and a 1Sheeld.
I have had good results with 1Sheeld, it's to my knowledge the shortest distance to something close to what you've described. By comparison, I've been using Arduino something like eight years now, an uneducated (formally) hobbyist with a larger budget than many students would have access to and what you've described sounds, well challenging. Prototyping costs money, mistakes cost money. Also, I have no idea how savvy you are in tinkering and problem solving obviously though, so what's challenging for me may come easier to you. All this to say that if I were you, new to Arduino and needed to get something up and running relatively quickly, 1Sheeld may be a solution for you. No, I don't work for them, I'm just a satisfied customer.

Oh, might be worth adding: my 1Sheeld runs nicely over an older phone, namely Samsung Galaxy S6 if you have something of that generation lying around

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.