ULensFile

A Lens file containing calibration mapping from FIZ data

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

CameraCalibrationCore

Header

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

Include

#include "LensFile.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(BlueprintType)
class ULensFile :
    public UObject,
    public FTickableGameObject

Remarks

A Lens file containing calibration mapping from FIZ data

Variables

Name Description

Protected variable

TUniquePtr< ICa...

 

CalibratedMapProcessor

Processor handling derived data out of calibrated st maps

Public variable UProperty Category, EditAnywhere

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 UProperty Category, EditAnywhere BlueprintReadOnly

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

TMap< FString, ...

 

UserMetadata

Metadata user could enter for its lens

Constructors

Name Description

Public function

ULensFile()

Functions

Name Description

Public function

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

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

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

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

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

void

 

ClearAll()

Removes all points of all tables

Public function

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

Public function Const

bool

 

EvaluateDistortionData

(
    float InFocus,
    float InZoom,
    FVector2D InFilmback,
    ULensDistortionModelHandlerBase...,
    FDistortionData& OutDistortionData
)

Draws the distortion map based on evaluation point

Protected function Const

bool

 

EvaluateDistortionForParameters

(
    float InFocus,
    float InZoom,
    FVector2D InFilmback,
    ULensDistortionModelHandlerBase...,
    FDistortionData& OutDistortionData
)

Evaluates distortion based on InFocus and InZoom using parameters

Public function Const

bool

 

EvaluateDistortionParameters

(
    float InFocus,
    float InZoom,
    FDistortionInfo& OutEvaluatedValue
)

Returns interpolated distortion parameters

Public function Const

bool

 

EvaluateFocalLength

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

Returns interpolated focal length

Public function Const

bool

 

EvaluateImageCenterParameters

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

Returns interpolated image center parameters based on input focus and zoom

Public function Const

bool

 

EvaluateNodalPointOffset

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

Returns interpolated nodal point offset based on input focus and zoom

Public function Const

float

 

EvaluateNormalizedFocus

(
    float InNormalizedValue
)

Returns interpolated focus based on input normalized value and mapping

Public function Const

float

 

EvaluateNormalizedIris

(
    float InNormalizedValue
)

Returns interpolated iris based on input normalized value and mapping

Protected function Const

bool

 

EvaluteDistortionForSTMaps

(
    float InFocus,
    float InZoom,
    FVector2D InFilmback,
    ULensDistortionModelHandlerBase...,
    FDistortionData& OutDistortionData
)

Evaluates distortion based on InFocus and InZoom using STMaps

Public function Const

bool

 

HasFocusEncoderMapping()

Whether focus encoder mapping is configured

Public function Const

bool

 

HasIrisEncoderMapping()

Whether iris encoder mapping is configured

Public function Const

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

void

 

RemoveFocusPoint

(
    ELensDataCategory InDataCategory,
    float InFocus
)

Removes a focus point

Public function

void

 

RemoveZoomPoint

(
    ELensDataCategory InDataCategory,
    float InFocus,
    float InZoom
)

Removes a zoom point

Protected function Const

void

 

SetupNoDistortionOutput

(
    ULensDistortionModelHandlerBase...,
    FDistortionData& OutDistortionData
)

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

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

InputTolerance

Tolerance used to consider input focus or zoom to be identical

UndistortedUVs

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

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss