added functionality to set first frame. used for benchmark node
This commit is contained in:
@@ -34,6 +34,9 @@ public:
|
|||||||
/// Provide an image.
|
/// Provide an image.
|
||||||
void addImage(const cv::Mat& img, double timestamp);
|
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.
|
/// Get the last frame that has been processed.
|
||||||
FramePtr lastFrame() { return last_frame_; }
|
FramePtr lastFrame() { return last_frame_; }
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,15 @@ addImage(const cv::Mat& img, double timestamp)
|
|||||||
finishFrameProcessingCommon(last_frame_->id_, res, last_frame_->nObs());
|
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::
|
FrameHandlerMono::UpdateResult FrameHandlerMono::
|
||||||
processFirstFrame()
|
processFirstFrame()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user