cargocount

Identifying Ships at Sea Using R

Abstract

As part of coursework at Clark University, I developed an R package which uses Sentinal-2 satellite imagery to identify large vessels in an open water port environment. The program separates land from deep water, counts large vessels in open water and returns an image mapping the location of each vessel and a table of latitude and longitude coordinates for each vessel

Introduction

Late in March 2021, a loaded cargo ship blocked the Suez Canal causing major disruptions in global shipping and capturing the world's attention.

Images like this illustrate the volume of shipping re-routed around the Horn of Africa during the Suez Canal blockage by visualizing Automatic Identification System (AIS) signals.

AIS uses radio signals to alert ships of each other's presence and avoid collisions. The radio signals can also be tracked by satellite to produce maps like the one above. AIS is mandated for vessels over 300 GT outside port (GT stands for gross tonnage, a measure of a ship's size. The MV Ever Given, which blocked the Suez Canal, has a gross tonnage of 220,940 - more than 700x the AIS mandated threshold).

Why identify ships at sea using satellite imagery when AIS is already doing a great job? AIS is mandated, but the radio signal can be turned off - effectively enabling a ship to disappear. And recently, the  New York Times reported  that vessels involved in smuggling sometimes broadcast an assumed AIS signal to hide their identity. A secondary tracking system could pinpoint vessels whose AIS signal abruptly disappears or changes identity - and assist in finding smugglers.

The Data

The European Space Agency's Sentinel-2 satellite platform captures spectral images at a spatial resolution of 10 meters and a temporal resolution of 5-10 days. The red, blue, green and near infrared bands were used in this analysis. Sentinel-2 imagery was downloaded from the  Copernicus Open Access Hub .

The Methods

Modified Normalized Difference Water Indices (NDWI) were used to separate land, deep water and ships. The standard index, per S.K. McFeeters, is as follows:

(green - near infrared) / (green + near infrared)

The standard index was used to separate water and land. Vessels were identified using a modified index, substituting the red band in place of the green band. Low pass filters were used to remove noise from both land and water images. A high pass filter was used to consolidate boundaries before identifying vessels. Objects identified in open water were filtered by area to an expected range for commercial cargo shipping vessels to reduce false positives caused by islands. Resulting images were converted from raster to vector for display. All analysis was completed in R.

Results

The first output is a color composite of the area of interest intended to confirm the correct uploading and initial processing of Sentinel-2 imagery.

This output image shows the Great Bitter Lake at the southern terminus of the Suez Canal in early April 2021. Ships are difficult to discern, but can be seen anchored on either side of the shipping channel. The land areas are a mix of irrigated crop land and desert.

The second output is a vector image of land in yellow, water in white and ships in blue. The algorithm correctly identifies 42 ships in open water.

Due to time constraints, testing was limited to two separate images. Algorithm accuracy was ~95% correct.

The final output is a comma-separated file listing latitude and longitude coordinates for each vessel identified. Ideally, these coordinate in conjunction with image capture date and time, could be cross referenced against AIS output.

Discussion

Identifying large vessels programmatically using satellite imagery is not a novel concept. cargocount was undertaken as an exercise in practical application of R and the analysis of freely available satellite imagery. There are several caveats that should be mentioned:

  • The Great Bitter Lake is located in an arid region. Cloud cover common to many tropical regions will complicate image processing.
  • The Great Bitter Lake enjoys relatively uniform water quality. Turbidity associated with river outlets could complicate processing.
  • Sentinel-2 imagery is limited to 20km within coastal regions. Other satellite sources will be required for any large scale analysis of open water.

The Sentinal-1 platform includes sensors employing C-band synthetic aperture radar imaging. Synthetic aperture radar enables the acquisition of imagery regardless of the weather and may address complications caused by cloud cover.

References

S. K. McFEETERS (1996) The use of the Normalized Difference Water Index (NDWI) in the delineation of open water features, International Journal of Remote Sensing, 17:7, 1425-1432, DOI:  10.1080/01431169608948714 

Koettl, Christoph. “How Illicit Oil Is Smuggled Into North Korea With China’s Help.” The New York Times, 24 Mar. 2021. NYTimes.com, https://www.nytimes.com/2021/03/24/world/asia/tankers-north-korea-china.html.

“Ship Detection and Classification from Optical Remote Sensing Images: A Survey.” Chinese Journal of Aeronautics, vol. 34, no. 3, Mar. 2021, pp. 145–63. www.sciencedirect.com, doi:10.1016/j.cja.2020.09.022.

Milios, Aristides, et al. “Automatic Fusion of Satellite Imagery and AIS Data for Vessel Detection.” 2019 22th International Conference on Information Fusion (FUSION), 2019, pp. 1–5.

“Vessel Detection and Classification from Spaceborne Optical Images: A Literature Survey.” Remote Sensing of Environment, vol. 207, Mar. 2018, pp. 1–26. www.sciencedirect.com, doi:10.1016/j.rse.2017.12.033.