1#ifndef BITSIM_SENSORS_BACKENDS_CAMERA_BACKEND_BASE_H
2#define BITSIM_SENSORS_BACKENDS_CAMERA_BACKEND_BASE_H
4#include "bitsim/bitsim_config.h"
10#include <opencv2/core.hpp>
76 explicit CameraBackendBase(
const std::string &backend_type) : backend_type_(backend_type) {}
79 std::string backend_type_;
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
virtual void connect()=0
Start receiving frames.
const std::string & backend_type_str() const noexcept
The type of the backend.
Definition camera_backend_base.h:73
virtual void disconnect()=0
Stop receiving frames.
virtual ~CameraBackendBase()=default
CameraBackendBase(const std::string &backend_type)
Definition camera_backend_base.h:76
virtual std::optional< CameraFrame > latest_frame() const =0
The latest frame, if one has been received.
virtual bool is_alive() const =0
Whether frames are arriving.
Definition camera_backend_base.h:19
Definition dc_motor_backend_base.h:9
std::size_t uint_t
uint_t
Definition bitsim_types.h:40
A frame delivered by a camera backend.
Definition camera_backend_base.h:25
cv::Mat image
The image, in BGR order as OpenCV uses.
Definition camera_backend_base.h:29
std::chrono::steady_clock::time_point received_at
When the backend received the frame.
Definition camera_backend_base.h:39
uint_t index
How many frames the backend has delivered, this one included.
Definition camera_backend_base.h:34