![]() |
OpenEV
Extending OpenCV to event-based vision
|
This is an auxiliary class. This class cannot be instanced. More...
#include <abstract-camera.hpp>
Public Member Functions | |
| virtual void | start ()=0 |
| Start reading data. | |
| void | stop () |
| Stop reading data. | |
| bool | isOpen () const |
| Check whether the device was found and opened. | |
| virtual bool | hasAps () const =0 |
| Check whether the device produces APS frames. | |
| virtual bool | hasImu () const =0 |
| Check whether the device produces IMU data. | |
| virtual cv::Size | getSensorSize () const =0 |
| Get device sensor size. | |
| virtual std::string | getSerialNumber () const =0 |
| Get device serial number, prefixed with the camera family. | |
| uint64_t | getResetTime () const |
| Get device reset time. | |
| cv::Rect_< uint16_t > | getRoi () const |
| Get current ROI. | |
| virtual bool | setRoi (const cv::Rect_< uint16_t > &roi)=0 |
| Set current ROI. Events outside the ROI are not considered. Images are cropped according to the ROI. | |
| void | setDefectivePixels (const std::string &defective_pixels_file) |
| Load a defective pixel file. Events on hot pixels are discarded, and saturated pixels are replaced by the median of their neighbours on every frame. | |
| void | setContainerInterval (const uint32_t usec) |
| Set the maximum time interval between subsequent containers. | |
| void | setContainerSize (const uint32_t n) |
| Set the maximum number of events a container may hold before it is delivered. The limit applies to each typed packet of the container separately, so a container carrying events, frames, and imu data can deliver up to this number of each of them. | |
| bool | getData (Vector &events) |
| Get DVS data. | |
| bool | getData (Queue &events) |
| Get DVS data. | |
| bool | getData (StampedMat &frame) |
| Get APS data. | |
| bool | getData (StampedMatVector &frames) |
| Get APS data. | |
| bool | getData (StampedMatQueue &frames) |
| Get APS data. | |
| bool | getData (Imu &imu) |
| Get IMU data. | |
| bool | getData (ImuVector &imu) |
| Get IMU data. | |
| bool | getData (ImuQueue &imu) |
| Get IMU data. | |
| bool | getData (Vector &events, StampedMat &frame) |
| Get DVS+APS data. | |
| bool | getData (Vector &events, StampedMatVector &frames) |
| Get DVS+APS data. | |
| bool | getData (Queue &events, StampedMatQueue &frames) |
| Get DVS+APS data. | |
| bool | getData (Vector &events, Imu &imu) |
| Get DVS+IMU data. | |
| bool | getData (Vector &events, ImuVector &imu) |
| Get DVS+IMU data. | |
| bool | getData (Queue &events, ImuQueue &imu) |
| Get DVS+IMU data. | |
| bool | getData (Vector &events, StampedMat &frame, Imu &imu) |
| Get DVS+APS+IMU data. | |
| bool | getData (Vector &events, StampedMatVector &frame, ImuVector &imu) |
| Get DVS+APS+IMU data. | |
| bool | getData (Queue &events, StampedMatQueue &frame, ImuQueue &imu) |
| Get DVS+APS+IMU data. | |
| std::size_t | getEventRaw (std::vector< uint64_t > &data) |
| Retrieve raw event data. | |
| std::size_t | getEventRaw (uint64_t *&data, const bool allow_realloc=true) |
| Retrieve raw event data. | |
| void | flush (const double usec) const |
| Discard data during an interval of time. | |
This is an auxiliary class. This class cannot be instanced.
| void ev::AbstractCamera::flush | ( | const double | usec | ) | const |
Discard data during an interval of time.
| usec | Time interval in microseconds |
| bool ev::AbstractCamera::getData | ( | Imu & | imu | ) |
| bool ev::AbstractCamera::getData | ( | ImuQueue & | imu | ) |
Get IMU data.
| imu | Imu data queue to which imu data will be added |
| bool ev::AbstractCamera::getData | ( | ImuVector & | imu | ) |
Get IMU data.
| imu | Imu data vector to which imu data will be added |
| bool ev::AbstractCamera::getData | ( | ev::Queue & | events | ) |
Get DVS data.
| events | Event queue to which events will be added. |
| bool ev::AbstractCamera::getData | ( | ev::Queue & | events, |
| ev::ImuQueue & | imu ) |
| bool ev::AbstractCamera::getData | ( | ev::Queue & | events, |
| ev::StampedMatQueue & | frames, | ||
| ev::ImuQueue & | imu ) |
| bool ev::AbstractCamera::getData | ( | ev::Queue & | events, |
| ev::StampedMatQueue & | frames ) |
Get DVS+APS data.
| events | Event queue to which events will be added |
| frames | Frame queue to which frame will be added |
| bool ev::AbstractCamera::getData | ( | StampedMat & | frame | ) |
Get APS data.
| frame | Frame destination |
| bool ev::AbstractCamera::getData | ( | StampedMatQueue & | frames | ) |
Get APS data.
| frames | Frame queue to which frame will be added |
| bool ev::AbstractCamera::getData | ( | StampedMatVector & | frames | ) |
Get APS data.
| frames | Frame vector to which frame will be added |
| bool ev::AbstractCamera::getData | ( | ev::Vector & | events | ) |
Get DVS data.
| events | Event vector to which events will be added |
| bool ev::AbstractCamera::getData | ( | ev::Vector & | events, |
| ev::Imu & | imu ) |
| bool ev::AbstractCamera::getData | ( | ev::Vector & | events, |
| ev::ImuVector & | imu ) |
| bool ev::AbstractCamera::getData | ( | ev::Vector & | events, |
| ev::StampedMat & | frame ) |
Get DVS+APS data.
| events | Event vector to which events will be added |
| frame | Frame destination |
| bool ev::AbstractCamera::getData | ( | ev::Vector & | events, |
| ev::StampedMat & | frame, | ||
| ev::Imu & | imu ) |
| bool ev::AbstractCamera::getData | ( | ev::Vector & | events, |
| ev::StampedMatVector & | frames, | ||
| ev::ImuVector & | imu ) |
| bool ev::AbstractCamera::getData | ( | ev::Vector & | events, |
| ev::StampedMatVector & | frames ) |
Get DVS+APS data.
| events | Event vector to which events will be added |
| frames | Frame vector to which frame will be added |
| std::size_t ev::AbstractCamera::getEventRaw | ( | std::vector< uint64_t > & | data | ) |
Retrieve raw event data.
| data | A vector to which the raw event data will be added. |
| std::size_t ev::AbstractCamera::getEventRaw | ( | uint64_t *& | data, |
| const bool | allow_realloc = true ) |
Retrieve raw event data.
| data | Buffer to which the raw event data will be written. Updated in place if the buffer is reallocated. |
| allow_realloc | If true, this function manages the size of the buffer, reallocating if needed. The buffer must then come from malloc/calloc/realloc (never from new[]) and remains owned by the caller, which is responsible for freeing it. If false, the caller must guarantee that the buffer is large enough: no bounds checking is performed. |
|
inlinenodiscard |
Get device reset time.
|
nodiscard |
|
nodiscardpure virtual |
|
nodiscardpure virtual |
Get device serial number, prefixed with the camera family.
Implemented in ev::Davis.
|
nodiscardpure virtual |
Check whether the device produces APS frames.
Implemented in ev::Davis.
|
nodiscardpure virtual |
Check whether the device produces IMU data.
Implemented in ev::Davis.
|
inlinenodiscard |
Check whether the device was found and opened.
| void ev::AbstractCamera::setContainerInterval | ( | const uint32_t | usec | ) |
Set the maximum time interval between subsequent containers.
| usec | Maximum time interval in microseconds |
| void ev::AbstractCamera::setContainerSize | ( | const uint32_t | n | ) |
Set the maximum number of events a container may hold before it is delivered. The limit applies to each typed packet of the container separately, so a container carrying events, frames, and imu data can deliver up to this number of each of them.
| n | Maximum number of events |
| void ev::AbstractCamera::setDefectivePixels | ( | const std::string & | defective_pixels_file | ) |
Load a defective pixel file. Events on hot pixels are discarded, and saturated pixels are replaced by the median of their neighbours on every frame.
| defective_pixels_file | Path to a YAML file |
|
pure virtual |
Set current ROI. Events outside the ROI are not considered. Images are cropped according to the ROI.
| roi | ROI |
Implemented in ev::Davis.
|
pure virtual |
Start reading data.
Implemented in ev::Davis.