Directed Cross-Ratio (DXR): Calculate Vehicle Speed with the DXR Method
Calculate vehicle speed in vPrism with the directed cross-ratio (DXR) method, using one known reference length such as wheelbase and no scene measurements or camera position. Mark positions across frames, then review PTS-based timing, leg distances, speeds, and accelerations, and export the results.
Transcript
To determine the speed of a vehicle using the directed cross-ratio method, import the video and make any tonal adjustments that will assist with consistent marking of the features of interest. The method calculates speed between any two positions using only one known reference length. Here, we’ll be using the wheels of the SUV and its wheelbase from vehicle specifications, but any known measurement can be used as long as the marked features sit at a consistent height above the roadway.
Click Analyze, then Speed, DXR. The properties panel will appear, allowing you to assign pixel coordinates to each wheel. Click the white crosshair to initiate rear assignment, then zoom and pan using mouse controls to locate the feature of interest and left click. The assignment can be modified after placement by left-clicking and dragging. Adjust marker sizing to your preference, then initiate front assignment by clicking on the red crosshair and repeat the process.
Mark either the wheel centers or the tire contact patches, whichever is more clearly visible, and use the same feature for the front and rear wheels and at every position. This keeps all the marked points at the same height, as the method expects.
Click the plus sign or simply navigate to a new frame to assign the next set of coordinates. Any travel distance can be used, but leg length is a tradeoff. Longer legs reduce sensitivity to marking error, while shorter legs more closely resolve a changing speed or a curved path. For straight-path travel, a leg of two to four reference lengths often yields the best result, and for a curved path, keep legs near one reference length.
Lens distortion correction isn’t required, as the cross-ratio largely cancels it, but if a steep distortion gradient is expected across a leg, keep that leg near one reference length as well. In either case, several legs are preferable to one long leg.
Once you have selected the next frame, repeat the assignment process. Add as many positions as is appropriate for your analysis.
Use the arrows at the top of the properties panel to cycle through the assigned positions. New positions can be added anytime and will automatically be re-ordered based on their PTS time.
Click on the “Speed” tab to enter the reference measurement (the wheelbase here) and see the results.
Here, you will see the frames used in the analysis, their PTS time, and the duration between positions. The pixel coordinates are also presented, along with the calculated leg distances, speeds, and accelerations.
Timing is taken from each frame’s PTS rather than the file’s nominal frame rate, so dropped frames and gaps are often accounted for. Still, examine the file and frame-level metadata to assist with your analysis of timing.
Positions can be edited or deleted in this screen by clicking on the appropriate icons. Timing can also be entered manually, if there’s reason to believe the PTS time is inaccurate.
Imperial and metric units are available, just be sure the units of your reference measurement match what vPrism expects. Feet for imperial, and meters for metric.
Before exporting, look at the speed trace across the legs. If it isn’t physically plausible, revisit frame timing, point marking, and whether each leg is short enough to be treated as straight. A plausible trace is your primary quality check when no instrumentation is available.
Results can be exported for further analysis.
The same tool applies to moving cameras, such as dashcams, by marking a stationary roadway reference in place of the vehicle. That workflow is covered in a separate tutorial. Review the technical literature on the cross-ratio method for guidance on reference selection, leg length, and moving-camera limits.
In a couple of minutes, you’ve accurately calculated the speed of a vehicle without scene measurements or camera position!