ON 6 September, at least 61 migrants seeking refuge in Europe drowned in the Aegean Sea off the coast of Turkey when their boat hit rocks. A day later another migrant boat sank off Lampedusa, Italy - and dozens are feared dead. A CCTV system for the ocean could help coastguards detect these overcrowded boats sooner, and perhaps save lives.

Buoys fitted with cameras have long been thought to be the best means to watch the seas. They would photograph vessels as they passed along the horizon, sending images to coastguards via satellite. Until now, though, this idea has been blocked by the inability of buoy-mounted cameras to capture clear, stable pictures in the ocean's swell.

Chad Lembke and colleagues at the University of South Florida in St Petersburg have designed an algorithm that enables a camera to detect the true horizon - rather than the edge of a nearby wave - even as it is tossed about in the open ocean. The algorithm identifies candidate edges that might be the horizon, and homes in on the correct one using the colour change between sea and sky. The camera then automatically takes a picture or video of any objects whose outline rises above the horizon. The software ignores everything else, which reduces the computational power needed and so also the running power. This makes it useful for long-term use at sea, says Lembke. The power would come from solar, wind or wave action, he says.

In more than 500 tests, the prototype correctly detected and tracked vessels up to 300 metres away 88 per cent of the time ( Ocean Engineering, By refining the algorithm's parameters, Lembke's team hopes to reach 98 per cent. And a better camera should be able to pick out ships up to a kilometre away, Lembke says. As well as detecting boats carrying migrants, the system could issue wireless alerts warning of the possible presence of pirates or drug smugglers.

The idea has promise, says John Wills, technical director of the Institute of Marine Engineering, Science and Technology in London. "This proposal might help support the vital role of identification of potentially hostile craft at sea, as long as some simple practical issues, such as keeping the lens clean of saltwater spray, do not inhibit its operation."

Issue 2882 of New Scientist magazine