Skip to content

Class Camera

ClassList > Camera

Base class used to identify different camera types such as spectral, RGB and gray cameras. More...

  • #include <camera.h>

Inherited by the following classes: GrayCamera, RGBCamera, SpectralCamera

Public Attributes

Type Name
std::shared_ptr< XiAPIWrapper > m_apiWrapper
std::unique_ptr< CameraFamily > * m_cameraFamily

Public Functions

Type Name
void AutoExposure (bool on) const
A method to control auto exposure settings.
Camera (std::unique_ptr< CameraFamily > * family, HANDLE * handle)
int GetExposure () const
Retrieves the exposure value.
int GetExposureMs () const
Retrieves the exposure time in milliseconds.
virtual int InitializeCamera ()
virtual int InitializeCameraCommonParameters ()
void SetExposure (int exp) const
Sets the exposure value for the camera.
void SetExposureMs (int exp) const
Sets the exposure time in milliseconds.
virtual ~Camera () = default

Protected Attributes

Type Name
HANDLE * m_cameraHandle

Detailed Description

This class handles the connection the the API wrapper for communicating with each camera, and defines custom initialization parameters (binning, data format, etc.) for each camera.

Public Attributes Documentation

variable m_apiWrapper

std::shared_ptr<XiAPIWrapper> Camera::m_apiWrapper;

Wrapper to xiAPI, useful for mocking the aPI during testing


variable m_cameraFamily

std::unique_ptr<CameraFamily>* Camera::m_cameraFamily;

Unique pointer to camera family


Public Functions Documentation

function AutoExposure

A method to control auto exposure settings.

void Camera::AutoExposure (
    bool on
) const

The AutoExposure method enables or disables auto exposure for a given camera. It is used to adjust the camera settings automatically based on the lighting conditions.


function Camera

inline Camera::Camera (
    std::unique_ptr< CameraFamily > * family,
    HANDLE * handle
) 

Constructor of camera class

Parameters:

  • family family of the camera to be constructed
  • handle camera handle used for all interactions with it

function GetExposure

Retrieves the exposure value.

int Camera::GetExposure () const

This function returns the exposure value, which represents the amount of light that reaches the camera sensor. The exposure value determines the brightness of the captured image.

Returns:

The exposure value.


function GetExposureMs

Retrieves the exposure time in milliseconds.

int Camera::GetExposureMs () const

This function is used to retrieve the exposure time in milliseconds.

Returns:

The exposure time in milliseconds.


function InitializeCamera

virtual int Camera::InitializeCamera () 

initializes camera by setting parameters such as framerate, binning mode, etc.


function InitializeCameraCommonParameters

virtual int Camera::InitializeCameraCommonParameters () 

Initializes camera parameters that are common across all supported cameras:

Returns:

status code as an integer


function SetExposure

Sets the exposure value for the camera.

void Camera::SetExposure (
    int exp
) const

This function is used to set the exposure value for the camera.

Parameters:

  • exp The exposure value to be set.

function SetExposureMs

Sets the exposure time in milliseconds.

void Camera::SetExposureMs (
    int exp
) const

This function is used to set the exposure time in milliseconds for a device.

Parameters:

  • exp The exposure time in milliseconds.

function ~Camera

virtual Camera::~Camera () = default

Protected Attributes Documentation

variable m_cameraHandle

HANDLE* Camera::m_cameraHandle;

Camera handle used to handle all interactions with it



The documentation for this class was generated from the following file src/camera.h