added functionality to set first frame. used for benchmark node

This commit is contained in:
Christian Forster
2014-03-21 20:22:56 +01:00
parent ddc3d6b7e1
commit e9404c4ed8
2 changed files with 12 additions and 0 deletions
+3
View File
@@ -34,6 +34,9 @@ public:
/// Provide an image.
void addImage(const cv::Mat& img, double timestamp);
/// Set the first frame (used for synthetic datasets in benchmark node)
void setFirstFrame(const FramePtr& first_frame);
/// Get the last frame that has been processed.
FramePtr lastFrame() { return last_frame_; }
+9
View File
@@ -74,6 +74,15 @@ addImage(const cv::Mat& img, double timestamp)
finishFrameProcessingCommon(last_frame_->id_, res, last_frame_->nObs());
}
void FrameHandlerMono::
setFirstFrame(const FramePtr& first_frame)
{
resetAll();
last_frame_ = first_frame;
map_.addKeyframe(last_frame_);
stage_ = DEFAULT_FRAME;
}
FrameHandlerMono::UpdateResult FrameHandlerMono::
processFirstFrame()
{