Program Listing for File TrackingReference.h¶
↰ Return to documentation for file (lib/Tracking/TrackingReference.h)
#pragma once
#include "util/settings.h"
#include "util/EigenCoreInclude.h"
#include "boost/thread/mutex.hpp"
#include <boost/thread/shared_mutex.hpp>
#include "DataStructures/Frame.h"
namespace lsd_slam
{
class DepthMapPixelHypothesis;
class KeyFrameGraph;
// TODO. Oh my gawd.
template< int __LEVELS >
class _TrackingRef
{
public:
typedef std::shared_ptr<_TrackingRef> SharedPtr;
_TrackingRef() = delete;
_TrackingRef( const _TrackingRef & ) = delete;
_TrackingRef( const Frame::SharedPtr &frame );
~_TrackingRef();
int frameID() { return ((bool)frame) ? frame->id() : -1; }
Frame::SharedPtr frame;
void makePointCloud(int level);
void clearAll();
Eigen::Vector3f* posData[__LEVELS]; // (x,y,z)
Eigen::Vector2f* gradData[__LEVELS]; // (dx, dy)
Eigen::Vector2f* colorAndVarData[__LEVELS]; // (I, Var)
int* pointPosInXYGrid[__LEVELS]; // x + y*width
int numData[__LEVELS];
private:
int wh_allocated;
std::mutex _accessMutex;
};
typedef _TrackingRef<PYRAMID_LEVELS> TrackingReference;
}
#include "TrackingReference_impl.h"