Dark Knight sonar vision mobile surveillance system
In The Dark Knight, Batman uses sonar vision to map out inhabitants of a building using mobile phone signals. Now researchers have managed to do this using Wi-Fi Warner Bros. Pictures

Electrical engineers from the University of California Santa Barbara have found a way to use Wi-Fi power measurements to calculate the number of people who are walking around a room, similar to the mobile phone spying technology used by Batman in The Dark Knight film.

Keeping a Wi-Fi network running well depends on the number of people connecting their devices to the Wi-Fi, but also the amount of furniture in the room, and whether there are a lot of people constantly walking through Wi-Fi beams, which causes the signal to drop slightly.

Researchers held an experiment where they put two Wi-Fi nodes at opposite ends of a 70sqm area and then examined how the Wi-Fi signal changed when people walked across the beams.

They realised that the signal dropped and then used more power to steady the signal. From that, they were able to create a mathematical model that is able to estimate how many people are walking around the space, and so far the system has correctly identified up to nine people.

A visualisation of a Wi-Fi network
How good your Wi-Fi network is often depends on how many obstacles Wi-Fi beams need to pass in order to get to your device Wi-Fi Alliance

"This is about counting walking people, which is very challenging," said Dr Yasamin Mostofi, associate professor with the Department of Electrical and Computer Engineering at UC Santa Barbara, who led the study.

"Counting this many people in such a small area with only Wi-Fi power measurements of one link is a hard problem, and the main motivation for this work."

Mostofi's research group focuses on being able to use wireless technologies to sense motion, obstacles and communications in order to build smarter robots. In August 2014, Mostofi and her researchers were able to develop robots with X-ray vision that could see through solid walls.

But being able to count the number of people in a room isn't designed to be a form of mass surveillance, as Bruce Wayne and his trusty advisor Lucius Fox debate, before Wayne uses the technology to save hostages disguised as the Joker's henchman in an incomplete skyscraper.

Firefighters around the world risk their lives by entering burning buildings to search all areas in order to find people who might be trapped, and this can often lead to close shaves or even a loss of life, and there might not even have been anyone to save in some parts of the building.

The researchers envision the technology being used by emergency services to count and automatically report back the number of inhabitants in a residential or office building during a disaster, which could increase efficiency of rescues and keep emergency personnel safe.

The technology could also be used by smart heating thermostats and lighting systems to decide autonomously when to adjust levels of output, which already use Wi-Fi to send data to monitoring apps.

This could save consumers money if the thermostat can detect that everyone has left the house, and thus turn the heating down during winter.

The paper, entitled "Occupancy Estimation Using Only Wi-Fi Power Measurements" is published in the IEEE Journal on Selected Areas in Communications.