![]() |
DvsenseDriver
1.3.0
The SDK for dvsense products.
|
Common interface for DVS/APS fusion cameras, including DVSync and DVSyncPro. More...
#include <FusionCamera.hpp>
Public Member Functions | |
| FusionCamera (CameraDescription cameraDesc) | |
| Constructor. | |
| virtual const bool | isConnected ()=0 |
| Check if the camera is connected. | |
| const CameraDescription | getDescription () |
| Get camera description. | |
| virtual uint32_t | addEventsStreamHandleCallback (EventsStreamHandleCallback cb)=0 |
| Add a callback function to handle events. | |
| virtual uint32_t | addSharedEventsStreamHandleCallback (SharedEventsStreamHandleCallback cb)=0 |
| Add a callback that shares ownership of each decoded DVS event buffer. | |
| virtual bool | removeEventsStreamHandleCallback (uint32_t callback_id)=0 |
| Remove a callback function by id. | |
| virtual bool | removeSharedEventsStreamHandleCallback (uint32_t callback_id)=0 |
| Remove a shared DVS event-buffer callback by id. | |
| virtual uint32_t | addApsFrameCallback (FrameCallback cb)=0 |
| Add a callback function to handle aps data. | |
| virtual bool | removeApsFrameCallback (uint32_t callback_id)=0 |
| Remove a callback function by id. | |
| virtual uint32_t | addSyncSignalCallback (DvsTriggerInCallback cb)=0 |
| Add a callback function to handle trigger in signal. | |
| virtual bool | removeSyncSignalCallback (uint32_t callback_id)=0 |
| Remove a callback function by id. | |
| virtual bool | getNextBatch (Event2DVector &event_batch)=0 |
| Get the next batch of events Before using the getNextBatch function, you need to use setBatchEventsNum to set the number of events you need to fetch, or setBatchEventsTime to set the interval at which you need to fetch the events. | |
| virtual void | setBatchEventsNum (uint64_t n)=0 |
| Set the number of events to be fetched. | |
| virtual void | setBatchEventsTime (TimeStamp n)=0 |
| Set the time interval at which events are fetched. | |
| virtual int | start (STREAM_TYPE type=FUSION_STREAM)=0 |
| Start the camera. | |
| virtual int | stop (STREAM_TYPE type=FUSION_STREAM)=0 |
| Stop the camera. | |
| virtual int | destroy ()=0 |
| virtual int | startRecording (std::string file_path, std::string file_name, STREAM_TYPE stream_type=FUSION_STREAM)=0 |
| Start recording events. | |
| virtual int | stopRecording (STREAM_TYPE stream_type=FUSION_STREAM)=0 |
| Stop recording events. | |
| virtual uint16_t | getWidth (STREAM_TYPE type=DVS_STREAM)=0 |
| Get the Width of the camera sensor. | |
| virtual uint16_t | getHeight (STREAM_TYPE type=DVS_STREAM)=0 |
| Get the Height of the camera sensor. | |
| const std::vector< ToolInfo > | getAllToolsInfo () |
| Get all the tools information. | |
| const ToolInfo | getToolInfo (ToolType type) |
| Get the tool information. | |
| const std::shared_ptr< CameraTool > | getTool (ToolType type) |
| Get the tool. | |
| const std::shared_ptr< CameraTool > | getTool (std::string tool_name) |
| Get the tool by tool name. | |
| virtual void | setStatisticInfoCallback (DsStatisticInfoCallback cb) |
| set the callback function to get the statistic information | |
| virtual bool | writeCalibrationFile (std::string file_path)=0 |
| virtual bool | readCalibrationParam (CalibratorParameters ¶m)=0 |
| virtual bool | getFirmwareVersion (std::string &version)=0 |
| bool | exportCameraConfigParams (std::string json_file_path) |
| Export camera configuration parameters to a JSON file. | |
| bool | loadCameraConfigParams (std::string json_file_path) |
| Load camera configuration parameters from a JSON file. | |
Protected Member Functions | |
| virtual int | init ()=0 |
| When a camera is opened, it should be initialized. | |
Protected Attributes | |
| CameraDescription | cameraDesc_ |
| Get the camera description. | |
| std::map< ToolType, std::shared_ptr< CameraTool > > | tools_ |
Common interface for DVS/APS fusion cameras, including DVSync and DVSyncPro.
|
inline |
Constructor.
| cameraDesc | camera description |
|
pure virtual |
Check if the camera is connected.
|
inline |
Get camera description.
|
pure virtual |
Add a callback function to handle events.
| cb | callback function |
The event pointer range is valid only during the callback. Copy events or use addSharedEventsStreamHandleCallback() when retaining them for asynchronous work.
|
pure virtual |
Add a callback that shares ownership of each decoded DVS event buffer.
The callback may retain the shared buffer after returning for asynchronous processing.
| cb | callback receiving a shared event buffer |
|
pure virtual |
Remove a callback function by id.
| callback_id |
|
pure virtual |
Remove a shared DVS event-buffer callback by id.
| callback_id | callback id returned by addSharedEventsStreamHandleCallback |
|
pure virtual |
Add a callback function to handle aps data.
| cb | callback function |
|
pure virtual |
Remove a callback function by id.
| callback_id |
|
pure virtual |
Add a callback function to handle trigger in signal.
| cb | callback function |
|
pure virtual |
Remove a callback function by id.
| callback_id |
|
pure virtual |
Get the next batch of events Before using the getNextBatch function, you need to use setBatchEventsNum to set the number of events you need to fetch, or setBatchEventsTime to set the interval at which you need to fetch the events.
| event_batch |
|
pure virtual |
Set the number of events to be fetched.
| n | number of events |
|
pure virtual |
Set the time interval at which events are fetched.
| n | interval in microseconds |
|
pure virtual |
Start the camera.
| type | Requested stream mode; reference-board DVSyncPro accepts FUSION_STREAM only. |
|
pure virtual |
Stop the camera.
|
pure virtual |
|
pure virtual |
Start recording events.
| file_path | |
| file_name | |
| stream_type |
|
pure virtual |
Stop recording events.
|
pure virtual |
Get the Width of the camera sensor.
|
pure virtual |
Get the Height of the camera sensor.
| const std::vector< ToolInfo > dvsense::FusionCamera::getAllToolsInfo | ( | ) |
Get all the tools information.
| const std::shared_ptr< CameraTool > dvsense::FusionCamera::getTool | ( | ToolType | type | ) |
Get the tool.
| type | tool type |
| const std::shared_ptr< CameraTool > dvsense::FusionCamera::getTool | ( | std::string | tool_name | ) |
Get the tool by tool name.
| tool_name | Name of the tool |
|
inlinevirtual |
set the callback function to get the statistic information
| cb | callback function |
|
pure virtual |
|
pure virtual |
|
pure virtual |
| bool dvsense::FusionCamera::exportCameraConfigParams | ( | std::string | json_file_path | ) |
Export camera configuration parameters to a JSON file.
| json_file_path | Path to the JSON file |
| bool dvsense::FusionCamera::loadCameraConfigParams | ( | std::string | json_file_path | ) |
Load camera configuration parameters from a JSON file.
| json_file_path | Path to the JSON file |
|
protectedpure virtual |
When a camera is opened, it should be initialized.
|
protected |
Get the camera description.
|
protected |