Finding hidden cameras with your smartphone’s ToF sensor

We explain what a smartphone’s ToF sensor is and how researchers from Singapore propose using it to find hidden cameras.

How to find a spy camera with your smartphone

Spy cameras in rented apartments or hotel rooms: fact or fiction? Fact, unfortunately. In a quite recent case, a family from New Zealand, having rented an apartment in Ireland, discovered a hidden camera livestreaming from the living room.

To spot a camera with the naked eye often requires X-ray vision, as it will almost certainly be carefully camouflaged. For those of us who aren’t Superman, there are special devices to help detect spy devices by electromagnetic radiation or Wi-Fi signal, but they are not standard travel items. And to get the most out of them you will need special skills or expert assistance.

That said, researchers in Singapore have recently developed a solution for locating a hidden device using the ToF sensor inside a regular smartphone. The new method goes by the name of LAPD (Laser-Assisted Photography Detection).

What is a ToF sensor?

Even if the terms “ToF sensor” and “ToF camera” mean nothing to you, you might already have encountered one in your smartphone. It is used, for example, to unlock the screen by face, to recognize gestures or to create the beloved bokeh effect — an out-of-focus background in photos.

To solve these tasks, the smartphone needs to see a three-dimensional picture in order to know what’s near to the camera and what’s further away. This is handled by ToF (which by the way stands for Time-of-Flight): the sensor emits an infrared beam and measures the time taken for the rays to get reflected back. The longer this takes, the farther the object is from the sensor, of course.

As the researchers found, in addition to their basic duties, ToF modules do a good job of finding spy cameras. This is because the light emitted by the sensor creates a characteristic glare on the lens, by which the offending device can be recognised.

Pimp my sensor

Since smartphone camera apps with ToF were created for very different purposes, the researchers had to develop a separate app and supplement the sensor’s capabilities to better cope with the search for glare from hidden cameras.

First, they added a smart system that informs the user of the optimal range for scanning for objects. If the smartphone is too close to a suspicious object, the glare from it will be very bright and “oversaturate” the sensor. Conversely, if the device is too far away, the glare will be too weak and the detector won’t be able to register it.

Second, the team applied a filter to sift out extraneous signals, the reason being that the detector can more-or-less accurately identify a hidden lens only in a limited field of view: a cone spanning approximately 20° originating from the smartphone’s camera. Anything outside this cone confuses the detector and leads to false positives.

Lastly, the experts applied self-learning programmable filters to further reduce the false-positive rate. The fact is that the resolution of ToF sensors is very low, only 320×240 pixels. For this reason, it is not easy for the detector to determine the exact size, shape and intensity of the glare — and it’s these parameters that distinguish a hidden camera from other, innocuous objects.

Test results

The researchers carried out an experiment to establish how effective the method is in practice. The study involved 379 volunteers, who were asked to find spy cameras in three ways: with the naked eye; with a specialized detector currently on the market; and with LAPD. They were given 30–60 seconds to search — about as much time as the average traveler is ready to spend on this activity.

The first method delivered unimpressive results. Only 46% of participants were able to detect the hidden cameras by eyesight alone. What’s more, there were very many false positives: in 54.9% of cases, the volunteers pointed to incorrect objects or places.

The specialized detector also showed modest results: in two different scanning modes, the spy cameras were found by just 62.3% and 57.7% of participants. The number of false positives was again high: 26.9% and 35.2%, respectively.

The LAPD method proved the most effective. The spy cameras were found in 88.9% of cases. Even when the researchers altered the lighting to make the search more difficult, the detection rate did not drop below 77.8%. The share of false positives was also low, at 16.67%.

Work in progress

Despite the impressive test results, we won’t be seeing an LAPD app on the App Store or Google Play anytime soon. According to the researchers themselves, modern ToF sensors still lack sufficient resolution and accuracy for in-the-field work; besides, not all smartphones have such a module. So, until the design is improved and manufacturers release new cameras, users will have to remain patient and rely on other methods to sniff out hidden cameras.

Tips