Truck Detection

Short Description

The Truck Detection algorithm detects the number of moving trucks along roads using 10m resolution Sentinel-2 level 2A data. The author Henrik Fisser (, developed this algorithm (with the title: Truck detection – Sensing trade from space) in the context of the Euro Data Cube COVID-19 edition of Sentinel Hub’s custom script contest. The algorithm exploits the small offset between Sentinel-2 bands which causes moving objects to appear as rainbows in RGB images allowing the detection and mapping of moving trucks.
The output of the algorithm is point vector data ( GeoPackage (.gpkg) format) with the coordinates of the detected trucks, dates of detected trucks and the valid road area as attributes.

How to generate trucks vector data

Generate trucks data for your area of interest in these simple steps:
  1. Create EDC account here and purchase enough credits
  2. Navigate to EDC Browser
  3. Select the required input parameters
  4. Follow the check-out wizard to complete your order.

Data Source

Truck detection algorithm detects trucks on Sentinel -2 L2A images. Find out more information about Sentinel-2 data in the documentation

Table 1: Data source description

Data Source Sentinel 2 L2A
Resolution 10m
Geographical coverage Global
Update Frequency New Sentinel data are added regularly, usually within few hours after they are available on Copernicus Hub
Bands used Blue, Green, Red, SCL

Table 2: Description of Sentinel 2 L2A bands used

Name Description Units & Typical Range
B02 Blue DN, typically from 0-10000
B03 Green DN, typically from 0-10000
B04 Red DN, typically from 0-10000
SCL Scene classification data, based on Sen2Cor processor Codelist, from 0-11

Detection Method

The detection method exploits small sensing offset of different wavelength that moving objects have in Sentinel-2 data which causes a specific reflectance relationship in the RGB, which looks like a rainbow. The method only targets the blue part of the ‘rainbow’ truck object since the dominance of blue reflectance is rare over land surfaces. This blue part of the truck serves as a marker. The detection is then achieved through reflectance band math calculations.
Initial step - Create a road mask, Check that the following conditions are fulfilled: Cloud masking : Final step - the ratios between B02 (blue) and B03 (green) and B02 and B04 (red) are calculated. The following thresholds are applied: Result- Each truck is represented by pixels with value 1. Connected pixels are filtered to identify single trucks and then vectorized to get the final result.

Algorithm Input Parameters

Table 3: Required parameters

Name Possible Values Description
Area of Interest BBox or polygon Area of Interest
Time range from 2016-11-01 to date Time period for which the algorithm will run
OSM Values "motorway", "trunk", "primary" Road types found in OSM. Trucks are only detected on roads obtained from OSM. Their descriptions can be found here
Max. cloud coverage Integer (from 0 to 100) Maximal cloud coverage in percentage
Week days "Monday", "Tuesday" ... Days of the week for which the algorithm will run in the selected time range

Algorithm output

The output of the algorithm is point vector data in GeoPackage format with coordinates of the detected trucks, the dates of detected trucks and the valid road area as attributes.

Projection of the output data

Format of the output data

Supported delivery methods


More Information


Application Areas

Known Limitations


trucks on sentinel 2
example of trucks visible on sentinel 2 image

Example of trucks detected (green dots) by the algorithm along Ventura freeway, southern California on 22-07-2020 with Sentinel 2 image overlay