change_radial_distortion_cam_par — Determine new camera parameters in accordance to the specified radial distortion.
change_radial_distortion_cam_par modifies the internal camera parameters in accordance to the specified radial distortion coefficients DistortionCoeffs. Via Mode one of the following modes can be selected:
'fixed': Only the distortion coefficients are modified, the other internal camera parameters remain unchanged. In general, this leads to a change of the visible part of the scene.
'fullsize': The scale factors and and the image center point are modified in order to preserve the visible part of the scene. Thus, all points visible in the original image are also visible in the modified (rectified) image. In general, this leads to undefined pixels in the modified image.
'adaptive': A trade-off between the other modes: The visible part of the scene is slightly reduced to prevent undefined pixels in the modified image. Similiarly to 'fullsize', the scale factors and the image center point are modified.
'preserve_resolution': As in the mode 'fullsize', all points visible in the original image are also visible in the modified (rectified) image, i.e., the scale factors and and the image center point are modified. In general, this leads to undefined pixels in the modified image. In contrast to the mode 'fullsize' additionally the size of the modified image is increased such that the image resolution does not decrease in any part of the image.
In all modes the distortion coefficients in CamParamOut are set to DistortionCoeffs. The transformation of a pixel in the modified image into the image plane using CamParamOut results in the same point as the transformation of a pixel in the original image via CamParamIn.
Default value: 'adaptive'
Suggested values: 'fullsize', 'adaptive', 'fixed', 'preserve_resolution'
Internal camera parameters (original).
Number of elements: CamParamIn == 8 || CamParamIn == 10 || CamParamIn == 12 || CamParamIn == 14
Desired radial distortions.
Number of elements: DistortionCoeffs == 1 || DistortionCoeffs == 5
Default value: 0.0
Internal camera parameters (modified).
Number of elements: CamParamOut == 8 || CamParamOut == 10 || CamParamOut == 12 || CamParamOut == 14
change_radial_distortion_cam_par returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.
change_radial_distortion_image, change_radial_distortion_contours_xld, gen_radial_distortion_map
camera_calibration, read_cam_par, change_radial_distortion_image, change_radial_distortion_contours_xld, change_radial_distortion_points