Calibrating distances on video camera images

One of the problems with the video footage produced by cameras that are worn by cyclists is in the interpretation of images produced to determine passing and following distances. This could be an issue when trying to get video evidence accepted by courts, the Crown Prosecution Service, or the police. I don’t know whether this was a factor in the apparently ridiculous decision not to prosecute for dangerous driving in this case of Martin Porter’s, but I can imagine it might be difficult in court to prove beyond reasonable doubt that the pass was as close as it subjectively looks in the video. For one thing, there is no part of the bicycle or rider visible in the frame against which to reference distances, and there is no information abut the focal length of the lens and any possible image distortions that may be present.

In fact, it is often the case that passes do not look as close in the video as they were in reality, resulting in the viewer getting the impression that a pass was not as close as it actually was. This is certainly the case with wide angle lens cameras, such as the Contour Roam that I use on my helmet. This is because of the significant barrel distortion that occurs, whereby straight lines near the edge of the frame appear to be curved.

Some people have tried to address this issue by building devices that use ultrasound or infrared light to measure the distance to passing vehicles, which is essential for academic research, and can be very effective for individual use, but is also rather inconvenient.

Another, less precise, but simpler approach is to calibrate the cameras to get an idea of the relationship between positions in the image and actual distances in reality. This article looks at some work I did to get a handle on that. As an example, I will use this incident, which was a pass that was uncomfortably close:

Here is a still frame taken from that video:

Close pass front view

To someone who is not used to interpreting these images, it may well look like the car gave me plenty of space when passing. Well, let’s take a look at the rear view, but in this case, we’ll carry out some calibration work on the rear camera. To do this, I placed some convenient bamboo canes on the ground, parallel to one another, at intervals of 0.5 metres. I then positioned the bike with its camera, which is mounted on the seat post, in line with the 0 metres position and took some footage. Here is a resulting still frame:

Image with bamboo canes

The next step is to trace the lines followed by the canes to create a raster:

Raster formed from canes.

The small mark to the right is the position of the weld on the rear carrier of my bike, which can be used as a reference to the centre-line when aligning the raster on a real image. Now, we can add the raster to the rear image from the close pass that I started with, aligning the small mark against the weld in the rear carrier to account for slight differences in camera position:

Close pass rear view with raster.

We can now see that the outside edge of the car’s tyre on the ground is just 1 metre away from the centre-line of the bike when the car passes. The width of the handlebars of my bike is 0.6 metres so, allowing for the inset of the wheel relative to the side of the car, the side of the car is less than 0.7 metres from my handlebar. However, the door mirror protrudes by about 15 centimetres, so that is passing about half a metre from my right elbow; that is far too close, especially at the speed that car was travelling at.

In many cases, close passes were actually worse than they appear subjectively in a video clip, and that should be taken into account when viewing and commenting on them.

This entry was posted in Article, Road Justice. Bookmark the permalink.

1 Response to Calibrating distances on video camera images

  1. Matthew.W says:

    Good stuff. Probably impossible to do with a helmet cam due to head movement though.

    To while away my commute I occasionally think of modifying a Herman Safety Wing with a couple cheapie cameras to capture the closeness of passes, that & trigger the deployment of a stinger.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.