Marcel Kittel finished five millimeters in front of Edvald Boassen Hagen on Friday, making the Tour de France’s stage 7 finish to Nuit-Saint-George one of the tightest in race history. That’s a difference of .0003 seconds at the line.

[related title=”More Tour de France news” align=”right” tag=”Tour-de-France”]

How does the Tour determine a victor when the gap is that small and riders are traveling in excess of 70 kilometers per hour? Photos published by the ASO, which come from timing company Tissot, appeared to show a dead heat. There simply isn’t enough detail to pick out a 5mm difference.

Finish line officials are working with quite a bit more detail, however. The judges use a camera placed on the finish line that shoots at 10,000 frames per second. This allows them to confidently pick a winner even when differences are far too small to spot with the naked eye.

It was the tightest finish the chief finish line judge, Severine Jamain, has seen in her 10-year career, she told NBC Sports.

The cameras don’t work like a normal video camera though. They work more like a scanner.

Rather than shoot frames that are thousands of pixels wide using some sort of shutter and digital sensor (the modern replacement for film), the finish line camera is a slit camera. Old slit cameras run film behind a lens. In the timing camera’s case, the design exposes a digital sensor.

A flatbed scanner is a type of slit camera. So imagine pointing one of those at the finish line and scanning the riders coming across. Frame rates can be so high because there is no shutter to close and the cameras only record a one-pixel wide image at a time (10,000 times per second). This type of camera, pointed at a finish line, is guaranteed to show you who or what got to that finish line first, because it shows almost every moment. This is also the source of the distortion we associate with finish line photos. The scanner has a set speed, and anything going slower gets elongated — anything faster gets squished.

No shutter means nothing is missed (because shutters close, and you miss that part). That’s good when the riders are crossing the line .0003 seconds apart from each other.

Tissot, the Tour’s timing company, has a team of people on the ground in France and provides these images and time differences to the race’s finish line judges. The final decision is made by these finish judges. It is still a human process, albeit one heavily aided by technology.