Propeller People Counter Idea
SRLM
Posts: 5,045
Hi. I am volunteering at an organization that is soon to host a large event. For this event, the fire marshal requires that a guest count of all admitted guests is kept in order to facilitate the safe evacuation of everybody if necessary. The main host man of this event mentioned to us volunteers that he had considered an electronic system, but found it too expensive. Instead, there will be about 20 people at any one time counting people with a hand clicker. I thought that by using·a Propeller this could be done both electronically and cheap. Here are the requirements:
There is estimated to be about 400,000 people attending the festival.
The system needs to monitor people going in and out at two gates, and exclusively out at two more
The system needs to be cheap
Other than that, the design criteria is fairly wide open. Any suggestion about how to go through with this? At this point, it is just a thought exercise, but if done soon enough I can probably get them on board for the electronic solution...
Post Edited (SRLM) : 8/2/2008 9:12:28 PM GMT
There is estimated to be about 400,000 people attending the festival.
The system needs to monitor people going in and out at two gates, and exclusively out at two more
The system needs to be cheap
Other than that, the design criteria is fairly wide open. Any suggestion about how to go through with this? At this point, it is just a thought exercise, but if done soon enough I can probably get them on board for the electronic solution...
Post Edited (SRLM) : 8/2/2008 9:12:28 PM GMT
Comments
www.irisys.co.uk
It uses their own 16x16 IR sensor array with a DSP running the image processing software which is based on a Kalman filter.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 8/2/2008 8:56:23 PM GMT
If the event is soon I don't see how you're going to develop a comprehensive and proven body counting system from scratch. Simple things like break-beam detectors won't work unless you can stream people one at a time, and even then aren't perfect. Unless you've done extensive testing you ( and more particularly, organisers and event licence holders ) are putting trust in something which might not be reliable or could fail in some spectacular way.
If you can stream people individually you could perhaps install turnstiles with counters. A lot may depend on what entry and exit rates you need to support, restricting flow can create more problems than it solves. If guests arrive over a two hour period spread across two gates you'll be counting in around 30 per second per gate. Even spread uniformly over two days that's one every second.
I've never dealt with any festivals of this scale so it's outside my experience.
Note that the event is over five days for ten hours per day, so thats 4,000 people per gate per hour, or roughly 1 person per second per gate.
The best sensor that I come up with so far (besides a single funnel with a turnstile) is a series of plates accrosss the walking width, each plate would have a dimension of about 4" x 2', and to deal with the high volume there would have to be turnstile towers without the actual turnstiles. Each plate is a switch. The propeller could then read the order of the plates being pushed, and infer a person from the "footprint". This beats infrared beams since people can walk close together but still be distinguished. This is because one person's footprint will never be exacltly the same as anothers at any one moment of time due to the physics of the thing.
Although a footprint reader would be tough to build, I think that it would do the job. Comments?
Many cities use them with train tickets to count one person per ticket getting on the train
and also count them again when they arrive at a destination station and exit the transit system.
The turnstile can easily have an event counter which often looks like a vehicle odometer,
and can be triggered most simply by:
-a microswitch pushed by bumps on the turnstile rotor for electromechanical event counter or LCD "totalizer"
-a mechanical lever on mechanical counter pushed by bumps on the turnstile rotor. This option requires no electricity.
I'm not convinced about the foot-step reader because I'm not sure how that would perform in practice, especially if there is bunching of people. You're back to similar problems as IR beams and if people are bunching, they walk slower, take smaller steps and you could register multiple steps as unique individuals. It would be interesting to try it though.
While there was some doubt about IR sensing being usable, what about overhead CCTV and motion tracking - genuine head count I don't know what the state of play is there and it's probably more a PC rather than Propeller proposition.
However, I really like your footprint idea. You could possibly do this with a single plate with a sensor mounted underneath. Just position it and peripheral "obstacles" in a way that a single foot, and no more, would hit it each time a person enters/exits.
I'm sure you could employ a prop to carry out the same principal, and will give you both in and out sensing.
Of course it is limited, we use it in in doorways where you are not likely to get two people side by side but it works well and stops 'tailgating'
Regards,
Coley
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite
40,000 persons arrive in one hour. 2 persons per second per frame. You need six frames (he he, one frame per cog). However, frames like turnstiles are often not allowed as they hamper egress during fire/emergency. Make the frames easily removable.
Test well and demonstrate to the Fire Marshall getting him/her to sign off (yeah-right). Buy lots of insurance and don't let any lawyers in.
Good Luck, Dave
When we aren't impeded our strides and weights distinguish us to a great extent, from which our direction and head counts could be derived. When we are impeded our weight and position would distinguish us.
You will have to get some agreement on how much error is acceptable...
There is something almost mystical about using gobs of sensors... people will love it.
As for people dirrection, it would be okay to split in from out in a keep to the right rule. So any counter would simply have to count, not distinguish dirrection.
As for infrared, it might work if I single out people (turnstileless passages). I had a look at the Parallax sensor, and on the external site that they give a link to the tester mentioned that it took several seconds to transition to low after motion has ceased. This obviously won't work for the high capacity that is needed. However, at http://www.futurlec.com/PIR_Sensors.shtml they offer just the sensor bits. There modules also have a delay, so I'm betting that this is put in by the software that comes in a complete setup. So if I were to get just the module to use with the propeller, then I should be safe in that regard. It looks like I would have to put in a digital converter.
Oh, and thanks for considering the fire issues. I for the physical plant, I was thinking of 3 foot tall dividers that are about 2 feet long and 6 inches wide. Whatever electroncs that are used would be put facing sideways. I'll check to see if this would be an issue.
That's basically how the Irisys people counter works. The software identifies people and then tracks them through consecutive frames. It uses a 500 MIPS Blackfin DSP, but the original system I worked on managed very well with a 33 MIPS DSP. Software development took several man years of work, just porting it to the DSP took me six months.
The system is far cheaper than a video system, of course, and isn't dependent on lighting conditions. It's widely used in supermarkets and shopping malls, worldwide. It would be worth asking Irisys about performance in high ambient temperatures.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 8/4/2008 6:22:54 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Funny how the thread came back to the Irisys technique as the only reliable system. I don't think that I have several man years of work to spare, though.
Well, I went to radio shack and got the Parallax PIR sensor, just to test it and make sure that it really won't work and see if I can modify it. Since I live in the area and temperatures are expected to reach about 100 today, I think I'll test it outside and check the feasability of any PIR sensor to work in the heat.
If the PIR doesn't work, then it might be possible to use a certain arrangement of modulated infrareds to do the trick. The problem with the infrared beam seems to be unreliability, so to help overcome this each passage way would get five beams in the following pattern:
|*|
The first and last beams tell the propeller that the person is in the area, and the middle three confirm that it is just one person. So if people are bunched up close together, the vertical beams tell which section a person is in, and the slanted beams count the actual people, and, due to their direction, are more resistant to counting handbags and backpacks.
1.People are gently led like sheep into many queues with railings and suggested to move fast and not bunch up.
2.Continuously "SCAN" across all the queues the way a fax machine or barcode reader does from above.
3.Convert the resulting "fax" stream into a scrolling image with people as black blobs on a white background.
This is very simple if the scan line is much brighter than people when there are no people crossing it.
4.Automatically count the black blobs. Very easy. Search the top of the "fax screen buffer" for black pixels, find one,
count it, fill the whole blob it's in with white pixels immediately and repeat.
Are suggesting to use a camera? I think somewhere else on the forum is a thread about using a B&W camera. That could work. Although, perhaps a cheaper and easier solution would be to use the Parallax "TSL230R Light to Frequency Converter". Then I could paint the opposite side with some garish color, like bright orange. Any method that is used would probably be easiest if it was used on each line.
The simplest scanning parts would be a laser pointer, a spinning mirror, and a phototransistor with a red filter.
(A barcode reader can do it!) Maybe it's just too simple for you to believe it can work.
You just need to scan just one shiny line sideways across all the queues
to get image data that would look like a multi-lane highway full of people if it came out of a fax machine.
But it IS important that the people actually walk through and not stand still in the scan beam.
The Prop will actually be an ideal platform for this type of image processing... and depending upon the time constraints is fully scalable. Probably not a good choice right now for this problem... but give it a year or two.
For normal control apps, there is a lot of competition on the imaging front, with bookoo specialized products, but there is plenty of room on the fringes and on the frontier.
Rich
except that my counting algorithm I described above will keep erasing the stripe and making a new one,
so the person who stands in the beam for too long will be counted over and over again.
Edit: (So your counting method is simpler and better than mine)
Post Edited (VIRAND) : 8/5/2008 7:51:32 AM GMT
Rgds, David
and have been for a long time. If it was even imagined to be unsafe under the most
conservative specifications then legal action would have been taken and/or there would
be shielding around the scanning zone with laser warning signs all around it.
Imagine trying to burn a flea with an LED and a magnifying glass. Even if you succeed,
LED's are still not considered dangerous, and they are much brighter than the lasers that would be used.
It is not necessary to use a laser. It is just the easiest way AFAIK. You could instead use an LED or bulb with lenses that
make a narrow (1 cm) beam. You could also scan in a reversed way with fluorescent or neon light under the scan line
and where there are no people standing that light gets reflected by the spinning mirror into the phototransistor.
Post Edited (VIRAND) : 8/5/2008 5:41:02 PM GMT
http://en.wikipedia.org/wiki/Laser_safety
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You might be able to kludge something that works, but it'll have to stand up for 400,000-plus·presses.
I really like the footfall approach, because it is a little more challenging but it is also much more interesting...and it is completely unobtrusive. I hate standing in lines and there is going to be a line at the barcode reader. What is to stop people from just leaving? .
If you come up with a footfall solution that works well, you will really have something of value. If you come up with a barcode reader, what do you have?... It's a barcode reader.