Class Frame

Class Documentation

class Frame

Public Types

enum DataFlags

Flags for use with require() and requirePyramid(). See the Frame class documentation for their exact meaning.

Values:

IMAGE = 1 << 0
GRADIENTS = 1 << 1
MAX_GRADIENTS = 1 << 2
IDEPTH = 1 << 3
IDEPTH_VAR = 1 << 4
REF_ID = 1 << 5
ALL = IMAGE | GRADIENTS | MAX_GRADIENTS | IDEPTH | IDEPTH_VAR | REF_ID
typedef std::shared_ptr<Frame> SharedPtr

Public Functions

Frame()
Frame(const Frame&)
Frame(int id, const Camera &cam, const ImageSize &sz, double timestamp, const unsigned char *image)
Frame(int id, const Camera &cam, const ImageSize &sz, double timestamp, const float *image)
~Frame()
void setDepth(const std::shared_ptr<DepthMap> &depthMap)

Sets or updates idepth and idepthVar on level zero. Invalidates higher levels.

void calculateMeanInformation()

Calculates mean information for statistical purposes.

void setDepthFromGroundTruth(const float *depth, float cov_scale = 1.0f)

Sets ground truth depth (real, not inverse!) from a float array on level zero. Invalidates higher levels.

void prepareForStereoWith(const Frame::SharedPtr &other, Sim3 thisToOther, const int level)

Prepares this frame for stereo comparisons with the other frame (computes some intermediate values that will be needed)

int id() const

Returns the unique frame id.

const ImageSize &imgSize(int i = 0) const
int width(int i = 0) const
int height(int i = 0) const
int area(int i = 0) const
const Camera &camera(int level = 0) const
const Eigen::Matrix3f &K(int level = 0) const
const Eigen::Matrix3f &Kinv(int level = 0) const
float fx(int level = 0) const
float fy(int level = 0) const
float cx(int level = 0) const
float cy(int level = 0) const
float fxi(int level = 0) const
float fyi(int level = 0) const
float cxi(int level = 0) const
float cyi(int level = 0) const
double timestamp() const

Returns the frame’s recording timestamp.

float *image(int level = 0)
const Eigen::Vector4f *gradients(int level = 0)
const float *maxGradients(int level = 0)
bool hasIDepthBeenSet() const
const float *idepth(int level = 0)
const float *idepthVar(int level = 0)
const unsigned char *validity_reAct()
const float *idepth_reAct()
const float *idepthVar_reAct()
bool *refPixelWasGood()
bool *refPixelWasGoodNoCreate()
void clear_refPixelWasGood()
boost::shared_lock<boost::shared_mutex> getActiveLock()
Sim3 getCamToWorld()
void setTrackingParent(const std::shared_ptr<KeyFrame> &newParent)
bool hasTrackingParent() const
const std::shared_ptr<KeyFrame> &trackingParent() const
bool isTrackingParent(const std::shared_ptr<Frame> &other) const
cv::Mat getCvImage()
bool isTrackingParent(const std::shared_ptr<KeyFrame> &other) const
bool isTrackingParent(int id) const

Public Members

std::mutex frameMutex
FramePoseStruct::SharedPtr pose
Sim3 lastConstraintTrackedCamToWorld
int referenceID
int referenceLevel
float distSquared
Eigen::Matrix3f K_otherToThis_R
Eigen::Vector3f K_otherToThis_t
Eigen::Vector3f otherToThis_t
Eigen::Vector3f K_thisToOther_t
Eigen::Matrix3f thisToOther_R
Eigen::Vector3f otherToThis_R_row0
Eigen::Vector3f otherToThis_R_row1
Eigen::Vector3f otherToThis_R_row2
Eigen::Vector3f thisToOther_t
float initialTrackedResidual
float meanIdepth
int numPoints
int idxInKeyframes
float edgeErrorSum
float edgesNum
int numMappablePixels
float meanInformation

Friends

friend lsd_slam::Frame::FrameMemory