---
title: "Camera"
description: "API documentation for Camera"
url: https://developer.disguise.one/python-api/docs/camera/
---

# Camera

A camera which captures a view of objects in the stage. May represent a physical camera with a video input, or a virtual camera which renders the modelled stage objects.

See also: [Stage Guide](/plugins/guides/stage)

Base class (inherits properties and methods): _[SlcAwareDisplay](/python-api/docs/slcawaredisplay#slcawaredisplay)_

Subclasses: _[OptiCalCameraPlan](/python-api/docs/opticalcameraplan#opticalcameraplan)_, _[SphericalCamera](/python-api/docs/sphericalcamera#sphericalcamera)_, _[VirtualCamera](/python-api/docs/virtualcamera#virtualcamera)_

## Properties

#### **activeMixedRealitySets** : _List\[[MixedRealitySet](/python-api/docs/mixedrealityset#mixedrealityset)\]_ _(Read-Only)_

The mixed reality sets that this camera is currently active in.

#### **aperture** : _float_

Aperture (f-stop) value, defined as the focal length / aperture diameter

#### **aspectRatio** : _float_

Aspect ratio of the camera lens, defined as x/y. This is not necessarily the same as the aspect ratio of the camera’s resolution, unless the pixels are perfectly square.

#### **cameraImagingPredictionSamples** : _int_

Number of samples to use for camera imaging forward prediction

_Category: Prediction  
UserName: Camera imaging delay prediction samples_

#### **cameraImagingPredictionTerms** : _int_

Number of terms to use for camera imaging forward prediction

_Category: Prediction  
UserName: Camera imaging delay prediction terms_

#### **centerShiftMM** : _[Vec2](/python-api/docs/vec2#vec2)_

Center shift of the camera in millimeters.

#### **doesTrackingSourceSupportLensData** : _bool_ _(Read-Only)_

Whether the tracking source attached to this camera (if present) supports lens data.

#### **fieldOfViewH** : _float_

Horizontal field of view of the camera, in degrees.

#### **fieldOfViewV** : _float_

Vertical field of view of the camera, in degrees.

#### **focalLengthMM** : _float_

Focal length of the camera in millimeters. Defined relative to the sensor width of the camera.

#### **focusDistance** : _float_

Distance to the focal plane in m

#### **frontplateCompositeOrder** : _int_

Order in which the distorted and undistorted front plates are composited

_Options: {0: ‘Undistorted On Top’, 1: ‘Distorted On Top’}  
Category: Output  
UserName: Frontplate composite order_

#### **frontplateFade** : _float_

The opacity of the camera’s frontplate content. 0 is fully transparent, 1 is fully opaque.

_Category: Output  
UserName: AR fade_

#### **frontplateReprojectionMode** : _int_

Mode used for frontplate delay compensation and reprojection:  
Backplate Aligned: The frontplate is delayed and reprojected with the backplate.  
No Reprojection: The frontplate is delayed with the backplate but not reprojected.  
Minimal Latency: The most recently rendered frontplate is composited with no reprojection.

_Options: {0: ‘Backplate Aligned’, 1: ‘No Reprojection’, 2: ‘Minimal Latency’}  
Category: Output  
UserName: Frontplate reprojection_

#### **isLiveCamera** : _bool_ _(Read-Only)_

Whether the camera has a live video input.

#### **k1k2k3** : _[Vec](/python-api/docs/vec#vec)_

Radial lens distortion coefficients k1, k2 and k3

#### **lens** : _[LensIntrinsics](/python-api/docs/lensintrinsics#lensintrinsics)_

The camera’s lens intrinsics values.

#### **lensFocusMode** : _int_

Disabled: No focus effects applied.  
Manual: Use focus distance set manually or from tracking source.  
Object Tracking: Set the focus distance based on a tracked object.

_Options: {0: ‘Disabled’, 1: ‘Manual’, 2: ‘Object Tracking’}  
Category: Focus  
UserName: Focus mode_

#### **lensFocusParams** : _[LensFocusParams](/python-api/docs/lensfocusparams#lensfocusparams)_

The lens focus parameters of the camera. These parameters are used to define depth of field effects, such as aperture and focus distance.

#### **lensFocusTrackedObject** : _[Object](/python-api/docs/object#object)_

Object used to calculate focus distance when focus mode is set to Object Tracking

_Category: Focus  
UserName: Focus tracked object_

#### **minOverscan** : _[Vec2](/python-api/docs/vec2#vec2)_ _(Read-Only)_

Minimum overscan required to avoid blank areas in the image, based on distortion settings.  
Note that a moving camera may require larger overscan than this to account for reprojection due to latency compensation.

#### **orthographicScale** : _float_

Orthographic scale of the camera, when the camera is in orthographic mode.

_Category: Stage Render  
UserName: Orthographic scale_

#### **overscan** : _[Vec2](/python-api/docs/vec2#vec2)_

Generate extra content outside the original canvas resolution to compensate for lens distortion.  
1 means 100% of original resolution, 2 means 200%.

_Category: Lens  
UserName: Overscan_

#### **overscanResolution** : _[Int2](/python-api/docs/int2#int2)_ _(Read-Only)_

The resolution of the overscanned camera image. This is equal to the camera resolution multiplied by the overscan.

#### **paWidthMM** : _float_

The physical width of the camera sensor in millimeters. Changing this does not affect the field of view or distortion of the camera.

#### **projectionMatrixType** : _int_

Perspective or orthographic view of stage

_Options: {0: ‘Perspective’, 1: ‘Orthographic’}  
Category: Stage Render  
UserName: Camera type_

#### **radialMaskScale** : _float_

Apply a radial mask to the filmed content. Scales between 0 and 1 based on the image diagonal.

_Category: Output  
UserName: Radial mask scale_

#### **renderTimeToCameraCaptureTime** : _float_

Amount of time between rendering a frame and the camera taking the picture of the stage showing that frame

_Category: Prediction  
UserName: Camera imaging delay (sec)_

#### **renderTimeToVideoReceiveTimeSec** : _float_

Amount of time between rendering a frame and receiving the corresponding video frame

_Category: Physical  
UserName: Video receive delay (sec)_

#### **sensorSizeMM** : _[Vec2](/python-api/docs/vec2#vec2)_

The size of the camera’s sensor in millimeters. Changing this does not affect the field of view or distortion of the camera.

#### **setExtensionAlpha** : _float_

Set to 1 for set extension, or 0 to turn it off

_Category: Output  
UserName: Set extension fade_

#### **setExtensionFeather** : _int_

The size of the feathering blending the set extension with reality

_Category: Output  
UserName: Set extension feather_

#### **spatialCalibration** : _[SpatialCalibrationConfig](/python-api/docs/spatialcalibrationconfig#spatialcalibrationconfig)_

Calibrate the difference between d3-space and tracker space by adjusting the cameras position, zoom and focus.  
This should always be calibrated after the Video Receive Delay.

_Category: Physical  
UserName: Spatial calibration_

#### **sphericalRenderParams** : _[SphericalRenderParams](/python-api/docs/sphericalrenderparams#sphericalrenderparams)_ _(Read-Only)_

Spherical render parameters, used by cameras which are capable of producing an equirectangular spherical output.

#### **stageRenderSettings** : _[StageRenderSettings](/python-api/docs/stagerendersettings#stagerendersettings)_ _(Read-Only)_

Settings defining how the camera renders the stage. For example, which objects are visible and which renderer is used.

#### **takeResolutionFromGuiHead** : _int_

Whether the camera resolution is fixed or should be taken from the GUI head.

_Options: {0: ‘Fixed’, 1: ‘Take from GUI’}  
Category: Settings  
UserName: Resolution Source_

#### **usingSpatialCalibrationLensPoses** : _bool_ _(Read-Only)_

Whether or not the camera is using spatial calibration lens poses for tracking. True if the camera has a tracking source and secondary spatial calibration has been carried out, False otherwise.

#### **videoIn** : _[LogicalVideoInDevice](/python-api/docs/logicalvideoindevice#logicalvideoindevice)_

Video input received from real-world camera

_Category: Physical  
UserName: Video in_

#### **videoInCompositeFade** : _float_

Set to 1 for video input in transmission, or 0 to turn it off. If no video input is selected, fade the visualser. This shows AR effects only, against an alpha background.

_Category: Output  
UserName: Video input fade_

#### **videoReceiveTimeToTrackerReceiveTimeSec** : _float_

Amount of time between receiving a video frame and receiving the corresponding tracking data.  
If negative tracker data arrives before the video frame.  
If positive, tracker data arrives after the video frame.

_Category: Physical  
UserName: Spatial Tracker delay (sec)_

#### **visibilitySettings** : _[StageRenderSettings](/python-api/docs/stagerendersettings#stagerendersettings)_

Settings controlling the camera’s render of the stage

_Category: Stage Render  
UserName: Render settings_

#### **zFar** : _float_

Set the furthest distance from the camera before an object will be clipped.

_Category: Stage Render  
UserName: Far clipping plane_

#### **zNear** : _float_

Set the closest distance to the camera before an object will be clipped.

_Category: Stage Render  
UserName: Near clipping plane_

## Variables

#### **TargetBackplate** : _Final\[int\]_ = 1

Index of the camera’s backplate display target

#### **TargetFrontplate** : _Final\[int\]_ = 2

Index of the camera’s frontplate display target

#### **TargetTransmission** : _Final\[int\]_ = 0

Index of the camera’s transmission display target

## Methods

#### **applyCalibrationToLockedOffCamera**(self)

Applies the calibration to a locked off camera.

This method applies the results of a spatial calibration in the case where the camera does not have a tracking source. In this case it is treated as ‘locked off’ i.e. static, so the calibrated pose is applied directly to the camera position, rotation and lens intrinsics.

#### **saveCurrentView**(self, filename: _str_)

Save the current camera view to a file.

This method saves the current camera view to a file with the specified filename. The file will be saved in the “screenshots” directory, and the extension will be determined by the screen shot texture format.

**Parameters**:

-   filename: The name of the file to save the camera view to.

## Static Methods

#### **localVisualiserCamera**() -> _[Camera](/python-api/docs/camera#camera)_

Get the visualiser camera for the local machine.  
This is the camera which provides the stage view for the Designer UI.
