25 #ifndef INCLUDED_TrackingSystem_h_GUID_B94B2C23_321F_45B4_5167_CB32D2624B50 26 #define INCLUDED_TrackingSystem_h_GUID_B94B2C23_321F_45B4_5167_CB32D2624B50 38 #include <opencv2/core/core.hpp> 44 #include <unordered_map> 49 class TrackedBodyTarget;
50 using BodyIndices = std::vector<BodyId>;
52 using LedUpdateCount = std::unordered_map<BodyTargetId, std::size_t>;
68 ImageOutputDataPtr performInitialImageProcessing(
83 LedUpdateCount
const &
108 cv::Mat
const &frame,
109 cv::Mat
const &frameGray,
112 performInitialImageProcessing(tv, frame, frameGray, camParams);
119 std::size_t getNumBodies()
const {
return m_bodies.size(); }
120 bool isValidBodyId(
BodyId i)
const {
121 return (!i.empty()) && (i.value() < m_bodies.size());
125 return *m_bodies.at(i.value());
137 bool haveCameraPose()
const;
160 void updatePoseEstimates();
164 void calibrationVideoPhaseThree();
166 using BodyPtr = std::unique_ptr<TrackedBody>;
169 BodyIndices m_updated;
170 std::vector<BodyPtr> m_bodies;
172 std::unique_ptr<Impl> m_impl;
180 #endif // INCLUDED_TrackingSystem_h_GUID_B94B2C23_321F_45B4_5167_CB32D2624B50 LedUpdateCount const & updateLedsFromVideoData(ImageOutputDataPtr &&imageData)
This is the second phase of the video-based tracking algorithm - the part that actually changes LED s...
Definition: TrackingSystem.cpp:90
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.
Definition: TrackingSystem.h:107
Eigen::Isometry3d const & getCameraPose() const
This gets rTc - the pose of the camera in the room.
Definition: TrackingSystem.cpp:229
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
std::pair< BodyId, TargetId > BodyTargetId
Type-safe zero-based target ID qualified with its body ID.
Definition: BodyIdTypes.h:67
Definition: CameraParameters.h:41
Header wrapping include of <Eigen/Core> and <Eigen/Geometry> for warning quieting.
Header defining specializations of std::hash that forward to the contained integer type...
Private implementation structure for TrackingSystem.
Definition: TrackingSystem_Impl.h:49
void setUseIMU(bool useIMU)
Definition: TrackingSystem.h:135
ConfigParams const & getParams() const
Definition: TrackingSystem.h:132
Eigen::Isometry3d const & getRoomToCamera() const
This gets cTr - the inverse of the camera pose, transforms from the room coordinate system to the cam...
Definition: TrackingSystem.cpp:233
Definition: TrackingSystem.h:54
BodyIndices const & updateBodiesFromVideoData(ImageOutputDataPtr &&imageData)
The combined second and third phases of the video-based tracking algorithm.
Definition: TrackingSystem.cpp:115
Corresponds to a rigid arrangements of discrete beacons detected by video-based tracking - typically ...
Definition: TrackedBodyTarget.h:77
bool isRoomCalibrationComplete()
Definition: TrackingSystem.cpp:237
Definition: TrackingDebugDisplay.h:54
IMUInputParams imu
IMU input-related parameters.
Definition: ConfigParams.h:254
General configuration parameters.
Definition: ConfigParams.h:82
Header providing a C++ wrapper around TimeValueC.h.
This is the class representing a tracked rigid body in the system.
Definition: TrackedBody.h:56
Definition: Quaternion.h:47
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81
void calibrationHandleIMUData(BodyId id, util::time::TimeValue const &tv, Eigen::Quaterniond const &quat)
Called by TrackedBody::incorporateNewMeasurementFromIMU() if room calibration is not complete...
Definition: TrackingSystem.cpp:212