Researchers in Singapore are building a smartphone app that uses phone’s camera to give air pollution measurements.

Users can take a photo with the app, known as AirTick, which uses an algorithm to map the haziness in the photo to pollution metrics, like the Pollutants Standard Index.

Air pollution sensors can be expensive, but “any camera-enabled mobile device installed with AirTick can become an air-quality sensor”, said its developer, Pan Zheng Xiang, a graduate student at the Nanyang Technological University.

The app learn to do this through artificial intelligence (AI) – meaning that the more it is used, the better it gets. It compares photos with official air-quality data to learn how to read air pollution from the photos. With enough people using the app, it can learn to measure air pollution from photos in other cities as well.

The AI behind AirTick could be used to convert CCTV cameras in cities into a network of air-monitoring sensors.

The reverse also applies – it could be used to track the amount of sunlight in a city, helping urban planners decide the best places to install solar panels.