OSVR-Core
|
Classes | |
struct | Impl |
Private implementation structure for TrackingSystem. More... | |
Public Member Functions | |
ConfigParams const & | getParams () const |
void | setUseIMU (bool useIMU) |
bool | haveCameraPose () const |
void | setCameraPose (Eigen::Isometry3d const &camPose) |
Eigen::Isometry3d const & | getCameraPose () const |
This gets rTc - the pose of the camera in the room. | |
Eigen::Isometry3d const & | getRoomToCamera () const |
This gets cTr - the inverse of the camera pose, transforms from the room coordinate system to the camera coordinate system. More... | |
bool | isRoomCalibrationComplete () |
void | calibrationHandleIMUData (BodyId id, util::time::TimeValue const &tv, Eigen::Quaterniond const &quat) |
Called by TrackedBody::incorporateNewMeasurementFromIMU() if room calibration is not complete. More... | |
Setup and Teardown | |
TrackingSystem (ConfigParams const ¶ms) | |
~TrackingSystem () | |
TrackedBody * | createTrackedBody () |
Runtime methods | |
Perform the initial phase of image processing. This does not modify the bodies, so it can happen in parallel/background processing. It's also the most expensive, so that's handy. | |
ImageOutputDataPtr | performInitialImageProcessing (util::time::TimeValue const &tv, cv::Mat const &frame, cv::Mat const &frameGray, CameraParameters const &camParams) |
LedUpdateCount const & | updateLedsFromVideoData (ImageOutputDataPtr &&imageData) |
This is the second phase of the video-based tracking algorithm - the part that actually changes LED state. More... | |
BodyIndices const & | updateBodiesFromVideoData (ImageOutputDataPtr &&imageData) |
The combined second and third phases of the video-based tracking algorithm. More... | |
BodyIndices const & | processFrame (util::time::TimeValue const &tv, cv::Mat const &frame, cv::Mat const &frameGray, CameraParameters const &camParams) |
All parts of the tracking algorithm combined for convenience. More... | |
Accessors | |
std::size_t | getNumBodies () const |
bool | isValidBodyId (BodyId i) const |
TrackedBody & | getBody (BodyId i) |
TrackedBody const & | getBody (BodyId i) const |
TrackedBodyTarget * | getTarget (BodyTargetId target) |
TrackedBodyTarget const * | getTarget (BodyTargetId target) const |
Friends | |
class | TrackingDebugDisplay |
void osvr::vbtracker::TrackingSystem::calibrationHandleIMUData | ( | BodyId | id, |
util::time::TimeValue const & | tv, | ||
Eigen::Quaterniond const & | quat | ||
) |
Called by TrackedBody::incorporateNewMeasurementFromIMU() if room calibration is not complete.
|
inline |
Eigen::Isometry3d const & osvr::vbtracker::TrackingSystem::getRoomToCamera | ( | ) | const |
This gets cTr - the inverse of the camera pose, transforms from the room coordinate system to the camera coordinate system.
bool osvr::vbtracker::TrackingSystem::isRoomCalibrationComplete | ( | ) |
If this is true, we know it's true. If it's false, we must go check.
Update the cached value.
|
inline |
All parts of the tracking algorithm combined for convenience.
|
inline |
BodyIndices const & osvr::vbtracker::TrackingSystem::updateBodiesFromVideoData | ( | ImageOutputDataPtr && | imageData | ) |
The combined second and third phases of the video-based tracking algorithm.
The third phase uses the updated LED data stored in each target to arrive at updated pose estimates.
These two phases are combined in one call to ensure preconditions - it would be invalid to call the third phase without immediately previously calling this second phase, but no state handover needs to take place.
imageData | Output from the first step - please std::move() the output of the first step into this step. |
Do the second phase of stuff
Do the third phase of tracking.
Trigger debug display, if activated.
LedUpdateCount const & osvr::vbtracker::TrackingSystem::updateLedsFromVideoData | ( | ImageOutputDataPtr && | imageData | ) |
This is the second phase of the video-based tracking algorithm - the part that actually changes LED state.
imageData | Output from the first step - please std::move() the output of the first step into this step. |
If you don't require updated poses, you can stop after this step, not proceeding to the third and final phase, and still keep track of which beacons are which.
Clear internal data, we're invalidating things here.
Update our frame cache, since we're taking ownership of the image data now.
Go through each target and try to process the measurements.