6#ifndef OPENEV_DEVICES_DAVIS_HPP
7#define OPENEV_DEVICES_DAVIS_HPP
22 [[nodiscard]]
friend std::ostream &operator<<(std::ostream &os,
const struct BiasValue &value) {
23 os <<
"Coarse: " <<
static_cast<int>(value.coarse) <<
", Fine: " <<
static_cast<int>(value.fine);
33 constexpr static uint32_t DEFAULT_INTERVAL = 20000;
34 constexpr static uint32_t DEFAULT_EXPOSURE = 6500;
48 void start()
override;
54 [[nodiscard]]
bool hasAps()
const override {
62 [[nodiscard]]
bool hasImu()
const override {
85 bool setRoi(
const cv::Rect_<uint16_t> &roi)
override;
153 std::size_t setDvsFilterPixels(
const std::vector<cv::Point> &pixels)
override;
Abstract camera device driver.
This is an auxiliary class. This class cannot be instanced.
Definition abstract-camera.hpp:131
This class extends AbstractCamera to operate with DAVIS event cameras. DAVIS cameras offer events (DV...
Definition davis.hpp:31
void enableDvs(bool state)
Enable DVS.
Definition davis.cpp:171
void setApsExposure(uint32_t usec)
Set APS exposure time.
Definition davis.cpp:189
bool hasAps() const override
DAVIS cameras have an APS sensor.
Definition davis.hpp:54
std::string getSerialNumber() const override
Get device serial number, prefixed with the chip model.
Definition davis.cpp:113
void enableAps(bool state)
Enable APS.
Definition davis.cpp:175
static uint32_t biasToCurrent(const BiasValue &value)
Convert a bias value into the current it produces. The coarse and fine ranges overlap,...
Definition davis.cpp:164
uint32_t getApsExposure() const
Get the APS exposure time currently applied by the device.
Definition davis.cpp:183
void start() override
Initialize the DAVIS camera. This function sets up the DAVIS camera for operation....
Definition davis.cpp:53
bool setBias(const uint8_t name, const BiasValue &value)
Set the bias value associated with the given name.
Definition davis.cpp:155
cv::Size getSensorSize() const override
Get device sensor size.
Definition davis.cpp:79
void enableImu(bool state)
Enable IMU.
Definition davis.cpp:221
BiasValue getBias(const uint8_t name) const
Retrieve the bias value associated with the given name.
Definition davis.cpp:148
void enableApsAutoExposure(bool state)
Let the device choose the APS exposure time on its own, aiming to avoid under and over exposure.
Definition davis.cpp:198
bool setRoi(const cv::Rect_< uint16_t > &roi) override
Set current ROI. Events outside the ROI are not considered. Images are cropped according to the ROI.
Definition davis.cpp:122
bool hasImu() const override
DAVIS cameras have an IMU.
Definition davis.hpp:62
void setApsTimeInterval(uint32_t usec)
Set APS maximum time interval between subsequent transmissions.
Definition davis.cpp:179
Coarse/fine bias value, the encoding used by DAVIS cameras.
Definition davis.hpp:19