initUndistortRectifyMap: Compute an Undistortion and Rectification Transformation Map

View source: R/calib3d.R

initUndistortRectifyMapR Documentation

Compute an Undistortion and Rectification Transformation Map

Description

initUndistortRectifyMap computes the joint undistortion and rectification transformation and represents the result in the form of maps for remap. The undistorted image looks like original, as if it is captured with a camera using the camera matrix new_camera_matrix and zero distortion. In case of a monocular camera, new_camera_matrix is usually equal to camera_matrix, or it can be computed by getOptimalNewCameraMatrix for a better control over scaling.

Usage

initUndistortRectifyMap(
  camera_matrix,
  dist_coefs,
  new_camera_matrix = camera_matrix,
  nrow,
  ncol
)

Arguments

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).

nrow, ncol

The number of rows and columns of the undistorted image.

Value

A 2xN matrix of transformed X/Y coordinates.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

undistort, calibrateCamera, getOptimalNewCameraMatrix

Examples

# See the help vignette:
## Not run: 
vignette("z8_calib", package = "Rvision")

## End(Not run)


swarm-lab/Rvision documentation built on Aug. 4, 2024, 2:29 p.m.