Compute an Undistortion and Rectification Transformation Map
Source:R/calib3d.R
initUndistortRectifyMap.RdinitUndistortRectifyMap 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
getOptimalNewCameraMatrixif you chose to execute this optional step (default:camera_matrix).- nrow, ncol
The number of rows and columns of the undistorted image.
Author
Simon Garnier, garnier@njit.edu
Examples
# See the help vignette:
if (FALSE) { # \dontrun{
vignette("z8_calib", package = "Rvision")
} # }