Tracking multiple targets from a camera installed on a buoy.
The buoy is deployed near a channel.
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.
Camera that is attached to the untethered buoy will provide images of several possible categories of horizon images.
(a)–(d) Images with horizon clearly discernable.
(e) Camera points to the sky and sky is the only scenery visible in the image.
(f) Image of water surface only.
(g) Objects such as ships when they take a big fraction of the field of view may seriously affect horizon detection.
(h) Blur that comes from water splashes is another factor affecting horizon detection.
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.
Consecutive frames of a video sequence exhibit high magnitude non-linear intra-frame motion in (a)–(c) which is the result of rapid camera motion.
(d) shows registration of (a)–(c) in one coordinate system.
(e) shows the values of one-dimensional normalized cross-correlation scaled in the range [0..1] during registration of frames (a) and (b) along the horizon line.
The peak corresponds to the optimal alignment along the horizon line.
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.
Steps of the segmentation algorithm:
(a) original image; (b) color-gradient filter; (c) thresholding; (d) filtering; (e) output.
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, doi.org/h9g).
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."