change_radial_distortion_imageT_change_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImagechange_radial_distortion_image (算子名称)

名称

change_radial_distortion_imageT_change_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImagechange_radial_distortion_image — Change the radial distortion of an image.

参数签名

change_radial_distortion_image(Image, 区域 : ImageRectified : CamParamIn, CamParamOut : )

Herror T_change_radial_distortion_image(const Hobject Image, const Hobject 区域, Hobject* ImageRectified, const Htuple CamParamIn, const Htuple CamParamOut)

void ChangeRadialDistortionImage(const HObject& Image, const HObject& 区域, HObject* ImageRectified, const HTuple& CamParamIn, const HTuple& CamParamOut)

HImage HImage::ChangeRadialDistortionImage(const HRegion& 区域, const HCamPar& CamParamIn, const HCamPar& CamParamOut) const

HImage HCamPar::ChangeRadialDistortionImage(const HImage& Image, const HRegion& 区域, const HCamPar& CamParamOut) const

static void HOperatorSet.ChangeRadialDistortionImage(HObject image, HObject 区域, out HObject imageRectified, HTuple camParamIn, HTuple camParamOut)

HImage HImage.ChangeRadialDistortionImage(HRegion 区域, HCamPar camParamIn, HCamPar camParamOut)

HImage HCamPar.ChangeRadialDistortionImage(HImage image, HRegion 区域, HCamPar camParamOut)

def change_radial_distortion_image(image: HObject, 区域: HObject, cam_param_in: Sequence[Union[int, float, str]], cam_param_out: Sequence[Union[int, float, str]]) -> HObject

描述

change_radial_distortion_imagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImageChangeRadialDistortionImagechange_radial_distortion_image changes the radial distortion of the input image ImageImageImageImageimageimage in accordance to the internal camera parameters CamParamInCamParamInCamParamInCamParamIncamParamIncam_param_in and CamParamOutCamParamOutCamParamOutCamParamOutcamParamOutcam_param_out. Each pixel of the output image that lies within the region 区域区域区域区域区域区域 is transformed into the image plane using CamParamOutCamParamOutCamParamOutCamParamOutcamParamOutcam_param_out and subsequently projected into a subpixel of ImageImageImageImageimageimage using CamParamInCamParamInCamParamInCamParamIncamParamIncam_param_in. The resulting gray value is determined by bilinear interpolation. If the subpixel is outside of ImageImageImageImageimageimage, the corresponding pixel in ImageRectifiedImageRectifiedImageRectifiedImageRectifiedimageRectifiedimage_rectified is set to 'black' and eliminated from the image domain.

If the gray values of all pixels in the output image shall be calculated, it is sufficient to pass an empty object in 区域区域区域区域区域区域 (which must be previously generated by, for example, using gen_empty_objgen_empty_objGenEmptyObjGenEmptyObjGenEmptyObjgen_empty_obj). This is especially useful if the size of the output image differs from the size of the input image, and hence, it is not possible to simply pass the region of the input image in 区域区域区域区域区域区域.

If CamParamOutCamParamOutCamParamOutCamParamOutcamParamOutcam_param_out was computed via change_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamParChangeRadialDistortionCamParchange_radial_distortion_cam_par, ImageRectifiedImageRectifiedImageRectifiedImageRectifiedimageRectifiedimage_rectified is equivalent to ImageImageImageImageimageimage obtained with a lens with a modified radial distortion. If the image is rectified. A subsequent pose estimation (determination of the external camera parameters) is not affected by this operation.

Please note that change_radial_distortion_imagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImageChangeRadialDistortionImagechange_radial_distortion_image does not work for line scan cameras with perspective lenses. Instead, you might want to use image_to_world_planeimage_to_world_planeImageToWorldPlaneImageToWorldPlaneImageToWorldPlaneimage_to_world_plane.

注意

change_radial_distortion_imagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImageChangeRadialDistortionImagechange_radial_distortion_image can be executed on OpenCL devices if the input image does not exceed the maximum size of image objects of the selected device. As the OpenCL implementation uses single precision arithmetic, the results can differ from the CPU implementation.

运行信息

参数表

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / uint2 / real)

Original image.

区域区域区域区域区域区域 (input_object)  region objectHRegionHObjectHRegionHobject

Region of interest in ImageRectifiedImageRectifiedImageRectifiedImageRectifiedimageRectifiedimage_rectified.

ImageRectifiedImageRectifiedImageRectifiedImageRectifiedimageRectifiedimage_rectified (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / uint2 / real)

Resulting image with modified radial distortion.

CamParamInCamParamInCamParamInCamParamIncamParamIncam_param_in (input_control)  campar HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Internal camera parameter for ImageImageImageImageimageimage.

CamParamOutCamParamOutCamParamOutCamParamOutcamParamOutcam_param_out (input_control)  campar HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Internal camera parameter for ImageImageImageImageimageimage.

结果

change_radial_distortion_imagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImageChangeRadialDistortionImagechange_radial_distortion_image returns 2 ( H_MSG_TRUE) if all parameter values are correct. If the input is empty (no input image is available) the behavior can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

可能的前置算子

change_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamParChangeRadialDistortionCamParchange_radial_distortion_cam_par, read_imageread_imageReadImageReadImageReadImageread_image, grab_imagegrab_imageGrabImageGrabImageGrabImagegrab_image

可能的后置算子

edges_imageedges_imageEdgesImageEdgesImageEdgesImageedges_image, thresholdthresholdThresholdThresholdThresholdthreshold

参考其它

change_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamParChangeRadialDistortionCamParchange_radial_distortion_cam_par, camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration, read_cam_parread_cam_parReadCamParReadCamParReadCamParread_cam_par, change_radial_distortion_contours_xldchange_radial_distortion_contours_xldChangeRadialDistortionContoursXldChangeRadialDistortionContoursXldChangeRadialDistortionContoursXldchange_radial_distortion_contours_xld, change_radial_distortion_pointschange_radial_distortion_pointsChangeRadialDistortionPointsChangeRadialDistortionPointsChangeRadialDistortionPointschange_radial_distortion_points

模块

Calibration