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());
123 TrackedBody &getBody(BodyId i) {
return *m_bodies.at(i.value()); }
124 TrackedBody
const &getBody(BodyId i)
const {
125 return *m_bodies.at(i.value());
127 TrackedBodyTarget *getTarget(BodyTargetId target);
128 TrackedBodyTarget
const *getTarget(BodyTargetId target)
const;
137 bool haveCameraPose()
const;
138 void setCameraPose(Eigen::Isometry3d
const &camPose);
155 Eigen::Quaterniond
const &quat);
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
BodyIndices const & processFrame(util::time::TimeValue const &tv, cv::Mat const &frame, cv::Mat const &frameGray, CameraParameters const &camParams)
Header wrapping include of and for warning quieting.
Header defining specializations of std::hash that forward to the contained integer type...
void setUseIMU(bool useIMU)
ConfigParams const & getParams() const
bool isRoomCalibrationComplete()
IMUInputParams imu
IMU input-related parameters.
LedUpdateCount const & updateLedsFromVideoData(ImageOutputDataPtr &&imageData)
General configuration parameters.
BodyIndices const & updateBodiesFromVideoData(ImageOutputDataPtr &&imageData)
Header providing a C++ wrapper around TimeValueC.h.
Eigen::Isometry3d const & getRoomToCamera() const
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
void calibrationHandleIMUData(BodyId id, util::time::TimeValue const &tv, Eigen::Quaterniond const &quat)
Eigen::Isometry3d const & getCameraPose() const
This gets rTc - the pose of the camera in the room.