unreal.LensFile

class unreal.LensFile(outer=None, name='None')

Bases: unreal.Object

A Lens file containing calibration mapping from FIZ data

C++ Source:

  • Plugin: CameraCalibrationCore

  • Module: CameraCalibrationCore

  • File: LensFile.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_import_data (AssetImportData): [Read-Only] Asset Import Data: Importing data and options used for importing ulens files.

  • data_mode (LensDataMode): [Read-Write] Data Mode: Type of data used for lens mapping

  • lens_info (LensInfo): [Read-Write] Lens Info: Lens information

  • user_metadata (Map(str, str)): [Read-Write] User Metadata: Metadata user could enter for its lens

add_distortion_point(new_focus, new_zoom, new_point, new_focal_length) None

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

Parameters
add_focal_length_point(new_focus, new_zoom, new_focal_length) None

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

Parameters
add_image_center_point(new_focus, new_zoom, new_point) None

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

Parameters
add_nodal_offset_point(new_focus, new_zoom, new_point) None

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

Parameters
add_st_map_point(new_focus, new_zoom, new_point) None

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

Parameters
clear_all() None

Removes all points of all tables

clear_data(data_category) None

Removes table associated to data category

Parameters

data_category (LensDataCategory) –

property data_mode

[Read-Write] Data Mode: Type of data used for lens mapping

Type

(LensDataMode)

evaluate_distortion_data(focus, zoom, filmback, lens_handler) bool

Draws the distortion map based on evaluation point

Parameters
Return type

bool

evaluate_distortion_parameters(focus, zoom) DistortionInfo or None

Returns interpolated distortion parameters

Parameters
Returns

out_evaluated_value (DistortionInfo):

Return type

DistortionInfo or None

evaluate_focal_length(focus, zoom) FocalLengthInfo or None

Returns interpolated focal length

Parameters
Returns

out_evaluated_value (FocalLengthInfo):

Return type

FocalLengthInfo or None

evaluate_image_center_parameters(focus, zoom) ImageCenterInfo or None

Returns interpolated image center parameters based on input focus and zoom

Parameters
Returns

out_evaluated_value (ImageCenterInfo):

Return type

ImageCenterInfo or None

evaluate_nodal_point_offset(focus, zoom) NodalPointOffset or None

Returns interpolated nodal point offset based on input focus and zoom

Parameters
Returns

out_evaluated_value (NodalPointOffset):

Return type

NodalPointOffset or None

evaluate_normalized_focus(normalized_value) float

Returns interpolated focus based on input normalized value and mapping

Parameters

normalized_value (float) –

Return type

float

evaluate_normalized_iris(normalized_value) float

Returns interpolated iris based on input normalized value and mapping

Parameters

normalized_value (float) –

Return type

float

get_distortion_point(focus, zoom) DistortionInfo or None

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

Parameters
Returns

out_distortion_info (DistortionInfo):

Return type

DistortionInfo or None

get_distortion_points()

Gets all Distortion points struct with focus, zoom and info

Return type

Array(DistortionPointInfo)

get_focal_length_point(focus, zoom) FocalLengthInfo or None

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

Parameters
Returns

out_focal_length_info (FocalLengthInfo):

Return type

FocalLengthInfo or None

get_focal_length_points()

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

Return type

Array(FocalLengthPointInfo)

get_image_center_point(focus, zoom) ImageCenterInfo or None

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

Parameters
Returns

out_image_center_info (ImageCenterInfo):

Return type

ImageCenterInfo or None

get_image_center_points()

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

Return type

Array(ImageCenterPointInfo)

get_nodal_offset_point(focus, zoom) NodalPointOffset or None

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

Parameters
Returns

out_nodal_point_offset (NodalPointOffset):

Return type

NodalPointOffset or None

get_nodal_offset_points()

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

Return type

Array(NodalOffsetPointInfo)

get_st_map_point(focus, zoom) STMapInfo or None

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

Parameters
Returns

out_st_map_info (STMapInfo):

Return type

STMapInfo or None

get_st_map_points()

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

Return type

Array(STMapPointInfo)

has_focus_encoder_mapping() bool

Whether focus encoder mapping is configured

Return type

bool

has_iris_encoder_mapping() bool

Whether iris encoder mapping is configured

Return type

bool

has_samples(data_category) bool

Returns whether a category has data samples

Parameters

data_category (LensDataCategory) –

Return type

bool

property lens_info

[Read-Write] Lens Info: Lens information

Type

(LensInfo)

remove_focus_point(data_category, focus) None

Removes a focus point

Parameters
remove_zoom_point(data_category, focus, zoom) None

Removes a zoom point

Parameters
property user_metadata

[Read-Write] User Metadata: Metadata user could enter for its lens

Type

(Map(str, str))