VOXL OpenVINS Server 1.0
Visual Inertial Odometry Server for VOXL Platform
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
voxl::StereoCamera Class Reference

Handles stereo camera input. More...

#include <StereoCameraMinimal.h>

Inheritance diagram for voxl::StereoCamera:
Inheritance graph
[legend]
Collaboration diagram for voxl::StereoCamera:
Collaboration graph
[legend]

Public Member Functions

 StereoCamera (const cam_info &camera_info)
 Constructor.
 
 ~StereoCamera () override=default
 Destructor.
 
- Public Member Functions inherited from voxl::CameraBase
 CameraBase (const cam_info &camera_info)
 Constructor.
 
virtual ~CameraBase ()=default
 Virtual destructor.
 
virtual bool connect ()
 Initialize the camera pipe connection.
 
virtual void disconnect ()
 Disconnect and clean up resources.
 
const cam_infoget_camera_info () const
 Get the camera information.
 
bool popCameraData (ov_core::CameraData &out)
 Pop camera data from the queue.
 
int get_channel () const
 Get the camera pipe channel.
 
size_t get_id () const
 Get the camera identifier.
 

Protected Member Functions

void process_image (const camera_image_metadata_t &meta, voxl::ImageType type, void *frame) override
 Process incoming image data.
 

Additional Inherited Members

- Static Protected Member Functions inherited from voxl::CameraBase
static void camera_callback (int ch, camera_image_metadata_t meta, char *frame, void *context)
 Common callback function for pipe client.
 
static void camera_device_buffer_callback (int ch, mpa_ion_buf_t *data, void *context)
 
- Protected Attributes inherited from voxl::CameraBase
cam_info camera_info_
 Camera configuration information.
 
int channel_ {-1}
 Channel used for pipe communication.
 
bool is_connected_ {false}
 Indicates if camera is connected to pipe.
 
std::mutex mutex_
 Mutex for thread-safe operations.
 
cl_context ctx_ {nullptr}
 OpenCL context used if GPU is enabled.
 
cl_command_queue q_ {nullptr}
 OpenCL command queue used if GPU is enabled.
 
boost::lockfree::spsc_queue< ov_core::CameraData, boost::lockfree::capacity< 64 > > camera_queue
 Lock-free SPSC queue for camera data.
 
img_ringbuf_packet curr_message_
 Instance-local buffer for image processing.
 
cv::Mat use_mask_
 Per-instance reusable mask for feature tracking.
 
bool drop_frames {false}
 Indicates if frames should be dropped.
 
bool skip_jerk_detection {true}
 Indicates if jerk detection should be skipped.
 

Detailed Description

Handles stereo camera input.

This class specializes CameraBase for stereo camera configurations. It processes images from a single camera and feeds them to the VIO system.

The StereoCamera class provides:

Key features:

Definition at line 47 of file StereoCameraMinimal.h.

Constructor & Destructor Documentation

◆ StereoCamera()

voxl::StereoCamera::StereoCamera ( const cam_info camera_info)
explicit

Constructor.

Constructor for StereoCamera.

Parameters
camera_infoCamera configuration information

Initializes a stereo camera instance by calling the base class constructor with the provided camera configuration information.

Parameters
camera_infoCamera configuration and calibration information

Definition at line 34 of file StereoCameraMinimal.cpp.

◆ ~StereoCamera()

voxl::StereoCamera::~StereoCamera ( )
overridedefault

Destructor.

Member Function Documentation

◆ process_image()

void voxl::StereoCamera::process_image ( const camera_image_metadata_t &  meta,
voxl::ImageType  type,
void *  frame 
)
overrideprotectedvirtual

Process incoming image data.

Overrides the base class method to handle stereo camera-specific image processing. This method is called by the pipe callback when new image data arrives.

Parameters
metaImage metadata containing timestamp and format information
framePointer to image data buffer

Overrides the base class method to handle stereo camera-specific image processing. This method is called by the pipe callback when new image data arrives.

The processing includes:

  • Updating camera connection status and timestamps
  • Checking system readiness before processing
  • Routing to appropriate format-specific processing
  • Updating current image dimensions

Currently supports RAW8 format with fast-path processing.

Parameters
metaImage metadata containing timestamp and format information
framePointer to image data buffer

Implements voxl::CameraBase.

Definition at line 57 of file StereoCameraMinimal.cpp.

References active_callbacks, is_cam_connected, is_resetting, last_cam_time, reset_cv, reset_mtx, and vio_error_codes.


The documentation for this class was generated from the following files: