Signapse
Public Member Functions | List of all members
Camera Class Reference

#include <Camera.h>

Inheritance diagram for Camera:
Inheritance graph
Collaboration diagram for Camera:
Collaboration graph

Public Member Functions

 Camera ()
 
 Camera (CameraSettings settings)
 
bool getOn ()
 
void setOn (bool state)
 
void Start ()
 
void Stop ()
 
virtual void NextScene (Scene next)=0
 

Additional Inherited Members

Detailed Description

Simple Pipeline element which integrates frame acquisition from the camera feed.

Definition at line 15 of file Camera.h.

Constructor & Destructor Documentation

◆ Camera() [1/2]

Camera::Camera ( )

Camera default constructor, inits settings, sets isOn to true.

Definition at line 6 of file Camera.cpp.

6 : cameraSettings() {
7 isOn=true;
8}

◆ Camera() [2/2]

Camera::Camera ( CameraSettings  settings)

Camera constructor from settings, sets isOn to true.

Definition at line 12 of file Camera.cpp.

12 : cameraSettings(settings){
13 isOn = true;
14}

Member Function Documentation

◆ getOn()

bool Camera::getOn ( )

Returns the isON state of the camera

Returns
true if on; false otherwise

Definition at line 71 of file Camera.cpp.

71 {
72 return isOn;
73}

◆ setOn()

void Camera::setOn ( bool  state)

Sets the isOn state of the camera

Parameters
state

Definition at line 20 of file Camera.cpp.

20 {
21 isOn = state;
22}

◆ Start()

void Camera::Start ( )

Starts the worker thread recording

Definition at line 53 of file Camera.cpp.

53 {
54 videoCapture.open(cameraSettings.deviceID, cameraSettings.apiID);
55 cameraThread = std::thread(&Camera::threadLoop, this);
56}
int apiID
Member variable containing web cam API ID.

◆ Stop()

void Camera::Stop ( )

Frees thread resources and stops recording, must be called prior to program exit.

Definition at line 61 of file Camera.cpp.

61 {
62 isOn=false;
63 cameraThread.join();
64
65}

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