cv_undistort_image

Undistortion a fisheyelens distortion of a whole image. Note that this is quite a slow process, so it is not really advisable to use this in a vision pipeline leading to control. However, it can be used to find the right undistortion parameter k, and shows that the undistortion functions work. The code also can be used to convert image coordinates from distorted fisheye lenses to undistorted coordinates and back. It takes into account the camera calibration matrix and the distortion of the specific lens.

Defines

Name

Value

Description

UNDISTORT_MIN_X_NORMALIZED

-2.0

Minimal normalized x-coordinate to be used for the undistortion

UNDISTORT_MAX_X_NORMALIZED

2.0

Maximal normalized x-coordinate to be used for the undistortion

UNDISTORT_FPS

0

The (maximum) frequency to run the calculations at. If zero, it will max out at the camera frame rate

UNDISTORT_CAMERA

bottom_camera|front_camera

The V4L2 camera device that is used for the calculations

UNDISTORT_CENTER_RATIO

1.0

If smaller than 1 only generate pixels for the center_ratio times the min_x to max_x interval. This makes undistortion quicker, but for a smaller FOV.

Depends

  • video_thread