In reply to DaveHK:
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.