First step for a traffic analysis in GoodVision is to describe the scene by placing filters (LINEs or ZONEs) on the vehicle trajectories shown on the preview screenshot. By placing filters, you can define entries and exits on the scene, starts and ends of desired movements, identify approaches or areas of interest depending on the goals of your analysis. When the filter placement is ready, you can continue with drawing movements, creating events or defining complex scenarios.

During processing of a video, GoodVision Artificial Intelligence algorithms automatically extract all physical aspects of vehicle behaviour from the video footage and present them in a form of coloured trajectories for each object class. A proper scene description and a correct filter placement is thus an important prerequisite for a good analysis, as it influences the final results. Letโ€™s have a look at some basic examples of the usage of filters.

Picture 1: Example of a possible scene description of an intersection

LINES ๐Ÿ“ and ZONES ๐Ÿ“

Initially, there are two basic filter types available for defining the conditions on the scene - LINEs and ZONEs. Both of them will filter out desired traffic but each of them has its specifics and recommended usage.

Lines are a great tool for traffic counting. They can serve as counting gates on entries and exits of all kinds of roads, intersections or roundabouts (single line movements). With lines, you can also define beginnings and ends of desired movements (multi line movements). There are some advanced metrics supported by line filters - time gaps, travel times and speed estimations. Lines are often used for getting total and average volume results or to identify peak periods in the traffic flows.

Zones are square-like sections of a scene which you draw with four spacial points. They are intended to cover bigger areas than lines and enable other types of area-based metrics like occupancy times and traffic events more interesting for traffic modellers. That can be average occupancy times on parking lots, time spent on red lights or approaches to roundabouts or intersections. When used for counting, zones can be useful for less visible areas or cases of lower quality footage. But for traffic counting, lines are generally more suitable and easier to use.

Picture 2: Example of line placement on a top-down drone scene

Line placement guidelines ๐Ÿ“

There are few essential tips to follow when placing the filters on your traffic scene.

Letโ€™s start with the lines first. Most of the suggestions are valid in general anyway.

  • DETECT OBSTACLES - detect obstacles on your traffic scene which may break the trajectories and place the filters accordingly.

  • FOCUS ON THE CENTER - focus the filters close to the center of the traffic situation you are analyzing. Do not place lines too far away, to the very edge or corners of the scene as trajectories may not be complete or get disconnected, especially when traffic is high or scene conditions are bad.

  • CAPTURE ALL TRAJECTORIES - make sure you draw lines that capture all trajectories of the desired movement. Length of the lines shall cover all trajectories of the analyzed movement but not exceed them too much. Placing a line a bit longer than the flow of the tracks should do well in most cases.

  • RESPECT FLOW OF TRAJECTORIES - place the lines vertically to the flow of the trajectories of the intended movement. Sometimes it is better to draw a separate line to cover a specific movement than to describe several different movements with just a single entry line. On some scenes, a skewed line might be useful (e.g when used in a triangle shape or when a traffic stream splits into more currents). But generally try to respect the trajectories and place the lines at a right angle with them.

  • USE SEPARATE LINES TO DIVIDE DIRECTIONS WHEN NEEDED - on more complicated scenes (larger intersections, lower quality videos or when the camera is placed low), it is better to define directions of the movements with separate lines. Simple roads are easy to analyze but avoid describing a complicated scene with just a few lines to do all the job. For example, if there is a small traffic stream on an intersection, it is advisable to place a separate line to cover this particular stream.

  • KEEP SOME DISTANCE BETWEEN THE FILTERS - when composing a movement, lines shall not cross or overlap each other as some valid trajectories might not be indluded. There is no problem with filter overlapping when they are not used for the same movement.

  • USE AS MANY FILTERS AS YOU NEED - do not hesitate to draw as many suitable filters on your scene as you need to reflect the real traffic flows. When you are about to draw the movements among them, donโ€™ t worry. Even when your desired movements cross several lines or zones, you can always remove the unnecessary filters in the movement dialog before saving it. On most of one-camera scenes it is actually better to count the traffic movement volumes just between the first and the last line, without involving the filters in between. When you intend to create a more complicated movement consisting of more than 2 lines, go for a scenario.

Picture 3: Example of a possible scene description on a more complicated intersection

A few tips for zone placement ๐Ÿ“

Zones are intended mostly for area-based analyses like occupancy times and conditions like stop events, delays, etc. They can still be used for counting under some specific circumstances just as in areas far away from the camera, places with obstacles in the view or where a line filter would be inappropriate for any reason.

Do not place zones randomly and try to choose the location according to what you are searching for. When placing zones remember that the zone should have an entry and an exit to report some advanced results. For a simple counting, all objects in the zone area will be reported but for some other metrics, objects starting or ending their tracks inside a zone would have missing entry and exit times. Also stop events are reported only for vehicles which have initially entered a zone.

For that reason try to avoid placing a zone starting from the edges of the scene or catching too big areas. And remember that when a movement is created only for one zone, there is no information about directions in that area.

Picture 4: Example of a scene description combining lines and zones

๐Ÿ’ก The better the filters will reflect what is really going on on the scene, the better results youโ€™ll get!

Sounds a little bit complicated? Let's go through it step by step together in the following video tutorial: https://www.youtube.com/watch?v=o4-v_FNbIYU.

Did this answer your question?