/ GPS tracking for mapping crowd movement?

This topic has been archived, and won't accept reply postings.
Dave Kerr - on 14 Feb 2013
Another one for the UKC collective brain which hasn't failed me yet...

I have the germ of an idea and want to check its viability before committing any more time to it.

Would it be possible to use either mobile phone GPS or dedicated trackers to record the movement of people around a building in order to map that movement? I hasten to add that this would be anonymous, consensual and for educational rather than surveillance purposes!

My main questions would be:

Do such devices work indoors? (My assumtion is that it would depend on the individual building).
If it does not work well indoors are there alternative positioning technologies that do?
Would it give sufficient accuracy?
What software could be used to map the movement?
Can such devices collect velocity data as well as position data?

Any comments or suggestions gratefully received.

Dave


mkean - on 14 Feb 2013
In reply to Dave Kerr:
Within a building GPS won't work :-)

You've got lots of other options though:

Wifi, bluetooth or GSM devices can be positioned by signal strength. (From access points/ femtocells) I'd have though this could be pretty accurate.

Some commercial software is already available but I suspect it'll be bloody costly.

If it was opt in whatabout doing it with software on the devices themselves, that would give you access to accelerometer data.
Dave Kerr - on 14 Feb 2013
In reply to mkean:
> (In reply to Dave Kerr)
> Within a building GPS won't work :-)
>

OK, that was the first hurdle. I'm a bit of a luddite in this respect.

Thanks for your other suggestions.
dissonance - on 14 Feb 2013
In reply to Dave Kerr:

> Do such devices work indoors? (My assumtion is that it would depend on the individual building).

As MKean says, GPS is unlikely to work (does depend on the building though) and also probably wont be accurate enough.

> If it does not work well indoors are there alternative positioning technologies that do?

There is the hardware to track phones around a building. Used in some shopping centres, although dont know how accurate it is.
I would be tempted to look at RFID, with several readers you could put something together.

> Would it give sufficient accuracy?

depends how accurate you want it. is it tracking people going in or out of small rooms or tracking them accurately in a large space?

> What software could be used to map the movement?

offhand not sure but visualisation software could be modified to work.

> Can such devices collect velocity data as well as position data?

a phone accelerometer can. external devices could but you would need to do the maths and potentially have a lot of them.
jkarran - on 14 Feb 2013
In reply to mkean:

I don't know how good the acceleration data is in a modern phone but you could potentially do it by dead reckoning over a short time period. It would work best in a known building so constraints and other positioning techniques using WiFi, Bluetooth, GSM data could be applied to correct for sensor/integrator drift. Some of this data is already used to improve the resolution of in-city 'GPS' navigation It's not a simple project!

You can also get land based 'GPS' transmitters to improve the resolution of positioning. Exactly what they're called, what they cost, how seamlessly they integrate with the existing network and what the regulatory constraints are I don't know. For a limited project in the right environment they might be of use indoors.

I suspect you'll find companies like Google and Apple are dedicating a lot of resources to improving in-building tracking/positioning, likewise various military/intelligence organisations. It may be the sort of thing that's commonplace in a few years but I think at present it's still pretty patchy.

jk
andy - on 14 Feb 2013
In reply to Dave Kerr: I've no idea how it works, but retailers have quite sophisticated technology for tracking footfall around their stores - I think they might use ceiling sensors etc.
krikoman - on 14 Feb 2013
In reply to Dave Kerr: How many people and over what sort of area?
Dave Kerr - on 14 Feb 2013
In reply to krikoman:
> (In reply to Dave Kerr) How many people and over what sort of area?

A sample of pupils (perhaps 50) in a large secondary school.

mkean - on 14 Feb 2013
In reply to Dave Kerr:
in a large secondary school.

Can of worms :-)

Tracking people round a school? Give each one an RFID card and stick a reader to each door frame, this method is used in some US schools.

Tracking the movement of people within communal areas (ie movement patterns in coridors) would be much more challenging.

Dave Kerr - on 14 Feb 2013
In reply to mkean:
> (In reply to Dave Kerr)
> in a large secondary school.
>
> Can of worms :-)

Obviously if we ran with it it would be handled ethically and responsibly but at this point it's just a bare idea.
>

> Tracking the movement of people within communal areas (ie movement patterns in coridors) would be much more challenging.

This was what I was thinking about as a mapping/GIS/use of space project in Geography.

From the responses already it's starting to look like the technology for this is not quite there yet.

jkarran - on 14 Feb 2013
In reply to Dave Kerr:

Depends which end of the project you're coming from and how big a project you foresee but this might be of interest http://www.wpnc.net/fileadmin/WPNC06/Proceedings/33_Pedestrian_Dead_Reckoning.pdf

jk
Milesy - on 14 Feb 2013
In reply to Dave Kerr:
> (In reply to krikoman)
> [...]
>
> A sample of pupils (perhaps 50) in a large secondary school.

You not follow the news? :)

http://www.wired.com/threatlevel/2012/09/rfid-chip-student-monitoring/
http://www.wired.com/threatlevel/2012/11/student-suspension
mkean - on 14 Feb 2013
In reply to Dave Kerr:
To map peoples movement in a communal area like a canteen you are going to have a lot of challenges and I suspect you'll be bending your budget right out of shape :-)

1) This has been done in the past by image analysis (comparing fluid dynamics models to crowd behaviour) and I think there may even be some open source packages that can do a lot of the crunching but it won't be easy. You'd set up one or move video cameras and then it is down to number crunching. Your main problems here is that you will probably have privacy issues as you can't really opt out of it easily.

2) A method of granting an opt out would be to use a marker rather than directly analysing the image. Each volunteer gets given a hat with an infra red led on the top and stick a filter on the camera. (You can pick up a fair bit of IR sensitivity by simply removing the filter from a cheap digital camera element. You then apply the same techniques as for the video.

3) You could possibly wangle something with a load of wifi-routers and some custom firmware to track electronic devices to a reasonable degree of accuracy. I suspect this is fairly technically challenging though as you'll be talking about fairly small signal variations within a room. That said there have been several demonstrations of using WIFI signals to enable you to 'see people through walls' so presumably there is a measurable difference?

In reality though I suspect you aren't going to have a lot of luck.
itsThere on 14 Feb 2013
In reply to Dave Kerr: You could set up a set of wireless nodes and each person pings them every so often. This can be changed depending on time of day, you dont need to know every 30s when they are sat in class. This data can be recorded and extrapolated onto a map. Matlab could do this. You could make the trackers out of arduino's and set up your own wifi to do the tracking.

This is quite a big job, how much are you thinking of spending. But it is possible.
Milesy - on 14 Feb 2013
There is software out there to use smart phones. Some big department stores in the USA allow you to download an app which uses your phones WiFi and will show you where you are on a map of the store layout.

http://www.meridianapps.com/howitworks
captain paranoia - on 14 Feb 2013
In reply to Dave Kerr:

As others have said, GPS is unlikely to work very well in a building, especially if it's a modern building with metal structures, roof, etc. Older, low-rise buildings may be okay, since you may still get enough signal strength to track. However, low signal strength will give higher position errors, and is susceptible to multipath reflections which can fool the receiver into generating fixes that are 10s or 100s of metres out.

Using time delay or arrival measurements with a mobile phone network might be a possibility, but I don't think these are intended for real-time tracking; more for 'where is the caller?' enquiries.
Big Z on 14 Feb 2013
In reply to Dave Kerr:

Hi Dave,

I actually work for a company that is the global leader in providing footfall monitoring for retailers around the globe and can maybe shed some light on this.

First of all, let me start by saying that footfall is usually monitored using thermal "cameras" above doorways and not the usual "beam" idea people have.

There are several factors that make indoor monitoring very tough and costly. First of all, tracking mobile signals if very inaccurate. They only ping once every few minutes which means you only get the location of that individual every few minutes, meaning that the person could have traveled a hundred meters but you wouldn't know where they went in that time. As for bluetooth, unless this is actually turned on on the phone then there is no signal to track meaning even less accurate data.

The "cameras" used can be modified/set up to be used indoors but this is very new territory and is very costly at the moment. To give you an idea, to install 1 "camera" is thousands of pounds so to install hundreds in a school/shop is very costly indeed.

The upside is that they are very accurate, usually between 95% - 100% and can provide real time data feeds.

The software used to show the mapping would need to be purchased from the service provider and is again an additional cost.

They cannot track speed that i know of, purely numbers, but then again i am not an engineer so i am not 100% sure on that.

Hope this helps,

Big Z
elsewhere on 14 Feb 2013
mkean - on 14 Feb 2013
In reply to Big Z:
They cannot track speed that i know of, purely numbers, but then again i am not an engineer so i am not 100% sure on that.

Probably isn't a stock feature but it is fairly easy to do from a video (I've seen a couple of homebrewed autonomous paintball turrets that do it). You know where the camera is, you know where the subject is in frame 1, frame 2 etc and you know the frame rate. The rest is just trigonometry. Some nasty bugger proposed this system a few years ago as a method of increasing the speed camera coverage by effectively retrofitting it to any road facing CCTV camera.
itsThere on 14 Feb 2013
In reply to mkean: I made a program last year in matlab that could spot the diff between two frames(raw images), it would be easy to change this to get speed. It wasnt that hard to make.
ads.ukclimbing.com
Dave Kerr - on 14 Feb 2013
In reply to Dave Kerr:

Some really interesting stuff folks, thanks. I'll need to wait until I'm home to peruse it in detail.

It being a school project I was of course looking for a low / zero budget way of doing it. That is looking unrealistic at present but I'll keep hunting for alternatives.

Another option could be to use GPS devices to map movement outwith the building to look at how exterior space is used.
dissonance - on 14 Feb 2013
In reply to mkean:

> Probably isn't a stock feature but it is fairly easy to do from a video (I've seen a couple of homebrewed autonomous paintball turrets that do it). You know where the camera is, you know where the subject is in frame 1, frame 2 etc and you know the frame rate.

the software to track someone in a crowd might be a bit tricky for a casual project though.
mkean - on 14 Feb 2013
In reply to dissonance:
the software to track someone in a crowd might be a bit tricky for a casual project though.

If you were planning on doing this I'd suggest cheating and fixing an IR LED to each participant. So your software just has to pick up points of light. Sticking a bit of black plastic binbag over the lens (or picking up a cheap thermal imaging camera lens of fleabay) should take out a lot of the visible light and make the software side a lot easier.

jkarran - on 14 Feb 2013
In reply to dissonance:

With a class full of kids on a one-off project basis it wouldn't be too hard, you could easily enough have the kids do the person/face recognition, have them digitize the data manually a second or two at a time. It's ugly but it illustrates well what's actually going on and demonstrates the value of learning to write software! 30 organised motivated kids could digitise a lot of data in an hour!

jk
captain paranoia - on 14 Feb 2013
In reply to itsThere:

> I made a program last year in matlab that could spot the diff between two frames(raw images), it would be easy to change this to get speed.

Yes... but...

Not only do you have to do a frame delta, you have to be able to identify subjects in the frame (assuming you want to track individuals), track their movements, and cope with obscuration, and continue the tracking after they re-appear from the obstruction. These tasks can be done, but, unless you've come up with something very new, it can't be done with a simple bit of Matlab code...

If you're just doing a frame delta, you'd need to know things about distance to get speed, which requires perspective analysis, etc... ('Dougal: these cows are very small; those cows are far away...').

We have a development system that allows indoor positioning to 30cm, but it needs a network of basestations, and each user needs a location unit, and it isn't in production...
captain paranoia - on 14 Feb 2013
In reply to jkarran:

> With a class full of kids on a one-off project basis it wouldn't be too hard, you could easily enough have the kids do the person/face recognition, have them digitize the data manually a second or two at a time.

I think we have a wiener! We're all stuck on the technology, forgetting the pool of slave labour that's to hand... Get them to track themselves, or a buddy.

Of course, this still only covers a small space, otherwise you're into needing lots of cameras, and there's the issue of perspective mapping, but that could be cued with a simple, fixed perspective graticule in the image ('minesweepers'); ideally automatically recognised by cursor/touchscreen zones during analysis.
itsThere on 14 Feb 2013
In reply to captain paranoia: Ok i admit its very very hard to do more than one subject. I was just pointing out for a simple system it is easy. I would not even want to try more than one person. As soon as we get into facial recognition tracking, the whole thing becomes too hard anyway.
Orgsm on 14 Feb 2013
In reply to Dave Kerr:

If you have enough access points, you can triangulate positions using wifi signals. It's done n some of the latest satnav functions of supermarket apps.
Jon Read - on 15 Feb 2013
In reply to Dave Kerr:
Dave, email me with the link above; I'm involved in doing exactly this in schools in the US.
wintertree - on 15 Feb 2013
In reply to Dave Kerr:

Having put my thinking hat on, here is how I would do this on the cheap with a bunch of cooperative subjects.

I would install cheap, wide angle cameras (USB or Ethernet) in strategic locations (doors, corners of large rooms etc.) looking vaguely down from above. I would modify these to be near IR imaging by either adding a visible light filter (cheaply available for photographers etc.) or removing the IR filter and adding the visible light filter.

I would then give each subject a cheap hat or headband with a battery and an IR LED on it acting as a beacon. These would give great big bright objects clearly visible on the camera but not visible by eye, which would make tracking them quite simple - you would just see the LEDs as bright objects on a dark background. For example there are free plugins for the free ImageJ program to do this: http://rsbweb.nih.gov/ij/plugins/multitracker.html

To cover a gym hall and a corridor might take 3 cameras at a cost of perhaps 100 each, and another 10 each for the filters. Each headband might cost 5 using a cheap alice band (good luck getting the boys to wear them), a battery holder and a couple of IR LEDs, all glued/cable tied to the alice band.

You would need to have people stand in plain sight of each camera with a movie clap-board and bang them at the same time to establish a common timebase between the videos.

You would need to calibrate each camera by having a person stand in certain locations and flash an IR light to fix positions in the image to positions in the room. With an IR filter the room will be otherwise invisible.

You would need to consider the ethical side, for which a typical school probably doesn't have set procedures. The great thing about working in IR with bright lights is you can adjust the exposure such that you basically don't record anything but the IR lights of participating people.

Don't believe the IR will work? Point a TV remote control at your mobile phone camera or digital camera and press a button!

The Raspberry Pi people are about to launch a camera for the Pi - you could use these running of a 9V PP3 battery and recording to an SD card for data acquisition.

If you wanted to track the identity of individual subjects then you could have their LEDs flash different identity patterns although this obviously complicated things quite a lot. Walk before you can run and all that.

wintertree - on 15 Feb 2013
In reply to mkean:

> If you were planning on doing this I'd suggest cheating and fixing an IR LED to each participant.

Beat me to it. The perils of leaving a half finished reply whilst I go for lunch...
nniff - on 15 Feb 2013
In reply to Dave Kerr:

We looked at this at work for measuring wait times in queues at airports. We looked at a number of things. Bluetooth has too large an emission and accurate location was not possible an dnot everyine has bluetooth switched on. GPS needs co-operative individuals and an excahnge of data but the signal reception is unpredicatble but mostly inadequate. Facial recognition needs cameras, but more importantly it needs camera height which is usually inadequate in most buildings. Best option is RFID, which needs each individual to have one and a variety of monitoring points. Cost about 1p per individual, but you need to get a tag to everyone, which isn't easy either and costs mount up unless you recover and re-use

Our esteemed client went with someone else who promised a working bluetooth option, which didn't work. Didn't solve the main issue of timing movement though each part of the handling process but would give some indication of presence in an enclosed area, eg a shop.

In your environment of co-operative users, RFID would be the way to go, but all it will tell you is which tag, at which location, when.
Jon Read - on 15 Feb 2013
In reply to nniff:

Yes, there's no easy way to do this. Here's a review from the infectious disease perspective (appologies for not being open access).
http://www.ncbi.nlm.nih.gov/pubmed/22687447

These sensors can detect each other, but aren't cheap
http://www.willow.co.uk/html/telosb_mote_platform.html
dissonance - on 15 Feb 2013
In reply to thesaunter:

> Beat me to it. The perils of leaving a half finished reply whilst I go for lunch...

that was a damn long lunch.
Dave Kerr - on 16 Feb 2013
In reply to Dave Kerr:

Cheers for all the input folks. I'm going to shelve the idea for now or change it to an outdoor project so that we can use mobile phone GPS.


This topic has been archived, and won't accept reply postings.