Hudl Distortion Correction Tool
At Hudl, we analyze sports videos and provide insights for teams in order to improve their game. In one of our projects we track soccer players across the pitch throughout the match. To have a full view of the pitch we use fisheye wide-angle lenses.
Wide-angle camera lenses provide an alternative to using multi-camera setups, however they comes on the expense that the images they provide are highly distorted. At Hudl, we created an open-source tool for calibrating cameras and correcting the distortion in their images and videos.
Camera calibration is the process by which camera parameters are obtained. These parameters include the camera intrinsic projection matrix and the distortion coefficients (more details in this link). Camera calibration will proceed by showing known patterns to the camera and analyzing the obtained images. An optimization process will then determine the optimal parameter values that explain the observations.
To calibrate a camera, the idea is show to this camera a set of scene points for which their 3D position is known. You must then determine where on the image these points project. This is typically done using a chessboard pattern to generate the set of 3D scene points required for calibration. This pattern creates points at the corners of each square, and since this pattern is flat, we can freely assume that the board is located at Z=0 with the X and Y axes well aligned with the grid.
In this case, the calibration process simply consists of showing the chessboard pattern to the camera from different viewpoints. Here is one example of a calibration pattern image:
Once the camera parameters are obtained, they are applied to any image or video taken by the camera to remove the distortion.
The images below show an example of using the Hudl Distortion Correction Tool to first correct the distortion in the image then further projected to a another view.
The example above shows how this tool creates practical and visually appealing results.