|
VOXL OpenVINS Server 1.0
Visual Inertial Odometry Server for VOXL Platform
|
Camera queue fusion system for multi-camera synchronization. More...
#include <CameraQueueFusion.h>
Public Member Functions | |
| void | start (size_t num_cams) |
| Start the fusion system. | |
| void | markCameraReady (size_t cam_id) |
| Mark a camera as ready with new data. | |
| bool | getSortedBatch (double timestamp_cutoff, std::vector< ov_core::CameraData > &out) |
| Get sorted batch of camera data. | |
Static Public Member Functions | |
| static CameraQueueFusion & | getInstance () |
| Get singleton instance. | |
Camera queue fusion system for multi-camera synchronization.
This class implements a sophisticated system for synchronizing and fusing data from multiple cameras. It uses a mask-based approach to track camera readiness and provides temporal alignment of camera data.
Features:
The system works by:
Definition at line 71 of file CameraQueueFusion.h.
|
static |
Get singleton instance.
Returns the single instance of the CameraQueueFusion, creating it if it doesn't exist (lazy initialization). This ensures that only one fusion system exists throughout the application lifecycle.
Definition at line 33 of file CameraQueueFusion.cpp.
Referenced by _imu_data_handler_cb(), and voxl::CameraManager::initialize().

| bool CameraQueueFusion::getSortedBatch | ( | double | timestamp_cutoff, |
| std::vector< ov_core::CameraData > & | out | ||
| ) |
Get sorted batch of camera data.
Retrieves a batch of synchronized camera data that is sorted by timestamp and filtered by the specified cutoff time.
| timestamp_cutoff | Timestamp cutoff for data inclusion |
| out | Output vector to store the sorted camera data |
Retrieves a batch of synchronized camera data that is sorted by timestamp and filtered by the specified cutoff time.
The method performs the following operations:
| timestamp_cutoff | Timestamp cutoff for data inclusion |
| out | Output vector to store the sorted camera data |
Definition at line 126 of file CameraQueueFusion.cpp.
Referenced by _imu_data_handler_cb().

| void CameraQueueFusion::markCameraReady | ( | size_t | cam_id | ) |
Mark a camera as ready with new data.
This method is called when a camera has new data available. It updates the camera ready mask and may trigger fusion processing.
| cam_id | Camera identifier (0-based) |
This method is called when a camera has new data available. It updates the camera ready mask and may trigger fusion processing.
The method performs the following operations:
The camera ready mask uses a bit field where each bit represents whether a specific camera has new data available.
| cam_id | Camera identifier (0-based) |
Definition at line 93 of file CameraQueueFusion.cpp.
References MAX_CAMERA_COUNT.
| void CameraQueueFusion::start | ( | size_t | num_cams | ) |
Start the fusion system.
Initializes the fusion system with the specified number of cameras and starts the background fusion thread.
| num_cams | Number of cameras to synchronize |
Initializes the fusion system with the specified number of cameras and starts the background fusion thread.
The initialization process includes:
The expected mask is calculated as (1 << num_cams) - 1, which creates a bit mask with the lowest num_cams bits set to 1.
| num_cams | Number of cameras to synchronize |
Definition at line 56 of file CameraQueueFusion.cpp.
References MAX_CAMERA_COUNT.
Referenced by voxl::CameraManager::initialize().
