ULensFile

A Lens file containing calibration mapping from FIZ data

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

CameraCalibrationCore

Header

/Engine/Plugins/VirtualProduction/CameraCalibrationCore/Source/CameraCalibrationCore/Public/LensFile.h

Include

#include "LensFile.h"

Syntax

UCLASS(BlueprintType)
class ULensFile :
    public UObject,
    public FTickableGameObject

Remarks

A Lens file containing calibration mapping from FIZ data

Variables

Name Description

Public variable UProperty Category instanced, visibleanywhere

TObjectPtr< UAs...

 

AssetImportData

Importing data and options used for importing ulens files.

Protected variable

TUniquePtr< ICa...

 

CalibratedMapProcessor

Processor handling derived data out of calibrated st maps

Public variable UProperty Category, EditAnywhere BlueprintReadWrite

ELensDataMode

 

DataMode

Type of data used for lens mapping

Protected variable

int32

 

DerivedDataInFlightCount

Derived data compute jobs we are waiting on

Protected variable UProperty Transient

TArray< UTextur...

 

DistortionDisplacementMapHolders

Texture used to store temporary distortion displacement map when using map blending

Public variable UProperty

FDistortionTabl...

 

DistortionTable

Distortion parameters table mapping to input focus/zoom

Public variable UProperty

FEncodersTable

 

EncodersTable

Encoder mapping table

Public variable UProperty

FFocalLengthTab...

 

FocalLengthTable

Focal length table mapping to input focus/zoom

Public variable UProperty

FImageCenterTab...

 

ImageCenterTable

Image center table mapping to input focus/zoom

Public variable

float

 

InputTolerance

Tolerance used to consider input focus or zoom to be identical

Public variable UProperty Category, EditAnywhere BlueprintReadWrite

FLensInfo

 

LensInfo

Lens information

Public variable UProperty

FNodalOffsetTab...

 

NodalOffsetTable

Nodal offset table mapping to input focus/zoom

Public variable UProperty

FSTMapTable

 

STMapTable

STMap table mapping to input focus/zoom

Protected variable UProperty Transient

TArray< UTextur...

 

UndistortionDisplacementMapHolders

Texture used to store temporary undistortion displacement map when using map blending

Public variable UProperty Category, EditAnywhere BlueprintReadWrite

TMap< FString, ...

 

UserMetadata

Metadata user could enter for its lens

Constructors

Name Description

Public function

ULensFile()

Functions

Name Description

Public function UFunction BlueprintCallable, Category

void

 

AddDistortionPoint

(
    float NewFocus,
    float NewZoom,
    const FDistortionInfo& NewPoint,
    const FFocalLengthInfo& NewFocalLe...
)

Adds a distortion point in our map. If a point already exist at the location, it is updated

Public function UFunction BlueprintCallable, Category

void

 

AddFocalLengthPoint

(
    float NewFocus,
    float NewZoom,
    const FFocalLengthInfo& NewFocalLe...
)

Adds a focal length point in our map. If a point already exist at the location, it is updated

Public function UFunction BlueprintCallable, Category

void

 

AddImageCenterPoint

(
    float NewFocus,
    float NewZoom,
    const FImageCenterInfo& NewPoint
)

Adds an ImageCenter point in our map. If a point already exist at the location, it is updated

Public function UFunction BlueprintCallable, Category

void

 

AddNodalOffsetPoint

(
    float NewFocus,
    float NewZoom,
    const FNodalPointOffset& NewPoint
)

Adds an NodalOffset point in our map. If a point already exist at the location, it is updated

Public function UFunction BlueprintCallable, Category

void

 

AddSTMapPoint

(
    float NewFocus,
    float NewZoom,
    const FSTMapInfo& NewPoint
)

Adds an STMap point in our map. If a point already exist at the location, it is updated

Public function UFunction BlueprintCallable, Category

void

 

ClearAll()

Removes all points of all tables

Public function UFunction BlueprintCallable, Category

void

 

ClearData

(
    ELensDataCategory InDataCategory
)

Removes table associated to data category

Protected function Const

float

 

ComputeOverscan

(
    const FDistortionData& DerivedData,
    FVector2D PrincipalPoint
)

Returns the overscan factor based on distorted UV and image center

Protected function

void

 

CreateIntermediateDisplacementMaps

(
    const FIntPoint DisplacementMapReso...
)

Create the intermediate displacement maps needed to do map blending to get final distortion/undistortion maps

Public function Const UFunction BlueprintPure, Category

bool

 

EvaluateDistortionData

(
    float InFocus,
    float InZoom,
    FVector2D InFilmback,
    ULensDistortionModelHandlerBase...
)

Draws the distortion map based on evaluation point

Protected function Const

bool

 

EvaluateDistortionForParameters

(
    float InFocus,
    float InZoom,
    FVector2D InFilmback,
    ULensDistortionModelHandlerBase...
)

Evaluates distortion based on InFocus and InZoom using parameters

Protected function Const

bool

 

EvaluateDistortionForSTMaps

(
    float InFocus,
    float InZoom,
    FVector2D InFilmback,
    ULensDistortionModelHandlerBase...
)

Evaluates distortion based on InFocus and InZoom using STMaps

Public function Const UFunction BlueprintPure, Category

bool

 

EvaluateDistortionParameters

(
    float InFocus,
    float InZoom,
    FDistortionInfo& OutEvaluatedValue
)

Returns interpolated distortion parameters

Public function Const UFunction BlueprintPure, Category

bool

 

EvaluateFocalLength

(
    float InFocus,
    float InZoom,
    FFocalLengthInfo& OutEvaluatedValu...
)

Returns interpolated focal length

Public function Const UFunction BlueprintPure, Category

bool

 

EvaluateImageCenterParameters

(
    float InFocus,
    float InZoom,
    FImageCenterInfo& OutEvaluatedValu...
)

Returns interpolated image center parameters based on input focus and zoom

Public function Const UFunction BlueprintPure, Category

bool

 

EvaluateNodalPointOffset

(
    float InFocus,
    float InZoom,
    FNodalPointOffset& OutEvaluatedVal...
)

Returns interpolated nodal point offset based on input focus and zoom

Public function Const UFunction BlueprintPure, Category

float

 

EvaluateNormalizedFocus

(
    float InNormalizedValue
)

Returns interpolated focus based on input normalized value and mapping

Public function Const UFunction BlueprintPure, Category

float

 

EvaluateNormalizedIris

(
    float InNormalizedValue
)

Returns interpolated iris based on input normalized value and mapping

Public function Const

const FBaseL...

 

GetDataTable

(
    ELensDataCategory InDataCategory
)

Get data table reference based on given category

Public function Const UFunction BlueprintPure, Category

bool

 

GetDistortionPoint

(
    float InFocus,
    float InZoom,
    FDistortionInfo& OutDistortionInfo
)

Gets a Distortion point by given focus and zoom, if point does not exists returns false

Public function Const UFunction BlueprintPure, Category

TArray< FDis...

 

GetDistortionPoints()

Gets all Distortion points struct with focus, zoom and info

Public function Const UFunction BlueprintPure, Category

bool

 

GetFocalLengthPoint

(
    float InFocus,
    float InZoom,
    FFocalLengthInfo& OutFocalLengthIn...
)

Gets a Focal Length point by given focus and zoom, if point does not exists returns false

Public function Const UFunction BlueprintPure, Category

TArray< FFoc...

 

GetFocalLengthPoints()

Gets all Focal Length points struct with focus, zoom and info

Public function Const UFunction BlueprintPure, Category

bool

 

GetImageCenterPoint

(
    float InFocus,
    float InZoom,
    FImageCenterInfo& OutImageCenterIn...
)

Gets a Image Center point by given focus and zoom, if point does not exists returns false

Public function Const UFunction BlueprintPure, Category

TArray< FIma...

 

GetImageCenterPoints()

Gets all Image Center points struct with focus, zoom and info

Public function Const UFunction BlueprintPure, Category

bool

 

GetNodalOffsetPoint

(
    float InFocus,
    float InZoom,
    FNodalPointOffset& OutNodalPointOf...
)

Gets a Nodal Offset point by given focus and zoom, if point does not exists returns false

Public function Const UFunction BlueprintPure, Category

TArray< FNod...

 

GetNodalOffsetPoints()

Gets all Nodal Offset points struct with focus, zoom and info

Public function Const UFunction BlueprintPure, Category

bool

 

GetSTMapPoint

(
    float InFocus,
    float InZoom,
    FSTMapInfo& OutSTMapInfo
)

Gets a ST Map point by given focus and zoom, if point does not exists returns false

Public function Const UFunction BlueprintPure, Category

TArray< FSTM...

 

GetSTMapPoints()

Gets all ST Map points struct with focus, zoom and info

Public function Const UFunction BlueprintPure, Category

bool

 

HasFocusEncoderMapping()

Whether focus encoder mapping is configured

Public function Const UFunction BlueprintPure, Category

bool

 

HasIrisEncoderMapping()

Whether iris encoder mapping is configured

Public function Const UFunction BlueprintPure, Category

bool

 

HasSamples

(
    ELensDataCategory InDataCategory
)

Returns whether a category has data samples

Public function Const

bool

 

IsCineCameraCompatible

(
    const UCineCameraComponent* Ci...
)

Whether the sensor dimensions in the lens file will be compatible with the sensor dimensions of the input CineCameraComponent

Public function

void

 

OnDistortionDerivedDataJobCompleted

(
    const FDerivedDistortionDataJobOutp...
)

Callbacked when stmap derived data has completed

Public function UFunction BlueprintCallable, Category

void

 

RemoveFocusPoint

(
    ELensDataCategory InDataCategory,
    float InFocus
)

Removes a focus point

Public function UFunction BlueprintCallable, Category

void

 

RemoveZoomPoint

(
    ELensDataCategory InDataCategory,
    float InFocus,
    float InZoom
)

Removes a zoom point

Protected function Const

void

 

SetupNoDistortionOutput

Clears output displacement map on LensHandler to have no distortion and setup distortion data to match that

Protected function

void

 

UpdateDerivedData()

Updates derived data entries to make sure it matches what is assigned in map points based on data mode

Public function

void

 

UpdateDisplacementMapResolution

(
    const FIntPoint NewDisplacementMapR...
)

Update the resolution used for intermediate blending displacement maps and for STMap derived data

Public function

void

 

UpdateInputTolerance

(
    const float NewTolerance
)

Update the input tolerance used when adding points to calibration tables

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeChainProperty

(
    FPropertyChangedChainEvent& Proper...
)

This alternate version of PostEditChange is called when properties inside structs are modified.

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Overridden from FTickableGameObject

Name Description

Public function Virtual Const

bool

 

IsTickableInEditor()

Used to determine whether the object should be ticked in the editor.

Overridden from FTickableObjectBase

Name Description

Public function Virtual Const

TStatId

 

GetStatId()

Return the stat id to use for this tickable

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

Pure virtual that must be overloaded by the inheriting class.

Constants

Name

Description

DisplacementMapHolderCount

The number of intermediate displacement maps needed to do map blending

UndistortedUVs

UV coordinates of 8 points (4 corners + 4 mid points)