Navigation
API > API/Plugins > API/Plugins/OpenCVLensDistortion > API/Plugins/OpenCVLensDistortion/UOpenCVLensDistortionBlueprintLi-
References
| Module | OpenCVLensDistortion |
| Header | /Engine/Plugins/Compositing/OpenCVLensDistortion/Source/OpenCVLensDistortion/Public/OpenCVLensDistortionBlueprintLibrary.h |
| Include | #include "OpenCVLensDistortionBlueprintLibrary.h" |
| Source | /Engine/Plugins/Compositing/OpenCVLensDistortion/Source/OpenCVLensDistortion/Private/OpenCVLensDistortionBlueprintLibrary.cpp |
UFUNCTION&40;BlueprintCallable, Category&61;"Lens Distortion &124; OpenCV",
Meta&61;&40;WorldContext&61;"WorldContextObject"&41;&41;
static UTexture2D &42; CreateUndistortUVDisplacementMap
&40;
const FOpenCVLensDistortionParameters & LensParameters,
const FIntPoint & ImageSize,
const float CroppingFactor,
FOpenCVCameraViewInfo & CameraViewInfo
&41;
Remarks
Creates a texture containing a DisplacementMap in the Red and the Green channel for undistorting a camera image. This call can take quite some time to process depending on the resolution. Texture2D containing the distort to undistort space displacement map.
Parameters
| Name | Description |
|---|---|
| LensParameters | The Lens distortion parameters with which to compute the UV displacement map. |
| ImageSize | The size of the camera image to be undistorted in pixels. Scaled down resolution will have an impact. |
| CroppingFactor | One means OpenCV will attempt to crop out all empty pixels resulting from the process (essentially zooming the image). Zero will keep all pixels. |
| CameraViewInfo | Information computed by OpenCV about the undistorted space. Can be used with SceneCapture to adjust FOV. |