Monado OpenXR Runtime
Loading...
Searching...
No Matches
xrt::tracking::constellation::Camera Struct Reference
Inheritance diagram for xrt::tracking::constellation::Camera:
Collaboration diagram for xrt::tracking::constellation::Camera:

Public Member Functions

void pushBlobs (t_blob_observation &observation)
 
 Camera (ConstellationTracker *tracker, std::weak_ptr< CameraMosaic > mosaic, const t_constellation_tracker_camera &camera_params, enum u_logging_level *log_level_ptr, uint32_t index)
 
 Camera (const Camera &)=delete
 
 Camera (Camera &&)=delete
 
Camera & operator= (const Camera &)=delete
 
Camera & operator= (Camera &&)=delete
 
std::optional< xrt_pose > getWorldPose (timepoint_ns when_ns)
 
void deferSampleToSlowThread (CameraSample &sample)
 
bool tryDevicePose (Device *device, CameraSample &sample, DeviceState &device_state, bool need_matching_ids, const std::optional< xrt_space_relation > &Tcv_cam_device_prior, const xrt_pose &Tcv_cam_device_candidate)
 Fast matching based on prior pose.
 
bool tryDeviceBlobRecovery (Device *device, CameraSample &sample, DeviceState &device_state, const std::optional< xrt_space_relation > &Tcv_cam_device_prior)
 
void handleStepComplete (CameraSample &sample)
 Handles a single step (fast,slow) being complete.
 
void handleProcessingComplete (CameraSample &sample, const std::span< Device * > devices)
 Handles complete processing of a sample, hold the devices lock while you call this.
 
void processSampleSlow (CameraSample &sample)
 
bool processSampleFast (CameraSample &sample)
 Returns whether a slow search is needed.
 
void pushPose (CameraSample &camera_sample, DeviceState &device_state, Device *device, pose_metrics &score, const xrt_pose &Tcv_cam_device, bool was_optimized)
 
void debugScribbleSample (CameraSample &sample, bool fast)
 
- Public Member Functions inherited from xrt::util::BlobSinkBase< Camera >
const Camera & derived () const noexcept
 
Camera & derived () noexcept
 
const t_blob_sink * getBlobSink () const noexcept
 
t_blob_sink * getBlobSink () noexcept
 

Static Public Member Functions

static void destroyBlobSink (t_blob_sink *sink)
 
- Static Public Member Functions inherited from xrt::util::BlobSinkBase< Camera >
static const Camera * fromBlobSink (const t_blob_sink *sink) noexcept
 
static Camera * fromBlobSink (t_blob_sink *sink) noexcept
 

Data Fields

ConstellationTracker * tracker
 The owner tracker, so we can retrieve it from the blob sink callback.
 
std::weak_ptr< CameraMosaic > mosaic
 
t_camera_calibration calibration
 
camera_model model
 
CameraScribbleSettings scribble_settings {}
 
uint32_t index
 The index in the mosaic.
 
os_thread_helper slow_processing_thread {}
 Does "slow" processing for this camera when fast recovery paths fail.
 
struct { 
 
   std::optional< CameraSample >   sample {std::nullopt} 
 
   correspondence_search *   cs {nullptr} 
 
   u_sink_debug   debug_sink {} 
 
} slow_processing_thread_data 
 
os_thread_helper fast_processing_thread {}
 Does "fast" processing for this camera, trying to recover a pose quickly.
 
struct { 
 
   std::optional< CameraSample >   sample {std::nullopt} 
 
   correspondence_search *   cs {nullptr} 
 
   u_sink_debug   debug_sink {} 
 
} fast_processing_thread_data 
 
os::Mutex processing_lock
 Locks all processing data.
 
struct { 
 
   xrt_pose   Txr_origin_cam 
 
   bool   has_concrete_pose 
 
} locked_data 
 All data protected by the processing lock.
 
std::atomic< uint32_t > shallow_searches_failed {0}
 

Member Function Documentation

◆ handleProcessingComplete()

void xrt::tracking::constellation::Camera::handleProcessingComplete ( CameraSample &  sample,
const std::span< Device * >  devices 
)

Handles complete processing of a sample, hold the devices lock while you call this.

References xrt::tracking::constellation::DeviceState::found_pose, and xrt::tracking::constellation::Device::last_seen_sequence_id.

◆ handleStepComplete()

void xrt::tracking::constellation::Camera::handleStepComplete ( CameraSample &  sample)

Handles a single step (fast,slow) being complete.

◆ processSampleFast()

◆ tryDevicePose()

bool xrt::tracking::constellation::Camera::tryDevicePose ( Device *  device,
CameraSample &  sample,
DeviceState &  device_state,
bool  need_matching_ids,
const std::optional< xrt_space_relation > &  Tcv_cam_device_prior,
const xrt_pose &  Tcv_cam_device_candidate 
)

Field Documentation

◆ fast_processing_thread

os_thread_helper xrt::tracking::constellation::Camera::fast_processing_thread {}

Does "fast" processing for this camera, trying to recover a pose quickly.

It's valid for this to happen at the same time as a slow process.

◆ index

uint32_t xrt::tracking::constellation::Camera::index

The index in the mosaic.

◆ [struct]

struct { ... } xrt::tracking::constellation::Camera::locked_data

All data protected by the processing lock.

◆ processing_lock

os::Mutex xrt::tracking::constellation::Camera::processing_lock
mutable

Locks all processing data.

◆ slow_processing_thread

os_thread_helper xrt::tracking::constellation::Camera::slow_processing_thread {}

Does "slow" processing for this camera when fast recovery paths fail.

◆ tracker

ConstellationTracker* xrt::tracking::constellation::Camera::tracker

The owner tracker, so we can retrieve it from the blob sink callback.


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