Speed is one of the important pieces of information for traffic analysis. In this article, we will go over the different types of speed measuring available in FLOW such as the default kilopixels/hour and then regular speed values you can get with georegistration and road section speed. Below you can see a short overview of the video of both of these and how they are set up.
By default, you see the speed in kilopixels/hour in FLOW. This is because we work with image data and the spatial movement of objects across the scene is represented by movement across the pixels of the footage. In the case of footage from high above at 90° angle or similar this data is accurate and the proportions of the values can help you understand how fast the cars are moving in relation to each other. It is however much more useful and understandable to have data in kilometers/hour aka km/h so let's talk about how you can achieve that.
Georegistration means placing multiple points across the footage and entering their coordinates to bind the footage to a specific real-world location. Section speed measuring is simply knowing the distance between 2 gates and entering this distance into the movement spatial filter placed between them.
Advantages of georegistration speed measuring:
You get speed for all objects in all parts of the footage after setting up the georegistration. You do this once and you have speed data in the whole scene including the vehicle flags.
Works with any spatial filter set up, unlike the section speed measuring.
Is more flexible and works in a lot more scenarios than section speed measuring. For example, only georegistration can give you current speed when used with a single gate.
Disadvantages of georegistration speed measuring:
Georegistration is a lot more complicated to set up and can require some preparation to do correctly.
The accuracy of the georegistration is very dependent on the placement of the georegistration points and on having accurate coordinates for each of them.
Georegistration of some scenes can be tricky due to the nature of the scene such as scenes that do not have any distinguishing features to use as anchor points for the georegistration points.
Advantages of section speed measuring:
It is very easy to set up and does not require any preparation. In theory you can guess the distance between the two gates based on the size of objects in the footage to get relatively accurate speed data.
Can be easily recalibrated in case the camera moves.
Disadvantages of section speed measuring:
The speed measurement only works for the given road section.
You get only the average speed of the object while if you have georegistration you can get both the average speed for specific road sections as well as immediate speed anywhere
Compared to georegistration getting average speed for whole footage is harder with section speed measurement as the starting locations of the trajectories are inconsistent due to the nature of the AI detection namely when comparing different object categories. Additionally, there is the disadvantage of having to set up at least 3 spatial filters to start getting the speed data.
Factors affecting both the georegistration and section speed measuring
One of the factors is the angle of the camera. If the camera is placed low and looking into the distance it will be impossible to get good speed data. When talking about the speed-accuracy - it's very important to take into account the camera angle. When the object is moving in the scene over a large distance in reality while the movement in the image of the camera is only minimal there will be a considerable inaccuracy. On the other hand, if there is a large amount of visible movement in the camera image for that same distance, the accuracy will be much better. (The second thing to take into consideration is that the further away from the camera the object is, the more sensitive and susceptible to error the speed detection gets and the last thing is that a side view produces a large change in image therefore also increasing accuracy of speed when monitoring cars from the side). Please take these things into consideration when deciding on camera placement in cases that require good speed data.
Lens distortion can be another issue. Be wary of cameras with heavy lens distortion, like fisheye cameras for which the speed measurements will be inaccurate everywhere but around the center of the camera video feed.
Now that we have covered the advantages and disadvantages and other important aspects of both methods let's get down to how you can measure the speed with both of these methods.
The full article on georegistration can be found here. In this article, we only describe it generally and compare it with the section on speed measuring. Once you georegister the footage, you will be able to see speeds in kilometers/hour under object flags. Now let's look at some of the most used types of speed data gathering setups. The first setup is for measuring speed in a specific road section. It can be set up the same way you would set up the road section speed measuring except you do not need to enter the length of the movement. You only need to place the gate at the beginning and at the end of the measured section and connect it with movement. When you drag the movement over to the canvas and add a statistical widget to it you will be able to get the speed data from it in km/h.
Section speed measurement using movement and georegistration
Another way to measure speed is to use a zone spatial filter. Simply draw a zone for which you would like to get your speed data and drag the zone over to the canvas. You can then get data such as the current average, minimum and maximum speed for the given zone via the statistical value widget.
Section speed measurement with zone and georegistration (drone view)
Note: There is one significant difference between using movement or zone for data gathering and that is, in fact, the data from the movement will become available only after the movement is completed but for zone, you will start getting data from the moment the vehicle enters the zone and it will keep updating until the vehicle exits the zone.
Another way to measure speed with georegistration is to use a gate that allows you to get the speed of the object at the moment it passed through the gate.
Current speed measurement with gate and georegistration
Section speed measuring - how to get speed data
The options for getting speed data are much more limited with section speed measuring. It always involves having a movement for which you need to know its distance and at least 2 other objects that define the area of the movement. These can be gates, zones, or a combination of them.
Section speed measurement using movement and known movement length
Working with the speed in FLOW in general
Now that you have gathered the speed data you can work with it further. There are multiple widgets and elements that work with speed data.
Here is the list:
Speed - motion filter - filtering in canvas based on different speed parameters
Statistical value widget - visualization of speed data on the dashboard
Speed Heatmap - color-coded speed visualization
Expression widget - own processing and visualization of speed and other data
A speed motion filter can be used in canvas to filter trajectories within a specific speed range. You can use this filter in front of a movement or zone in a canvas to only analyze trajectories that meet the specified speed criteria.
Example of using speed motion filter with 2 movements (one for each direction)
Statistical value widget
It gives you the minimum, maximum, average, and median speed for all the trajectories that are at the input of this operator. If you select the time series setting, it can also visualize the development of these values over a specified timeframe with a line graph. For the visualization in this widget in the dashboard, you can choose between the average speed or median speed value to be the center line of the graph.
Section speed statistical value widget visualized in time series format
Speed heatmap is a useful visualization tool allowing you to see where in the scene cars drive fast and where the traffic is slow. This heatmap can help you identify spots where speeding is likely to occur or can visually alert you of traffic congestion.
This widget is quite complex to use and can be used for custom calculations. You can learn more about it in this article.
How is speed data processed in set operators
Union, Intersection, and Compliment are useful filtering tools allowing you to get the data you need. You can learn more about them here. You can for example do a union of two zones or two movements to get the average speed for both of them. This will be true for the vehicles that have passed through both of the spatial filters and also if this was done in a georegistered footage.
If you would use the Compliment set operator on two movements you would get all the trajectories that have not passed through the movements.
If the object would pass through only one of the movements/zones then its resulting speed would simply be its speed for the one spatial filter that it has passed as there would be no second value to calculate the average value from.
For example, if you would work with 2 movements, be it using Union or Intersection operator and you would have a trajectory that has passed through both of the movements, it would give you an average value for these two movements.
Lastly, if you were working with two movements in non-georegistered footage and one of them would have its length entered and one would not and you would use union or intersection of these you would only get speed values for the one that you have defined.
In this article, you have learned about the different ways you can get speed data in FLOW the Georegistration and Section speed. The main takeaway should be that for permanent camera installations, georegistration should be your go-to way for speed data gathering as it provides many more options in terms of where and what speed data you can extract from the footage while section speed can give you a quick way to gather speed data or a way to get accurate speed data for a road section of known length. We hope you have found this guide helpful.
If you have any questions please contact us at firstname.lastname@example.org or use the live chat (EU CET timezone) on the bottom right.
Read in more detail about Georegistration and how to set it up.
Read about Set operators (Union, Intersection, Complement)
Learn about Spatial Filters.
Get familiar with widgets you can create for live Dashboard.