ClassesClassesClassesClasses | | | | Operators

change_radial_distortion_imageT_change_radial_distortion_imageChangeRadialDistortionImagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImage (Operator)

Name

change_radial_distortion_imageT_change_radial_distortion_imageChangeRadialDistortionImagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImage — Change the radial distortion of an image.

Signature

change_radial_distortion_image(Image, Region : ImageRectified : CamParamIn, CamParamOut : )

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

Herror change_radial_distortion_image(Hobject Image, Hobject Region, Hobject* ImageRectified, const HTuple& CamParamIn, const HTuple& CamParamOut)

HImage HImage::ChangeRadialDistortionImage(const HRegion& Region, const HTuple& CamParamIn, const HTuple& CamParamOut) const

HImageArray HImageArray::ChangeRadialDistortionImage(const HRegion& Region, const HTuple& CamParamIn, const HTuple& CamParamOut) const

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

HImage HImage::ChangeRadialDistortionImage(const HRegion& Region, const HTuple& CamParamIn, const HTuple& CamParamOut) const

void HOperatorSetX.ChangeRadialDistortionImage(
[in] IHUntypedObjectX* Image, [in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*ImageRectified, [in] VARIANT CamParamIn, [in] VARIANT CamParamOut)

IHImageX* HImageX.ChangeRadialDistortionImage(
[in] IHRegionX* Region, [in] VARIANT CamParamIn, [in] VARIANT CamParamOut)

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

HImage HImage.ChangeRadialDistortionImage(HRegion region, HTuple camParamIn, HTuple camParamOut)

Description

change_radial_distortion_imagechange_radial_distortion_imageChangeRadialDistortionImagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImage changes the radial distortion of the input image ImageImageImageImageImageimage in accordance to the internal camera parameters CamParamInCamParamInCamParamInCamParamInCamParamIncamParamIn and CamParamOutCamParamOutCamParamOutCamParamOutCamParamOutcamParamOut. Each pixel of the output image that lies within the region RegionRegionRegionRegionRegionregion is transformed into the image plane using CamParamOutCamParamOutCamParamOutCamParamOutCamParamOutcamParamOut and subsequently projected into a subpixel of ImageImageImageImageImageimage using CamParamInCamParamInCamParamInCamParamInCamParamIncamParamIn. The resulting gray value is determined by bilinear interpolation. If the subpixel is outside of ImageImageImageImageImageimage, the corresponding pixel in ImageRectifiedImageRectifiedImageRectifiedImageRectifiedImageRectifiedimageRectified 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 RegionRegionRegionRegionRegionregion (which must be previously generated by, for example, using gen_empty_objgen_empty_objGenEmptyObjgen_empty_objGenEmptyObjGenEmptyObj). 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 RegionRegionRegionRegionRegionregion.

If CamParamOutCamParamOutCamParamOutCamParamOutCamParamOutcamParamOut was computed via change_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamPar, ImageRectifiedImageRectifiedImageRectifiedImageRectifiedImageRectifiedimageRectified is equivalent to ImageImageImageImageImageimage obtained with a lens with a modified radial distortion. If Kappa is 0 the image is rectified. A subsequent pose estimation (determination of the external camera parameters) is not affected by this operation.

Attention

change_radial_distortion_imagechange_radial_distortion_imageChangeRadialDistortionImagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImage 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.

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte / uint2 / real)

Original image.

RegionRegionRegionRegionRegionregion (input_object)  region objectHRegionHRegionHRegionHRegionXHobject

Region of interest in ImageRectifiedImageRectifiedImageRectifiedImageRectifiedImageRectifiedimageRectified.

ImageRectifiedImageRectifiedImageRectifiedImageRectifiedImageRectifiedimageRectified (output_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Resulting image with modified radial distortion.

CamParamInCamParamInCamParamInCamParamInCamParamIncamParamIn (input_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Internal camera parameter for ImageImageImageImageImageimage.

Number of elements: CamParamIn == 8 || CamParamIn == 12

CamParamOutCamParamOutCamParamOutCamParamOutCamParamOutcamParamOut (input_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Internal camera parameter for ImageImageImageImageImageimage.

Number of elements: CamParamOut == 8 || CamParamOut == 12

Result

change_radial_distortion_imagechange_radial_distortion_imageChangeRadialDistortionImagechange_radial_distortion_imageChangeRadialDistortionImageChangeRadialDistortionImage 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

change_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamPar, read_imageread_imageReadImageread_imageReadImageReadImage, grab_imagegrab_imageGrabImagegrab_imageGrabImageGrabImage

Possible Successors

edges_imageedges_imageEdgesImageedges_imageEdgesImageEdgesImage, thresholdthresholdThresholdthresholdThresholdThreshold

See also

change_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamPar, camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration, read_cam_parread_cam_parReadCamParread_cam_parReadCamParReadCamPar, change_radial_distortion_contours_xldchange_radial_distortion_contours_xldChangeRadialDistortionContoursXldchange_radial_distortion_contours_xldChangeRadialDistortionContoursXldChangeRadialDistortionContoursXld, change_radial_distortion_pointschange_radial_distortion_pointsChangeRadialDistortionPointschange_radial_distortion_pointsChangeRadialDistortionPointsChangeRadialDistortionPoints

Module

Calibration


ClassesClassesClassesClasses | | | | Operators