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
. The operator can only be
used for area scan cameras (with any lens type) and for line scan
cameras with telecentric lenses. Line scan cameras with perspective
lenses are not supported.
With the parameter 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': For area scan cameras, the scale factors and and the image center point are modified in order to preserve the visible part of the scene. For line scan cameras with telecentric lenses, the scale factor , the image center point , and the component of the motion vector are changed to achieve the this effect. 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. The same parameters as for 'fullsize' are modified.
'preserve_resolution': As in the mode 'fullsize' , all points visible in the original image are also visible in the modified (rectified) image. For area scan cameras, the scale factors and and the image center point are modified. For line scan cameras with telecentric lenses, the scale factor , the image center point , and potentially the component of the motion vector are changed to achieve the this effect. 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
. For telecentric line scan
cameras, the motion vector also influences the percieved
distortion. For example, a nonzero component leads
to skewed pixels. Furthermore, if , the pixels appear to be
non-square. Therefore, for telecentric line scan cameras, up to
three more components can be passed in addition to
or , respectively, in DistortionCoeffs
. These specify
the new , , and
components of the motion vector.
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
.
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