OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::vbtracker::TrackerThread Class Reference
Inheritance diagram for osvr::vbtracker::TrackerThread:

Public Member Functions

 TrackerThread (TrackingSystem &trackingSystem, ImageSource &imageSource, BodyReportingVector &reportingVec, CameraParameters const &camParams, std::int32_t cameraUsecOffset=0, bool bufferImu=false, bool debugData=false)
 
void threadAction ()
 
void signalImageProcessingComplete (ImageOutputDataPtr &&imageData, cv::Mat const &frame, cv::Mat const &frameGray)
 
Main thread methods

The thread starts and immediately blocks. Calling this allows it to proceed with execution.

void permitStart ()
 
void triggerStop ()
 
bool submitIMUReport (TrackedBodyIMU &imu, util::time::TimeValue const &tv, OSVR_OrientationReport const &report)
 
bool submitIMUReport (TrackedBodyIMU &imu, util::time::TimeValue const &tv, OSVR_AngularVelocityReport const &report)
 
bool checkForDebugData (DebugArray &data)
 

Detailed Description

Definition at line 77 of file TrackerThread.h.

Member Function Documentation

void osvr::vbtracker::TrackerThread::threadAction ( )

Thread function-call operator: should be invoked by a lambda in a dedicated thread.

The thread internally is organized around processing video frames, with arrival of IMU reports internally handled as they come. Thus, we keep getting frames and processing them until we're told to stop, doing what we can asynchronously to also process incoming IMU messages.

sleep an extra half a second to give everyone else time to get off the starting blocks.

Initialize reporting vector, as far as we can.

Launch the image proc thread in a waiting state.

Call the doFrame() method to perform one video frame's worth of processing.

Copy the run flag.

Definition at line 73 of file TrackerThread.cpp.

void osvr::vbtracker::TrackerThread::triggerStop ( )

Call from the main thread to trigger this thread's execution to exit after the current frame.

Main thread method!

Definition at line 141 of file TrackerThread.cpp.

bool osvr::vbtracker::TrackerThread::submitIMUReport ( TrackedBodyIMU imu,
util::time::TimeValue const &  tv,
OSVR_OrientationReport const &  report 
)

Submit an orientation report for an IMU

Returns
false if there is no room in the queue for the message

Main thread method!

Definition at line 148 of file TrackerThread.cpp.

bool osvr::vbtracker::TrackerThread::submitIMUReport ( TrackedBodyIMU imu,
util::time::TimeValue const &  tv,
OSVR_AngularVelocityReport const &  report 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. for angular velocity

Main thread method!

Definition at line 162 of file TrackerThread.cpp.

void osvr::vbtracker::TrackerThread::signalImageProcessingComplete ( ImageOutputDataPtr &&  imageData,
cv::Mat const &  frame,
cv::Mat const &  frameGray 
)

Call from image processing thread to signal completion of frame processing.

Definition at line 179 of file TrackerThread.cpp.


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