Table of Contents

Class Camera

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

Payload model for the camera that can interface with Unreal and produce images.

public class Camera : PhysicalComponent
Inheritance
Camera
Inherited Members

Constructors

Camera()

Default constructor

protected Camera()

Fields

Aperture

[mm] The diameter of the opening of the lens, larger opening means wider FOV

public double Aperture

Field Value

double

ApertureFStops

[f-stops] The ratio of the focal length to the aperture diameter, larger ratio means wider FOV

public double ApertureFStops

Field Value

double

CaptureName

[-] The name of the image that will be saved when the image is captured.

[EditableVariable("-", false, "", "", false)]
public string CaptureName

Field Value

string

CircleOfConfusion

[mm] Defines the acceptable level of blur, light from an object converging before or after the sensor will be out of focus, if it is blurred by more than the circle of confusion it is not inside the depth of field planes this is measured on the sensor itself in this case

public double CircleOfConfusion

Field Value

double

FieldOfView

[deg] The Field Of View (FOV) of the camera

public double FieldOfView

Field Value

double

FocalLength

public double FocalLength

Field Value

double

FocusingDistance

[m] Defines the distance from the lens to where objects are in focus

public double FocusingDistance

Field Value

double

Out_CameraImageMsg

An output message that contains the data from the image and is able to store all the bytes.

public CameraImageMessage Out_CameraImageMsg

Field Value

CameraImageMessage

PixelPitch

public double PixelPitch

Field Value

double

Resolution

The Resolution of the camera sensor

public Vector2 Resolution

Field Value

Vector2

SampleRate

[s] The time between photo captures

[EditableVariable("s", 0, false, "", "", false)]
public double SampleRate

Field Value

double

Properties

LastCaptureTime

[s] Stores the last time of a successful capture

[EditableVariable("s", true, "", "", false)]
public double LastCaptureTime { get; }

Property Value

double

ReadyToCapture

[-] A flag for if the image is ready to capture

[EditableVariable("-", true, "", "", false)]
public bool ReadyToCapture { get; }

Property Value

bool

Methods

CanCapture()

Checks if the camera is ready to capture and if it is, it will reset the flag back to false.

public bool CanCapture()

Returns

bool

A flag if the camera can capture

Capture(string)

Called to capture the photo. This is handled through the Unreal Engine

public void Capture(string name = "")

Parameters

name string

OnUpdate(double, double)

Called when the 'Component' should update

protected override void OnUpdate(double time, double step)

Parameters

time double

current time (seconds)

step double

the time step (seconds)

SetAperture(double)

public bool SetAperture(double aperture)

Parameters

aperture double

Returns

bool

SetCircleOfConfusion(double)

public bool SetCircleOfConfusion(double circleOfConfusion)

Parameters

circleOfConfusion double

Returns

bool

SetFOV(double)

public bool SetFOV(double fov)

Parameters

fov double

Returns

bool

SetFocalDistance(double)

public bool SetFocalDistance(double focalDistance)

Parameters

focalDistance double

Returns

bool

SetFocalLength(double)

public bool SetFocalLength(double focalLength)

Parameters

focalLength double

Returns

bool

SetPixelPitch(double)

public bool SetPixelPitch(double pixelPitch)

Parameters

pixelPitch double

Returns

bool

SetResolution(int, int)

public bool SetResolution(int width, int height)

Parameters

width int
height int

Returns

bool

UpdateDOF()

public bool UpdateDOF()

Returns

bool

UpdateFOV()

public bool UpdateFOV()

Returns

bool