change_radial_distortion_cam_par
— Determine new camera parameters in accordance to the specified
radial distortion.
change_radial_distortion_cam_par( : : Mode, CamParamIn, DistortionCoeffs : CamParamOut)
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. Similarly 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
.
Please note that change_radial_distortion_cam_par
does not work
for line scan cameras.
Mode
(input_control) string →
(string)
Mode
Default value: 'adaptive'
Suggested values: 'fullsize' , 'adaptive' , 'fixed' , 'preserve_resolution'
CamParamIn
(input_control) campar →
(real / integer / string)
Internal camera parameters (original).
DistortionCoeffs
(input_control) real(-array) →
(real / integer)
Desired radial distortions.
Number of elements: DistortionCoeffs == 1 || DistortionCoeffs == 5
Default value: 0.0
CamParamOut
(output_control) campar →
(real / integer / string)
Internal camera parameters (modified).
change_radial_distortion_cam_par
returns 2 (H_MSG_TRUE) if all parameter
values are correct.
If necessary, an exception is raised.
camera_calibration
,
read_cam_par
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
Calibration