Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Classes | Public Member Functions | Static Public Member Functions | List of all members
SR::Camera Class Referenceabstract

Class of Sense dealing with video data. More...

#include <camera.h>

Inheritance diagram for SR::Camera:
[legend]
Collaboration diagram for SR::Camera:
[legend]

Classes

class  Descriptor
 Class describing a physical camera. More...
 

Public Member Functions

virtual ~Camera ()
 
virtual Camera::Descriptor getDescriptor ()=0
 Get descriptor to identify physical Camera. More...
 
virtual const unsigned int getStreamCount ()=0
 Get the number of available streams. More...
 
virtual std::shared_ptr< VideoStreamopenVideoStream (VideoListener *listener)=0
 Creates a VideoStream for listener to be connected to. More...
 
virtual void streamClosed (VideoStream *stream)=0
 Closes a specific VideoStream. More...
 
- Public Member Functions inherited from SR::Sense
void setCalibration (Transformation calibration)
 Sets a Transformation object to represent the sense's calibration with respect to the display. More...
 
Transformation getCalibration ()
 Gets callibration. More...
 
virtual ~Sense ()
 Ensures the proper destruction of the sense implementation. More...
 
virtual std::string getName ()=0
 Return the name of the sense. More...
 
virtual std::string getDescription ()=0
 Return a description of the sense. More...
 
virtual void start ()=0
 Start continuous updates, default behaviour is defined in the updater() function. More...
 
virtual void stop ()=0
 Stop continuous updates. More...
 

Static Public Member Functions

static void addImplementation (CameraListFunction *listFunction, CameraCreateImplementationFunction *createFunction, std::string cameraType)
 Static function to make a Camera implementation available through the Camera::listDescriptors and Camera::create functions. More...
 
static std::vector< SR_cameraDescriptorlistDescriptors ()
 List camera identifiers. More...
 
static Cameracreate (SRContext &context, Camera::Descriptor cameraDescriptor)
 Create a camera with a given identifier. More...
 
static Cameracreate (SRContext &context)
 Create a camera. More...
 

Additional Inherited Members

- Protected Attributes inherited from SR::Sense
Transformation calibration
 

Detailed Description

Class of Sense dealing with video data.

Extentions of Camera can either provide input to the system or output in the user

Constructor & Destructor Documentation

◆ ~Camera()

virtual SR::Camera::~Camera ( )
virtual

Member Function Documentation

◆ addImplementation()

static void SR::Camera::addImplementation ( CameraListFunction *  listFunction,
CameraCreateImplementationFunction createFunction,
std::string  cameraType 
)
static

Static function to make a Camera implementation available through the Camera::listDescriptors and Camera::create functions.

Parameters
listFunctionis one of the functions that will be called when Camera::listDescriptors is called
createFunctionis one of the functions that can be called when Camera::create is called for a camera of the right type
cameraTypeindicates when this createFunction should be used

◆ create() [1/2]

static Camera * SR::Camera::create ( SRContext context)
static

Create a camera.

Parameters
contextis the environment in which created senses are kept track of
Returns
Camera* which can provide streams of video data

◆ create() [2/2]

static Camera * SR::Camera::create ( SRContext context,
Camera::Descriptor  cameraDescriptor 
)
static

Create a camera with a given identifier.

Parameters
contextis the environment in which created senses are kept track of
cameraDescriptorindicates what type of Camera implementation should be constructed
Returns
Camera* which can provide streams of video data

◆ getDescriptor()

virtual Camera::Descriptor SR::Camera::getDescriptor ( )
pure virtual

Get descriptor to identify physical Camera.

Returns
descriptor to identify physical Camera

◆ getStreamCount()

virtual const unsigned int SR::Camera::getStreamCount ( )
pure virtual

Get the number of available streams.

Camera modules (with multiple sensors) can be represented as a Camera implementation with multiple streams. This can be helpful when the frames are related, which would be the case with calibrated stereo cameras offering depth information.

Returns
positive integer representing the number of available video streams.

◆ listDescriptors()

static std::vector< SR_cameraDescriptor > SR::Camera::listDescriptors ( )
static

List camera identifiers.

Returns
list of camera identifiers available to the SR system

◆ openVideoStream()

virtual std::shared_ptr< VideoStream > SR::Camera::openVideoStream ( VideoListener listener)
pure virtual

Creates a VideoStream for listener to be connected to.

Parameters
listenerwill receive video updates from now on
Returns
std::shared_ptr<VideoStream> to be used to close the stream correctly when it is no longer required

◆ streamClosed()

virtual void SR::Camera::streamClosed ( VideoStream stream)
pure virtual

Closes a specific VideoStream.

Parameters
streamwill no longer supply video updates

The documentation for this class was generated from the following file: