Skip to contents

undistortPoints transforms a set of coordinates representing points in an image to compensate for radial and tangential lens distortion.

Usage

undistortPoints(
  points,
  camera_matrix,
  dist_coefs,
  new_camera_matrix = camera_matrix
)

Arguments

points

A 2xN matrix of X/Y coordinates.

camera_matrix

A 3x3 camera intrinsic matrix as returned by calibrateCamera.

dist_coefs

A single row matrix with 4, 5, 8, 12 or 14 elements as returned by calibrateCamera.

new_camera_matrix

A 3x3 camera intrinsic matrix as returned by getOptimalNewCameraMatrix if you chose to execute this optional step (default: camera_matrix).

Value

A 2xN matrix of transformed X/Y coordinates.

Author

Simon Garnier, garnier@njit.edu

Examples

# See the help vignette:
if (FALSE) { # \dontrun{
vignette("z8_calib", package = "Rvision")
} # }