All Collections
TrafficSurvey - post-recording processing of videos
TrafficSurveyViewer program guide - Analysis
Trajectory cutting by polygon (Action Region) - Improve position data and focus your analysis
Trajectory cutting by polygon (Action Region) - Improve position data and focus your analysis

Trajectory cutting - narrow down and focus your analysis, get rid of unwated trajectory handovers and improve data quality

DataFromSky avatar
Written by DataFromSky
Updated over a week ago

Trajectory cutting is a long-awaited feature solving many problems that you might have encountered in your TrafficSurveying experience. Do not want to count cars coming from a particular direction? Want to focus your analysis on a particular area of the footage? Do you want to increase the precision of your safety analysis? All of this can be done thanks to trajectory cutting. In this article, we will first explain how to do trajectory cutting, and its different options, and then discuss the various use cases.

How to Perform Trajectory Cutting and How It Works

Trajectory cutting is defined by a Traffic Region or Action Region.

To access this feature, navigate to "Tracking Log/ Cut Trajectories by Polygon," as illustrated in the image below.

Next, you must choose the polygon (Traffic Region or Action Region) by which the trajectories will be cut by.

Last you need to select one of the following cutting options which are described further below.

Types of Cutting Approaches explained on an example

In the image below you can see an example trajectory of a bicycle that has entered and exited the Traffic Region twice. Below are described how the different types of trajectory cutting will behave in regard to this trajectory and this traffic region. In most cases, if using a simple square-shaped trajectory your trajectories will be entering and exiting the zone only once so in these cases there would be no difference between these options.

A) Keep all subsequences: A part of the trajectory that is outside the action area is deleted. The trajectory is divided into two parts – one before exiting the action area and the other after re-entering the action area. This way the first part keeps the original trajectory ID and the second trajectory is given the next available ID.

B) Keep the longest subsequence: Similar to the previous case, this option deletes the portion of the trajectory outside the action area. From the remaining two segments, the longer one is retained, while the shorter one is discarded

C) Keep the supersequence: In this scenario, the trajectory portion when the vehicle exits the action area is retained, while the parts of the trajectory before the first entry into the specified area and after its final exit are deleted.

In most cases, we recommend choosing option B) Keep the longest subsequence.

Quick side note. There is also a similar option to cutting and that is "Delete Trajectories by Spatial Element". This will delete all the trajectories that match the gate's filtering criteria. This can help you get rid of unwanted trajectories in your analyses.

Use cases

1. Focus Your Analysis

This feature is especially useful when dealing with an excessive number of trajectories in areas of no interest, or when you simply want to concentrate your safety analysis on specific sections of the footage. By doing so, you can attain clarity and narrow down your analysis to the areas that are most relevant to your Traffic Analysis needs. See an example below where we focus analysis only on the left roundabout.

2. Improve Safety Analysis Quality

The tracking system in TrafficSurvey is highly robust and can detect objects even when they are partially visible. However, this can lead to less accurate tracking dot positioning at the edges of the footage. To enhance the precision of your safety analysis, we recommend excluding trajectories from the outer 5-10% of the footage, depending on the object size within the particular analysis. Larger objects may require a greater percentage of the edges to be cut off. This approach retains only those trajectory segments where the tracking dot is centered on the objects, resulting in improved data related to position, speed, acceleration, and coordinates in WGS/UTM/px, among others. See an example below where we focus our safety analysis on conflicts happening on a specific crossing and its surroundings.

3. Eliminate Unwanted Trajectory Handovers in Problematic Areas

In rare cases on the edges of the detection area, one object can hand over its trajectory to another object passing by it which results in incorrect trajectories and problems for OD/ TMC exports. This can be eliminated by selecting only the "inside area" of interest where detections are high quality and you can still tell the direction of objects. You can see example of unwanted trajectory handover in the image below where toward the edge of detection capabilities pedestrians passing in front of another one cause transfer trajectories from the pedestrian leaving the detection area to the pedestrian entering the detection area.


We hope you have found this guide helpful.

If you want to learn more about Safety Analysis refer to this article.

To help you find what you need we recommend using the search bar on the top of the help section. You can also contact us using the chat button in the bottom right corner of the page. To get notified about updates or events where you can meet us please follow us on LinkedIn.

Did this answer your question?