Detect and Identify Ships
来源: https://vis-webcontent.s3.amazonaws.com/quickguides/SAR+Essentials/Ship+Detection/index.html#/
Lesson 1 of 1
Detect and Identify Ships
In this quick guide, you will:
- •
Open and display a geocoded Sentinel-1 image. * •
Use the SAR Ship Detection tool to automatically detect ships. * •
Import Automatic Identification System (AIS) data stored in a Microsoft Excel spreadsheet. * •
Create shapefiles of ship locations and tracks. Ships with matching AIS records are further annotated with their names.
Sample Data
The exercises in this quick guide use a Sentinel-1 geocoded image for demonstration. Download the ZIP file below and extract its contents to a directory on your computer.
[SAREssentials_ShipDetection.zip
30.9 MB
DownloadArrow down with horizontal line beneath it](assets/SAREssentials_ShipDetection.zip)
- •
File name: sentinel1_146_20161016_165333021_IW__VV_slc_list_geo.dat. An ENVI header file (.hdr) and ENVI SARScape file (.sml) are also included. * •
Acquisition date: 16 October 2016 * •
Source: European Union, Copernicus Sentinel-1 imagery
Also included is a sample AIS data file from the Danish Maritime Authority for 16 October 2016, downloaded from the AIS Data(opens in a new tab) web site. The file is in a comma-separated value (CSV) format.
Background
Ship detection involves the following steps:
- •
Mask out land areas based on an optional reference shapefile or OpenStreetMap© coastlines. * •
Identify targets with significant backscattering. * •
Add the targets of interest to a shapefile.
The ship detection algorithm is based on a two-parameter Constant False Alarm Rate (CFAR) detector. It is a type of adaptive threshold algorithm that identifies targets with significant backscattering that are stronger than the surrounding background. A guard window around potential targets is employed and subsequently discarded to avoid spurious effects (Crisp, 2004). All windows move one pixel at a time across the SAR image. Pixels with backscatter values above a specified threshold are considered targets (ships). Their locations are written to an output shapefile.

Once the detection process is complete, ship locations are compared with corresponding AIS records if you provide them in this workflow. AIS is a maritime digital positioning system developed for identification, tracking, and search-and-rescue operations for vessels. AIS messages provide information about vessels' identities, position, speed, course, and other relevant information. Refer to the SAR Ship Detection help topic for more information about AIS repositories and standards.
Data Requirements
The SAR Ship Detection tool accepts Single Look Complex (SLC) or geocoded Level-1/2/3 data. It also requires data that can be properly calibrated. If it discovers incorrect calibration parameters in the original data, it issues a warning message and deactivates the fixed backscatter threshold. To reenable the backscatter threshold, you must provide a new threshold value that is consistent with the image’s backscatter levels.
Tip: To check if your images are suitable for the SAR Ship Detection tool, run the SAR Compatibility Check tool in the SAR Essentials folder of the Toolbox. See the SAR Essentials: Check Data Compatibility quick guide for more information.
Open and Display a Sentinel-1 Image
The Sentinel-1 image you will use in this exercise is geocoded to a Geographic WGS-84 projection. You will open and display the image before running the SAR Ship Detection tool.
- 1
Select File > Open from the Menu bar. An Open dialog appears. - 2
Go to the location where you saved the sample data for this quick guide. - 3
Select the file sentinel1_146_20161016_165333021_IW__VV_slc_list_geo.dat and click Open. The image is added to the Layer Manager and displayed in the Image window. - 4
Click the Zoom to Full Extent button in the Toolbar to view the full extent of the Sentinel-1 image.

The town of Skagen, Norway is visible on the left side of the image. The North Sea surrounds the peninsula.

Run the SAR Ship Detection Tool
- 1
In the Toolbox, go to the SAR Essentials folder and expand the Target Detection folder. - 2
Double-click the SAR Ship Detection tool. The SAR Ship Detection dialog appears, beginning with the Data Preprocessing panel. The Input tab is active. - 3
Click the Browse button next to the Input Image field. - 4
Select the file sentinel1_146_20161016_165333021_IW__VV_slc_list_geo.dat and click Open.

- 5
Click the Export tab. - 6
Select the No option for Geocoded results. The Sentinel-1 image is already geocoded. - 7
Leave the Grid Size field empty. - 8
The output shapefile will be written to the directory specified in the ENVI Output Directory preference. To specify a different output folder, click the Browse button next to Output Folder and choose a different folder.

- 9
Click the Next button. When processing is complete, the Ship Detection panel appears.
Set Ship Detection Parameters
The Ship Detection panel lists several parameters that you can adjust to achieve the best results for your specific image. Default values are provided based on the input image characteristics. They provide a good starting point and work well in most cases; however, you can still experiment with different settings to improve ship detection.
- 1
Leave the Land Mask Shape File Name field empty. This is for specifying an optional polygon shapefile of land areas. The ship detection algorithm will not process pixels within the polygons. If you do not provide a shapefile (as in this exercise), the tool automatically applies a land mask derived from OpenStreetMap. - 2
Keep the default value of 50 for Land Mask Buffer Size [m]. A 50-meter buffer will apply around the land mask. - 3
Keep the default value of 75 for Target Window Size [m]. A 75-meter target window will be used to detect targets (ships). - 4
Keep the default value of 400 for Guard Window Size [m]. The guard window surrounds the target window. Pixels within the guard window are excluded from background estimation. Its purpose is to avoid double targets. - 5
Keep the default value of 1000 for Background Window Size [m]. A 1000-meter window will be used to estimate the background statistics.

Tip: For future reference, if your image contains several ships that are located close together, try reducing the Guard Window Size [m] and Background Window Size [m] values. This will increase the probability of detecting all of the ships.
- 6
Set the Minimum Ship Backscatter value [dB] to -6. This is a threshold used in the target window to determine whether or not a pixel is considered a target (ship). In the Sentinel-1 image, accepting the default value of -2 dB would result in multiple detections per ship as shown in the left image below. Normally, most ships exhibit consistently high backscattering across their entire surface. Other vessels exhibit inconsistent backscattering, as with the example below. This can lead the software to identify multiple points for the same ship. Decreasing the minimum backscatter value to -6 addresses this issue.

Keep in mind, however, that decreasing the minimum backscatter value may result in more false positives.
- 7
In the Output File Prefix field, enter Skagen.

- 8
Click the Next button. The tool advances to the AIS Matching panel.
Select AIS Data
For this exercise, you will provide a sample AIS data file from the Danish Maritime Authority (DMA) for 16 October 2016, downloaded from the AIS Data(opens in a new tab) web site. The file is in a comma-separated value (CSV) format.
For more information about different AIS repositories and formats, click the blue Help button at the bottom of the tool, then click the Read more link to view the SAR Ship Detection help topic. This topic also explains how to create custom templates if your AIS data are formatted differently than the predefined options (such as NOAA or DMA).
- 1
Click the AIS format drop-down list and select ais_csv_DK. This corresponds to the structure of AIS historical data (in CSV format) provided by the Danish Maritime Authority (DMA). - 2
Click the Browse button next to the Input AIS field, and select the file aisdk_20161016_053-054.csv. - 3
Keep the Skagen entry in the Output File Prefix field.

- 4
Click the Next button. When processing is complete, the tool advances to the Finish panel. Various shapefiles and annotations are added to the Layer Manager and displayed in the Image window: You will examine these layers in the next section.

Examine the Results
Expand the sections below to learn more about each output layer.
Matched Points
Ship locations with matching AIS records are stored in a point shapefile named Skagen_sar_ais_matched_points.shp. Records are marked with red crosshair symbols, as shown in the first image below. To view ship names and marker symbols, turn on the associated layers in the Layer Manager.

Matched Tracks
AIS tracks that match SAR-detected ships are stored in a shapefile named Skagen_sar_ais_matched_tracks.shp. Tracks are displayed in yellow.

Unmatched Points
Detected ships with no matching AIS records are stored in a point shapefile named Skagen_sar_ais_NOmatched_points.shp. Records are marked with blue crosshair symbols, as shown in the first image below.
To view red symbol markers instead, turn on the Skagen_sar_ais_NOmatched_points_symbol.anz annotation layer in the Layer Manager.

Unmatched Tracks
AIS tracks that do not match any SAR-detected ships are stored in a shapefile named Skagen_ais_sar_NOmatched_tracks.shp. They are displayed in green. Several small tracks are visible in the Skagen port but not in the open sea.

This concludes the quick guide.
Additional Resources
- •
Crisp, D. J. "The State-of-the-Art in Ship Detection in Synthetic Aperture Radar Imagery." Australian Government, Department of Defence, Edinburgh, DSTO Information Sciences Laboratory, DSTO-RR-0272, 1-115 (2004). * •
SAR Essentials: Estimate the Velocity of Moving Objects quick guide
Your input is important to us, please take a few moments to fill out ourQuick Guide Feedback(opens in a new tab)form.
© 2025 NV5 Geospatial Solutions, Inc. This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR).