unreal.LensFile
¶
- class unreal.LensFile(outer: Optional[Object] = None, name: Union[Name, str] = 'None')¶
Bases:
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 mappinglens_info
(LensInfo): [Read-Write] Lens Info: Lens informationuser_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:
new_focus (float) –
new_zoom (float) –
new_point (DistortionInfo) –
new_focal_length (FocalLengthInfo) –
- 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:
new_focus (float) –
new_zoom (float) –
new_focal_length (FocalLengthInfo) –
- 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:
new_focus (float) –
new_zoom (float) –
new_point (ImageCenterInfo) –
- 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:
new_focus (float) –
new_zoom (float) –
new_point (NodalPointOffset) –
- 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
- clear_data(data_category) None ¶
Removes table associated to data category
- Parameters:
data_category (LensDataCategory) –
- property data_mode: LensDataMode¶
[Read-Write] Data Mode: Type of data used for lens mapping
- Type:
- evaluate_distortion_data(focus, zoom, filmback, lens_handler) bool ¶
Draws the distortion map based on evaluation point
- Parameters:
focus (float) –
zoom (float) –
filmback (Vector2D) –
lens_handler (LensDistortionModelHandlerBase) –
- Return type:
- 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
- evaluate_normalized_iris(normalized_value) float ¶
Returns interpolated iris based on input normalized value and mapping
- 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() Array[DistortionPointInfo] ¶
Gets all Distortion points struct with focus, zoom and info
- Return type:
- 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() Array[FocalLengthPointInfo] ¶
Gets all Focal Length points struct with focus, zoom and info
- Return type:
- 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() Array[ImageCenterPointInfo] ¶
Gets all Image Center points struct with focus, zoom and info
- Return type:
- 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() Array[NodalOffsetPointInfo] ¶
Gets all Nodal Offset points struct with focus, zoom and info
- Return type:
- 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
- get_st_map_points() Array[STMapPointInfo] ¶
Gets all ST Map points struct with focus, zoom and info
- Return type:
- get_total_point_num(data_category) int32 ¶
Returns total number of the points for given category
- Parameters:
data_category (LensDataCategory) –
- Return type:
int32
- has_samples(data_category) bool ¶
Returns whether a category has data samples
- Parameters:
data_category (LensDataCategory) –
- Return type:
- remove_focus_point(data_category, focus) None ¶
Removes a focus point
- Parameters:
data_category (LensDataCategory) –
focus (float) –
- remove_zoom_point(data_category, focus, zoom) None ¶
Removes a zoom point
- Parameters:
data_category (LensDataCategory) –
focus (float) –
zoom (float) –